Fields Class
Fields class represents force field, which affects velocity of particles. An instance of this class is set to Emitter.process method.
Methods
init
() protected
Init instance. The init method sets all needed fields properties acording to developer requirements or to default values. This method is called when field object is constructed.
moveTo
(
point
Move field onto a new positoin.
Parameters:
-
point
VectorX and y coordinates of new field position
Properties
mass
Integer
The mass of the field. Default is set to 100.
Example:
new Field ({
position : new Vector({x:System.width/2, y:System.height/2}),
mass : 250
})
position
Vector
Location of the field center in pixels.
Example:
new Field ({
position : new Vector({x:System.width/2, y:System.height/2}),
mass : 250
})