add platform to mesh app
This commit is contained in:
parent
302931bfaf
commit
af49add2b9
4 changed files with 45 additions and 8 deletions
|
|
@ -1 +1,36 @@
|
|||
console.log('mesh loaded');
|
||||
// required for license and other grid app dependencies
|
||||
self.gapp = {};
|
||||
|
||||
function $(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
||||
function init() {
|
||||
let container = $('container'),
|
||||
moto = self.moto,
|
||||
sky = false;
|
||||
dark = false,
|
||||
ortho = false,
|
||||
zoomrev = true;
|
||||
zoomspd = 1,
|
||||
Space = moto.Space;
|
||||
|
||||
Space.showSkyGrid(sky);
|
||||
Space.setSkyColor(dark ? 0 : 0xffffff);
|
||||
Space.init(container, delta => { }, ortho);
|
||||
Space.platform.onMove(delta => { } );
|
||||
Space.platform.setRound(false);
|
||||
Space.platform.setZOff(0.2);
|
||||
Space.platform.setSize(500,500,2.5);
|
||||
Space.platform.setGrid(25,5);
|
||||
Space.view.setZoom(zoomrev, zoomspd);
|
||||
Space.useDefaultKeys(true);
|
||||
|
||||
$('curtain').style.display = 'none';
|
||||
}
|
||||
|
||||
document.onreadystatechange = function() {
|
||||
if (document.readyState === 'complete') {
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue