Sprite is the normal textured drawable.
- render a
TextureorRenderTexture - apply transform/origin/tint state
- use
textureFramefor sub-rect rendering - participate in the normal scene graph through
Container
texturetextureFramewidthheight- inherited transform/tint/visibility state
Use it through the normal scene flow:
sprite.render(renderBackend)or place it in a container and render the container.
- WebGPU supports the normal built-in sprite path
Text,Video, andRenderTexturedisplay all ride on the sprite path- batching is internal and not part of the public API contract
For clip playback, use AnimatedSprite:
import { AnimatedSprite } from 'exojs';
animatedSprite.play('walk');
animatedSprite.pause();
animatedSprite.resume();
animatedSprite.stop();AnimatedSprite supports:
- named clips
- loop / non-loop playback
onFrameandonCompletesignalsAnimatedSprite.fromSpritesheet(...)from spritesheet animation metadata
Use sortable containers for deterministic draw order:
container.sortableChildren = true;
sprite.zIndex = 10;When sorting is disabled, insertion order remains the default behavior.