Constructor
new Shape(parent)
Parameters:
- Source:
Extends
Classes
- Shape
Members
dv :number
Nominal step-count for parametric curves and surfaces.
Type:
- Overrides:
- Source:
Methods
color(color) → {this}
Parameters:
Name |
Type |
Description |
color |
string
|
|
- Overrides:
- Source:
Returns:
-
Type
-
this
curve(f, u) → {Array.<Geometry>}
Draw a parametric curve.
Parameters:
Name |
Type |
Description |
f |
function
|
parametric function |
u |
Array.<number>
|
parametric coordinate range |
- Source:
Returns:
-
Type
-
Array.<Geometry>
dupe() → {this}
Get a new duplicate transformed Coords object.
- Overrides:
- Source:
Returns:
-
Type
-
this
grey(valueopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
value |
number
|
<optional>
|
0
|
grey value (0-100) |
- Overrides:
- Source:
Returns:
-
Type
-
this
hue(hueopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
hue |
number
|
<optional>
|
0
|
hue as degrees on a color wheel (0-360) |
- Overrides:
- Source:
Returns:
-
Type
-
this
lightness(lightnessopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
lightness |
number
|
<optional>
|
0
|
lightness percentage |
- Overrides:
- Source:
Returns:
-
Type
-
this
opacity(opacity) → {this}
Parameters:
Name |
Type |
Description |
opacity |
number
|
|
- Overrides:
- Source:
Returns:
-
Type
-
this
orient(v) → {Array.<number>}
Apply current un-translated coordinate transform to vector v.
Parameters:
Name |
Type |
Description |
v |
Array.<number>
|
|
- Overrides:
- Source:
Returns:
-
Type
-
Array.<number>
quaternion(q) → {this}
Rotate by a quaternion
Parameters:
Name |
Type |
Description |
q |
Array.<number>
|
a quaternion |
- Overrides:
- Source:
Returns:
-
Type
-
this
- Overrides:
- Source:
Returns:
-
Type
-
this
rotate(angleopt, axisopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
angle |
number
|
<optional>
|
0
|
|
axis |
number
|
Array.<number>
|
<optional>
|
0
|
either an axis index (0, 1, 2) or an axis vector |
- Overrides:
- Source:
Returns:
-
Type
-
this
rotateTo(srcAxis, dstAxis)
Rotate so that srcAxis goes into dstAxis.
Parameters:
Name |
Type |
Description |
srcAxis |
Array.<number>
|
|
dstAxis |
Array.<number>
|
|
- Overrides:
- Source:
saturation(saturationopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
saturation |
number
|
<optional>
|
0
|
saturation percentage |
- Overrides:
- Source:
Returns:
-
Type
-
this
scale(sopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
s |
number
|
<optional>
|
1
|
|
- Overrides:
- Source:
Returns:
-
Type
-
this
setOptions(options) → {this}
Parameters:
- Overrides:
- Source:
Returns:
-
Type
-
this
setSubOptions(options) → {this}
Should only be given settings for object-valued options.
Parameters:
- Overrides:
- Source:
Returns:
-
Type
-
this
stretch(xopt, yopt, zopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
x |
number
|
<optional>
|
1
|
|
y |
number
|
<optional>
|
1
|
|
z |
number
|
<optional>
|
1
|
|
- Overrides:
- Source:
Returns:
-
Type
-
this
style(style) → {this}
Set the drawing style of the surface() method.
Allows for easy dynamic switching between solid and wireframe views.
Parameters:
Name |
Type |
Description |
style |
string
|
either 'surface' or 'wireframe'. |
- Source:
Returns:
-
Type
-
this
surface(f, u, v) → {Array.<Geometry>}
Draw a parametric surface (or a wireframe representation, if our style has been set to "wireframe").
Parameters:
Name |
Type |
Description |
f |
function
|
parametric function |
u |
Array.<number>
|
first parametric coordinate range |
v |
Array.<number>
|
second parametric coordinate range |
- Source:
Returns:
-
Type
-
Array.<Geometry>
Apply current coordinate transform to vector v.
Parameters:
Name |
Type |
Description |
v |
Array.<number>
|
|
- Overrides:
- Source:
Returns:
-
Type
-
Array.<number>
translate(xopt, yopt, zopt) → {this}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
x |
number
|
<optional>
|
0
|
|
y |
number
|
<optional>
|
0
|
|
z |
number
|
<optional>
|
0
|
|
- Overrides:
- Source:
Returns:
-
Type
-
this
wireframe(f, u, v) → {Array.<Geometry>}
Draw a wireframe of a parametric surface.
Parameters:
Name |
Type |
Description |
f |
function
|
parametric function |
u |
Array.<number>
|
first parametric coordinate range |
v |
Array.<number>
|
second parametric coordinate range |
- Source:
Returns:
-
Type
-
Array.<Geometry>