TorusKnotBufferGeometry.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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:BufferGeometry] &rarr;
  12. <h1>圆环缓冲扭结几何体([name])</h1>
  13. <p class="desc">This is the [page:BufferGeometry] port of [page:TorusKnotGeometry].</p>
  14. <iframe id="scene" src="scenes/geometry-browser.html#TorusKnotBufferGeometry"></iframe>
  15. <script>
  16. // iOS iframe auto-resize workaround
  17. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  18. var scene = document.getElementById( 'scene' );
  19. scene.style.width = getComputedStyle( scene ).width;
  20. scene.style.height = getComputedStyle( scene ).height;
  21. scene.setAttribute( 'scrolling', 'no' );
  22. }
  23. </script>
  24. <h2>代码示例</h2>
  25. <code>var geometry = new THREE.TorusKnotBufferGeometry( 10, 3, 100, 16 );
  26. var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
  27. var torusKnot = new THREE.Mesh( geometry, material );
  28. scene.add( torusKnot );
  29. </code>
  30. <h2>构造器</h2>
  31. <h3>[name]([param:Float radius], [param:Float tube], [param:Integer tubularSegments], [param:Integer radialSegments], [param:Integer p], [param:Integer q])</h3>
  32. <p>
  33. <ul>
  34. <li>radius - 圆环的半径,默认值为1。</li>
  35. <li>tube — 管道的半径,默认值为0.4。</li>
  36. <li>tubularSegments — 管道的分段数量,默认值为64。</li>
  37. <li>radialSegments — 横截面分段数量,默认值为8。</li>
  38. <li>p — 这个值决定了几何体将绕着其旋转对称轴旋转多少次,默认值是2。</li>
  39. <li>q — 这个值决定了几何体将绕着其内部圆环旋转多少次,默认值是3。</li>
  40. </ul>
  41. </p>
  42. <h2>属性</h2>
  43. <p>共有属性请参见其基类[page:BufferGeometry]。</p>
  44. <h3>.parameters</h3>
  45. <p>
  46. 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
  47. </p>
  48. <h2>方法(Methods)</h2>
  49. <p>共有方法请参见其基类[page:BufferGeometry]。</p>
  50. <h2>源代码</h2>
  51. <p>
  52. [link:https://github.com/mrdoob/three.js/blob/master/src/geometries/TorusKnotGeometry.js src/geometries/TorusKnotGeometry.js]
  53. </p>
  54. </body>
  55. </html>