Skip to main content

Interface: SpriteRequiredOptions

Defined in: rendering/components/sprite-component.ts:12

Fields of SpriteEcsComponent with no sensible default; callers must always provide these.

Extended by​

Properties​

height​

height: number

Defined in: rendering/components/sprite-component.ts:23

The sprite's height in world units. Scales the unit quad vertically before it's rotated and translated to the entity's world position.


renderable​

renderable: Renderable

Defined in: rendering/components/sprite-component.ts:32

The geometry, material, and instancing configuration used to draw this sprite. Sprites sharing the same Renderable are batched into a single instanced draw call, and renderable.category is matched against each camera's culling mask to decide whether the camera draws this sprite at all.


width​

width: number

Defined in: rendering/components/sprite-component.ts:17

The sprite's width in world units. Scales the unit quad horizontally before it's rotated and translated to the entity's world position.