Skip to main content

Function: createImageSprite()

createImageSprite(image, renderContext, layer, options?): SpriteEcsComponent

Defined in: rendering/utilities/create-image-sprite.ts:94

Creates a sprite using the provided image and render layer.

Parameters

image

HTMLImageElement

The image to use for the sprite.

renderContext

RenderContext

The render context to be used.

layer

number

The render layer for the sprite.

options?

CreateImageSpriteOptions = {}

Optional parameters for creating the sprite.

Returns

SpriteEcsComponent

The created sprite.