SgBillboard¶
Displays a 2D image or quad that always faces the camera, regardless of scene orientation. Commonly used for sprites, icons, particles, or simple UI elements placed in 3D space. Can be useful for optimizing visuals that don’t need full 3D geometry.
Inherits from¶
Usage¶
To use this class, add the following require at the top of your script:
local SgBillboard = require 'engine/sceneobjects/sgbillboard'
Reference¶
- class SgBillboard¶
- module:
- create(options, parent)¶
Create a new billboard object in the scenegraph.
- Parameters:
options (
table
) – A table of options to fill the parametersparent (
SceneObject
) – The parent scene object to add this to
- Returns:
a promise which will resolve to the created object
- Return type:
Promise