method addDOMObject

bool addDOMObject(string objName,object obj);

Argumente

Zurückgegebener Wert

This method allows the caller to add user defined objects to the DOM. The name provided becomes a property on the box that can be used to reference the object that was added. aObjName must be non-null and non-empty. The object provided must not be null.
var box = scene.getBoxById("testBox");
if (box)
{
    var employee = new employeeObject();
    box.addDOMObject("employee", employee);
    box.employee.firstName = "JOHN";
    box.employee.lastName = "DOE";
}