Object3D.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <script src="../../list.js"></script>
  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. <div class="desc">Base class for scene graph objects</div>
  12. <h2>Constructor</h2>
  13. <h3>[name]()</h3>
  14. <h2>Properties</h2>
  15. <h3>.[page:Integer id]</h3>
  16. <div>
  17. Unique number of this object instance.
  18. </div>
  19. <h3>.[page:String name]</h3>
  20. <div>
  21. Optional name of the object (doesn't have to be unique).
  22. </div>
  23. <h3>.[page:Object3D parent]</h3>
  24. <div>
  25. Object's parent in scene graph.
  26. </div>
  27. <h3>.[page:Object3D children]</h3>
  28. <div>
  29. Array with object's children.
  30. </div>
  31. <h3>.[page:Vector3 position]</h3>
  32. <div>
  33. Object's local position.
  34. </div>
  35. <h3>.[page:Vector3 rotation]</h3>
  36. <div>
  37. Object's local rotation (Euler angles).
  38. </div>
  39. <h3>.[page:String eulerOrder]</h3>
  40. <div>
  41. Order of axis for Euler angles.
  42. </div>
  43. <h3>.[page:Vector3 scale]</h3>
  44. <div>
  45. Object's local scale.
  46. </div>
  47. <h3>.[page:Vector3 up]</h3>
  48. <div>
  49. Up direction.
  50. </div>
  51. <h3>.[page:Vector3 matrix]</h3>
  52. <div>
  53. Local transform.
  54. </div>
  55. <h3>.[page:Vector3 matrixRotationWorld]</h3>
  56. <div>
  57. Global rotation.
  58. </div>
  59. <h3>.[page:Quaternion quaternion]</h3>
  60. <div>
  61. Global rotation.
  62. </div>
  63. <h3>.[page:Boolean useQuaternion]</h3>
  64. <div>
  65. Use quaternion instead of Euler angles for specifying local rotation.
  66. </div>
  67. <h3>.[page:Float boundRadius]</h3>
  68. <h3>.[page:Float boundRadiusScale]</h3>
  69. <div>
  70. Maximum scale from x, y, z scale components.
  71. </div>
  72. <h3>.[page:Float renderDepth]</h3>
  73. <div>
  74. Override depth-sorting order if non *null*.
  75. </div>
  76. <h3>.[page:Boolean visible]</h3>
  77. <div>
  78. Object gets rendered if *true*.
  79. </div>
  80. <h3>.[page:Boolean doubleSided]</h3>
  81. <div>
  82. Both sides of faces visible if *true*.
  83. </div>
  84. <h3>.[page:Boolean flipSided]</h3>
  85. <div>
  86. Backside of face visible if *true*.
  87. </div>
  88. <h3>.[page:Boolean castShadow]</h3>
  89. <div>
  90. Gets rendered into shadow map.
  91. </div>
  92. <h3>.[page:Boolean receiveShadow]</h3>
  93. <div>
  94. Material gets baked in shadow receiving.
  95. </div>
  96. <h3>.[page:Boolean frustumCulled]</h3>
  97. <h3>.[page:Boolean matrixAutoUpdate]</h3>
  98. <h3>.[page:Boolean matrixWorldNeedsUpdate]</h3>
  99. <h3>.[page:Boolean rotationAutoUpdate]</h3>
  100. <h2>Methods</h2>
  101. <h3>.translate( [page:Float distance], [page:Vector3 axis] )</h3>
  102. <div>
  103. distance - Distance.<br />
  104. axis - Translation direction.
  105. </div>
  106. <div>
  107. Translates object along arbitrary *axis* by *distance*.
  108. </div>
  109. <h3>.translateX( [page:Float distance] )</h3>
  110. <div>
  111. Translates object along x axis by distance.
  112. </div>
  113. <h3>.translateY( [page:Float distance] )</h3>
  114. <div>
  115. Translates object along y axis by distance.
  116. </div>
  117. <h3>.translateZ( [page:Float distance] )</h3>
  118. <div>
  119. Translates object along z axis by distance.
  120. </div>
  121. <h3>.lookAt( [page:Vector3 vector] )</h3>
  122. <div>
  123. Rotates object to face point in space.
  124. </div>
  125. <h3>.add( [page:Object3D object] )</h3>
  126. <div>
  127. Adds *object* as child of this object.
  128. </div>
  129. <h3>.remove( [page:Object3D object] )</h3>
  130. <div>
  131. Removes *object* as child of this object.
  132. </div>
  133. <h3>.getChildByName( [page:String name], [page:Boolean recursive] )</h3>
  134. <div>
  135. name - Object name.<br />
  136. recursive - Whether check in the objects's children.
  137. </div>
  138. <div>
  139. Gets first child with name matching the argument. Searches whole subgraph recursively if *recursive* is true.
  140. </div>
  141. <h3>.updateMatrix()</h3>
  142. <div>
  143. Updates local transform.
  144. </div>
  145. <h3>.updateMatrixWorld( [page:Boolean force] )</h3>
  146. <div>
  147. Updates global transform of the object and its children.
  148. </div>
  149. <h2>Source</h2>
  150. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  151. </body>
  152. </html>