Skip to main content
Version: 0.10.0

UeSprite

A UeSprite is a lightweight 2D object rendered as a billboard that always faces the camera.
Useful for UI-like elements, particles, and icon markers in 3D space.

Inherits from UeMesh and uses a flat plane geometry (PlaneGeometry) and typically a UeSpriteMaterial.


Constructor

new UeSprite(material = new UeSpriteMaterial(), data = {})

Inherits from UeMesh

Data parameters

NameTypeDefaultDescription
materialUeSpriteMaterialnew UeSpriteMaterial()Material used for rendering the sprite
dataobject{}Inherited properties from UeMesh
data.lockHorizontalbooleanfalseLocks horizontal orientation. Can only lock one axis at a time.
data.lockVerticalbooleanfalseLocks vertical orientation. Can only lock one axis at a time.

Properties

PropertyTypeDefaultDescription
isSpritebooleantrueIdentifies this object as a sprite
typestringSpriteObject type
namestringundefinedObject name (optional)
geometryPlaneGeometryPlaneGeometry(1, 1)A flat quad geometry
materialUeSpriteMaterialnew UeSpriteMaterial()Material used for rendering the sprite
lockHorizontalbooleanfalseIf true, locks horizontal axis
lockVerticalbooleanfalseIf true, locks vertical axis

Geometry

The geometry is always a PlaneGeometry(1, 1) centered on the origin.

This can be scaled via .scale or transformed like any UeObject3D.

📝 Notes

Sprites are ideal for simple transparent objects.

Custom shaders can be assigned to UeSpriteMaterial to extend behavior.

Can be used in particle systems or UI overlays.

Example

const sprite = new UeSprite();
sprite.setPosition(0, 0, 10);
scene.add(sprite);