@xviewer.js/core 1.0.0-alpha.49 → 1.0.0-alpha.50
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/main.js +3 -2
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -2
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/Viewer.d.ts +3 -1
package/dist/main.js
CHANGED
|
@@ -4632,7 +4632,7 @@ class Viewer extends EventEmitter {
|
|
|
4632
4632
|
const interval = 1 / this._targetFrameRate;
|
|
4633
4633
|
const delta = this._time - this._lastFrameTime;
|
|
4634
4634
|
if (delta >= interval) {
|
|
4635
|
-
this.loop(this._time - this._lastTime);
|
|
4635
|
+
this.loop(this._fixedFrameTime ? interval : this._time - this._lastTime);
|
|
4636
4636
|
this._lastTime = this._time;
|
|
4637
4637
|
this._lastFrameTime = this._time - delta % interval;
|
|
4638
4638
|
}
|
|
@@ -4927,7 +4927,7 @@ class Viewer extends EventEmitter {
|
|
|
4927
4927
|
near: 0.1,
|
|
4928
4928
|
far: 1000,
|
|
4929
4929
|
position: new three.Vector3(0, 0, 4)
|
|
4930
|
-
}, targetFrameRate = -1, colorSpace = three.SRGBColorSpace, toneMapping = three.LinearToneMapping, toneMappingExposure = 1, maxDPR = 1.5, path = "", resourcePath = "", dracoPath = "https://www.gstatic.com/draco/v1/decoders/", orientation = exports.Orientation.AUTO, loader = {}, tasker = {}, ...webglOpts } = {}){
|
|
4930
|
+
}, targetFrameRate = -1, fixedFrameTime = false, colorSpace = three.SRGBColorSpace, toneMapping = three.LinearToneMapping, toneMappingExposure = 1, maxDPR = 1.5, path = "", resourcePath = "", dracoPath = "https://www.gstatic.com/draco/v1/decoders/", orientation = exports.Orientation.AUTO, loader = {}, tasker = {}, ...webglOpts } = {}){
|
|
4931
4931
|
super();
|
|
4932
4932
|
this._dpr = 1;
|
|
4933
4933
|
this._width = 1;
|
|
@@ -4944,6 +4944,7 @@ class Viewer extends EventEmitter {
|
|
|
4944
4944
|
this._lastTime = 0;
|
|
4945
4945
|
this._lastFrameTime = 0;
|
|
4946
4946
|
this._targetFrameRate = -1;
|
|
4947
|
+
this._fixedFrameTime = false;
|
|
4947
4948
|
this._autoResize = true;
|
|
4948
4949
|
const el = canvas || document.getElementById("canvas");
|
|
4949
4950
|
const webgl = parepareWebGL(el, webglOpts);
|