Skip to content

@emile/engine


@emile/engine / rendering/renderer / SpriteCreator

Interface: SpriteCreator

Defined in: src/rendering/renderer.ts:124

A sprite creator.

Sprite creators are used to create, update and delete sprites in the renderer.

If the sprite creator update method returns a ContainerChild, delete will be called and the returned ContainerChild will replace the old one.

Warning

Your create and delete methods are responsible for adding/removing the sprite from the world container. The renderer will not do this for you.

Properties

create?

readonly optional create: SpriteCreatorCreate

Defined in: src/rendering/renderer.ts:143

Creates a sprite in the renderer.

Param

The registry of the renderer

Param

The pixi app of the renderer

Param

The entity to create the sprite for

Returns

The created sprite


delete?

readonly optional delete: SpriteCreatorDelete

Defined in: src/rendering/renderer.ts:165

Deletes a sprite from the renderer.

Param

The registry of the renderer

Param

The pixi app of the renderer

Param

The entity to delete the sprite for

Param

The sprite to delete


query?

readonly optional query: EntityQuery

Defined in: src/rendering/renderer.ts:132

The query to match entities against.

The create, update and delete methods will only be called for entities that match this query.

If not set, the create, update and delete methods will be called for all entities.


update?

readonly optional update: SpriteCreatorUpdate

Defined in: src/rendering/renderer.ts:156

Updates a sprite in the renderer.

Param

The registry of the renderer

Param

The pixi app of the renderer

Param

The entity to update the sprite for

Param

The sprite to update

Param

The delta time since the last engine update

Returns

The new created sprite