add mesh.object -- add dependencies to loaders

This commit is contained in:
Stewart Allen 2021-12-29 16:49:15 -05:00
commit 77eae604c7
10 changed files with 63 additions and 19 deletions

29
src/mesh/object.js Normal file
View file

@ -0,0 +1,29 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
"use strict";
(function() {
gapp.register("mesh.object", [
"add.three", // dep: add.three
"moto.license", // dep: moto.license
"moto.worker", // dep: moto.worker
]);
let mesh = self.mesh = self.mesh || {};
if (mesh.object) return;
mesh.object = class MeshObject {
constructor(data) {
let { file, mesh } = data;
if (!mesh) {
dbug.error(`'${file}' missing mesh data`);
return;
}
console.log({new_mesh_object: data});
}
};
})();

View file

@ -4,9 +4,9 @@
(function() {
gapp.finalize("mesh.pool", [
"moto.license", // dep: moto.license
"moto.worker" // dep: moto.worker
]);
gapp.finalize("mesh.pool", [
"moto.license", // dep: moto.license
"moto.worker" // dep: moto.worker
]);
})();

View file

@ -4,14 +4,14 @@
(function() {
// start worker pool (disabled for now with *0)
moto.client.start(`/code/mesh_pool?${gapp.version}`, moto.client.max() * 0);
// start worker pool (disabled for now with *0)
moto.client.start(`/code/mesh_pool?${gapp.version}`, moto.client.max() * 0);
// dep: ext.three
// dep: ext.three-bgu
gapp.finalize("mesh.work", [
"moto.license", // dep: moto.license
"moto.client" // dep: moto.client
]);
// dep: ext.three
// dep: ext.three-bgu
gapp.finalize("mesh.work", [
"moto.license", // dep: moto.license
"moto.client" // dep: moto.client
]);
})();