@needle-tools/gltf-progressive 4.0.0-alpha.3 → 4.0.0-alpha.5

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.
@@ -106,14 +106,9 @@ export class PromiseQueue {
106
106
  constructor(maxConcurrent, opts = {}) {
107
107
  this.maxConcurrent = maxConcurrent;
108
108
  this.debug = opts.debug ?? false;
109
- // Dedicated workers can have requestAnimationFrame when they are owned by a window.
110
- // Other worker-like scopes do not, so keep the frame-based tick when available and fall back to timers otherwise.
111
- if (typeof globalThis.requestAnimationFrame === "function") {
112
- globalThis.requestAnimationFrame(this.tick);
113
- }
114
- else {
115
- setTimeout(this.tick, 0);
116
- }
109
+ // Start with a timer, not requestAnimationFrame: window rAF does not fire while an immersive WebXR session
110
+ // is presenting (e.g. a page reloaded straight into VR via sessiongranted), so the queue would never tick.
111
+ setTimeout(this.tick, 0);
117
112
  }
118
113
  tick = () => {
119
114
  this.internalUpdate();
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // replaced at build time
2
- export const version = "4.0.0-alpha.3";
2
+ export const version = "4.0.0-alpha.5";
3
3
  globalThis["GLTF_PROGRESSIVE_VERSION"] = version;
4
4
  console.debug(`[gltf-progressive] version ${version || "-"}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/gltf-progressive",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-alpha.5",
4
4
  "description": "three.js support for loading glTF or GLB files that contain progressive loading data",
5
5
  "homepage": "https://needle.tools",
6
6
  "author": {