TorusKnotBufferGeometry.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html lang="en">
  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. <div class="desc">This is the [page:BufferGeometry] port of [page:TorusKnotGeometry].</div>
  14. <iframe src='scenes/geometry-browser.html#TorusKnotBufferGeometry'></iframe>
  15. <h2>Example</h2>
  16. <code>var geometry = new THREE.TorusKnotBufferGeometry( 10, 3, 100, 16 );
  17. var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
  18. var torusKnot = new THREE.Mesh( geometry, material );
  19. scene.add( torusKnot );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]([page:Float radius], [page:Float tube], [page:Integer tubularSegments], [page:Integer radialSegments], [page:Integer p], [page:Integer q])</h3>
  23. <div>
  24. <ul>
  25. <li>radius — Default is 100.</li>
  26. <li>tube — Diameter of the tube. Default is 40.</li>
  27. <li>tubularSegments — Default is 64.</li>
  28. <li>radialSegments — Default is 8.</li>
  29. <li>p — This value determines, how many times the geometry winds around its axis of rotational symmetry. Default is 2.</li>
  30. <li>q — This value determines, how many times the geometry winds around a circle in the interior of the torus. Default is 3.</li>
  31. </ul>
  32. </div>
  33. <h2>Properties</h2>
  34. <div>
  35. Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
  36. </div>
  37. <h2>Source</h2>
  38. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  39. </body>
  40. </html>