Class: Shape3DMaker
A help class for quickly creating Shape3D related objects
Export
Constructors
Accessors
Methods
Constructors
constructor
• new Shape3DMaker(renderer
): Shape3DMaker
Parameters
Name | Type |
---|---|
renderer | Shape3DRenderer |
Returns
Defined in
packages/graphic/renderer/Shape3DMaker.ts:25
Accessors
renderer
• get
renderer(): Shape3DRenderer
Returns
Defined in
packages/graphic/renderer/Shape3DMaker.ts:49
Methods
makeRenderer
▸ makeRenderer(name
, textureList
, scene
, maxNodeCount?
, triangleEachNode?
): Shape3DMaker
Parameters
Name | Type | Default value | Description |
---|---|---|---|
name | string | undefined | key of Shape3DRenderer. |
textureList | BitmapTexture2DArray | undefined | textures used by node. |
scene | Scene3D | undefined | Scene3D |
maxNodeCount? | number | 1000 | Can accommodate the maximum number of nodes |
triangleEachNode? | number | 24 | The maximum number of triangles included is triangleEachNode * maxNodeCount |
Returns
{Shape3DMaker}
Static
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:40
ellipse
▸ ellipse(radiusX
, radiusY
, rotation
, startAngle
, endAngle
, counterclockwise?
): EllipseShape3D
Create an ellipse in Shape3DRenderer
Parameters
Name | Type |
---|---|
radiusX | number |
radiusY | number |
rotation | number |
startAngle | number |
endAngle | number |
counterclockwise? | boolean |
Returns
{EllipseShape3D}
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:66
arc
▸ arc(radius
, startAngle
, endAngle
, counterclockwise?
): CircleShape3D
Create an arc in Shape3DRenderer
Parameters
Name | Type |
---|---|
radius | number |
startAngle | number |
endAngle | number |
counterclockwise? | boolean |
Returns
{CircleShape3D}
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:87
line
▸ line(points
): LineShape3D
Create line segments in Shape3DRenderer
Parameters
Name | Type |
---|---|
points | Vector2 [] |
Returns
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:103
quadraticCurve
▸ quadraticCurve(fx
, fy
, cpx
, cpy
, tx
, ty
): QuadraticCurveShape3D
Create a quadratic curve in Shape3DRenderer
Parameters
Name | Type |
---|---|
fx | number |
fy | number |
cpx | number |
cpy | number |
tx | number |
ty | number |
Returns
{QuadraticCurveShape3D}
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:127
curve
▸ curve(fx
, fy
, cp1x
, cp1y
, cp2x
, cp2y
, tx
, ty
): CurveShape3D
Create a curve in Shape3DRenderer
Parameters
Name | Type |
---|---|
fx | number |
fy | number |
cp1x | number |
cp1y | number |
cp2x | number |
cp2y | number |
tx | number |
ty | number |
Returns
{CurveShape3D}
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:149
path2D
▸ path2D(): Path2DShape3D
Create a path2D in Shape3DRenderer. Through the Path2DShape3D, you can use the CanvasPath API for path drawing on xz plane.
Returns
{Path2DShape3D}
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:165
path3D
▸ path3D(): Path3DShape3D
Create a path3D in Shape3DRenderer. Through the Path3DShape3D, you can use the similar CanvasPath API for path drawing in 3D space.
Returns
{Path3DShape3D}
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:175
rect
▸ rect(w
, h
): RoundRectShape3D
Create a rect in Shape3DRenderer
Parameters
Name | Type |
---|---|
w | number |
h | number |
Returns
{RoundRectShape3D}
Memberof
Shape3DMaker
Defined in
packages/graphic/renderer/Shape3DMaker.ts:187
roundRect
▸ roundRect(w
, h
, radii?
): RoundRectShape3D
Create a RoundRect in Shape3DRenderer
Parameters
Name | Type |
---|---|
w | number |
h | number |
radii? | number |
Returns
Memberof
Shape3DMaker