File: EllipseCurve.html

package info (click to toggle)
three.js 111%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,184 kB
  • sloc: javascript: 133,174; makefile: 24; sh: 1
file content (99 lines) | stat: -rw-r--r-- 3,464 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		[page:Curve] &rarr;

		<h1>[name]</h1>

		<p class="desc">
			Creates a 2d curve in the shape of an ellipse. Setting the
			[page:Number xRadius] equal to the [page:Number yRadius] will result in a circle.
		</p>

		<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
	0                 // aRotation
);

var points = curve.getPoints( 50 );
var geometry = new THREE.BufferGeometry().setFromPoints( points );

var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );

// Create the final object to add to the scene
var ellipse = new THREE.Line( geometry, material );
</code>

		<h2>Constructor</h2>


		<h3>[name]( [param:Float aX], [param:Float aY], [param:Float xRadius], [param:Float yRadius], [param:Radians aStartAngle], [param:Radians aEndAngle], [param:Boolean aClockwise], [param:Radians aRotation] )</h3>
		<p>
			[page:Float aX] – The X center of the ellipse. Default is *0*.<br/>
			[page:Float aY] – The Y center of the ellipse. Default is *0*.<br/>
			[page:Float xRadius] – The radius of the ellipse in the x direction. Default is *1*.<br/>
			[page:Float yRadius] – The radius of the ellipse in the y direction. Default is *1*.<br/>
			[page:Radians aStartAngle] – The start angle of the curve in radians starting from the positive X axis.  Default is *0*.<br/>
			[page:Radians aEndAngle] – The end angle of the curve in radians starting from the positive X axis. Default is *2 x Math.PI*.<br/>
			[page:Boolean aClockwise] – Whether the ellipse is drawn clockwise. Default is *false*.<br/>
			[page:Radians aRotation]  – The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.<br/><br/>
		</p>

		<h2>Properties</h2>
		<p>See the base [page:Curve] class for common properties.</p>

		<h3>[property:Boolean isEllipseCurve]</h3>
		<p>
			Used to check whether this or derived classes are EllipseCurves. Default is *true*.<br /><br />

			You should not change this, as it used internally for optimisation.
		</p>

		<h3>[property:Float aX]</h3>
		<p>The X center of the ellipse.</p>

		<h3>[property:Float aY]</h3>
		<p>The Y center of the ellipse.</p>

		<h3>[property:Radians xRadius]</h3>
		<p>The radius of the ellipse in the x direction.</p>

		<h3>[property:Radians yRadius]</h3>
		<p>The radius of the ellipse in the y direction.</p>

		<h3>[property:Float aStartAngle]</h3>
		<p>The start angle of the curve in radians starting from the middle right side.</p>

		<h3>[property:Float aEndAngle]</h3>
		<p>The end angle of the curve in radians starting from the middle right side.</p>

		<h3>[property:Boolean aClockwise]</h3>
		<p>Whether the ellipse is drawn clockwise.</p>

		<h3>[property:Float aRotation]</h3>
		<p>The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional). Default is *0*.</p>


		<h2>Methods</h2>
		<p>See the base [page:Curve] class for common methods.</p>

		<h2>Source</h2>

		<p>
			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
		</p>
	</body>
</html>