Packageorg.flintparticles.common.initializers
Classpublic class ScaleImageInit
InheritanceScaleImageInit Inheritance InitializerBase Inheritance Object

The ScaleImageInit Initializer adjusts the size of the particles image.

If you also want to adjust the mass and collision radius of the particle, use the ScaleAllInit initializer.

See also

org.flintparticles.twoD.initializers.ScaleAllInit
org.flintparticles.threeD.initializers.ScaleAllInit


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

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