File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -198,17 +198,12 @@ export class NgtCanvas {
198198 this . store . get ( 'events' ) . connect ?.( untracked ( this . glCanvas ) . nativeElement ) ;
199199 }
200200
201- untracked ( ( ) => {
202- this . glEnvironmentInjector = createEnvironmentInjector (
203- [ provideNgtRenderer ( this . store ) ] ,
204- this . environmentInjector ,
205- ) ;
206- this . glRef = untracked ( this . glCanvasViewContainerRef ) . createComponent ( untracked ( this . sceneGraph ) , {
207- environmentInjector : this . glEnvironmentInjector ,
208- injector : this . injector ,
209- } ) ;
210-
211- this . glRef . changeDetectorRef . detectChanges ( ) ;
201+ this . glEnvironmentInjector = createEnvironmentInjector ( [ provideNgtRenderer ( this . store ) ] , this . environmentInjector ) ;
202+ this . glRef = untracked ( this . glCanvasViewContainerRef ) . createComponent ( untracked ( this . sceneGraph ) , {
203+ environmentInjector : this . glEnvironmentInjector ,
204+ injector : this . injector ,
212205 } ) ;
206+
207+ this . glRef . changeDetectorRef . detectChanges ( ) ;
213208 }
214209}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export function makeRendererInstance<TCanvas extends NgtCanvasElement>(
3232 if ( is . renderer ( customRenderer ) ) return customRenderer ;
3333 return new WebGLRenderer ( {
3434 powerPreference : 'high-performance' ,
35- canvas : canvas ,
35+ canvas,
3636 antialias : true ,
3737 alpha : true ,
3838 ...glOptions ,
You can’t perform that action at this time.
0 commit comments