public class ParticleEmitter extends Object
| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<javafx.scene.effect.BlendMode> |
blendMode |
javafx.beans.property.DoubleProperty |
emissionRate |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
endColor |
javafx.beans.property.ObjectProperty<javafx.animation.Interpolator> |
interpolator |
javafx.beans.property.DoubleProperty |
maxSize |
javafx.beans.property.DoubleProperty |
minSize |
javafx.beans.property.IntegerProperty |
numParticles |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
startColor |
| Constructor and Description |
|---|
ParticleEmitter() |
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.ObjectProperty<javafx.scene.effect.BlendMode> |
blendModeProperty() |
javafx.beans.property.DoubleProperty |
emissionRateProperty() |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
endColorProperty() |
Supplier<javafx.geometry.Point2D> |
getAccelerationFunction() |
javafx.scene.effect.BlendMode |
getBlendMode()
Gets the value of the property blendMode.
|
double |
getEmissionRate() |
javafx.scene.paint.Paint |
getEndColor()
Gets the value of the property endColor.
|
javafx.animation.Interpolator |
getInterpolator()
Gets the value of the property interpolator.
|
int |
getMaxEmissions() |
double |
getMaxSize() |
double |
getMinSize() |
int |
getNumParticles() |
javafx.scene.paint.Paint |
getStartColor()
Gets the value of the property startColor.
|
javafx.beans.property.ObjectProperty<javafx.animation.Interpolator> |
interpolatorProperty() |
boolean |
isFinished() |
javafx.beans.property.DoubleProperty |
maxSizeProperty() |
javafx.beans.property.DoubleProperty |
minSizeProperty() |
javafx.beans.property.IntegerProperty |
numParticlesProperty() |
protected double |
rand()
Returns a value in [0..1).
|
protected double |
rand(double min,
double max)
Returns a value in [min..max).
|
void |
setAccelerationFunction(Supplier<javafx.geometry.Point2D> gravityFunction)
Set gravity function.
|
void |
setBlendMode(javafx.scene.effect.BlendMode blendMode)
Sets the value of the property blendMode.
|
void |
setColor(javafx.scene.paint.Paint color) |
void |
setEmissionRate(double emissionRate)
Set the emission rate.
|
void |
setEndColor(javafx.scene.paint.Paint endColor)
Sets the value of the property endColor.
|
void |
setExpireFunction(TriFunction<Integer,Double,Double,javafx.util.Duration> expireFunction)
Expire function is used to obtain expire time for particles.
|
void |
setInterpolator(javafx.animation.Interpolator interpolator)
Sets the value of the property interpolator.
|
void |
setMaxEmissions(int maxEmissions) |
void |
setMaxSize(double maxSize)
Sets the value of the property maxSize.
|
void |
setMinSize(double minSize)
Sets the value of the property minSize.
|
void |
setNumParticles(int numParticles) |
void |
setScaleFunction(TriFunction<Integer,Double,Double,javafx.geometry.Point2D> scaleFunction)
Scale function defines how the size of particles change over time.
|
void |
setSize(double min,
double max)
Set size to particles.
|
void |
setSourceImage(javafx.scene.image.Image sourceImage)
Set source image for this emitter to produce particles.
|
void |
setSpawnPointFunction(TriFunction<Integer,Double,Double,javafx.geometry.Point2D> spawnPointFunction)
Particles will use the function to obtain spawn points.
|
void |
setStartColor(javafx.scene.paint.Paint startColor)
Sets the value of the property startColor.
|
void |
setVelocityFunction(TriFunction<Integer,Double,Double,javafx.geometry.Point2D> velocityFunction)
Set initial velocity function.
|
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
startColorProperty() |
public javafx.beans.property.IntegerProperty numParticlesProperty
getNumParticles(),
setNumParticles(int)public final javafx.beans.property.DoubleProperty emissionRateProperty
getEmissionRate(),
setEmissionRate(double)public final javafx.beans.property.DoubleProperty minSizeProperty
getMinSize(),
setMinSize(double)public final javafx.beans.property.DoubleProperty maxSizeProperty
getMaxSize(),
setMaxSize(double)public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> startColorProperty
getStartColor(),
setStartColor(Paint)public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> endColorProperty
getEndColor(),
setEndColor(Paint)public final javafx.beans.property.ObjectProperty<javafx.scene.effect.BlendMode> blendModeProperty
getBlendMode(),
setBlendMode(BlendMode)public final javafx.beans.property.ObjectProperty<javafx.animation.Interpolator> interpolatorProperty
getInterpolator(),
setInterpolator(Interpolator)public javafx.beans.property.IntegerProperty numParticlesProperty()
getNumParticles(),
setNumParticles(int)public final int getNumParticles()
public final void setNumParticles(int numParticles)
numParticles - number of particles being spawned per emissionpublic final javafx.beans.property.DoubleProperty emissionRateProperty()
getEmissionRate(),
setEmissionRate(double)public final double getEmissionRate()
public final void setEmissionRate(double emissionRate)
emissionRate - emission ratepublic final int getMaxEmissions()
public final void setMaxEmissions(int maxEmissions)
public boolean isFinished()
public final double getMinSize()
public final javafx.beans.property.DoubleProperty minSizeProperty()
getMinSize(),
setMinSize(double)public final void setMinSize(double minSize)
public final double getMaxSize()
public final javafx.beans.property.DoubleProperty maxSizeProperty()
getMaxSize(),
setMaxSize(double)public final void setMaxSize(double maxSize)
public final void setSize(double min,
double max)
min - minimum sizemax - maximum sizepublic final javafx.scene.paint.Paint getStartColor()
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> startColorProperty()
getStartColor(),
setStartColor(Paint)public final void setStartColor(javafx.scene.paint.Paint startColor)
public final javafx.scene.paint.Paint getEndColor()
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> endColorProperty()
getEndColor(),
setEndColor(Paint)public final void setEndColor(javafx.scene.paint.Paint endColor)
public final void setColor(javafx.scene.paint.Paint color)
public final javafx.scene.effect.BlendMode getBlendMode()
public final javafx.beans.property.ObjectProperty<javafx.scene.effect.BlendMode> blendModeProperty()
getBlendMode(),
setBlendMode(BlendMode)public final void setBlendMode(javafx.scene.effect.BlendMode blendMode)
public final javafx.animation.Interpolator getInterpolator()
public final javafx.beans.property.ObjectProperty<javafx.animation.Interpolator> interpolatorProperty()
getInterpolator(),
setInterpolator(Interpolator)public final void setInterpolator(javafx.animation.Interpolator interpolator)
public final Supplier<javafx.geometry.Point2D> getAccelerationFunction()
public final void setAccelerationFunction(Supplier<javafx.geometry.Point2D> gravityFunction)
gravityFunction - gravity vector supplier functionpublic final void setVelocityFunction(TriFunction<Integer,Double,Double,javafx.geometry.Point2D> velocityFunction)
velocityFunction - the velocity functionpublic final void setSpawnPointFunction(TriFunction<Integer,Double,Double,javafx.geometry.Point2D> spawnPointFunction)
spawnPointFunction - supplier of spawn pointspublic final void setScaleFunction(TriFunction<Integer,Double,Double,javafx.geometry.Point2D> scaleFunction)
scaleFunction - scaling functionpublic final void setExpireFunction(TriFunction<Integer,Double,Double,javafx.util.Duration> expireFunction)
expireFunction - function to supply expire timepublic void setSourceImage(javafx.scene.image.Image sourceImage)
sourceImage - the imageprotected final double rand()
protected final double rand(double min,
double max)
min - min boundsmax - max boundsCopyright © 2017. All rights reserved.