TorusBufferGeometry.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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:TorusGeometry].</div>
  14. <iframe src='scenes/geometry-browser.html#TorusBufferGeometry'></iframe>
  15. <h2>Example</h2>
  16. <code>var geometry = new THREE.TorusBufferGeometry( 10, 3, 16, 100 );
  17. var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
  18. var torus = new THREE.Mesh( geometry, material );
  19. scene.add( torus );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]([page:Float radius], [page:Float tube], [page:Integer radialSegments], [page:Integer tubularSegments], [page:Float arc])</h3>
  23. <div>
  24. radius — Default is 100. <br />
  25. tube — Diameter of the tube. Default is 40. <br />
  26. radialSegments — Default is 8 <br />
  27. tubularSegments — Default is 6. <br />
  28. arc — Central angle. Default is Math.PI * 2.
  29. </div>
  30. <h2>Properties</h2>
  31. <div>
  32. 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.
  33. </div>
  34. <h2>Source</h2>
  35. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  36. </body>
  37. </html>