Packageorg.flintparticles.threeD.initializers
Classpublic class ScaleAllsInit
InheritanceScaleAllsInit Inheritance InitializerBase Inheritance Object

The ScaleAllsInit initializer sets the scale of the particles image and adjusts its mass and collision radius accordingly. It selects one of multiple scales, using optional weighting values to produce an uneven distribution for the scales.

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.ScaleImagesInit


Public Properties
 PropertyDefined By
 Inheritedpriority : int
Returns a default priority of 0 for this action.
InitializerBase
  scales : Array
[write-only]
ScaleAllsInit
  weights : Array
[write-only]
ScaleAllsInit
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
InitializerBase
Public Methods
 MethodDefined By
  
ScaleAllsInit(scales:Array = null, weights:Array = null)
The constructor creates a ScaleAllsInit initializer for use by an emitter.
ScaleAllsInit
  
addedToEmitter(emitter:Emitter):void
[override]
ScaleAllsInit
  
addScale(scale:Number, weight:Number = 1):void
ScaleAllsInit
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
ScaleAllsInit
 Inherited
This method does nothing.
InitializerBase
  
removeScale(scale:Number):void
ScaleAllsInit
Property Detail
scalesproperty
scales:Array  [write-only]


Implementation
    public function set scales(value:Array):void
weightsproperty 
weights:Array  [write-only]


Implementation
    public function set weights(value:Array):void
Constructor Detail
ScaleAllsInit()Constructor
public function ScaleAllsInit(scales:Array = null, weights:Array = null)

The constructor creates a ScaleAllsInit initializer for use by an emitter. To add a ScaleAllsInit to all particles created by an emitter, use the emitter's addInitializer method.

Parameters
scales:Array (default = null) — An array containing the scales to use for each particle created by the emitter.
 
weights:Array (default = null) — The weighting to apply to each scale. If no weighting values are passed, the scales are all assigned a weighting of 1.

See also

Method Detail
addedToEmitter()method
override public function addedToEmitter(emitter:Emitter):void

Parameters

emitter:Emitter

addScale()method 
public function addScale(scale:Number, weight:Number = 1):void

Parameters

scale:Number
 
weight:Number (default = 1)

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

removeScale()method 
public function removeScale(scale:Number):void

Parameters

scale:Number