source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/src/extras/curves/QuadraticBezierCurve3.js@ 28897

Last change on this file since 28897 was 28897, checked in by davidb, 10 years ago

GUI front-end to server base plus web page content

File size: 581 bytes
Line 
1/**************************************************************
2 * Quadratic Bezier 3D curve
3 **************************************************************/
4
5THREE.QuadraticBezierCurve3 = THREE.Curve.create(
6
7 function ( v0, v1, v2 ) {
8
9 this.v0 = v0;
10 this.v1 = v1;
11 this.v2 = v2;
12
13 },
14
15 function ( t ) {
16
17 var tx, ty, tz;
18
19 tx = THREE.Shape.Utils.b2( t, this.v0.x, this.v1.x, this.v2.x );
20 ty = THREE.Shape.Utils.b2( t, this.v0.y, this.v1.y, this.v2.y );
21 tz = THREE.Shape.Utils.b2( t, this.v0.z, this.v1.z, this.v2.z );
22
23 return new THREE.Vector3( tx, ty, tz );
24
25 }
26
27);
Note: See TracBrowser for help on using the repository browser.