| Package | org.flintparticles.twoD.initializers |
| Class | public class ScaleAllInit |
| Inheritance | ScaleAllInit InitializerBase Object |
If you want to adjust only the image size use the ScaleImageInit initializer.
This initializer has a priority of -10 to ensure it occurs after mass and radius assignment classes like CollisionRadiusInit and MassInit.
See also
| Property | Defined By | ||
|---|---|---|---|
| maxScale : Number
The maximum scale value for particles initialised by
this initializer. | ScaleAllInit | ||
| minScale : Number
The minimum scale value for particles initialised by
this initializer. | ScaleAllInit | ||
![]() | priority : int
Returns a default priority of 0 for this action. | InitializerBase | |
| scale : Number
When reading, returns the average of minScale and maxScale. | ScaleAllInit | ||
| Method | Defined By | ||
|---|---|---|---|
ScaleAllInit(minScale:Number = 1, maxScale:Number)
The constructor creates a ScaleAllInit initializer for use by
an emitter. | ScaleAllInit | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
[override]
This method does nothing. | ScaleAllInit | ||
![]() | 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| ScaleAllInit | () | Constructor |
public function ScaleAllInit(minScale:Number = 1, maxScale:Number)The constructor creates a ScaleAllInit initializer for use by an emitter. To add a ScaleAllInit 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 |