Skip to main content

Function: createSprite()

createSprite(material, renderContext, cameraEntity, width, height): Sprite

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

Creates a sprite using the provided material and render context.

Parameters

material

Material

The material to use for the sprite.

renderContext

RenderContext

The render context to be used.

cameraEntity

Entity

The camera entity for the renderable.

width

number

The width of the sprite.

height

number

The height of the sprite.

Returns

Sprite

The created sprite.