mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-19 04:27:55 +01:00
70 lines
2.1 KiB
HTML
70 lines
2.1 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html lang="en">
|
|||
|
<head>
|
|||
|
<meta charset="utf-8" />
|
|||
|
<script src="../../../list.js"></script>
|
|||
|
<script src="../../../page.js"></script>
|
|||
|
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
[page:Curve] →
|
|||
|
|
|||
|
<h1>[name]</h1>
|
|||
|
|
|||
|
<div class="desc">Creates a 2d curve in the shape of an ellipse.</div>
|
|||
|
|
|||
|
<h2>Example</h2>
|
|||
|
|
|||
|
<code>
|
|||
|
var curve = new THREE.EllipseCurve(
|
|||
|
0, 0, // ax, aY
|
|||
|
10, 10, // xRadius, yRadius
|
|||
|
0, 2 * Math.PI, // aStartAngle, aEndAngle
|
|||
|
false // aClockwise
|
|||
|
);
|
|||
|
|
|||
|
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 );
|
|||
|
</code>
|
|||
|
|
|||
|
<h2>Constructor</h2>
|
|||
|
|
|||
|
|
|||
|
<h3>[name]( [page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise] )</h3>
|
|||
|
<div>
|
|||
|
aX – The X center of the ellipse<br/>
|
|||
|
aY – The Y center of the ellipse<br/>
|
|||
|
xRadius – The radius of the ellipse in the x direction<br/>
|
|||
|
yRadius – The radius of the ellipse in the y direction<br/>
|
|||
|
aStartAngle – The start angle of the curve in radians starting from the middle right side<br/>
|
|||
|
aEndAngle – The end angle of the curve in radians starting from the middle right side<br/>
|
|||
|
aClockwise – Whether the ellipse is clockwise<br/><br/>
|
|||
|
|
|||
|
<strong>Note:</strong> When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<h2>Properties</h2>
|
|||
|
|
|||
|
<h3>[property:Float aX]</h3>
|
|||
|
<h3>[property:Float aY]</h3>
|
|||
|
<h3>[property:Radians xRadius]</h3>
|
|||
|
<h3>[property:Radians yRadius]</h3>
|
|||
|
<h3>[property:Float aStartAngle]</h3>
|
|||
|
<h3>[property:Float aEndAngle]</h3>
|
|||
|
<h3>[property:Boolean aClockwise]</h3>
|
|||
|
|
|||
|
<h2>Methods</h2>
|
|||
|
|
|||
|
<h3>See [page:Curve] for inherited methods</h3>
|
|||
|
|
|||
|
<h2>Source</h2>
|
|||
|
|
|||
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|||
|
</body>
|
|||
|
</html>
|