rayzee 5.3.2 → 5.3.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayzee",
3
- "version": "5.3.2",
3
+ "version": "5.3.3",
4
4
  "type": "module",
5
5
  "description": "Real-time WebGPU path tracing engine built on Three.js",
6
6
  "main": "dist/rayzee.umd.js",
@@ -128,9 +128,6 @@ export class PathTracerApp extends EventDispatcher {
128
128
 
129
129
  // Resolution state
130
130
  this._resizeDebounceTimer = null;
131
- this._resizeObserver = null;
132
- this._lastObservedWidth = 0;
133
- this._lastObservedHeight = 0;
134
131
 
135
132
  }
136
133
 
@@ -386,7 +383,7 @@ export class PathTracerApp extends EventDispatcher {
386
383
  }
387
384
 
388
385
  clearTimeout( this._resizeDebounceTimer );
389
- this._resizeObserver?.disconnect();
386
+ window.removeEventListener( 'resize', this.resizeHandler );
390
387
 
391
388
  this.isInitialized = false;
392
389
 
@@ -642,9 +639,6 @@ export class PathTracerApp extends EventDispatcher {
642
639
  const width = this.canvas.clientWidth;
643
640
  const height = this.canvas.clientHeight;
644
641
  if ( width === 0 || height === 0 ) return;
645
- if ( width === this._lastObservedWidth && height === this._lastObservedHeight ) return;
646
- this._lastObservedWidth = width;
647
- this._lastObservedHeight = height;
648
642
 
649
643
  this.renderer.setPixelRatio( 1.0 );
650
644
  this.renderer.setSize( width, height, false );
@@ -1161,10 +1155,10 @@ export class PathTracerApp extends EventDispatcher {
1161
1155
 
1162
1156
  // Resize handling
1163
1157
  this.onResize();
1158
+ this.resizeHandler = () => this.onResize();
1164
1159
  if ( this._autoResize ) {
1165
1160
 
1166
- this._resizeObserver = new ResizeObserver( () => this.onResize() );
1167
- this._resizeObserver.observe( this.canvas );
1161
+ window.addEventListener( 'resize', this.resizeHandler );
1168
1162
 
1169
1163
  }
1170
1164