File tree 3 files changed +17
-4
lines changed
3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ export class NgtCanvas {
61
61
private autoEffect = injectAutoEffect ( ) ;
62
62
63
63
private host = inject < ElementRef < HTMLElement > > ( ElementRef ) ;
64
- private viewContainerRef = inject ( ViewContainerRef ) ;
65
64
private zone = inject ( NgZone ) ;
66
65
private environmentInjector = inject ( EnvironmentInjector ) ;
67
66
private injector = inject ( Injector ) ;
@@ -204,7 +203,7 @@ export class NgtCanvas {
204
203
[ provideNgtRenderer ( this . store ) ] ,
205
204
this . environmentInjector ,
206
205
) ;
207
- this . glRef = this . viewContainerRef . createComponent ( untracked ( this . sceneGraph ) , {
206
+ this . glRef = untracked ( this . glCanvasViewContainerRef ) . createComponent ( untracked ( this . sceneGraph ) , {
208
207
environmentInjector : this . glEnvironmentInjector ,
209
208
injector : this . injector ,
210
209
} ) ;
@@ -213,5 +212,3 @@ export class NgtCanvas {
213
212
} ) ;
214
213
}
215
214
}
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(
216
216
while ( root . get ( 'previousRoot' ) ) {
217
217
root = root . get ( 'previousRoot' ) ! ;
218
218
}
219
+
219
220
const interactions = root . get ( 'internal' , 'interaction' ) || [ ] ;
220
221
interactions . push ( instance ) ;
221
222
}
You can’t perform that action at this time.
0 commit comments