test dependency injection
This commit is contained in:
parent
0645c74f9a
commit
a1dc0dea06
10 changed files with 98 additions and 46 deletions
|
|
@ -3,7 +3,10 @@
|
|||
"use strict";
|
||||
|
||||
(function() {
|
||||
var AP = {};
|
||||
|
||||
gapp.register('add.array');
|
||||
|
||||
let AP = {};
|
||||
|
||||
/** ******************************************************************
|
||||
* Array prototype helpers
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
/** Copyright 2014-2019 Stewart Allen -- All Rights Reserved */
|
||||
|
||||
"use strict";
|
||||
|
||||
if (!self.ArrayWriter) {
|
||||
gapp.register('add.class');
|
||||
}
|
||||
|
||||
self.ArrayWriter = class ArrayWriter {
|
||||
constructor() {
|
||||
this.pos = 0;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
(function() {
|
||||
|
||||
gapp.register('add.three');
|
||||
|
||||
var MP = THREE.Mesh.prototype,
|
||||
BP = THREE.BufferGeometry.prototype;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/** node compatibility **/
|
||||
|
||||
if (typeof(self) === 'undefined') {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
(function () {
|
||||
|
||||
/** debug and logging **/
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ document.onreadystatechange = function() {
|
|||
|
||||
// finalize modules
|
||||
gapp.finalize("main.mesh", [
|
||||
"moto.client", // dep: moto.client
|
||||
"moto.broker", // dep: moto.broker
|
||||
"moto.space" // dep: moto.space
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
(function() {
|
||||
|
||||
gapp.finalize("mesh.pool");
|
||||
gapp.finalize("mesh.pool", [
|
||||
"moto.worker" // dep: moto.worker
|
||||
]);
|
||||
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
// start worker pool (disabled for now with *0)
|
||||
moto.client.start(`/code/mesh_pool?${gapp.version}`, moto.client.max() * 0);
|
||||
|
||||
gapp.finalize("mesh.work");
|
||||
gapp.finalize("mesh.work", [
|
||||
"moto.client" // dep: moto.client
|
||||
]);
|
||||
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
module.exports = terms;
|
||||
}
|
||||
|
||||
// allow license to be required() by app without gapp
|
||||
if (typeof(self) !== 'undefined' && self.gapp) {
|
||||
let app = self.gapp;
|
||||
app.license = terms.LICENSE;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
"use strict";
|
||||
|
||||
(function() {
|
||||
gapp.register('moto.space');
|
||||
gapp.register('moto.space', [
|
||||
'add.array', // dep: add.array
|
||||
'moto.orbit' // dep: moto.orbit
|
||||
]);
|
||||
|
||||
let MOTO = self.moto = self.moto || {},
|
||||
WIN = window,
|
||||
|
|
|
|||
Loading…
Reference in a new issue