rayzee 5.3.2 → 5.3.4

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.4",
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 );
@@ -685,8 +679,6 @@ export class PathTracerApp extends EventDispatcher {
685
679
 
686
680
  setCanvasSize( width, height ) {
687
681
 
688
- this.canvas.style.width = `${width}px`;
689
- this.canvas.style.height = `${height}px`;
690
682
  this.denoisingManager?.syncCanvasStyle( width, height );
691
683
 
692
684
  if ( width === 0 || height === 0 ) return;
@@ -1161,10 +1153,10 @@ export class PathTracerApp extends EventDispatcher {
1161
1153
 
1162
1154
  // Resize handling
1163
1155
  this.onResize();
1156
+ this.resizeHandler = () => this.onResize();
1164
1157
  if ( this._autoResize ) {
1165
1158
 
1166
- this._resizeObserver = new ResizeObserver( () => this.onResize() );
1167
- this._resizeObserver.observe( this.canvas );
1159
+ window.addEventListener( 'resize', this.resizeHandler );
1168
1160
 
1169
1161
  }
1170
1162