O ptimized
G raphics
A dvanced
R endering
ECS Deferred Rendering Engine
Ogar 😼 is pronounced as: https://translate.google.com/?hl=pl&sl=pl&tl=en&text=ogar&op=translate
- Fork the repository
- Open 2 consoles in the root of the project
- Run these 2 scripts at the same time:
a) will continuously build the src/Main.js into dist/
and examples/dist/
npm run build
b) will run a simple http server inside the examples/
folder. Assumes you have http-server
package installed globally
npm run start
- Navigate to 'http://localhost:8080/' and select an example to run
import * as OGAR from './dist/OGAR.module.js';
const engine = new OGAR.Engine();
engine.init( document.body );
const ogarExporter = new OGAR.OGARExporter();
const ogarLoader = new OGAR.OGARLoader();
const mesh = new THREE.Mesh( someGeometry, someMaterial );
// Export and save mesh into 'cube.ogar' 3d model
ogarExporter.exportMesh( mesh, 'cube' );
// Load 'cube.ogar' 3d model
ogarLoader.load('cube.ogar')
.then( ( asset ) => {
const loadedModel = new THREE.Mesh( asset.geometry, someMaterial );
engine.scene.add( loadedModel );
});