Box3Helper.html 1.5 KB

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