Skip to main content

Function: createSprite()

createSprite(material, renderLayer, width, height): Sprite

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

Creates a sprite using the provided material and render layer.

Parameters

material

Material

The material to use for the sprite.

renderLayer

ForgeRenderLayer

The render layer to which the sprite will be added.

width

number

The width of the sprite.

height

number

The height of the sprite.

Returns

Sprite

The created sprite.