Constructor
new MeshBuilder()
- Source:
Methods
(static) createCapsule(options) → {MeshResult}
Create capsule.
Parameters:
Name |
Type |
Description |
options |
Object
|
The options. |
Properties:
Name |
Type |
Description |
options.radius |
Number
|
The semicircle radius. |
options.cylinderHeight |
Number
|
The column height. |
options.widthSegments |
Number
|
The widthSegments. |
options.heightSegments |
Number
|
The heightSegments. |
- Source:
Returns:
-
Type
-
MeshResult
(static) createCircle(options) → {MeshResult}
Create circle.
Parameters:
Name |
Type |
Description |
options |
Object
|
The options. |
Properties:
Name |
Type |
Description |
options.radius |
Number
|
The radius. |
options.segments |
Number
|
The number of disc segments. |
options.startRad |
Number
|
The starting angle. |
- Source:
Returns:
-
Type
-
MeshResult
Example
let cirecle = THING.MeshBuilder.createCircle();
// @expect(cirecle.index.length == 192 );
(static) createCylinder(options) → {MeshResult}
Create cylinder.
Parameters:
Name |
Type |
Description |
options |
Object
|
The options. |
Properties:
Name |
Type |
Description |
options.radiusTop |
Number
|
The top radius. |
options.radiusBottom |
Number
|
The bottom radius. |
options.height |
Number
|
The height. |
options.radialSegments |
Number
|
The number of divisions. |
options.heightSegments |
Number
|
The number of height divisions. |
options.openEnded |
Boolean
|
The calculate the top and bottom surfaces. |
options.thetaStart |
Number
|
The starting angle. |
options.thetaLength |
Number
|
The end angle. |
options.poslength |
Number
|
The offset. |
- Source:
Returns:
-
Type
-
MeshResult
(static) createTorus(options) → {MeshResult}
Create torus.
Parameters:
Name |
Type |
Description |
options |
Object
|
The options. |
Properties:
Name |
Type |
Description |
options.radius |
Number
|
The inner radius of ring. |
options.tube |
Number
|
The width. |
options.radialSegments |
Number
|
The number of tangent circle segments. |
options.tubularSegments |
Number
|
The number of ring segments. |
options.arc |
Number
|
The display range. |
- Source:
Returns:
-
Type
-
MeshResult