Skip to main content

Function: createImageSprite()

createImageSprite(image, renderLayer, shaderStore, cameraEntity): Sprite

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

Creates a sprite using the provided image and render layer.

Parameters

image

HTMLImageElement

The image to use for the sprite.

renderLayer

ForgeRenderLayer

The render layer to which the sprite will be added.

shaderStore

ShaderStore

The shader store to use for the sprite's material.

cameraEntity

Entity

Returns

Sprite

The created sprite.