rayzee 5.3.0 → 5.3.2
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
package/src/PathTracerApp.js
CHANGED
|
@@ -128,6 +128,9 @@ 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;
|
|
131
134
|
|
|
132
135
|
}
|
|
133
136
|
|
|
@@ -383,7 +386,7 @@ export class PathTracerApp extends EventDispatcher {
|
|
|
383
386
|
}
|
|
384
387
|
|
|
385
388
|
clearTimeout( this._resizeDebounceTimer );
|
|
386
|
-
|
|
389
|
+
this._resizeObserver?.disconnect();
|
|
387
390
|
|
|
388
391
|
this.isInitialized = false;
|
|
389
392
|
|
|
@@ -639,6 +642,9 @@ export class PathTracerApp extends EventDispatcher {
|
|
|
639
642
|
const width = this.canvas.clientWidth;
|
|
640
643
|
const height = this.canvas.clientHeight;
|
|
641
644
|
if ( width === 0 || height === 0 ) return;
|
|
645
|
+
if ( width === this._lastObservedWidth && height === this._lastObservedHeight ) return;
|
|
646
|
+
this._lastObservedWidth = width;
|
|
647
|
+
this._lastObservedHeight = height;
|
|
642
648
|
|
|
643
649
|
this.renderer.setPixelRatio( 1.0 );
|
|
644
650
|
this.renderer.setSize( width, height, false );
|
|
@@ -1155,10 +1161,10 @@ export class PathTracerApp extends EventDispatcher {
|
|
|
1155
1161
|
|
|
1156
1162
|
// Resize handling
|
|
1157
1163
|
this.onResize();
|
|
1158
|
-
this.resizeHandler = () => this.onResize();
|
|
1159
1164
|
if ( this._autoResize ) {
|
|
1160
1165
|
|
|
1161
|
-
|
|
1166
|
+
this._resizeObserver = new ResizeObserver( () => this.onResize() );
|
|
1167
|
+
this._resizeObserver.observe( this.canvas );
|
|
1162
1168
|
|
|
1163
1169
|
}
|
|
1164
1170
|
|
package/src/Stages/Display.js
CHANGED
|
@@ -699,7 +699,7 @@ export class InteractionManager extends EventDispatcher {
|
|
|
699
699
|
|
|
700
700
|
this.select( event.object );
|
|
701
701
|
app.refreshFrame();
|
|
702
|
-
app.dispatchEvent( { type:
|
|
702
|
+
app.dispatchEvent( { type: EngineEvents.OBJECT_SELECTED, object: event.object, uuid: event.uuid } );
|
|
703
703
|
|
|
704
704
|
} );
|
|
705
705
|
|
|
@@ -707,7 +707,7 @@ export class InteractionManager extends EventDispatcher {
|
|
|
707
707
|
|
|
708
708
|
this.select( null );
|
|
709
709
|
app.refreshFrame();
|
|
710
|
-
app.dispatchEvent( { type:
|
|
710
|
+
app.dispatchEvent( { type: EngineEvents.OBJECT_DESELECTED, object: event.object, uuid: event.uuid } );
|
|
711
711
|
|
|
712
712
|
} );
|
|
713
713
|
|