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/dist/rayzee.es.js +5 -5
- package/dist/rayzee.es.js.map +1 -1
- package/dist/rayzee.umd.js +1 -1
- package/dist/rayzee.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/PathTracerApp.js +3 -9
package/package.json
CHANGED
package/src/PathTracerApp.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
1167
|
-
this._resizeObserver.observe( this.canvas );
|
|
1161
|
+
window.addEventListener( 'resize', this.resizeHandler );
|
|
1168
1162
|
|
|
1169
1163
|
}
|
|
1170
1164
|
|