2.3.0 • Published 2 years ago

ore-three-ts v2.3.0

Weekly downloads
51
License
MIT
Repository
github
Last release
2 years ago

Ore Three

three.js utils.

npm.io

Documentation Examples

install

You can get the library from npm.

$ npm install ore-three-ts
Import
import * as ORE from 'ore-three-ts';

Create Controller

import * as ORE from 'ore-three-ts';

import { ControllerScene } from './ControllerScene';

export class APP {

	private controller: ORE.Controller;

	constructor() {

		this.controller = new ORE.Controller();

		this.controller.addLayer( new ControllerScene(), {
			name: 'Main',
			canvas: document.querySelector( '#canvas' ) as HTMLCanvasElement,
		} );

	}

}

window.addEventListener( 'load', () => {

	let app = new APP();

} );

Create Scene

import * as THREE from 'three';
import * as ORE from 'ore-three-ts';

export class ControllerScene extends ORE.BaseLayer {

	private box: THREE.Mesh;

	constructor() {

		super();

	}

	public onBind( info: ORE.LayerInfo ) {

		super.onBind( info );

		this.camera.position.set( 0, 1.5, 4 );
		this.camera.lookAt( 0, 0, 0 );

		this.box = new THREE.Mesh( new THREE.BoxGeometry(), new THREE.MeshNormalMaterial() );
		this.scene.add( this.box );

	}

	public animate( deltaTime: number ) {

		this.box.rotateY( 1.0 * deltaTime );

		this.renderer.render( this.scene, this.camera );

	}

	public onResize() {

		super.onResize();

	}

	public onTouchStart( args: ORE.TouchEventArgs ) {

	}

	public onTouchMove( args: ORE.TouchEventArgs ) {

	}

	public onTouchEnd( args: ORE.TouchEventArgs ) {

	}

	public onHover( args: ORE.TouchEventArgs ) {

	}

	public onWheel( event: WheelEvent, trackpadDelta: number ) {

	}


}
2.3.0

2 years ago

2.3.0-beta1

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

2.0.0-dev8

3 years ago

2.0.0-dev7

3 years ago

2.0.0-dev6

3 years ago

2.0.0-dev5

3 years ago

2.0.0-dev4

3 years ago

2.0.0-dev3

3 years ago

2.0.0-dev2

3 years ago

2.0.0-dev1

3 years ago

1.0.5

4 years ago

1.0.5-dev2

4 years ago

1.0.5-dev3

4 years ago

1.0.5-dev1

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.3-dev5

4 years ago

1.0.3-dev4

4 years ago

1.0.3-dev3

4 years ago

1.0.3-dev2

4 years ago

1.0.3-dev1

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.2-beta2

4 years ago

1.0.2-beta3

4 years ago

1.0.2-beta

4 years ago

1.0.0

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago