@luma.gl/engine 9.1.0-alpha.2 → 9.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-loop/make-animation-loop.js +1 -1
- package/dist/async-texture/async-texture.js +9 -3
- package/dist/dist.dev.js +499 -203
- package/dist/dist.min.js +56 -42
- package/dist/index.cjs +59 -43
- package/dist/index.cjs.map +4 -4
- package/dist/lib/clip-space.d.ts.map +1 -1
- package/dist/lib/clip-space.js +7 -7
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js +1 -1
- package/dist/shader-inputs.d.ts +5 -3
- package/dist/shader-inputs.d.ts.map +1 -1
- package/dist/shader-inputs.js +15 -9
- package/package.json +3 -3
- package/src/animation-loop/make-animation-loop.ts +1 -1
- package/src/async-texture/async-texture.ts +9 -3
- package/src/lib/clip-space.ts +2 -2
- package/src/model/model.ts +1 -1
- package/src/shader-inputs.ts +24 -18
|
@@ -6,7 +6,7 @@ import { AnimationLoop } from "./animation-loop.js";
|
|
|
6
6
|
/** Instantiates and runs the render loop */
|
|
7
7
|
export function makeAnimationLoop(AnimationLoopTemplateCtor, props) {
|
|
8
8
|
let renderLoop = null;
|
|
9
|
-
const device = props?.device || luma.createDevice();
|
|
9
|
+
const device = props?.device || luma.createDevice({ id: 'animation-loop' });
|
|
10
10
|
// Create an animation loop;
|
|
11
11
|
const animationLoop = new AnimationLoop({
|
|
12
12
|
...props,
|
|
@@ -67,11 +67,17 @@ export class AsyncTexture {
|
|
|
67
67
|
async function awaitAllPromises(x) {
|
|
68
68
|
x = await x;
|
|
69
69
|
if (Array.isArray(x)) {
|
|
70
|
-
return x.map(awaitAllPromises);
|
|
70
|
+
return await Promise.all(x.map(awaitAllPromises));
|
|
71
71
|
}
|
|
72
72
|
if (x && typeof x === 'object' && x.constructor === Object) {
|
|
73
|
-
const
|
|
74
|
-
|
|
73
|
+
const object = x;
|
|
74
|
+
const values = await Promise.all(Object.values(object));
|
|
75
|
+
const keys = Object.keys(object);
|
|
76
|
+
const resolvedObject = {};
|
|
77
|
+
for (let i = 0; i < keys.length; i++) {
|
|
78
|
+
resolvedObject[keys[i]] = values[i];
|
|
79
|
+
}
|
|
80
|
+
return resolvedObject;
|
|
75
81
|
}
|
|
76
82
|
return x;
|
|
77
83
|
}
|