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 23
23
"peerDependencies" : {
24
24
"@angular/common" : " ^15.1.0" ,
25
25
"@angular/core" : " ^15.1.0" ,
26
- "three" : " ^0.148.0 || ^0.149.0"
26
+ "three" : " ^0.148.0 || ^0.149.0 || ^0.150.0 "
27
27
},
28
28
"dependencies" : {
29
29
"ngx-resize" : " ^1.0.0" ,
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ export class NgtRoutedScene {
19
19
filter ( ( event ) => event instanceof ActivationEnd ) ,
20
20
takeUntil ( destroy$ )
21
21
)
22
- . subscribe ( ( ) => {
23
- cdr . detectChanges ( ) ;
24
- } ) ;
22
+ . subscribe ( cdr . detectChanges . bind ( cdr ) ) ;
25
23
}
26
24
}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { selectSlice } from '@rx-angular/state';
4
4
import * as THREE from 'three' ;
5
5
import { createLoop } from '../loop' ;
6
6
import type {
7
+ NgtAnyRecord ,
7
8
NgtBeforeRenderRecord ,
8
9
NgtCanvasInputs ,
9
10
NgtDpr ,
@@ -334,7 +335,11 @@ export class NgtStore extends NgtRxStore<NgtState> {
334
335
335
336
// Safely set color management if available.
336
337
// 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
+ }
338
343
const outputEncoding = linear ? THREE . LinearEncoding : THREE . sRGBEncoding ;
339
344
const toneMapping = flat ? THREE . NoToneMapping : THREE . ACESFilmicToneMapping ;
340
345
Original file line number Diff line number Diff line change 72
72
"ngx-resize" : " ^1.0.6" ,
73
73
"nice-color-palettes" : " ^3.0.0" ,
74
74
"rxjs" : " ~7.8.0" ,
75
- "three" : " ^0.149.0 " ,
75
+ "three" : " ^0.150.1 " ,
76
76
"three-stdlib" : " ^2.21.8" ,
77
77
"tslib" : " ^2.5.0" ,
78
78
"zone.js" : " 0.12.0"
You can’t perform that action at this time.
0 commit comments