forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObject3D.html
187 lines (141 loc) · 3.33 KB
/
Object3D.html
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<h1>[name]</h1>
<div class="desc">Base class for scene graph objects</div>
<h2>Constructor</h2>
<h3>[name]()</h3>
<h2>Properties</h2>
<h3>.[page:Integer id]</h3>
<div>
Unique number of this object instance.
</div>
<h3>.[page:String name]</h3>
<div>
Optional name of the object (doesn't have to be unique).
</div>
<h3>.[page:Object3D parent]</h3>
<div>
Object's parent in scene graph.
</div>
<h3>.[page:Object3D children]</h3>
<div>
Array with object's children.
</div>
<h3>.[page:Vector3 position]</h3>
<div>
Object's local position.
</div>
<h3>.[page:Vector3 rotation]</h3>
<div>
Object's local rotation (Euler angles).
</div>
<h3>.[page:String eulerOrder]</h3>
<div>
Order of axis for Euler angles.
</div>
<h3>.[page:Vector3 scale]</h3>
<div>
Object's local scale.
</div>
<h3>.[page:Vector3 up]</h3>
<div>
Up direction.
</div>
<h3>.[page:Vector3 matrix]</h3>
<div>
Local transform.
</div>
<h3>.[page:Vector3 matrixRotationWorld]</h3>
<div>
Global rotation.
</div>
<h3>.[page:Quaternion quaternion]</h3>
<div>
Global rotation.
</div>
<h3>.[page:Boolean useQuaternion]</h3>
<div>
Use quaternion instead of Euler angles for specifying local rotation.
</div>
<h3>.[page:Float boundRadius]</h3>
<h3>.[page:Float boundRadiusScale]</h3>
<div>
Maximum scale from x, y, z scale components.
</div>
<h3>.[page:Float renderDepth]</h3>
<div>
Override depth-sorting order if non *null*.
</div>
<h3>.[page:Boolean visible]</h3>
<div>
Object gets rendered if *true*.
</div>
<h3>.[page:Boolean doubleSided]</h3>
<div>
Both sides of faces visible if *true*.
</div>
<h3>.[page:Boolean flipSided]</h3>
<div>
Backside of face visible if *true*.
</div>
<h3>.[page:Boolean castShadow]</h3>
<div>
Gets rendered into shadow map.
</div>
<h3>.[page:Boolean receiveShadow]</h3>
<div>
Material gets baked in shadow receiving.
</div>
<h3>.[page:Boolean frustumCulled]</h3>
<h3>.[page:Boolean matrixAutoUpdate]</h3>
<h3>.[page:Boolean matrixWorldNeedsUpdate]</h3>
<h3>.[page:Boolean rotationAutoUpdate]</h3>
<h2>Methods</h2>
<h3>.translate( [page:Float distance], [page:Vector3 axis] )</h3>
<div>
distance - Distance.<br />
axis - Translation direction.
</div>
<div>
Translates object along arbitrary *axis* by *distance*.
</div>
<h3>.translateX( [page:Float distance] )</h3>
<div>
Translates object along x axis by distance.
</div>
<h3>.translateY( [page:Float distance] )</h3>
<div>
Translates object along y axis by distance.
</div>
<h3>.translateZ( [page:Float distance] )</h3>
<div>
Translates object along z axis by distance.
</div>
<h3>.lookAt( [page:Vector3 vector] )</h3>
<div>
Rotates object to face point in space.
</div>
<h3>.add( [page:Object3D object] )</h3>
<div>
Adds *object* as child of this object.
</div>
<h3>.remove( [page:Object3D object] )</h3>
<div>
Removes *object* as child of this object.
</div>
<h3>.getChildByName( [page:String name], [page:Boolean recursive] )</h3>
<div>
name - Object name.<br />
recursive - Whether check in the objects's children.
</div>
<div>
Gets first child with name matching the argument. Searches whole subgraph recursively if *recursive* is true.
</div>
<h3>.updateMatrix()</h3>
<div>
Updates local transform.
</div>
<h3>.updateMatrixWorld( [page:Boolean force] )</h3>
<div>
Updates global transform of the object and its children.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]