Skip to main content

Function: createImageSprite()

createImageSprite(image, renderContext, options?): SpriteEcsComponent

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

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.

options?​

CreateImageSpriteOptions = {}

Optional parameters for creating the sprite.

Returns​

SpriteEcsComponent

The created sprite.