ProjectManager/Light

Light Scenegraph Component
Parameters:
Name Type Description
opt object

Members

color :Array

Color
Type:
  • Array
Example
const light = Module.ProjectManager.getObject("123456789"); // key
light.color = [255,255,255];

intensity :Number

Intensity
Type:
  • Number
Example
const light = Module.ProjectManager.getObject("123456789"); // key
light.intensity = 10;

position :Array

Position
Type:
  • Array
Example
const light = Module.ProjectManager.getObject("123456789"); // key
light.position = [2,4,1];

visible :boolean

Visiblity
Type:
  • boolean
Example
const light = Module.ProjectManager.getObject("123456789"); // key
light.visible = true;

Methods

(inner) addChangeListener(callback)

Add change listener
Example
const handler = (type)=> {
 console.log(type)
}
const light = Module.ProjectManager.getObject("123456789"); // key
light.addChangeListener(handler);
Parameters:
Name Type Description
callback Object callback method

(inner) clearChangeHandlers()

Clear change listeners
Example
const light = Module.ProjectManager.getObject("123456789"); // key
light.clearChangeHandlers();

(inner) remove()

Remove light
Example
// remove light
const light = Module.ProjectManager.getObject("123456789"); // key
light.remove();

(inner) removeChangeListener(callback)

Remove change listener
Example
const handler = (type)=> {
 console.log(type)
}
const light = Module.ProjectManager.getObject("123456789"); // key
light.removeChangeListener(handler);
Parameters:
Name Type Description
callback Object callback method used in add