Namespace: GLDraw

$3Dmol. GLDraw

Lower level utilities for creating WebGL shape geometries. These are not intended for general consumption.

Methods

<static> drawCone(geo, from, to, radius, color)

Create a cone

Parameters:
Name Type Description
geo geometry
from Point
to Point
radius float
color $3Dmol.Color

<static> drawCylinder(geo, from, to, radius, color, fromCap, toCap)

Create a cylinder

Parameters:
Name Type Description
geo geometry
from Point
to Point
radius float
color $3Dmol.Color
fromCap integer

0 for none, 1 for flat, 2 for round; Note: currently does not support different styles of caps on the same cylinder.

toCap integer

= 0 for none, 1 for flat, 2 for round

<static> drawSphere(geo, pos, radius, color)

Create a sphere.

Parameters:
Name Type Description
geo geometry
pos Point
radius float
color $3Dmol.Color