fix ordering of deep dependencies

This commit is contained in:
Stewart Allen 2021-12-29 10:57:10 -05:00
commit 2d189790dc
3 changed files with 8 additions and 13 deletions

15
app.js
View file

@ -69,7 +69,8 @@ function init(mod) {
}
let deep = find_deps(dep, seen);
if (deep) {
deps.appendAll(deep);
// deeper dependencies go first
deps = [...deep, ...deps];
}
}
}
@ -480,23 +481,11 @@ const script = {
mesh : [
"main/gapp",
"moto/license",
"ext/three",
"ext/three-bgu",
"ext/three-svg",
"ext/tween",
"ext/fsave",
"&main/mesh"
],
mesh_work : [
"main/gapp",
"moto/license",
"ext/jszip",
"ext/clip2",
"ext/earcut",
"ext/base64",
"ext/three",
"add/three",
"ext/three-bgu",
"&mesh/work"
],
mesh_pool : [

View file

@ -7,6 +7,8 @@
// 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.client" // dep: moto.client
]);

View file

@ -3,6 +3,10 @@
"use strict";
(function() {
// dep: ext.tween
// dep: ext.three
// dep: ext.three-bgu
// dep: ext.three-svg
gapp.register('moto.space', [
'add.array', // dep: add.array
'moto.orbit' // dep: moto.orbit