QuadraticBezierCurve.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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:Curve] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">
  14. Create a smooth 2d
  15. <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:B%C3%A9zier_2_big.gif" target="_blank">quadratic bezier curve</a>,
  16. defined by a startpoint, endpoint and a single control point.
  17. </div>
  18. <h2>Example</h2>
  19. <code>
  20. var curve = new THREE.QuadraticBezierCurve(
  21. new THREE.Vector2( -10, 0 ),
  22. new THREE.Vector2( 20, 15 ),
  23. new THREE.Vector2( 10, 0 )
  24. );
  25. var path = new THREE.Path( curve.getPoints( 50 ) );
  26. var geometry = path.createPointsGeometry( 50 );
  27. var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
  28. //Create the final object to add to the scene
  29. var curveObject = new THREE.Line( geometry, material );
  30. </code>
  31. <h2>Constructor</h2>
  32. <h3>[name]( [page:Vector2 v0], [page:Vector2 v1], [page:Vector2 v2] )</h3>
  33. <div>
  34. [page:Vector2 v0] – The startpoint.<br/>
  35. [page:Vector2 v1] – The control point.<br/>
  36. [page:Vector2 v2] – The endpoint.
  37. </div>
  38. <h2>Properties</h2>
  39. <div>See the base [page:Curve] class for common properties.</div>
  40. <h3>[property:Vector2 v0]</h3>
  41. <div>The startpoint.</div>
  42. <h3>[property:Vector2 v1]</h3>
  43. <div>The control point.</div>
  44. <h3>[property:Vector2 v2]</h3>
  45. <div>The endpoint.</div>
  46. <h2>Methods</h2>
  47. <div>See the base [page:Curve] class for common methods.</div>
  48. <h2>Source</h2>
  49. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  50. </body>
  51. </html>