Plugin Documentation

Enable 3D rendering with Three.js plugin. Open included example project in Panda 2 to see how the plugin works.

Models

Three.js plugin can load OBJ models. If the model contains any material files, they will be automatically loaded.

game.addAsset('model.obj');

game.createScene('Main', {
    init: function() {
        var model = game.getOBJ('model.obj');
    }
});

Config

You can set THREE.WebGLRenderer parameters from game.config module:

game.config = {
    three: {
        preserveDrawingBuffer: true
    }
}

Debugging

View Three.js render and memory info on debug panel by setting these values in game.config module:

game.config = {
    three: {
        debugRender: true,
        debugMemory: true
    }
}