提交 76ecc661 编写于 作者: G Greg Tatum

Completed half of curve documentation

上级 dbb4fc60
......@@ -11,38 +11,10 @@
<h1>[name]</h1>
<div class="desc">todo</div>
<h2>Example</h2>
<code>todo</code>
<h2>Constructor</h2>
<h3>todo</h3>
<div></div>
<h2>Properties</h2>
<h3>todo</h3>
<div>
todo
</div>
<h2>Methods</h2>
<h3>todo</h3>
<div>todo</div>
<div>
todo
</div>
<div class="desc">Alias for [page:EllipseCurve]</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
</html>
\ No newline at end of file
......@@ -11,38 +11,41 @@
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">Create a smooth 3d spline curve from a series of points that loops back onto itself</div>
<h2>Example</h2>
<code>todo</code>
<code>
//Create a closed wavey loop
var curve = new THREE.ClosedSplineCurve3([
new THREE.Vector3(-10, 0, 10),
new THREE.Vector3(-5, 5, 5),
new THREE.Vector3( 0, 0, 0),
new THREE.Vector3( 5, -5, 5),
new THREE.Vector3(10, 0, 10)
]);
var geometry = new THREE.Geometry();
geometry.vertices = curve.getPoints(50);
var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
</code>
<h2>Constructor</h2>
<h3>todo</h3>
<div></div>
<h3>[name]([page:Array points])</h3>
<div>points – An array of [page:Vector3] points</div>
<h2>Properties</h2>
<h3>todo</h3>
<div>
todo
</div>
<h3>.[page:Array points]</h3>
<h2>Methods</h2>
<h3>todo</h3>
<div>todo</div>
<div>
todo
</div>
<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>
......@@ -11,35 +11,56 @@
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">Creates a 2d curve in the shape of an ellipse.</div>
<h2>Example</h2>
<code>todo</code>
<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>todo</h3>
<div></div>
<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>todo</h3>
<div>
todo
</div>
<h3>.[page:Float aX]</h3>
<h3>.[page:Float aY]</h3>
<h3>.[page:Radians xRadius]</h3>
<h3>.[page:Radians yRadius]</h3>
<h3>.[page:Float aStartAngle]</h3>
<h3>.[page:Float aEndAngle]</h3>
<h3>.[page:Boolean aClockwise]</h3>
<h2>Methods</h2>
<h3>todo</h3>
<div>todo</div>
<div>
todo
</div>
<h3>See [page:Curve] for inherited methods</h3>
<h2>Source</h2>
......
......@@ -8,38 +8,31 @@
</head>
<body>
[page:Curve] &rarr;
<h1>[name]</h1>
<div class="desc">todo</div>
<h2>Example</h2>
<code>todo</code>
<div class="desc">A curve representing a 2d line segment</div>
<h2>Constructor</h2>
<h3>todo</h3>
<div></div>
<h3>[name]([page:Vector2 v1], [page:Vector2 v2])</h3>
<div>
v1 – The start point<br/>
v2 - The end point
</div>
<h2>Properties</h2>
<h3>todo</h3>
<div>
todo
</div>
<h3>.[page:Vector2 v1]</h3>
<h3>.[page:Vector2 v2]</h3>
<h2>Methods</h2>
<h3>See [page:Curve] for inherited methods</h3>
<h3>todo</h3>
<div>todo</div>
<div>
todo
</div>
<h2>Source</h2>
......
......@@ -8,38 +8,30 @@
</head>
<body>
[page:Curve] &rarr;
<h1>[name]</h1>
<div class="desc">todo</div>
<h2>Example</h2>
<code>todo</code>
<div class="desc">A curve representing a 3d line segment</div>
<h2>Constructor</h2>
<h3>todo</h3>
<div></div>
<h3>[name]([page:Vector3 v1], [page:Vector3 v2])</h3>
<div>
v1 – The start point<br/>
v2 - The end point
</div>
<h2>Properties</h2>
<h3>todo</h3>
<div>
todo
</div>
<h3>.[page:Vector3 v1]</h3>
<h3>.[page:Vector3 v2]</h3>
<h2>Methods</h2>
<h3>todo</h3>
<div>todo</div>
<div>
todo
</div>
<h3>See [page:Curve] for inherited methods</h3>
<h2>Source</h2>
......
......@@ -11,35 +11,42 @@
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">Create a smooth 2d spline curve from a series of points</div>
<h2>Example</h2>
<code>todo</code>
<code>
//Create a sine-like wave
var curve = new THREE.SplineCurve([
new THREE.Vector2(-10, 0),
new THREE.Vector2(-5, 5),
new THREE.Vector2( 0, 0),
new THREE.Vector2( 5, -5),
new THREE.Vector2(10, 0)
]);
var path = new THREE.Path( curve.getPoints(50) );
var geometry = path.createPointsGeometry( 50 );
var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
var object3d = new THREE.Line( geometry, material );
</code>
<h2>Constructor</h2>
<h3>todo</h3>
<div></div>
<h3>[name]([page:Array points])</h3>
<div>points – An array of [page:Vector2] points</div>
<h2>Properties</h2>
<h3>todo</h3>
<div>
todo
</div>
<h3>.[page:Array points]</h3>
<h2>Methods</h2>
<h3>todo</h3>
<div>todo</div>
<div>
todo
</div>
<h3>See [page:Curve] for inherited methods</h3>
<h2>Source</h2>
......
......@@ -11,38 +11,41 @@
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">Create a smooth 3d spline curve from a series of points</div>
<h2>Example</h2>
<code>todo</code>
<code>
//Create a closed bent a sine-like wave
var curve = new THREE.SplineCurve3([
new THREE.Vector3(-10, 0, 10),
new THREE.Vector3(-5, 5, 5),
new THREE.Vector3( 0, 0, 0),
new THREE.Vector3( 5, -5, 5),
new THREE.Vector3(10, 0, 10)
]);
var geometry = new THREE.Geometry();
geometry.vertices = curve.getPoints(50);
var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
</code>
<h2>Constructor</h2>
<h3>todo</h3>
<div></div>
<h3>[name]([page:Array points])</h3>
<div>points – An array of [page:Vector3] points</div>
<h2>Properties</h2>
<h3>todo</h3>
<div>
todo
</div>
<h3>.[page:Array points]</h3>
<h2>Methods</h2>
<h3>todo</h3>
<div>todo</div>
<div>
todo
</div>
<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>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册