three-engine
What is three-engine?
three-engine let's you create a three.js scene with one line of code.
Compatibility
Complatible with three.js r.148
How to install
npm install three-engine
How to use
import * as THREE from 'three';
import ThreeEngine from 'three-engine';
new ThreeEngine({
callbacks: {
init: threeEngine => {
const box = new THREE.Mesh(new THREE.BoxGeometry(0.5, 0.5, 0.5), new THREE.MeshStandardMaterial);
box.setupClickable();
threeEngine.scene.add(box);
box.onClick = function(){console.log('Clicked')};
box.onHover = function(){console.log('Hovered')};
}
},
setup: {
enableControls: true,
enableTestLights: true,
enableAntialias: true,
DEV_MODE: true
}
});
Example
You can find example in /examples/example.js.
To run example:
git clone https://github.com/allala0/three-engine.git
cd three-engine
npm install
npm run example
TODO
Creator:
Artur Brytkowski