2
0

Box3Helper.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:LineSegments] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. 模拟3维包围盒 [page:Box3] 的辅助对象.
  15. </p>
  16. <h2>例子</h2>
  17. <code>
  18. var box = new THREE.Box3();
  19. box.setFromCenterAndSize( new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 2, 1, 3 ) );
  20. var helper = new THREE.Box3Helper( box, 0xffff00 );
  21. scene.add( helper );
  22. </code>
  23. <h2>构造函数</h2>
  24. <h3>[name]( [param:Box3 box], [param:Color color] )</h3>
  25. <p>
  26. [page:Box3 box] -- 被模拟的3维包围盒.<br />
  27. [page:Color color] -- (可选的) 线框盒子的颜色. 默认为 0xffff00.<br /><br />
  28. 创建一个新的线框盒子用以表示指定的3维包围盒.
  29. </p>
  30. <h2>属性</h2>
  31. <p>请到基类 [page:LineSegments] 页面查看公共属性.</p>
  32. <h3>[property:Box3 box]</h3>
  33. <p>被模拟的3维包围盒.</p>
  34. <h2>方法</h2>
  35. <p>请到基类 [page:LineSegments] 页面查看公共方法.</p>
  36. <h3>[method:void updateMatrixWorld]( [param:Boolean force] )</h3>
  37. <p>
  38. 重写基类 [page:Object3D] 的该方法以便于
  39. 同时更新线框辅助对象与 [page:Box3Helper.box .box]
  40. 属性保持一致.
  41. </p>
  42. <h2>源码</h2>
  43. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  44. </body>
  45. </html>