PlaneHelper.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. 用于模拟平面 [page:Plane] 的辅助对象.
  14. </p>
  15. <h2>代码示例</h2>
  16. <code>
  17. const plane = new THREE.Plane( new THREE.Vector3( 1, 1, 0.2 ), 3 );
  18. const helper = new THREE.PlaneHelper( plane, 1, 0xffff00 );
  19. scene.add( helper );
  20. </code>
  21. <h2>构造函数</h2>
  22. <h3>[name]( [param:Plane plane], [param:Float size], [param:Color hex] )</h3>
  23. <p>
  24. [page:Plane plane] -- 被模拟的平面.<br />
  25. [page:Float size] -- (可选的) 辅助对象的单边长度. 默认为 1.<br />
  26. [page:Color color] -- (可选的) 辅助对象的颜色. 默认为 0xffff00.<br /><br />
  27. 创建一个线框辅助对象来表示指定平面.
  28. </p>
  29. <h2>属性</h2>
  30. <p>请到基类 [page:LineSegments] 页面查看公共属性.</p>
  31. <h3>[property:Plane plane]</h3>
  32. <p>被模拟的平面 [page:Plane plane] .</p>
  33. <h3>[property:Float size]</h3>
  34. <p>辅助对象的单边长度.</p>
  35. <h2>方法</h2>
  36. <p>请到基类 [page:LineSegments] 页面查看公共方法.</p>
  37. <h3>[method:undefined updateMatrixWorld]( [param:Boolean force] )</h3>
  38. <p>
  39. 重写基类 [page:Object3D] 的该方法以便于
  40. 同时更新线框辅助对象与 [page:PlaneHelper.plane .plane] 和
  41. [page:PlaneHelper.size .size] 属性保持一致.
  42. </p>
  43. <h2>源码</h2>
  44. <p>
  45. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  46. </p>
  47. </body>
  48. </html>