@preference-sl/pref-viewer 2.10.0-beta.26 → 2.10.0-beta.27
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/package.json +1 -1
- package/src/index.js +122 -72
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -61,7 +61,7 @@ class PrefViewer extends HTMLElement {
|
|
|
61
61
|
visible: false,
|
|
62
62
|
size: null,
|
|
63
63
|
timeStamp: null,
|
|
64
|
-
changed: false,
|
|
64
|
+
changed: { pending: false, success: false },
|
|
65
65
|
},
|
|
66
66
|
environment: {
|
|
67
67
|
name: "environment",
|
|
@@ -71,7 +71,7 @@ class PrefViewer extends HTMLElement {
|
|
|
71
71
|
visible: false,
|
|
72
72
|
size: null,
|
|
73
73
|
timeStamp: null,
|
|
74
|
-
changed: false,
|
|
74
|
+
changed: { pending: false, success: false },
|
|
75
75
|
},
|
|
76
76
|
materials: {
|
|
77
77
|
name: "materials",
|
|
@@ -81,35 +81,35 @@ class PrefViewer extends HTMLElement {
|
|
|
81
81
|
visible: false,
|
|
82
82
|
size: null,
|
|
83
83
|
timeStamp: null,
|
|
84
|
-
changed: false,
|
|
84
|
+
changed: { pending: false, success: false },
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
87
|
options: {
|
|
88
88
|
camera: {
|
|
89
89
|
value: null,
|
|
90
90
|
locked: true,
|
|
91
|
-
changed: false,
|
|
91
|
+
changed: { pending: false, success: false, oldValue: null, oldLocked: true },
|
|
92
92
|
},
|
|
93
93
|
materials: {
|
|
94
94
|
innerWall: {
|
|
95
95
|
value: null,
|
|
96
96
|
prefix: "innerWall",
|
|
97
|
-
changed: false,
|
|
97
|
+
changed: { pending: false, success: false, oldValue: null },
|
|
98
98
|
},
|
|
99
99
|
outerWall: {
|
|
100
100
|
value: null,
|
|
101
101
|
prefix: "outerWall",
|
|
102
|
-
changed: false,
|
|
102
|
+
changed: { pending: false, success: false, oldValue: null },
|
|
103
103
|
},
|
|
104
104
|
innerFloor: {
|
|
105
105
|
value: null,
|
|
106
106
|
prefix: "innerFloor",
|
|
107
|
-
changed: false,
|
|
107
|
+
changed: { pending: false, success: false, oldValue: null },
|
|
108
108
|
},
|
|
109
109
|
outerFloor: {
|
|
110
110
|
value: null,
|
|
111
111
|
prefix: "outerFloor",
|
|
112
|
-
changed: false,
|
|
112
|
+
changed: { pending: false, success: false, oldValue: null },
|
|
113
113
|
},
|
|
114
114
|
},
|
|
115
115
|
},
|
|
@@ -249,24 +249,24 @@ class PrefViewer extends HTMLElement {
|
|
|
249
249
|
this.loading = false;
|
|
250
250
|
|
|
251
251
|
const toLoadDetail = {
|
|
252
|
-
container_model: !!this.#data.containers.model.changed,
|
|
253
|
-
container_environment: !!this.#data.containers.environment.changed,
|
|
254
|
-
container_materials: !!this.#data.containers.materials.changed,
|
|
255
|
-
options_camera: !!this.#data.options.camera.changed,
|
|
256
|
-
options_innerWallMaterial: !!this.#data.options.materials.innerWall.changed,
|
|
257
|
-
options_outerWallMaterial: !!this.#data.options.materials.outerWall.changed,
|
|
258
|
-
options_innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed,
|
|
259
|
-
options_outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed,
|
|
252
|
+
container_model: !!this.#data.containers.model.changed.pending,
|
|
253
|
+
container_environment: !!this.#data.containers.environment.changed.pending,
|
|
254
|
+
container_materials: !!this.#data.containers.materials.changed.pending,
|
|
255
|
+
options_camera: !!this.#data.options.camera.changed.pending,
|
|
256
|
+
options_innerWallMaterial: !!this.#data.options.materials.innerWall.changed.pending,
|
|
257
|
+
options_outerWallMaterial: !!this.#data.options.materials.outerWall.changed.pending,
|
|
258
|
+
options_innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed.pending,
|
|
259
|
+
options_outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed.pending,
|
|
260
260
|
};
|
|
261
261
|
const loadedDetail = {
|
|
262
|
-
container_model: !!this.#data.containers.model.changed
|
|
263
|
-
container_environment: !!this.#data.containers.environment.changed
|
|
264
|
-
container_materials: !!this.#data.containers.materials.changed
|
|
265
|
-
options_camera: !!this.#data.options.camera.changed
|
|
266
|
-
options_innerWallMaterial: !!this.#data.options.materials.innerWall.changed
|
|
267
|
-
options_outerWallMaterial: !!this.#data.options.materials.outerWall.changed
|
|
268
|
-
options_innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed
|
|
269
|
-
options_outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed
|
|
262
|
+
container_model: !!this.#data.containers.model.changed.success,
|
|
263
|
+
container_environment: !!this.#data.containers.environment.changed.success,
|
|
264
|
+
container_materials: !!this.#data.containers.materials.changed.success,
|
|
265
|
+
options_camera: !!this.#data.options.camera.changed.success,
|
|
266
|
+
options_innerWallMaterial: !!this.#data.options.materials.innerWall.changed.success,
|
|
267
|
+
options_outerWallMaterial: !!this.#data.options.materials.outerWall.changed.success,
|
|
268
|
+
options_innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed.success,
|
|
269
|
+
options_outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed.success,
|
|
270
270
|
};
|
|
271
271
|
|
|
272
272
|
const detail = {
|
|
@@ -301,18 +301,18 @@ class PrefViewer extends HTMLElement {
|
|
|
301
301
|
|
|
302
302
|
#setStatusOptionsLoaded() {
|
|
303
303
|
const toLoadDetail = {
|
|
304
|
-
camera: !!this.#data.options.camera.changed,
|
|
305
|
-
innerWallMaterial: !!this.#data.options.materials.innerWall.changed,
|
|
306
|
-
outerWallMaterial: !!this.#data.options.materials.outerWall.changed,
|
|
307
|
-
innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed,
|
|
308
|
-
outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed,
|
|
304
|
+
camera: !!this.#data.options.camera.changed.pending,
|
|
305
|
+
innerWallMaterial: !!this.#data.options.materials.innerWall.changed.pending,
|
|
306
|
+
outerWallMaterial: !!this.#data.options.materials.outerWall.changed.pending,
|
|
307
|
+
innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed.pending,
|
|
308
|
+
outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed.pending,
|
|
309
309
|
};
|
|
310
310
|
const loadedDetail = {
|
|
311
|
-
camera: !!this.#data.options.camera.changed
|
|
312
|
-
innerWallMaterial: !!this.#data.options.materials.innerWall.changed
|
|
313
|
-
outerWallMaterial: !!this.#data.options.materials.outerWall.changed
|
|
314
|
-
innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed
|
|
315
|
-
outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed
|
|
311
|
+
camera: !!this.#data.options.camera.changed.success,
|
|
312
|
+
innerWallMaterial: !!this.#data.options.materials.innerWall.changed.success,
|
|
313
|
+
outerWallMaterial: !!this.#data.options.materials.outerWall.changed.success,
|
|
314
|
+
innerFloorMaterial: !!this.#data.options.materials.innerFloor.changed.success,
|
|
315
|
+
outerFloorMaterial: !!this.#data.options.materials.outerFloor.changed.success,
|
|
316
316
|
};
|
|
317
317
|
|
|
318
318
|
const detail = {
|
|
@@ -336,10 +336,17 @@ class PrefViewer extends HTMLElement {
|
|
|
336
336
|
if (!options || !options.camera) {
|
|
337
337
|
return false;
|
|
338
338
|
}
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
339
|
+
const prev = this.#data.options.camera.value;
|
|
340
|
+
const changed = options.camera !== prev;
|
|
341
|
+
|
|
342
|
+
this.#data.options.camera.changed.pending = changed;
|
|
343
|
+
this.#data.options.camera.changed.success = false;
|
|
344
|
+
if (changed) {
|
|
345
|
+
this.#data.options.camera.changed.oldValue = prev;
|
|
346
|
+
this.#data.options.camera.changed.oldLocked = this.#data.options.camera.locked;
|
|
347
|
+
this.#data.options.camera.value = options.camera;
|
|
348
|
+
}
|
|
349
|
+
return changed;
|
|
343
350
|
}
|
|
344
351
|
|
|
345
352
|
#checkMaterialsChanged(options) {
|
|
@@ -349,10 +356,18 @@ class PrefViewer extends HTMLElement {
|
|
|
349
356
|
let someChanged = false;
|
|
350
357
|
Object.keys(this.#data.options.materials).forEach((material) => {
|
|
351
358
|
const key = `${material}Material`;
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
359
|
+
const state = this.#data.options.materials[material];
|
|
360
|
+
const prev = state.value;
|
|
361
|
+
const incoming = options[key];
|
|
362
|
+
const materialChanged = !!incoming && incoming !== prev;
|
|
363
|
+
|
|
364
|
+
state.changed.pending = materialChanged;
|
|
365
|
+
state.changed.success = false;
|
|
366
|
+
if (materialChanged) {
|
|
367
|
+
state.changed.oldValue = prev;
|
|
368
|
+
state.value = incoming;
|
|
369
|
+
}
|
|
370
|
+
someChanged = someChanged || materialChanged;
|
|
356
371
|
});
|
|
357
372
|
return someChanged;
|
|
358
373
|
}
|
|
@@ -361,19 +376,23 @@ class PrefViewer extends HTMLElement {
|
|
|
361
376
|
if (success) {
|
|
362
377
|
container.timeStamp = container.changed.timeStamp;
|
|
363
378
|
container.size = container.changed.size;
|
|
364
|
-
container.changed.success =
|
|
365
|
-
|
|
366
|
-
container.source = container.changed.source;
|
|
367
|
-
container.changed = false;
|
|
379
|
+
container.changed.success = true;
|
|
380
|
+
container.changed.pending = false;
|
|
368
381
|
} else {
|
|
369
|
-
container.changed = false;
|
|
382
|
+
container.changed.success = false;
|
|
383
|
+
container.changed.pending = false;
|
|
370
384
|
}
|
|
371
385
|
}
|
|
372
386
|
|
|
373
387
|
#resetChangedFlags() {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
388
|
+
const reset = (node) => {
|
|
389
|
+
if (!node.changed) node.changed = {};
|
|
390
|
+
node.changed.pending = false;
|
|
391
|
+
node.changed.success = false;
|
|
392
|
+
};
|
|
393
|
+
Object.values(this.#data.containers).forEach(reset);
|
|
394
|
+
Object.values(this.#data.options.materials).forEach(reset);
|
|
395
|
+
reset(this.#data.options.camera);
|
|
377
396
|
}
|
|
378
397
|
|
|
379
398
|
// Babylon.js
|
|
@@ -646,7 +665,7 @@ class PrefViewer extends HTMLElement {
|
|
|
646
665
|
try {
|
|
647
666
|
JSON.parse(decoded);
|
|
648
667
|
isJson = true;
|
|
649
|
-
} catch {}
|
|
668
|
+
} catch { }
|
|
650
669
|
extension = isJson ? ".gltf" : ".glb";
|
|
651
670
|
const type = isJson ? "model/gltf+json" : "model/gltf-binary";
|
|
652
671
|
const array = Uint8Array.from(decoded, (c) => c.charCodeAt(0));
|
|
@@ -675,17 +694,17 @@ class PrefViewer extends HTMLElement {
|
|
|
675
694
|
if (!optionMaterial || !optionMaterial.prefix || !optionMaterial.value) {
|
|
676
695
|
return false;
|
|
677
696
|
}
|
|
678
|
-
|
|
697
|
+
|
|
679
698
|
const material = this.#data.containers.materials.assetContainer?.materials.find((mat) => mat.name === optionMaterial.value) || null;
|
|
680
699
|
if (!material) {
|
|
681
700
|
return false;
|
|
682
701
|
}
|
|
683
|
-
|
|
702
|
+
|
|
684
703
|
const containers = [];
|
|
685
|
-
if (this.#data.containers.model.assetContainer && (this.#data.containers.model.changed || this.#data.containers.materials.changed || optionMaterial.changed)) {
|
|
704
|
+
if (this.#data.containers.model.assetContainer && (this.#data.containers.model.changed.pending || this.#data.containers.materials.changed.pending || optionMaterial.changed.pending)) {
|
|
686
705
|
containers.push(this.#data.containers.model.assetContainer);
|
|
687
706
|
}
|
|
688
|
-
if (this.#data.containers.environment.assetContainer && (this.#data.containers.environment.changed || this.#data.containers.materials.changed || optionMaterial.changed)) {
|
|
707
|
+
if (this.#data.containers.environment.assetContainer && (this.#data.containers.environment.changed.pending || this.#data.containers.materials.changed.pending || optionMaterial.changed.pending)) {
|
|
689
708
|
containers.push(this.#data.containers.environment.assetContainer);
|
|
690
709
|
}
|
|
691
710
|
if (containers.length === 0) {
|
|
@@ -704,8 +723,11 @@ class PrefViewer extends HTMLElement {
|
|
|
704
723
|
|
|
705
724
|
if (someSetted) {
|
|
706
725
|
optionMaterial.changed.success = true;
|
|
707
|
-
|
|
726
|
+
optionMaterial.changed.pending = false;
|
|
727
|
+
} else if (optionMaterial.changed.pending) {
|
|
708
728
|
optionMaterial.value = optionMaterial.changed.oldValue;
|
|
729
|
+
optionMaterial.changed.success = false;
|
|
730
|
+
optionMaterial.changed.pending = false;
|
|
709
731
|
}
|
|
710
732
|
|
|
711
733
|
return someSetted;
|
|
@@ -721,27 +743,39 @@ class PrefViewer extends HTMLElement {
|
|
|
721
743
|
}
|
|
722
744
|
|
|
723
745
|
#setOptionsCamera() {
|
|
724
|
-
if (
|
|
746
|
+
if (
|
|
747
|
+
!this.#data.options.camera.value &&
|
|
748
|
+
!this.#data.options.camera.changed.pending &&
|
|
749
|
+
!this.#data.containers.model.changed.pending &&
|
|
750
|
+
!this.#data.containers.environment.changed.pending
|
|
751
|
+
) {
|
|
725
752
|
return false;
|
|
726
753
|
}
|
|
727
754
|
|
|
728
755
|
let camera = this.#data.containers.model.assetContainer?.cameras.find((thisCamera) => thisCamera.name === this.#data.options.camera.value) || this.#data.containers.environment.assetContainer?.cameras.find((thisCamera) => thisCamera.name === this.#data.options.camera.value) || null;
|
|
729
756
|
if (!camera) {
|
|
730
757
|
if (this.#data.options.camera.changed?.oldValue && this.#data.options.camera.changed?.oldValue !== this.#data.options.camera.value) {
|
|
731
|
-
camera = this.#data.containers.model.assetContainer?.cameras.find((thisCamera) => thisCamera.name === this.#data.options.camera.changed.oldValue) || this.#data.containers.environment.assetContainer?.cameras.find((thisCamera) => thisCamera.name ===
|
|
758
|
+
camera = this.#data.containers.model.assetContainer?.cameras.find((thisCamera) => thisCamera.name === this.#data.options.camera.changed.oldValue) || this.#data.containers.environment.assetContainer?.cameras.find((thisCamera) => thisCamera.name === this.#data.options.camera.changed.oldValue) || null;
|
|
732
759
|
}
|
|
733
760
|
if (camera) {
|
|
734
761
|
camera.metadata = { locked: this.#data.options.camera.changed.oldLocked };
|
|
735
762
|
this.#data.options.camera.value = this.#data.options.camera.changed.oldValue;
|
|
736
763
|
this.#data.options.camera.locked = this.#data.options.camera.changed.oldLocked;
|
|
764
|
+
this.#data.options.camera.changed.success = false;
|
|
765
|
+
this.#data.options.camera.changed.pending = false;
|
|
737
766
|
} else {
|
|
738
767
|
camera = this.#camera;
|
|
739
768
|
this.#data.options.camera.value = null;
|
|
740
769
|
this.#data.options.camera.locked = this.#camera.metadata.locked;
|
|
770
|
+
this.#data.options.camera.changed.success = false;
|
|
771
|
+
this.#data.options.camera.changed.pending = false;
|
|
741
772
|
}
|
|
742
|
-
this.#data.options.camera.changed.success = false;
|
|
743
773
|
} else {
|
|
744
774
|
camera.metadata = { locked: this.#data.options.camera.locked };
|
|
775
|
+
if (this.#data.options.camera.changed.pending) {
|
|
776
|
+
this.#data.options.camera.changed.success = true;
|
|
777
|
+
this.#data.options.camera.changed.pending = false;
|
|
778
|
+
}
|
|
745
779
|
}
|
|
746
780
|
if (!this.#data.options.camera.locked && this.#data.options.camera.value !== null) {
|
|
747
781
|
camera.attachControl(this.#canvas, true);
|
|
@@ -788,10 +822,11 @@ class PrefViewer extends HTMLElement {
|
|
|
788
822
|
const object = await loadModel(storage.id, storage.table);
|
|
789
823
|
source = object.data;
|
|
790
824
|
if (object.timeStamp === container.timeStamp) {
|
|
791
|
-
container.changed = false;
|
|
825
|
+
container.changed.pending = false;
|
|
826
|
+
container.changed.success = false;
|
|
792
827
|
return false;
|
|
793
828
|
} else {
|
|
794
|
-
Object.assign(container.changed, { timeStamp: object.timeStamp, size: object.size, success: false });
|
|
829
|
+
Object.assign(container.changed, { timeStamp: object.timeStamp, size: object.size, success: false, pending: true });
|
|
795
830
|
}
|
|
796
831
|
}
|
|
797
832
|
|
|
@@ -806,12 +841,13 @@ class PrefViewer extends HTMLElement {
|
|
|
806
841
|
file = new File([blob], `${container.name}${extension}`, {
|
|
807
842
|
type: blob.type,
|
|
808
843
|
});
|
|
809
|
-
if (!container.changed) {
|
|
844
|
+
if (!container.changed.pending) {
|
|
810
845
|
if (container.timeStamp === null && container.size === size) {
|
|
811
|
-
container.changed = false;
|
|
846
|
+
container.changed.pending = false;
|
|
847
|
+
container.changed.success = false;
|
|
812
848
|
return false;
|
|
813
849
|
} else {
|
|
814
|
-
Object.assign(container.changed, { timeStamp: null, size: size, success: false });
|
|
850
|
+
Object.assign(container.changed, { timeStamp: null, size: size, success: false, pending: true });
|
|
815
851
|
}
|
|
816
852
|
}
|
|
817
853
|
} else {
|
|
@@ -819,10 +855,11 @@ class PrefViewer extends HTMLElement {
|
|
|
819
855
|
extension = extMatch ? `.${extMatch[1].toLowerCase()}` : ".gltf";
|
|
820
856
|
const [fileSize, fileTimeStamp] = await this.#getServerFileDataHeader(source);
|
|
821
857
|
if (container.size === fileSize && container.timeStamp === fileTimeStamp) {
|
|
822
|
-
container.changed = false;
|
|
858
|
+
container.changed.pending = false;
|
|
859
|
+
container.changed.success = false;
|
|
823
860
|
return false;
|
|
824
861
|
} else {
|
|
825
|
-
Object.assign(container.changed, { timeStamp: fileTimeStamp, size: fileSize, success: false });
|
|
862
|
+
Object.assign(container.changed, { timeStamp: fileTimeStamp, size: fileSize, success: false, pending: true });
|
|
826
863
|
}
|
|
827
864
|
}
|
|
828
865
|
|
|
@@ -917,17 +954,24 @@ class PrefViewer extends HTMLElement {
|
|
|
917
954
|
|
|
918
955
|
// Containers
|
|
919
956
|
const loadModel = !!config.model?.storage;
|
|
920
|
-
|
|
957
|
+
// CHANGED: marcar pending, no boolean
|
|
958
|
+
this.#data.containers.model.changed.pending = loadModel;
|
|
959
|
+
this.#data.containers.model.changed.success = false;
|
|
960
|
+
this.#data.containers.model.changed.storage = this.#data.containers.model.storage;
|
|
921
961
|
this.#data.containers.model.storage = loadModel ? config.model.storage : this.#data.containers.model.storage;
|
|
922
962
|
this.#data.containers.model.show = config.model?.visible !== undefined ? config.model.visible : this.#data.containers.model.show;
|
|
923
963
|
|
|
924
964
|
const loadEnvironment = !!config.scene?.storage;
|
|
925
|
-
this.#data.containers.environment.changed = loadEnvironment
|
|
965
|
+
this.#data.containers.environment.changed.pending = loadEnvironment;
|
|
966
|
+
this.#data.containers.environment.changed.success = false;
|
|
967
|
+
this.#data.containers.environment.changed.storage = this.#data.containers.environment.storage;
|
|
926
968
|
this.#data.containers.environment.storage = loadEnvironment ? config.scene.storage : this.#data.containers.environment.storage;
|
|
927
969
|
this.#data.containers.environment.show = config.scene?.visible !== undefined ? config.scene.visible : this.#data.containers.environment.show;
|
|
928
970
|
|
|
929
971
|
const loadMaterials = !!config.materials?.storage;
|
|
930
|
-
this.#data.containers.materials.changed = loadMaterials
|
|
972
|
+
this.#data.containers.materials.changed.pending = loadMaterials;
|
|
973
|
+
this.#data.containers.materials.changed.success = false;
|
|
974
|
+
this.#data.containers.materials.changed.storage = this.#data.containers.materials.storage;
|
|
931
975
|
this.#data.containers.materials.storage = loadMaterials ? config.materials.storage : this.#data.containers.materials.storage;
|
|
932
976
|
|
|
933
977
|
// Options
|
|
@@ -965,7 +1009,9 @@ class PrefViewer extends HTMLElement {
|
|
|
965
1009
|
return false;
|
|
966
1010
|
}
|
|
967
1011
|
const loadModel = !!model.storage;
|
|
968
|
-
this.#data.containers.model.changed = loadModel
|
|
1012
|
+
this.#data.containers.model.changed.pending = loadModel;
|
|
1013
|
+
this.#data.containers.model.changed.success = false;
|
|
1014
|
+
this.#data.containers.model.changed.storage = this.#data.containers.model.storage;
|
|
969
1015
|
this.#data.containers.model.storage = loadModel ? model.storage : this.#data.containers.model.storage;
|
|
970
1016
|
this.#data.containers.model.show = model.visible !== undefined ? model.visible : this.#data.containers.model.show;
|
|
971
1017
|
this.initialized && this.#loadContainers(loadModel, false, false);
|
|
@@ -977,7 +1023,9 @@ class PrefViewer extends HTMLElement {
|
|
|
977
1023
|
return false;
|
|
978
1024
|
}
|
|
979
1025
|
const loadEnvironment = !!scene.storage;
|
|
980
|
-
this.#data.containers.environment.changed = loadEnvironment
|
|
1026
|
+
this.#data.containers.environment.changed.pending = loadEnvironment;
|
|
1027
|
+
this.#data.containers.environment.changed.success = false;
|
|
1028
|
+
this.#data.containers.environment.changed.storage = this.#data.containers.environment.storage;
|
|
981
1029
|
this.#data.containers.environment.storage = loadEnvironment ? scene.storage : this.#data.containers.environment.storage;
|
|
982
1030
|
this.#data.containers.environment.show = scene.visible !== undefined ? scene.visible : this.#data.containers.environment.show;
|
|
983
1031
|
this.initialized && this.#loadContainers(false, loadEnvironment, false);
|
|
@@ -989,7 +1037,9 @@ class PrefViewer extends HTMLElement {
|
|
|
989
1037
|
return false;
|
|
990
1038
|
}
|
|
991
1039
|
const loadMaterials = !!materials.storage;
|
|
992
|
-
this.#data.containers.materials.changed = loadMaterials
|
|
1040
|
+
this.#data.containers.materials.changed.pending = loadMaterials;
|
|
1041
|
+
this.#data.containers.materials.changed.success = false;
|
|
1042
|
+
this.#data.containers.materials.changed.storage = this.#data.containers.materials.storage;
|
|
993
1043
|
this.#data.containers.materials.storage = loadMaterials ? materials.storage : this.#data.containers.materials.storage;
|
|
994
1044
|
this.initialized && this.#loadContainers(false, false, loadMaterials);
|
|
995
1045
|
}
|