Packageorg.flintparticles.twoD.initializers
Classpublic class ScaleAllInit
InheritanceScaleAllInit Inheritance InitializerBase Inheritance Object

The ScaleAllInit Initializer sets the size of the particles image and adjusts its mass and collision radius accordingly.

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

org.flintparticles.common.initializers.ScaleImageInit


Public Properties
 PropertyDefined 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
 Inheritedpriority : int
Returns a default priority of 0 for this action.
InitializerBase
  scale : Number
When reading, returns the average of minScale and maxScale.
ScaleAllInit
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
InitializerBase
Public Methods
 MethodDefined By
  
ScaleAllInit(minScale:Number = 1, maxScale:Number)
The constructor creates a ScaleAllInit initializer for use by an emitter.
ScaleAllInit
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
ScaleAllInit
 Inherited
This method does nothing.
InitializerBase
Property Detail
maxScaleproperty
maxScale:Number

The maximum scale value for particles initialised by this initializer. Should be between 0 and 1.


Implementation
    public function get maxScale():Number
    public function set maxScale(value:Number):void
minScaleproperty 
minScale:Number

The minimum scale value for particles initialised by this initializer. Should be between 0 and 1.


Implementation
    public function get minScale():Number
    public function set minScale(value:Number):void
scaleproperty 
scale:Number

When reading, returns the average of minScale and maxScale. When writing this sets both maxScale and minScale to the same scale value.


Implementation
    public function get scale():Number
    public function set scale(value:Number):void
Constructor Detail
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.

Parameters
minScale: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

Method Detail
initialize()method
override public function initialize(emitter:Emitter, particle:Particle):void

This method does nothing. All derived classes override this method to initialize each particle created by the emitter.

Parameters

emitter:Emitter
 
particle:Particle