@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/module.js CHANGED
@@ -4630,7 +4630,7 @@ class Viewer extends EventEmitter {
4630
4630
  const interval = 1 / this._targetFrameRate;
4631
4631
  const delta = this._time - this._lastFrameTime;
4632
4632
  if (delta >= interval) {
4633
- this.loop(this._time - this._lastTime);
4633
+ this.loop(this._fixedFrameTime ? interval : this._time - this._lastTime);
4634
4634
  this._lastTime = this._time;
4635
4635
  this._lastFrameTime = this._time - delta % interval;
4636
4636
  }
@@ -4925,7 +4925,7 @@ class Viewer extends EventEmitter {
4925
4925
  near: 0.1,
4926
4926
  far: 1000,
4927
4927
  position: new Vector3(0, 0, 4)
4928
- }, targetFrameRate = -1, colorSpace = SRGBColorSpace, toneMapping = LinearToneMapping, toneMappingExposure = 1, maxDPR = 1.5, path = "", resourcePath = "", dracoPath = "https://www.gstatic.com/draco/v1/decoders/", orientation = Orientation.AUTO, loader = {}, tasker = {}, ...webglOpts } = {}){
4928
+ }, targetFrameRate = -1, fixedFrameTime = false, colorSpace = SRGBColorSpace, toneMapping = LinearToneMapping, toneMappingExposure = 1, maxDPR = 1.5, path = "", resourcePath = "", dracoPath = "https://www.gstatic.com/draco/v1/decoders/", orientation = Orientation.AUTO, loader = {}, tasker = {}, ...webglOpts } = {}){
4929
4929
  super();
4930
4930
  this._dpr = 1;
4931
4931
  this._width = 1;
@@ -4942,6 +4942,7 @@ class Viewer extends EventEmitter {
4942
4942
  this._lastTime = 0;
4943
4943
  this._lastFrameTime = 0;
4944
4944
  this._targetFrameRate = -1;
4945
+ this._fixedFrameTime = false;
4945
4946
  this._autoResize = true;
4946
4947
  const el = canvas || document.getElementById("canvas");
4947
4948
  const webgl = parepareWebGL(el, webglOpts);