Scene class implements properties and methods to access the objects in a scene.
var Scene = require('Scene');
This class exposes no properties.
Returns a child object by name. An exception is thrown if the object isn't found.
Returns a descendant object by name. An exception is thrown if the object isn't found or if more than one is found.
Note: object D is considered to be a descendant of object P if either D is a child of P or if such an object C which is a child of P exists that D is a descendant of C.
The following example demonstrates how to retrieve named elements from a
const Scene = require('Scene'); // This example assumes the following scene tree in AR Studio: // // - Device (Default) // - Camera (Default) // - Focal Distance (Default) // - plane3D (3D Plane) // - planeText (2D Text) // A common practice is to parent most scene objects to the Focal Distance. const fd = Scene.root.child('Device').child('Camera').child('Focal Distance'); // 3D objects are addressed using the child() method: var plane = fd.child('plane3D') // 2D objects are addressed using the planarChild() method: var text = plane.planarChild('planeText2D');