| Package | org.flintparticles.common.initializers |
| Class | public class ScaleImageInit |
| Inheritance | ScaleImageInit InitializerBase Object |
If you also want to adjust the mass and collision radius of the particle, use the ScaleAllInit initializer.
See also
| Property | Defined By | ||
|---|---|---|---|
| maxScale : Number
The maximum scale value for particles initialised by
this initializer. | ScaleImageInit | ||
| minScale : Number
The minimum scale value for particles initialised by
this initializer. | ScaleImageInit | ||
![]() | priority : int
Returns a default priority of 0 for this action. | InitializerBase | |
| scale : Number
When reading, returns the average of minScale and maxScale. | ScaleImageInit | ||
| Method | Defined By | ||
|---|---|---|---|
ScaleImageInit(minScale:Number = 1, maxScale:Number)
The constructor creates a ScaleImageInit initializer for use by
an emitter. | ScaleImageInit | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
[override]
This method does nothing. | ScaleImageInit | ||
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
| maxScale | property |
maxScale:NumberThe maximum scale value for particles initialised by this initializer. Should be between 0 and 1.
public function get maxScale():Number public function set maxScale(value:Number):void| minScale | property |
minScale:NumberThe minimum scale value for particles initialised by this initializer. Should be between 0 and 1.
public function get minScale():Number public function set minScale(value:Number):void| scale | property |
scale:NumberWhen reading, returns the average of minScale and maxScale. When writing this sets both maxScale and minScale to the same scale value.
public function get scale():Number public function set scale(value:Number):void| ScaleImageInit | () | Constructor |
public function ScaleImageInit(minScale:Number = 1, maxScale:Number)The constructor creates a ScaleImageInit initializer for use by an emitter. To add a ScaleImageInit to all particles created by an emitter, use the emitter's addInitializer method.
The scale factor of particles initialized by this class will be a random value between the minimum and maximum values set. If no maximum value is set, the minimum value is used with no variation.
ParametersminScale:Number (default = 1) — the minimum scale factor for particles
initialized by the instance.
| |
maxScale:Number (default = NaN) — the maximum scale factor for particles
initialized by the instance.
|
See also
| initialize | () | method |
override public function initialize(emitter:Emitter, particle:Particle):voidThis method does nothing. All derived classes override this method to initialize each particle created by the emitter.
Parameters
emitter:Emitter | |
particle:Particle |