@inweb/viewer-three 26.12.7 → 27.1.0
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/viewer-three.js +9 -15
- package/dist/viewer-three.js.map +1 -1
- package/dist/viewer-three.min.js +3 -3
- package/dist/viewer-three.module.js +9 -15
- package/dist/viewer-three.module.js.map +1 -1
- package/lib/Viewer/Viewer.d.ts +2 -1
- package/package.json +5 -5
- package/src/Viewer/Viewer.ts +10 -4
- package/src/Viewer/loaders/DynamicGltfLoader/DynamicGltfLoader.js +2 -12
package/dist/viewer-three.js
CHANGED
|
@@ -38097,8 +38097,6 @@ void main() {
|
|
|
38097
38097
|
this.frameDelay = 0;
|
|
38098
38098
|
this.graphicsObjectLimit = 10000;
|
|
38099
38099
|
this.totalLoadedObjects = 0;
|
|
38100
|
-
this.lastUpdateTime = 0;
|
|
38101
|
-
this.updateInterval = 1000;
|
|
38102
38100
|
this.handleToObjects = new Map();
|
|
38103
38101
|
this.originalObjects = new Set();
|
|
38104
38102
|
this.originalObjectsToSelection = new Set();
|
|
@@ -38774,11 +38772,7 @@ void main() {
|
|
|
38774
38772
|
loaded: loadedCount,
|
|
38775
38773
|
total: totalNodes,
|
|
38776
38774
|
});
|
|
38777
|
-
|
|
38778
|
-
if (currentTime - this.lastUpdateTime >= this.updateInterval) {
|
|
38779
|
-
this.dispatchEvent("update");
|
|
38780
|
-
this.lastUpdateTime = currentTime;
|
|
38781
|
-
}
|
|
38775
|
+
this.dispatchEvent("update");
|
|
38782
38776
|
await new Promise((resolve) => {
|
|
38783
38777
|
setTimeout(resolve, 0);
|
|
38784
38778
|
});
|
|
@@ -39118,7 +39112,6 @@ void main() {
|
|
|
39118
39112
|
this.objectTransforms.clear();
|
|
39119
39113
|
this.transformedGeometries.clear();
|
|
39120
39114
|
this.totalLoadedObjects = 0;
|
|
39121
|
-
this.lastUpdateTime = 0;
|
|
39122
39115
|
this.currentMemoryUsage = 0;
|
|
39123
39116
|
this.loadedGeometrySize = 0;
|
|
39124
39117
|
this.abortController = new AbortController();
|
|
@@ -39229,9 +39222,7 @@ void main() {
|
|
|
39229
39222
|
}
|
|
39230
39223
|
yieldToUI() {
|
|
39231
39224
|
return new Promise((resolve) => {
|
|
39232
|
-
|
|
39233
|
-
setTimeout(resolve, 0);
|
|
39234
|
-
});
|
|
39225
|
+
setTimeout(resolve, 0);
|
|
39235
39226
|
});
|
|
39236
39227
|
}
|
|
39237
39228
|
async optimizeScene() {
|
|
@@ -55399,6 +55390,7 @@ js: import "konva/skia-backend";
|
|
|
55399
55390
|
this.target = new Vector3(0, 0, 0);
|
|
55400
55391
|
this._activeDragger = null;
|
|
55401
55392
|
this._components = [];
|
|
55393
|
+
this._updateDelay = 1000;
|
|
55402
55394
|
this._renderNeeded = false;
|
|
55403
55395
|
this._renderTime = 0;
|
|
55404
55396
|
this.render = this.render.bind(this);
|
|
@@ -55536,16 +55528,18 @@ js: import "konva/skia-backend";
|
|
|
55536
55528
|
this.emitEvent({ type: "resize", width, height });
|
|
55537
55529
|
}
|
|
55538
55530
|
update(force = false) {
|
|
55531
|
+
const time = performance.now();
|
|
55532
|
+
force = force || time - this._renderTime >= this._updateDelay;
|
|
55539
55533
|
this._renderNeeded = true;
|
|
55540
55534
|
if (force)
|
|
55541
|
-
this.render();
|
|
55542
|
-
this.emitEvent({ type: "update",
|
|
55535
|
+
this.render(time);
|
|
55536
|
+
this.emitEvent({ type: "update", force });
|
|
55543
55537
|
}
|
|
55544
|
-
render(time
|
|
55538
|
+
render(time) {
|
|
55545
55539
|
var _a, _b;
|
|
55546
55540
|
if (!this.renderer)
|
|
55547
55541
|
return;
|
|
55548
|
-
if (!this._renderNeeded
|
|
55542
|
+
if (!this._renderNeeded)
|
|
55549
55543
|
return;
|
|
55550
55544
|
if (!time)
|
|
55551
55545
|
time = performance.now();
|