LatheBufferGeometry.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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:LatheGeometry].</div>
  14. <h2>Example</h2>
  15. <iframe src='scenes/geometry-browser.html#LatheBufferGeometry'></iframe>
  16. <code>
  17. var points = [];
  18. for ( var i = 0; i < 10; i ++ ) {
  19. points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );
  20. }
  21. var geometry = new THREE.LatheBufferGeometry( points );
  22. var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
  23. var lathe = new THREE.Mesh( geometry, material );
  24. scene.add( lathe );
  25. </code>
  26. <h2>Constructor</h2>
  27. <h3>[name]([page:Array points], [page:Integer segments], [page:Float phiStart], [page:Float phiLength])</h3>
  28. <div>
  29. points — Array of Vector2s. The x-coordinate of each point must be greater than zero.<br />
  30. segments — the number of circumference segments to generate. Default is 12.<br />
  31. phiStart — the starting angle in radians. Default is 0.<br />
  32. phiLength — the radian (0 to 2PI) range of the lathed section 2PI is a closed lathe, less than 2PI is a portion. Default is 2PI.
  33. </div>
  34. <div>
  35. This creates a LatheBufferGeometry based on the parameters.
  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>