refactor ui builder to use util.defer

This commit is contained in:
Stewart Allen 2022-01-03 10:50:59 -05:00
commit a5cf4a7a87
2 changed files with 38 additions and 37 deletions

View file

@ -282,6 +282,13 @@ let util = mesh.util = {
deferFn.push(rec);
},
// return a function wrapper which can be re-used
deferWrap(fn, time) {
return function() {
util.defer(fn, time);
}
},
// @param object {THREE.Object3D | THREE.Object3D[] | MeshObject | MeshObject[]}
// @returns bounds modified for moto.Space
bounds(object) {