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:
| Name | Type | Description |
|---|---|---|
geo | Geometry | |
from | Point | |
to | Point | |
radius | number | |
color | Color |
- Source
(static) drawCylinder(geo, from, to, radius, color, fromCap, toCap)
Create a cylinder
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
geo | Geometry | ||
from | Point | ||
to | Point | ||
radius | number | ||
color | Color | ||
fromCap | CAP | 0 | 0 for none, 1 for flat, 2 for round |
toCap | CAP | 0 | = 0 for none, 1 for flat, 2 for round |
- Source
(static) drawSphere(geo, pos, radius, color, sphereQuality)
Create a sphere.
Parameters:
| Name | Type | Description |
|---|---|---|
geo | Geometry | |
pos | Point | |
radius | number | |
color | Color | |
sphereQuality | number | 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:
| Name | Type | Default | Description |
|---|---|---|---|
geo | Geometry | Target geometry | |
center | Point | Center of the torus | |
normal | Point | Normal vector to the ring plane | |
majorRadius | number | Radius from center to tube center | |
minorRadius | number | Radius of the tube cross-section | |
color | Colored | Color of the torus | |
majorSegments | number | 16 | Segments around the ring (default 16) |
minorSegments | number | 4 | Segments around the tube (default 4) |
- Source