SplineCurve3.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../../list.js"></script>
  6. <script src="../../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../../page.css" />
  8. </head>
  9. <body>
  10. [page:Curve] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">Create a smooth 3d spline curve from a series of points</div>
  13. <h2>Example</h2>
  14. <code>
  15. //Create a closed bent a sine-like wave
  16. var curve = new THREE.SplineCurve3([
  17. new THREE.Vector3(-10, 0, 10),
  18. new THREE.Vector3(-5, 5, 5),
  19. new THREE.Vector3( 0, 0, 0),
  20. new THREE.Vector3( 5, -5, 5),
  21. new THREE.Vector3(10, 0, 10)
  22. ]);
  23. var geometry = new THREE.Geometry();
  24. geometry.vertices = curve.getPoints(50);
  25. var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
  26. </code>
  27. <h2>Constructor</h2>
  28. <h3>[name]([page:Array points])</h3>
  29. <div>points – An array of [page:Vector3] points</div>
  30. <h2>Properties</h2>
  31. <h3>[property:Array points]</h3>
  32. <h2>Methods</h2>
  33. <h3>See [page:Curve] for inherited methods</h3>
  34. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  35. </body>
  36. </html>