Skip to content

Objects

Josh Stovall edited this page Dec 19, 2020 · 1 revision

Objects

Functions

show/hide object

// create a box
var object = new XR.Box();

// show the box
object.show();

// hide the box
object.hide();

Display

show() show the object

object.show();

hide() hide the object

object.hide();

Color

color() set the object color

object.color('red');

getColor() get the object color

object.getColor();
// {r: 1, g: 0, b: 0}

Position

position() set object position

object.position([0,4,0]);

getPosition() get object position

object.getPosition();
// {x: 0, y: 4, z: 0}
Clone this wiki locally