BodySprite
Extends:
Sets the body property to be a THREE.Sprite on initialized particles.
NOTE The texture map MUST be set on the SpriteMaterial in the TextureLoader.load callback. Not doing so will cause WebGL buffer errors.
Static Method Summary
Static Public Methods | ||
public static |
fromJSON(json: object, THREE: object): BodySprite Creates a BodySprite initializer from JSON. |
Constructor Summary
Public Constructor | ||
public |
constructor(THREE: object, texture: string, materialProperties: object): * Constructs a BodySprite initializer. |
Member Summary
Public Members | ||
public |
material: SpriteMaterial THREE.SpriteMaterial instance. |
|
public |
The material properties for this object's SpriteMaterial NOTE This is required for testing purposes |
|
public |
sprite: Sprite THREE.Sprite instance. |
|
public |
The texture for the THREE.SpriteMaterial map. |
Method Summary
Public Methods | ||
public |
initialize(particle: Particle): * Sets the particle body to the sprite. |
Inherited Summary
From class Initializer | ||
public static abstract |
Returns a new instance of the initializer from the JSON object passed. |
|
public static |
Determines if the initializer requires a Web GL API to be provided to its constructor. |
|
public |
isEnabled: * |
|
public |
type: * |
|
public |
Initializes the property on the emitter or particle. |
|
public abstract |
initialize(target: object) Place custom property initialization code in this method in the subclass. |
|
public abstract |
reset() |
Static Public Methods
public static fromJSON(json: object, THREE: object): BodySprite source
Creates a BodySprite initializer from JSON.
Override:
Initializer#fromJSONPublic Constructors
public constructor(THREE: object, texture: string, materialProperties: object): * source
Constructs a BodySprite initializer.
Override:
Initializer#constructorReturn:
* | void |
Throw:
If the TextureLoader fails to load the supplied texture |
Public Members
Public Methods
public initialize(particle: Particle): * source
Sets the particle body to the sprite.
Override:
Initializer#initializeParams:
Name | Type | Attribute | Description |
particle | Particle | The particle to set the body of |
Return:
* | void |