stage object the component belongs to
Component type
Add a new representation to the component
the name of the representation
the object on which the representation should be based
the created representation wrapped into a representation element object
Add an anotation object
the 3d position
the HTML content
the added annotation object
Add a new shape representation to the component
the name of the representation, one of: buffer.
representation parameters
the created representation wrapped into a representation component object
Automatically center and zoom the component
Iterator over each annotation and executing the callback
function to execute
Iterator over each representation and executing the callback
function to execute
the component's bounding box
the component's center position
Remove all annotations from the component
Removes all representation components
Remove the give annotation from the component
the annotation to remove
Removes a representation component
the representation element
Set position transform
the coordinates
this object
Set local rotation transform (for global rotation use setTransform)
the rotation
this object
Set scale transform
the scale
this object
Set general transform. Is applied before and in addition to the position, rotation and scale transformations
the matrix
this object
Set the visibility of the component, including added representations
visibility flag
this object
Propogates our matrix to each representation
Events emitted by the component
Generated using TypeDoc
Component wrapping a Shape object
// get a shape component by adding a shape object to the stage var shape = new NGL.Shape( "shape" ); shape.addSphere( [ 0, 0, 0 ], [ 1, 0, 0 ], 1.5 ); var shapeComponent = stage.addComponentFromObject( shape ); shapeComponent.addRepresentation( "buffer" );