new Frame(index, x, y, width, height, name, uuid)
A Frame is a single frame of an animation and is part of a FrameData collection.
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | The index of this Frame within the FrameData set it is being added to. |
x |
number | X position of the frame within the texture image. |
y |
number | Y position of the frame within the texture image. |
width |
number | Width of the frame within the texture image. |
height |
number | Height of the frame within the texture image. |
name |
string | The name of the frame. In Texture Atlas data this is usually set to the filename. |
uuid |
string | Internal UUID key. |
- Source:
- animation/Frame.js, line 21
Members
-
centerX
-
- Source:
- animation/Frame.js, line 61
Properties:
Name Type Description centerXnumber Center X position within the image to cut from. -
centerY
-
- Source:
- animation/Frame.js, line 66
Properties:
Name Type Description centerYnumber Center Y position within the image to cut from. -
distance
-
- Source:
- animation/Frame.js, line 71
Properties:
Name Type Description distancenumber The distance from the top left to the bottom-right of this Frame. -
height
-
- Source:
- animation/Frame.js, line 46
Properties:
Name Type Description heightnumber Height of the frame. -
index
-
- Source:
- animation/Frame.js, line 26
Properties:
Name Type Description indexnumber The index of this Frame within the FrameData set it is being added to. -
name
-
- Source:
- animation/Frame.js, line 51
Properties:
Name Type Description namestring Useful for Texture Atlas files (is set to the filename value). -
rotated
-
- Default Value:
- false
- Source:
- animation/Frame.js, line 77
Properties:
Name Type Description rotatedbool Rotated? (not yet implemented) -
rotationDirection
-
- Default Value:
- 'cw'
- Source:
- animation/Frame.js, line 83
Properties:
Name Type Description rotationDirectionstring Either 'cw' or 'ccw', rotation is always 90 degrees. -
sourceSizeH
-
- Source:
- animation/Frame.js, line 99
Properties:
Name Type Description sourceSizeHnumber Height of the original sprite. -
sourceSizeW
-
- Source:
- animation/Frame.js, line 94
Properties:
Name Type Description sourceSizeWnumber Width of the original sprite. -
spriteSourceSizeH
-
- Default Value:
- 0
- Source:
- animation/Frame.js, line 123
Properties:
Name Type Description spriteSourceSizeHnumber Height of the trimmed sprite. -
spriteSourceSizeW
-
- Default Value:
- 0
- Source:
- animation/Frame.js, line 117
Properties:
Name Type Description spriteSourceSizeWnumber Width of the trimmed sprite. -
spriteSourceSizeX
-
- Default Value:
- 0
- Source:
- animation/Frame.js, line 105
Properties:
Name Type Description spriteSourceSizeXnumber X position of the trimmed sprite inside original sprite. -
spriteSourceSizeY
-
- Default Value:
- 0
- Source:
- animation/Frame.js, line 111
Properties:
Name Type Description spriteSourceSizeYnumber Y position of the trimmed sprite inside original sprite. -
trimmed
-
- Default Value:
- false
- Source:
- animation/Frame.js, line 89
Properties:
Name Type Description trimmedbool Was it trimmed when packed? -
uuid
-
- Source:
- animation/Frame.js, line 56
Properties:
Name Type Description uuidstring A link to the PIXI.TextureCache entry. -
width
-
- Source:
- animation/Frame.js, line 41
Properties:
Name Type Description widthnumber Width of the frame. -
x
-
- Source:
- animation/Frame.js, line 31
Properties:
Name Type Description xnumber X position within the image to cut from. -
y
-
- Source:
- animation/Frame.js, line 36
Properties:
Name Type Description ynumber Y position within the image to cut from.