File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ export class NgtCanvas {
6161 private autoEffect = injectAutoEffect ( ) ;
6262
6363 private host = inject < ElementRef < HTMLElement > > ( ElementRef ) ;
64- private viewContainerRef = inject ( ViewContainerRef ) ;
6564 private zone = inject ( NgZone ) ;
6665 private environmentInjector = inject ( EnvironmentInjector ) ;
6766 private injector = inject ( Injector ) ;
@@ -204,7 +203,7 @@ export class NgtCanvas {
204203 [ provideNgtRenderer ( this . store ) ] ,
205204 this . environmentInjector ,
206205 ) ;
207- this . glRef = this . viewContainerRef . createComponent ( untracked ( this . sceneGraph ) , {
206+ this . glRef = untracked ( this . glCanvasViewContainerRef ) . createComponent ( untracked ( this . sceneGraph ) , {
208207 environmentInjector : this . glEnvironmentInjector ,
209208 injector : this . injector ,
210209 } ) ;
@@ -213,5 +212,3 @@ export class NgtCanvas {
213212 } ) ;
214213 }
215214}
216-
217- export const injectRoot = injectCanvasRootInitializer ;
Original file line number Diff line number Diff line change 1+ import { TestBed } from '@angular/core/testing' ;
2+ import { Mesh } from 'three' ;
3+ import { extend , injectCatalogue } from './catalogue' ;
4+
5+ describe ( 'renderer/catalogue' , ( ) => {
6+ test ( 'should extend properly' , ( ) => {
7+ TestBed . runInInjectionContext ( ( ) => {
8+ const catalogue = injectCatalogue ( ) ;
9+ expect ( catalogue ) . toEqual ( { } ) ;
10+
11+ extend ( { Mesh } ) ;
12+ expect ( catalogue ) . toEqual ( { Mesh } ) ;
13+ } ) ;
14+ } ) ;
15+ } ) ;
Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ export function processThreeEvent(
216216 while ( root . get ( 'previousRoot' ) ) {
217217 root = root . get ( 'previousRoot' ) ! ;
218218 }
219+
219220 const interactions = root . get ( 'internal' , 'interaction' ) || [ ] ;
220221 interactions . push ( instance ) ;
221222 }
You can’t perform that action at this time.
0 commit comments