forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCurvePath.html
More file actions
142 lines (114 loc) · 3.79 KB
/
CurvePath.html
File metadata and controls
142 lines (114 loc) · 3.79 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!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] →
<h1>[name]</h1>
<div class="desc">
An abstract base class further extending [page:Curve]. A CurvePath is simply an array of connected curves,
but retains the api of a curve.
</div>
<h2>Constructor</h2>
<h3>[name]()</h3>
<div>
The constructor take no parameters.
</div>
<h2>Properties</h2>
<h3>[property:array curves]</h3>
<div>
The array of [page:Curve]s
</div>
<h3>[property:array bends]</h3>
<div>
An array of [page:Curve]s used to transform and bend the curve using [page:CurvePath.getWrapPoints].
</div>
<h3>[property:boolean autoClose]</h3>
<div>
Whether or not to automatically close the path.
</div>
<h2>Methods</h2>
<h3>[method:Array getWrapPoints]( [page:Array vertices], [page:Curve curve] )</h3>
<div>
vertices -- An array of [page:Vector2]s to modify<br />
curve -- An array of 2d [page:Curve]s
</div>
<div>
Modifies the array of vertices by warping it by the curve. The curve parameter also accepts objects with similar
interfaces such as [page:CurvePath], [page:Path], [page:SplineCurve], etc. Returns the original vertices after
modification.
</div>
<h3>[method:null addWrapPath]( [page:Curve curve] )</h3>
<div>
curve -- A [page:Curve] or object with a similar interface.
</div>
<div>
Pushes a curve onto the bends array.
</div>
<h3>[method:Geometry createGeometry]( [page:Vector3 points] )</h3>
<div>
points -- An array of [page:Vector3]s
</div>
<div>
Creates a geometry from points
</div>
<h3>[method:Geometry createPointsGeometry]( [page:Integer divisions] )</h3>
<div>
divisions -- How many segments to create with [page:Vector3]s. Defaults to 12.
</div>
<div>
Creates a [page:Geometry] object comprised of [page:Vector3]s
</div>
<h3>[method:Geometry createSpacedPointsGeometry]( [page:Integer divisions] )</h3>
<div>
divisions -- How many segments to create with [page:Vector3]s. Defaults to 12.
</div>
<div>
Creates a [page:Geometry] object comprised of [page:Vector3]s that are equidistant.
</div>
<h3>[method:null add]( [page:Curve curve] )</h3>
<div>
curve -- The [page:Curve curve] to add
</div>
<div>
Pushes a curve onto the curves array.
</div>
<h3>[method:null closePath]()</h3>
<div>
Adds a curve to close the path.
</div>
<h3>[method:Object getBoundingBox]()</h3>
<div>
Returns an object with the keys minX, minY, maxX, maxY, (if 3d: maxZ, minZ)
</div>
<h3>[method:Float getCurveLengths]()</h3>
<div>
Adds together the length of the curves
</div>
<h3>[method:Array getTransformedPoints]( [page:Integer segments], [page:Array bends] )</h3>
<div>
segments -- The number of segments to create using the getPoints()<br />
bends -- (optional) An array of [page:Curve]s used to transform the points. Defaults to this.bends if blank.
</div>
<div>
Uses this CurvePath to generate a series of points transformed by the curves in the bends array. Returns an
array of [page:Vector2]s.
</div>
<h3>[method:Array getTransformedSpacedPoints]( [page:Integer segments], [page:Array bends] )</h3>
<div>
segments -- The number of segments to create using the getPoints()<br />
bends -- (optional) Defaults to this.bends if blank. An array of [page:Curve]s used to transform the points.
</div>
<div>
Uses this CurvePath to generate a series equidistant points that are then transformed by the curves in the bends.
Returns an array of [page:Vector2]s.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>