SgScene

The root node or container for all scene objects. Manages object hierarchy, updates, and global systems like lighting or audio. Typically created and loaded by the engine to represent a level or game world.

Inherits from

Usage

To use this class, add the following require at the top of your script:

local SgScene = require 'engine/sceneobjects/sgscene'

Reference

class SgScene
module:
create(options, parent)

Create a new scene object in the scenegraph.

Parameters:
  • options (table) – A table of options to fill the parameters

  • parent (SceneObject) – The parent scene object to add this to

Returns:

a promise which will resolve to the created object

Return type:

Promise

Examples