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:
626 bytes
|
Line | |
---|
1 | /**************************************************************
|
---|
2 | * Cubic Bezier 3D curve
|
---|
3 | **************************************************************/
|
---|
4 |
|
---|
5 | THREE.CubicBezierCurve3 = THREE.Curve.create(
|
---|
6 |
|
---|
7 | function ( v0, v1, v2, v3 ) {
|
---|
8 |
|
---|
9 | this.v0 = v0;
|
---|
10 | this.v1 = v1;
|
---|
11 | this.v2 = v2;
|
---|
12 | this.v3 = v3;
|
---|
13 |
|
---|
14 | },
|
---|
15 |
|
---|
16 | function ( t ) {
|
---|
17 |
|
---|
18 | var tx, ty, tz;
|
---|
19 |
|
---|
20 | tx = THREE.Shape.Utils.b3( t, this.v0.x, this.v1.x, this.v2.x, this.v3.x );
|
---|
21 | ty = THREE.Shape.Utils.b3( t, this.v0.y, this.v1.y, this.v2.y, this.v3.y );
|
---|
22 | tz = THREE.Shape.Utils.b3( t, this.v0.z, this.v1.z, this.v2.z, this.v3.z );
|
---|
23 |
|
---|
24 | return new THREE.Vector3( tx, ty, tz );
|
---|
25 |
|
---|
26 | }
|
---|
27 |
|
---|
28 | ); |
---|
Note:
See
TracBrowser
for help on using the repository browser.