You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `AnimatedSprite` component renders an animated sprite from a spritesheet. It requires a JSON file (typically generated by a tool like TexturePacker) that defines the frames and animations.
The path to the JSON file that defines the spritesheet data.
21
+
22
+
-`spritesheetImage?: string`
23
+
The path to the image file for the spritesheet.
24
+
25
+
-`width: number`
26
+
The width of the sprite.
27
+
28
+
-`height: number`
29
+
The height of the sprite.
30
+
31
+
-`startingAnimation?: string`
32
+
The name of the animation to play when the sprite is created. (Or "default" to preserve spritesheet data's starting animation but force the `bounce` and `loop` properties)
33
+
34
+
-`disableAntiAliasing?: boolean`
35
+
If `true`, disables anti-aliasing for this sprite. Defaults to `false`.
The engine expects a specific JSON format for the spritesheet data. See the `convertTexturePackerToSpriteSheetData` helper function and the `SpriteSheetData` type in the source code for details.
0 commit comments