GLDraw

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

Source

Methods

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

Create a cone

Parameters:
NameTypeDescription
geoGeometry
fromPoint
toPoint
radiusnumber
colorColor
Source

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

Create a cylinder

Parameters:
NameTypeDefaultDescription
geoGeometry
fromPoint
toPoint
radiusnumber
colorColor
fromCapCAP0

0 for none, 1 for flat, 2 for round

toCapCAP0

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

Source

(static) drawSphere(geo, pos, radius, color, sphereQuality)

Create a sphere.

Parameters:
NameTypeDescription
geoGeometry
posPoint
radiusnumber
colorColor
sphereQualitynumber

Quality of sphere (default 2, higher increases number of triangles)

Source

(static) drawTorus(geo, center, normal, majorRadius, minorRadius, color, majorSegments, minorSegments)

Draw a torus (ring/donut shape) for aromatic ring visualization.

Parameters:
NameTypeDefaultDescription
geoGeometry

Target geometry

centerPoint

Center of the torus

normalPoint

Normal vector to the ring plane

majorRadiusnumber

Radius from center to tube center

minorRadiusnumber

Radius of the tube cross-section

colorColored

Color of the torus

majorSegmentsnumber16

Segments around the ring (default 16)

minorSegmentsnumber4

Segments around the tube (default 4)

Source