Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/manual/en/introduction/Import-via-modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ <h2>Importable Examples</h2>
<li>MorphAnimMesh</li>
<li>MorphBlendMesh</li>
<li>Ocean</li>
<li>RollerCoaster</li>
<li>Volume</li>
<li>VolumeSlice</li>
</ul>
Expand Down
30 changes: 15 additions & 15 deletions examples/js/RollerCoaster.js → examples/js/misc/RollerCoaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @author mrdoob / http://mrdoob.com/
*/

function RollerCoasterGeometry( curve, divisions ) {
THREE.RollerCoasterGeometry = function ( curve, divisions ) {

THREE.BufferGeometry.call( this );

Expand Down Expand Up @@ -210,11 +210,11 @@ function RollerCoasterGeometry( curve, divisions ) {
this.addAttribute( 'normal', new THREE.BufferAttribute( new Float32Array( normals ), 3 ) );
this.addAttribute( 'color', new THREE.BufferAttribute( new Float32Array( colors ), 3 ) );

}
};

RollerCoasterGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
THREE.RollerCoasterGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );

function RollerCoasterLiftersGeometry( curve, divisions ) {
THREE.RollerCoasterLiftersGeometry = function ( curve, divisions ) {

THREE.BufferGeometry.call( this );

Expand Down Expand Up @@ -384,11 +384,11 @@ function RollerCoasterLiftersGeometry( curve, divisions ) {
this.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( vertices ), 3 ) );
this.addAttribute( 'normal', new THREE.BufferAttribute( new Float32Array( normals ), 3 ) );

}
};

RollerCoasterLiftersGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
THREE.RollerCoasterLiftersGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );

function RollerCoasterShadowGeometry( curve, divisions ) {
THREE.RollerCoasterShadowGeometry = function ( curve, divisions ) {

THREE.BufferGeometry.call( this );

Expand Down Expand Up @@ -454,11 +454,11 @@ function RollerCoasterShadowGeometry( curve, divisions ) {

this.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( vertices ), 3 ) );

}
};

RollerCoasterShadowGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
THREE.RollerCoasterShadowGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );

function SkyGeometry() {
THREE.SkyGeometry = function () {

THREE.BufferGeometry.call( this );

Expand All @@ -485,11 +485,11 @@ function SkyGeometry() {

this.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( vertices ), 3 ) );

}
};

SkyGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
THREE.SkyGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );

function TreesGeometry( landscape ) {
THREE.TreesGeometry = function ( landscape ) {

THREE.BufferGeometry.call( this );

Expand Down Expand Up @@ -539,6 +539,6 @@ function TreesGeometry( landscape ) {
this.addAttribute( 'position', new THREE.BufferAttribute( new Float32Array( vertices ), 3 ) );
this.addAttribute( 'color', new THREE.BufferAttribute( new Float32Array( colors ), 3 ) );

}
};

TreesGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
THREE.TreesGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
26 changes: 26 additions & 0 deletions examples/jsm/misc/RollerCoaster.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {
BufferGeometry,
Curve,
Mesh,
Vector3
} from '../../../src/Three';

export class RollerCoasterGeometry extends BufferGeometry {
constructor(curve: Curve<Vector3>, divisions: number);
}

export class RollerCoasterLiftersGeometry extends BufferGeometry {
constructor(curve: Curve<Vector3>, divisions: number);
}

export class RollerCoasterShadowGeometry extends BufferGeometry {
constructor(curve: Curve<Vector3>, divisions: number);
}

export class SkyGeometry extends BufferGeometry {
constructor(curve: Curve<Vector3>, divisions: number);
}

export class TreesGeometry extends BufferGeometry {
constructor(landscape: Mesh);
}
Loading