Constructor
new Sprite(device, options)
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
device |
pc.GraphicsDevice | The graphics device of the application. | ||||||||||||||||
options |
Object | Options for creating the pc.Sprite.
Properties
|
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
options.frameKeys |
Array.<String> |
<optional> |
The keys of the frames in the sprite atlas that this sprite is using. |
pixelsPerUnit |
Number | The number of pixels that map to one PlayCanvas unit. | |
atlas |
pc.TextureAtlas | The texture atlas. | |
renderMode |
pc.SPRITE_RENDERMODE | The rendering mode of the Sprite. | |
frameKeys |
Array.<String> | The keys of the frames in the sprite atlas that this sprite is using. | |
meshes |
Array.<pc.Mesh> | An array that contains a mesh for each frame. |
- Source:
Methods
destroy()
Free up the meshes created by the sprite.
- Source: