Curve →
EllipseCurve
Creates a 2d curve in the shape of an ellipse.
Example
var curve = new THREE.EllipseCurve( 0, 0, // ax, aY 10, 10, // xRadius, yRadius 0, 2 * Math.PI, // aStartAngle, aEndAngle false, // aClockwise 0 // aRotation ); var path = new THREE.Path( curve.getPoints( 50 ) ); var geometry = path.createPointsGeometry( 50 ); var material = new THREE.LineBasicMaterial( { color : 0xff0000 } ); // Create the final Object3d to add to the scene var ellipse = new THREE.Line( geometry, material );
Constructor
aX – The X center of the ellipse
aY – The Y center of the ellipse
xRadius – The radius of the ellipse in the x direction
yRadius – The radius of the ellipse in the y direction
aStartAngle – The start angle of the curve in radians starting from the middle right side
aEndAngle – The end angle of the curve in radians starting from the middle right side
aClockwise – Whether the ellipse is clockwise
aRotation – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional)
Note: When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.
Properties
Methods
See Curve for inherited methods
Source
src/extras/curves/EllipseCurve.js
Edit