QuadraticBezierCurve.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 points = curve.getPoints( 50 );
  26. var geometry = new THREE.BufferGeometry().setFromPoints( points );
  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:Boolean isQuadraticBezierCurve]</h3>
  41. <div>
  42. Used to check whether this or derived classes are QuadraticBezierCurves. Default is *true*.<br /><br />
  43. You should not change this, as it used internally for optimisation.
  44. </div>
  45. <h3>[property:Vector2 v0]</h3>
  46. <div>The startpoint.</div>
  47. <h3>[property:Vector2 v1]</h3>
  48. <div>The control point.</div>
  49. <h3>[property:Vector2 v2]</h3>
  50. <div>The endpoint.</div>
  51. <h2>Methods</h2>
  52. <div>See the base [page:Curve] class for common methods.</div>
  53. <h2>Source</h2>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </body>
  56. </html>