name
parameter object
Add an arrow
from position vector or array
to position vector or array
color object or array
radius value
this object
Add a box
position vector or array
color object or array
size value
height axis vector or array
depth axis vector or array
this object
Add a buffer
buffer object
this object
Add a cone
from position vector or array
to position vector or array
color object or array
radius value
this object
Add a cylinder
from position vector or array
to position vector or array
color object or array
radius value
this object
Add an ellipsoid
position vector or array
color object or array
radius value
major axis vector or array
minor axis vector or array
this object
Deprecated, use .addText
Add a mesh
positions
colors
this object
Add an octahedron
position vector or array
color object or array
size value
height axis vector or array
depth axis vector or array
this object
Add point
position vector or array
color object or array
this object
Add a sphere
position vector or array
color object or array
radius value
this object
Add a tetrahedron
position vector or array
color object or array
size value
height axis vector or array
depth axis vector or array
this object
Add text
position vector or array
color object or array
size value
text value
this object
Add a torus
position vector or array
color object or array
radius value
major axis vector or array
minor axis vector or array
this object
Add a wideline
from position vector or array
to position vector or array
color object or array
this object
Generated using TypeDoc
Class for building custom shapes.
var shape = new NGL.Shape('shape', { disableImpostor: true }); shape.addSphere([ 0, 0, 9 ], [ 1, 0, 0 ], 1.5 ); shape.addEllipsoid([ 6, 0, 0 ], [ 1, 0, 0 ], 1.5, [ 3, 0, 0 ], [ 0, 2, 0 ]); shape.addCylinder([ 0, 2, 7 ], [ 0, 0, 9 ], [ 1, 1, 0 ], 0.5); shape.addCone([ 0, 2, 7 ], [ 0, 3, 3 ], [ 1, 1, 0 ], 1.5); shape.addArrow([ 1, 2, 7 ], [ 30, 3, 3 ], [ 1, 0, 1 ], 1.0); shape.addBox([ 0, 3, 0 ], [ 1, 0, 1 ], 2, [ 0, 1, 1 ], [ 1, 0, 1 ]); var shapeComp = stage.addComponentFromObject(shape); geoComp.addRepresentation('buffer');