Object3D.html 3.3 KB

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