Creates a Shape from the points
The first point defines the offset, then successive points are added to the curves array as LineCurves. If no points are specified, an empty Shape is created and the .currentPoint is set to the origin.
Whether or not to automatically close the path.
The current offset of the path. Any new Curve added will start here.
The array of Curves.
An array of paths that define the holes in the shape.
Readonly
typeA Read-only string to check if this
object type.
UUID of this object instance.
Adds an absolutely positioned EllipseCurve to the path.
Optional
aClockwise: booleanAdds an absolutely positioned EllipseCurve to the path.
The radius of the ellipse in the x axis. Expects a Float
The radius of the ellipse in the y axis. Expects a Float
Optional
aClockwise: booleanOptional
aRotation: numberAdds an EllipseCurve to the path, positioned relative to .currentPoint.
Optional
aClockwise: booleanAdds a lineCurve to close the path.
Generates the Frenet Frames
Expects a Integer
Optional
closed: booleanRequires a Curve definition in 3D space Used in geometries like TubeGeometry or ExtrudeGeometry.
Copies another Curve object to this instance.
Adds an EllipseCurve to the path, positioned relative to .currentPoint.
The radius of the ellipse in the x axis. Expects a Float
The radius of the ellipse in the y axis. Expects a Float
Optional
aClockwise: booleanOptional
aRotation: numberGet total Curve arc length.
Returns a vector for a given position on the curve.
A position on the curve. Must be in the range [ 0, 1 ]
. Expects a Float
Optional
optionalTarget: Vector2If specified, the result will be copied into this Vector, otherwise a new Vector will be created. Default new T
.
Returns an array of points representing a sequence of curves
Optional
divisions: numberNumber of pieces to divide the curve into. Expects a Integer
. Default 12
The division
parameter defines the number of pieces each curve is divided into
However, for optimization and quality purposes, the actual sampling resolution for each curve depends on its type
For example, for a LineCurve, the returned number of points is always just 2.
Returns a unit vector tangent at t
A position on the curve. Must be in the range [ 0, 1 ]
. Expects a Float
Optional
optionalTarget: Vector2If specified, the result will be copied into this Vector, otherwise a new Vector will be created.
If the derived Curve does not implement its tangent derivation, two points a small delta apart will be used to find its gradient which seems to give a reasonable approximation.
Connects a LineCurve from .currentPoint to x, y onto the path.
Expects a Float
Expects a Float
Points are added to the curves array as LineCurves.
Connects a new SplineCurve onto the path.
Defines an arbitrary 2d Shape plane using paths with optional holes
Remarks
It can be used with ExtrudeGeometry, ShapeGeometry, to get points, or to get triangulated faces.
Example
See