Iris : object

Main Iris Application

Kind: global namespace

Example

var iris = IRIS || {};

Iris.Canvas : Object

The WebGL Canvas DOM Object.

Kind: static property of [Iris](#Iris)
Access: public
Example

iris.Canvas;

Iris.Frame : Object

The WebGL Frame DOM Object.

Kind: static property of [Iris](#Iris)
Access: public
Example

iris.Frame;

Iris.Layers : Array.<Object>

The array of layers in the Iris scene.

Kind: static property of [Iris](#Iris)
Access: public
Example

iris.Layers;

Iris.Views : Array.<Object>

The array of views in the Iris scene.

Kind: static property of [Iris](#Iris)
Access: public
Example

iris.Views;

Iris.Planes : Object

The collection of planes in the Iris scene.

Kind: static property of [Iris](#Iris)
Access: public
Example

iris.Planes;

Iris.Lights : Array.<Object>

The array of lights in the Iris scene.

Kind: static property of [Iris](#Iris)
Access: public
Example

iris.Lights;

Iris.Scene : Object

Returns the Iris Scene object.

Kind: static property of [Iris](#Iris)
Access: public
Example

iris.Scene();

Iris.Init()

Initializes Iris Web App

Kind: static method of [Iris](#Iris)
Access: public
Example

iris.Init();

Iris.Initialized()

returns true if iris.Init() has run, false if it has not

Kind: static method of [Iris](#Iris)
Access: public
Example

if (!iris.Initialized) {  iris.Init();  iris.PrintVersion();}

Iris.PrintVersion()

Prints the version of the Iris Web App to the console.

Kind: static method of [Iris](#Iris)
Access: public
Example

iris.PrintVersion();

Iris.LayerOn(layer)

Turns Layer On.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
layer string Name of the Layer you want to turn off.

Example

iris.LayerOn(layer);
iris.LayerOn('myLayer');

Iris.LayerOff(layer)

Turns Layer Off.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
layer string Name of the Layer you want to turn off.

Example

iris.LayerOff(layer);
iris.LayerOff('myLayer');

Iris.ViewChange(view)

Change view to a named view.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
view string Name of the View you want to see.

Example

iris.ViewChange(view);
iris.ViewChange('myView');

Iris.SaveView(view)

Save current camera position as a view.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
view string Name of the View you want to save.

Example

iris.SaveView(view);
iris.SaveView('myNewView');

Iris.DeleteView(view)

Delete named view from list of Views.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
view string Name of the View you want to delete.

Example

iris.DeleteView(view);
iris.DeleteView('myView');

Iris.ZoomSelected()

Focuses view on selected object(s).

Kind: static method of [Iris](#Iris)
Access: public
Example

iris.ZoomSelected();

Iris.ZoomExtents()

Focuses view on scene bounds.

Kind: static method of [Iris](#Iris)
Access: public
Example

iris.ZoomExtents();

Iris.CaptureView()

Opens a new browser tab with bitmap of current camera view.

Kind: static method of [Iris](#Iris)
Access: public
Example

iris.CaptureView();

Iris.ToggleFullScreen()

Sets the Iris Canvas to full screen.

Kind: static method of [Iris](#Iris)
Access: public
Example

iris.ToggleFullScreen();

Iris.AnimateViews()

Animates the camera through the saved views.

Kind: static method of [Iris](#Iris)
Access: public
Example

iris.AnimateViews();

Iris.PlaneOn(plane)

Turns on Clipping Plane.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
plane string Name of the Plane you want to activate. Default planes are ‘planeXY’, ‘planeYZ’, and ‘planeXZ’

Example

iris.PlaneOn(plane);
iris.PlaneOn('planeXY');

Iris.PlaneOff(plane)

Turns off Clipping Plane.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
plane string Name of the Plane you want to deactivate. Default planes are ‘planeXY’, ‘planeYZ’, and ‘planeXZ’

Example

iris.PlaneOff(plane);
iris.PlaneOff('planeXY');

Iris.PlaneMove(plane, position)

Moves Clipping Plane.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
plane string Name of the Plane you want to deactivate. Default planes are ‘planeXY’, ‘planeYZ’, and ‘planeXZ’
position number Position of plane. A value from -1 to 1 representing scene bounds.

Example

iris.PlaneMove(plane, position);
iris.PlaneMove('planeXY', 0.5);

Iris.PlaneFlip(plane)

Flips direction Clipping Plane.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
plane string Name of the Plane you want to flip. Default planes are ‘planeXY’, ‘planeYZ’, and ‘planeXZ’

Example

iris.PlaneFlip(plane);
iris.PlaneFlip('planeXY');

Iris.ChangeBackgroundColor(color)

Changes the Iris scene background color.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
color string | number Hexidecimal number or string which represents a color. X11 color names supported if entered with lowercase charachters and no spaces.

Example

iris.ChangeBackgroundColor(color);
iris.ChangeBackgroundColor('rgb(255,0,0)'); //changes background to red
iris.ChangeBackgroundColor('rgb(100%,0,0)'); //changes background to red
iris.ChangeBackgroundColor('hsl(0,100%,20%)');//changes background to dark red
iris.ChangeBackgroundColor('lightsalmon'); //changes the background to Light Salmon X11 color
iris.ChangeBackgroundColor(0xFFFFFF); //changes background to white

Iris.RegisterSelectedCallback(callback)

Registers the callback function to call when an object is selected.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onSelectedCallback(event) {    //prints the selected object to the console  
  console.log(event.detail);
}
iris.RegisterSelectedCallback(onSelectedCallback);

Iris.RegisterLayerAddedCallback(callback)

Registers the callback function to call when a layer is added during scene loading.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onLayerAddedCallback(event) {  //prints the Layer Name to the console.  
  console.log(event.detail.name);  //prints the Layer DivID to the console  console.log(event.detail.divID);
}
iris.RegisterLayerAddedCallback(onLayerAddedCallback);

Iris.RegisterSceneLoadedCallback(callback)

Registers the callback function to call when the scene is loaded.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onLoadedCallback(event) {  //print details of the event to the console.  
  console.log(event.detail);  //remove the event from the Iris Frame DOM Object once the scene is loaded.
  iris.Frame.removeEventListener(event.type, onLoadedCallback);
}
iris.RegisterSceneLoadedCallback(onLoadedCallback);

Iris.RegisterSceneLoadingCallback(callback)

Registers the callback function to call when the scene is loading.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onLoadingCallback(event) {  //print the loading progress to the console.
  console.log(event.detail);
}
iris.RegisterSceneLoadingCallback(onLoadingCallback);

Iris.RegisterLayerOffCallback(callback)

Registers the callback function to call when a layer is turned off as the scene loads.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onLayerOffCallback(event) {  //if layer is turned off, add a graphic element which represents this.
}
iris.RegisterLayerOffCallback(onLayerOffCallback);

Iris.RegisterViewAddedCallback(callback)

Registers the callback function to call when a view is added as the scene is loading, or if a view is added when viewing the scene.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onViewAddedCallback(event) {  //add a button or other graphic element that acts as the reference for this view
}
iris.RegisterViewAddedCallback(onViewAddedCallback);

Iris.RegisterPlaneAddedCallback(callback)

Registers the callback function to call when a plane is added as the scene is loading.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onPlaneAddedCallback(event) {  //add a button or other graphic element that acts as the reference for this plane
}
iris.RegisterPlaneAddedCallback(onPlaneAddedCallback);

Iris.RegisterLightAddedCallback(callback)

Registers the callback function to call when a light is added as the scene is loading.

Kind: static method of [Iris](#Iris)
Access: public

Param Type Description
callback function The callback function,

Example

function onLightAddedCallback(event) {  //add a button or other graphic element that acts as the reference for this light
}
iris.RegisterLightAddedCallback(onLightAddedCallback);