Object3D.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">
  12. This is the base class for most objects in three.js and provides a set of
  13. properties and methods for manipulating objects in 3D space.<br /><br />
  14. Note that this can be used for grouping objects via the [page:.add]( object ) method which adds the object as a child, however it is better to
  15. use [page:Group] for this.
  16. </p>
  17. <h2>Constructor</h2>
  18. <h3>[name]()</h3>
  19. <p>The constructor takes no arguments.</p>
  20. <h2>Properties</h2>
  21. <h3>[property:AnimationClip animations]</h3>
  22. <p>Array with object's animation clips.</p>
  23. <h3>[property:Boolean castShadow]</h3>
  24. <p>Whether the object gets rendered into shadow map. Default is `false`.</p>
  25. <h3>[property:Array children]</h3>
  26. <p>
  27. Array with object's children. See [page:Group] for info on manually
  28. grouping objects.
  29. </p>
  30. <h3>[property:Material customDepthMaterial]</h3>
  31. <p>
  32. Custom depth material to be used when rendering to the depth map. Can only
  33. be used in context of meshes. When shadow-casting with a
  34. [page:DirectionalLight] or [page:SpotLight], if you are modifying vertex
  35. positions in the vertex shader you must specify a customDepthMaterial for
  36. proper shadows. Default is `undefined`.
  37. </p>
  38. <h3>[property:Material customDistanceMaterial]</h3>
  39. <p>
  40. Same as [page:.customDepthMaterial customDepthMaterial], but used with
  41. [page:PointLight]. Default is `undefined`.
  42. </p>
  43. <h3>[property:Boolean frustumCulled]</h3>
  44. <p>
  45. When this is set, it checks every frame if the object is in the frustum of
  46. the camera before rendering the object. If set to `false` the object gets
  47. rendered every frame even if it is not in the frustum of the camera.
  48. Default is `true`.
  49. </p>
  50. <h3>[property:Integer id]</h3>
  51. <p>readonly – Unique number for this object instance.</p>
  52. <h3>[property:Boolean isObject3D]</h3>
  53. <p>Read-only flag to check if a given object is of type [name].</p>
  54. <h3>[property:Layers layers]</h3>
  55. <p>
  56. The layer membership of the object. The object is only visible if it has
  57. at least one layer in common with the [page:Camera] in use. This property
  58. can also be used to filter out unwanted objects in ray-intersection tests
  59. when using [page:Raycaster].
  60. </p>
  61. <h3>[property:Matrix4 matrix]</h3>
  62. <p>The local transform matrix.</p>
  63. <h3>[property:Boolean matrixAutoUpdate]</h3>
  64. <p>
  65. When this is set, it calculates the matrix of position, (rotation or
  66. quaternion) and scale every frame and also recalculates the matrixWorld
  67. property. Default is [page:Object3D.DEFAULT_MATRIX_AUTO_UPDATE] (true).
  68. </p>
  69. <h3>[property:Matrix4 matrixWorld]</h3>
  70. <p>
  71. The global transform of the object. If the Object3D has no parent, then
  72. it's identical to the local transform [page:.matrix].
  73. </p>
  74. <h3>[property:Boolean matrixWorldAutoUpdate]</h3>
  75. <p>
  76. If set, then the renderer checks every frame if the object and its
  77. children need matrix updates. When it isn't, then you have to maintain all
  78. matrices in the object and its children yourself. Default is
  79. [page:Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE] (true).
  80. </p>
  81. <h3>[property:Boolean matrixWorldNeedsUpdate]</h3>
  82. <p>
  83. When this is set, it calculates the matrixWorld in that frame and resets
  84. this property to false. Default is `false`.
  85. </p>
  86. <h3>[property:Matrix4 modelViewMatrix]</h3>
  87. <p>
  88. This is passed to the shader and used to calculate the position of the
  89. object.
  90. </p>
  91. <h3>[property:String name]</h3>
  92. <p>
  93. Optional name of the object (doesn't need to be unique). Default is an
  94. empty string.
  95. </p>
  96. <h3>[property:Matrix3 normalMatrix]</h3>
  97. <p>
  98. This is passed to the shader and used to calculate lighting for the
  99. object. It is the transpose of the inverse of the upper left 3x3
  100. sub-matrix of this object's modelViewMatrix.<br /><br />
  101. The reason for this special matrix is that simply using the
  102. modelViewMatrix could result in a non-unit length of normals (on scaling)
  103. or in a non-perpendicular direction (on non-uniform scaling).<br /><br />
  104. On the other hand the translation part of the modelViewMatrix is not
  105. relevant for the calculation of normals. Thus a Matrix3 is sufficient.
  106. </p>
  107. <h3>[property:Function onAfterRender]</h3>
  108. <p>
  109. An optional callback that is executed immediately after a 3D object is
  110. rendered. This function is called with the following parameters: renderer,
  111. scene, camera, geometry, material, group.
  112. </p>
  113. <p>
  114. Please notice that this callback is only executed for `renderable` 3D
  115. objects. Meaning 3D objects which define their visual appearance with
  116. geometries and materials like instances of [page:Mesh], [page:Line],
  117. [page:Points] or [page:Sprite]. Instances of [page:Object3D], [page:Group]
  118. or [page:Bone] are not renderable and thus this callback is not executed
  119. for such objects.
  120. </p>
  121. <h3>[property:Function onAfterShadow]</h3>
  122. <p>
  123. An optional callback that is executed immediately after a 3D object is
  124. rendered to a shadow map. This function is called with the following parameters: renderer,
  125. scene, camera, shadowCamera, geometry, depthMaterial, group.
  126. </p>
  127. <p>
  128. Please notice that this callback is only executed for `renderable` 3D
  129. objects. Meaning 3D objects which define their visual appearance with
  130. geometries and materials like instances of [page:Mesh], [page:Line],
  131. [page:Points] or [page:Sprite]. Instances of [page:Object3D], [page:Group]
  132. or [page:Bone] are not renderable and thus this callback is not executed
  133. for such objects.
  134. </p>
  135. <h3>[property:Function onBeforeRender]</h3>
  136. <p>
  137. An optional callback that is executed immediately before a 3D object is
  138. rendered. This function is called with the following parameters: renderer,
  139. scene, camera, geometry, material, group.
  140. </p>
  141. <p>
  142. Please notice that this callback is only executed for `renderable` 3D
  143. objects. Meaning 3D objects which define their visual appearance with
  144. geometries and materials like instances of [page:Mesh], [page:Line],
  145. [page:Points] or [page:Sprite]. Instances of [page:Object3D], [page:Group]
  146. or [page:Bone] are not renderable and thus this callback is not executed
  147. for such objects.
  148. </p>
  149. <h3>[property:Function onBeforeShadow]</h3>
  150. <p>
  151. An optional callback that is executed immediately before a 3D object is
  152. rendered to a shadow map. This function is called with the following parameters: renderer,
  153. scene, camera, shadowCamera, geometry, depthMaterial, group.
  154. </p>
  155. <p>
  156. Please notice that this callback is only executed for `renderable` 3D
  157. objects. Meaning 3D objects which define their visual appearance with
  158. geometries and materials like instances of [page:Mesh], [page:Line],
  159. [page:Points] or [page:Sprite]. Instances of [page:Object3D], [page:Group]
  160. or [page:Bone] are not renderable and thus this callback is not executed
  161. for such objects.
  162. </p>
  163. <h3>[property:Object3D parent]</h3>
  164. <p>
  165. Object's parent in the [link:https://en.wikipedia.org/wiki/Scene_graph scene graph]. An object can have at most one parent.
  166. </p>
  167. <h3>[property:Vector3 position]</h3>
  168. <p>
  169. A [page:Vector3] representing the object's local position. Default is `(0,
  170. 0, 0)`.
  171. </p>
  172. <h3>[property:Quaternion quaternion]</h3>
  173. <p>Object's local rotation as a [page:Quaternion Quaternion].</p>
  174. <h3>[property:Boolean receiveShadow]</h3>
  175. <p>Whether the material receives shadows. Default is `false`.</p>
  176. <h3>[property:Number renderOrder]</h3>
  177. <p>
  178. This value allows the default rendering order of
  179. [link:https://en.wikipedia.org/wiki/Scene_graph scene graph] objects to be
  180. overridden although opaque and transparent objects remain sorted
  181. independently. When this property is set for an instance of [page:Group Group], all descendants objects will be sorted and rendered together.
  182. Sorting is from lowest to highest renderOrder. Default value is `0`.
  183. </p>
  184. <h3>[property:Euler rotation]</h3>
  185. <p>
  186. Object's local rotation (see
  187. [link:https://en.wikipedia.org/wiki/Euler_angles Euler angles]), in
  188. radians.
  189. </p>
  190. <h3>[property:Vector3 scale]</h3>
  191. <p>The object's local scale. Default is [page:Vector3]( 1, 1, 1 ).</p>
  192. <h3>[property:Vector3 up]</h3>
  193. <p>
  194. This is used by the [page:.lookAt lookAt] method, for example, to
  195. determine the orientation of the result.<br />
  196. Default is [page:Object3D.DEFAULT_UP] - that is, `( 0, 1, 0 )`.
  197. </p>
  198. <h3>[property:Object userData]</h3>
  199. <p>
  200. An object that can be used to store custom data about the Object3D. It
  201. should not hold references to functions as these will not be cloned.
  202. Default is an empty object `{}`.
  203. </p>
  204. <h3>[property:String uuid]</h3>
  205. <p>
  206. [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of
  207. this object instance. This gets automatically assigned, so this shouldn't
  208. be edited.
  209. </p>
  210. <h3>[property:Boolean visible]</h3>
  211. <p>Object gets rendered if `true`. Default is `true`.</p>
  212. <h2>Static Properties</h2>
  213. <p>
  214. Static properties and methods are defined per class rather than per
  215. instance of that class. This means that changing
  216. [page:Object3D.DEFAULT_UP] or [page:Object3D.DEFAULT_MATRIX_AUTO_UPDATE]
  217. will change the values of [page:.up up] and [page:.matrixAutoUpdate matrixAutoUpdate] for `every` instance of Object3D (or derived classes)
  218. created after the change has been made (already created Object3Ds will not
  219. be affected).
  220. </p>
  221. <h3>[property:Vector3 DEFAULT_UP]</h3>
  222. <p>
  223. The default [page:.up up] direction for objects, also used as the default
  224. position for [page:DirectionalLight], [page:HemisphereLight] and
  225. [page:Spotlight] (which creates lights shining from the top down).<br />
  226. Set to ( 0, 1, 0 ) by default.
  227. </p>
  228. <h3>[property:Boolean DEFAULT_MATRIX_AUTO_UPDATE]</h3>
  229. <p>
  230. The default setting for [page:.matrixAutoUpdate matrixAutoUpdate] for
  231. newly created Object3Ds.<br />
  232. </p>
  233. <h3>[property:Boolean DEFAULT_MATRIX_WORLD_AUTO_UPDATE]</h3>
  234. <p>
  235. The default setting for [page:.matrixWorldAutoUpdate
  236. matrixWorldAutoUpdate] for newly created Object3Ds.<br />
  237. </p>
  238. <h2>Methods</h2>
  239. <p>
  240. [page:EventDispatcher EventDispatcher] methods are available on this
  241. class.
  242. </p>
  243. <h3>[method:this add]( [param:Object3D object], ... )</h3>
  244. <p>
  245. Adds `object` as child of this object. An arbitrary number of objects may
  246. be added. Any current parent on an object passed in here will be removed,
  247. since an object can have at most one parent.<br /><br />
  248. See [page:Group] for info on manually grouping objects.
  249. </p>
  250. <h3>[method:undefined applyMatrix4]( [param:Matrix4 matrix] )</h3>
  251. <p>
  252. Applies the matrix transform to the object and updates the object's
  253. position, rotation and scale.
  254. </p>
  255. <h3>[method:this applyQuaternion]( [param:Quaternion quaternion] )</h3>
  256. <p>Applies the rotation represented by the quaternion to the object.</p>
  257. <h3>[method:this attach]( [param:Object3D object] )</h3>
  258. <p>
  259. Adds `object` as a child of this, while maintaining the object's world
  260. transform.<br /><br />
  261. Note: This method does not support scene graphs having
  262. non-uniformly-scaled nodes(s).
  263. </p>
  264. <h3>[method:this clear]()</h3>
  265. <p>Removes all child objects.</p>
  266. <h3>[method:Object3D clone]( [param:Boolean recursive] )</h3>
  267. <p>
  268. recursive -- if true, descendants of the object are also cloned. Default
  269. is true.<br /><br />
  270. Returns a clone of this object and optionally all descendants.
  271. </p>
  272. <h3>[method:this copy]( [param:Object3D object], [param:Boolean recursive] )</h3>
  273. <p>
  274. recursive -- If set to `true`, descendants of the object are copied next to the existing ones.
  275. If set to `false`, descendants are left unchanged. Default is `true`.<br /><br />
  276. Copies the given object into this object. Note: Event listeners and
  277. user-defined callbacks ([page:.onAfterRender] and [page:.onBeforeRender])
  278. are not copied.
  279. </p>
  280. <h3>[method:Object3D getObjectById]( [param:Integer id] )</h3>
  281. <p>
  282. id -- Unique number of the object instance<br /><br />
  283. Searches through an object and its children, starting with the object
  284. itself, and returns the first with a matching id.<br />
  285. Note that ids are assigned in chronological order: 1, 2, 3, ...,
  286. incrementing by one for each new object.
  287. </p>
  288. <h3>[method:Object3D getObjectByName]( [param:String name] )</h3>
  289. <p>
  290. name -- String to match to the children's Object3D.name property.
  291. <br /><br />
  292. Searches through an object and its children, starting with the object
  293. itself, and returns the first with a matching name.<br />
  294. Note that for most objects the name is an empty string by default. You
  295. will have to set it manually to make use of this method.
  296. </p>
  297. <h3>[method:Object3D getObjectByProperty]( [param:String name], [param:Any value] )</h3>
  298. <p>
  299. name -- the property name to search for. <br />
  300. value -- value of the given property. <br /><br />
  301. Searches through an object and its children, starting with the object
  302. itself, and returns the first with a property that matches the value
  303. given.
  304. </p>
  305. <h3>[method:Object3D getObjectsByProperty]( [param:String name], [param:Any value], [param:Array optionalTarget] )</h3>
  306. <p>
  307. name -- the property name to search for. <br />
  308. value -- value of the given property. <br />
  309. optionalTarget -- (optional) target to set the result.
  310. Otherwise a new Array is instantiated. If set, you must clear this
  311. array prior to each call (i.e., array.length = 0;). <br /><br />
  312. Searches through an object and its children, starting with the object
  313. itself, and returns all the objects with a property that matches the value
  314. given.
  315. </p>
  316. <h3>[method:Vector3 getWorldPosition]( [param:Vector3 target] )</h3>
  317. <p>
  318. [page:Vector3 target] — the result will be copied into this Vector3.
  319. <br /><br />
  320. Returns a vector representing the position of the object in world space.
  321. </p>
  322. <h3>[method:Quaternion getWorldQuaternion]( [param:Quaternion target] )</h3>
  323. <p>
  324. [page:Quaternion target] — the result will be copied into this Quaternion.
  325. <br /><br />
  326. Returns a quaternion representing the rotation of the object in world
  327. space.
  328. </p>
  329. <h3>[method:Vector3 getWorldScale]( [param:Vector3 target] )</h3>
  330. <p>
  331. [page:Vector3 target] — the result will be copied into this Vector3.
  332. <br /><br />
  333. Returns a vector of the scaling factors applied to the object for each
  334. axis in world space.
  335. </p>
  336. <h3>[method:Vector3 getWorldDirection]( [param:Vector3 target] )</h3>
  337. <p>
  338. [page:Vector3 target] — the result will be copied into this Vector3.
  339. <br /><br />
  340. Returns a vector representing the direction of object's positive z-axis in
  341. world space.
  342. </p>
  343. <h3>[method:Vector3 localToWorld]( [param:Vector3 vector] )</h3>
  344. <p>
  345. vector - A vector representing a position in this object's local space.<br /><br />
  346. Converts the vector from this object's local space to world space.
  347. </p>
  348. <h3>[method:undefined lookAt]( [param:Vector3 vector] )<br />
  349. [method:undefined lookAt]( [param:Float x], [param:Float y], [param:Float z] )
  350. </h3>
  351. <p>
  352. vector - A vector representing a position in world space.<br /><br />
  353. Optionally, the [page:.x x], [page:.y y] and [page:.z z] components of the
  354. world space position.<br /><br />
  355. Rotates the object to face a point in world space.<br /><br />
  356. This method does not support objects having non-uniformly-scaled
  357. parent(s).
  358. </p>
  359. <h3>[method:undefined raycast]( [param:Raycaster raycaster], [param:Array intersects] )</h3>
  360. <p>
  361. Abstract (empty) method to get intersections between a casted ray and this
  362. object. Subclasses such as [page:Mesh], [page:Line], and [page:Points]
  363. implement this method in order to use raycasting.
  364. </p>
  365. <h3>[method:this remove]( [param:Object3D object], ... )</h3>
  366. <p>
  367. Removes `object` as child of this object. An arbitrary number of objects
  368. may be removed.
  369. </p>
  370. <h3>[method:this removeFromParent]()</h3>
  371. <p>Removes this object from its current parent.</p>
  372. <h3>[method:this rotateOnAxis]( [param:Vector3 axis], [param:Float angle] )</h3>
  373. <p>
  374. axis -- A normalized vector in object space. <br />
  375. angle -- The angle in radians.<br /><br />
  376. Rotate an object along an axis in object space. The axis is assumed to be
  377. normalized.
  378. </p>
  379. <h3>[method:this rotateOnWorldAxis]( [param:Vector3 axis], [param:Float angle])</h3>
  380. <p>
  381. axis -- A normalized vector in world space. <br />
  382. angle -- The angle in radians.<br /><br />
  383. Rotate an object along an axis in world space. The axis is assumed to be
  384. normalized. Method Assumes no rotated parent.
  385. </p>
  386. <h3>[method:this rotateX]( [param:Float rad] )</h3>
  387. <p>
  388. rad - the angle to rotate in radians.<br /><br />
  389. Rotates the object around x axis in local space.
  390. </p>
  391. <h3>[method:this rotateY]( [param:Float rad] )</h3>
  392. <p>
  393. rad - the angle to rotate in radians.<br /><br />
  394. Rotates the object around y axis in local space.
  395. </p>
  396. <h3>[method:this rotateZ]( [param:Float rad] )</h3>
  397. <p>
  398. rad - the angle to rotate in radians.<br /><br />
  399. Rotates the object around z axis in local space.
  400. </p>
  401. <h3>[method:undefined setRotationFromAxisAngle]( [param:Vector3 axis], [param:Float angle] )</h3>
  402. <p>
  403. axis -- A normalized vector in object space. <br />
  404. angle -- angle in radians<br /><br />
  405. Calls [page:Quaternion.setFromAxisAngle setFromAxisAngle]( [page:Float axis], [page:Float angle] ) on the [page:.quaternion].
  406. </p>
  407. <h3>[method:undefined setRotationFromEuler]( [param:Euler euler] )</h3>
  408. <p>
  409. euler -- Euler angle specifying rotation amount.<br />
  410. Calls [page:Quaternion.setRotationFromEuler setRotationFromEuler](
  411. [page:Euler euler]) on the [page:.quaternion].
  412. </p>
  413. <h3>[method:undefined setRotationFromMatrix]( [param:Matrix4 m] )</h3>
  414. <p>
  415. m -- rotate the quaternion by the rotation component of the matrix.<br />
  416. Calls [page:Quaternion.setFromRotationMatrix setFromRotationMatrix](
  417. [page:Matrix4 m]) on the [page:.quaternion].<br /><br />
  418. Note that this assumes that the upper 3x3 of m is a pure rotation matrix
  419. (i.e, unscaled).
  420. </p>
  421. <h3>[method:undefined setRotationFromQuaternion]( [param:Quaternion q] )</h3>
  422. <p>
  423. q -- normalized Quaternion.<br /><br />
  424. Copy the given quaternion into [page:.quaternion].
  425. </p>
  426. <h3>[method:Object toJSON]( [param:Object meta] )</h3>
  427. <p>
  428. meta -- object containing metadata such as materials, textures or images
  429. for the object.<br />
  430. Convert the object to three.js
  431. [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
  432. </p>
  433. <h3>[method:this translateOnAxis]( [param:Vector3 axis], [param:Float distance] )</h3>
  434. <p>
  435. axis -- A normalized vector in object space.<br />
  436. distance -- The distance to translate.<br /><br />
  437. Translate an object by distance along an axis in object space. The axis is
  438. assumed to be normalized.
  439. </p>
  440. <h3>[method:this translateX]( [param:Float distance] )</h3>
  441. <p>Translates object along x axis in object space by `distance` units.</p>
  442. <h3>[method:this translateY]( [param:Float distance] )</h3>
  443. <p>Translates object along y axis in object space by `distance` units.</p>
  444. <h3>[method:this translateZ]( [param:Float distance] )</h3>
  445. <p>Translates object along z axis in object space by `distance` units.</p>
  446. <h3>[method:undefined traverse]( [param:Function callback] )</h3>
  447. <p>
  448. callback - A function with as first argument an object3D object.<br /><br />
  449. Executes the callback on this object and all descendants.<br />
  450. Note: Modifying the scene graph inside the callback is discouraged.
  451. </p>
  452. <h3>[method:undefined traverseVisible]( [param:Function callback] )</h3>
  453. <p>
  454. callback - A function with as first argument an object3D object.<br /><br />
  455. Like traverse, but the callback will only be executed for visible objects.
  456. Descendants of invisible objects are not traversed.<br />
  457. Note: Modifying the scene graph inside the callback is discouraged.
  458. </p>
  459. <h3>[method:undefined traverseAncestors]( [param:Function callback] )</h3>
  460. <p>
  461. callback - A function with as first argument an object3D object.<br /><br />
  462. Executes the callback on all ancestors.<br />
  463. Note: Modifying the scene graph inside the callback is discouraged.
  464. </p>
  465. <h3>[method:undefined updateMatrix]()</h3>
  466. <p>Updates the local transform.</p>
  467. <h3>[method:undefined updateMatrixWorld]( [param:Boolean force] )</h3>
  468. <p>
  469. force - A boolean that can be used to bypass
  470. [page:.matrixWorldAutoUpdate], to recalculate the world matrix of the
  471. object and descendants on the current frame. Useful if you cannot wait for
  472. the renderer to update it on the next frame (assuming
  473. [page:.matrixWorldAutoUpdate] set to `true`).<br /><br />
  474. Updates the global transform of the object and its descendants if the
  475. world matrix needs update ([page:.matrixWorldNeedsUpdate] set to true) or
  476. if the `force` parameter is set to `true`.
  477. </p>
  478. <h3>[method:undefined updateWorldMatrix]( [param:Boolean updateParents], [param:Boolean updateChildren] )</h3>
  479. <p>
  480. updateParents - recursively updates global transform of ancestors.<br />
  481. updateChildren - recursively updates global transform of descendants.<br /><br />
  482. Updates the global transform of the object.
  483. </p>
  484. <h3>[method:Vector3 worldToLocal]( [param:Vector3 vector] )</h3>
  485. <p>
  486. vector - A vector representing a position in world space.<br /><br />
  487. Converts the vector from world space to this object's local space.
  488. </p>
  489. <h2>Events</h2>
  490. <h3>added</h3>
  491. <p>
  492. Fires when the object has been added to its parent object.
  493. </p>
  494. <h3>removed</h3>
  495. <p>
  496. Fires when the object has been removed from its parent object.
  497. </p>
  498. <h3>childadded</h3>
  499. <p>
  500. Fires when a new child object has been added.
  501. </p>
  502. <h3>childremoved</h3>
  503. <p>
  504. Fires when a new child object has been removed.
  505. </p>
  506. <h2>Source</h2>
  507. <p>
  508. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  509. </p>
  510. </body>
  511. </html>