@hkdigital/lib-core 0.4.64 → 0.4.65
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.
|
@@ -364,6 +364,17 @@ export default class SceneBase {
|
|
|
364
364
|
/* ==== Internal methods */
|
|
365
365
|
|
|
366
366
|
#startLoading() {
|
|
367
|
+
// Handle empty scenes - immediately transition to loaded if no sources
|
|
368
|
+
if (this.sources.length === 0) {
|
|
369
|
+
// Use setTimeout to avoid re-entrant state machine calls
|
|
370
|
+
setTimeout(() => {
|
|
371
|
+
if (this.#state.current === STATE_LOADING) {
|
|
372
|
+
this.#state.send(LOADED);
|
|
373
|
+
}
|
|
374
|
+
}, 0);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
|
|
367
378
|
for (let i = 0; i < this.sources.length; i++) {
|
|
368
379
|
const source = this.sources[i];
|
|
369
380
|
const loader = this.getLoaderFromSource(source);
|