File tree Expand file tree Collapse file tree 5 files changed +16
-13
lines changed
Expand file tree Collapse file tree 5 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 2323 "peerDependencies" : {
2424 "@angular/common" : " ^15.1.0" ,
2525 "@angular/core" : " ^15.1.0" ,
26- "three" : " ^0.148.0 || ^0.149.0"
26+ "three" : " ^0.148.0 || ^0.149.0 || ^0.150.0 "
2727 },
2828 "dependencies" : {
2929 "ngx-resize" : " ^1.0.0" ,
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ export class NgtRoutedScene {
1919 filter ( ( event ) => event instanceof ActivationEnd ) ,
2020 takeUntil ( destroy$ )
2121 )
22- . subscribe ( ( ) => {
23- cdr . detectChanges ( ) ;
24- } ) ;
22+ . subscribe ( cdr . detectChanges . bind ( cdr ) ) ;
2523 }
2624}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { selectSlice } from '@rx-angular/state';
44import * as THREE from 'three' ;
55import { createLoop } from '../loop' ;
66import type {
7+ NgtAnyRecord ,
78 NgtBeforeRenderRecord ,
89 NgtCanvasInputs ,
910 NgtDpr ,
@@ -334,7 +335,11 @@ export class NgtStore extends NgtRxStore<NgtState> {
334335
335336 // Safely set color management if available.
336337 // Avoid accessing THREE.ColorManagement to play nice with older versions
337- if ( THREE . ColorManagement ) THREE . ColorManagement . legacyMode = legacy ?? true ;
338+ if ( THREE . ColorManagement ) {
339+ const ColorManagement = THREE . ColorManagement as NgtAnyRecord ;
340+ if ( 'enabled' in ColorManagement ) ColorManagement [ 'enabled' ] = ! legacy ?? false ;
341+ else if ( 'legacyMode' in ColorManagement ) ColorManagement [ 'legacyMode' ] = legacy ?? true ;
342+ }
338343 const outputEncoding = linear ? THREE . LinearEncoding : THREE . sRGBEncoding ;
339344 const toneMapping = flat ? THREE . NoToneMapping : THREE . ACESFilmicToneMapping ;
340345
Original file line number Diff line number Diff line change 7272 "ngx-resize" : " ^1.0.6" ,
7373 "nice-color-palettes" : " ^3.0.0" ,
7474 "rxjs" : " ~7.8.0" ,
75- "three" : " ^0.149.0 " ,
75+ "three" : " ^0.150.1 " ,
7676 "three-stdlib" : " ^2.21.8" ,
7777 "tslib" : " ^2.5.0" ,
7878 "zone.js" : " 0.12.0"
You can’t perform that action at this time.
0 commit comments