File tree 1 file changed +13
-1
lines changed
libs/core/src/lib/renderer
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -172,8 +172,20 @@ export class NgtRenderer2 implements Renderer2 {
172
172
return primitiveRendererNode ;
173
173
}
174
174
175
+ if ( ! name . startsWith ( 'ngt-' ) ) {
176
+ return createRendererNode ( 'platform' , platformElement , this . document ) ;
177
+ }
178
+
175
179
const threeName = kebabToPascal ( name . startsWith ( 'ngt-' ) ? name . slice ( 4 ) : name ) ;
176
- const threeTarget = this . catalogue [ threeName ] ;
180
+ let threeTarget = this . catalogue [ threeName ] ;
181
+
182
+ if ( ! threeTarget && threeName in THREE ) {
183
+ const threeSymbol = THREE [ threeName as keyof typeof THREE ] ;
184
+ if ( typeof threeSymbol === 'function' ) {
185
+ // we will attempt to prefill the catalogue with symbols from THREE
186
+ threeTarget = this . catalogue [ threeName ] = threeSymbol as NgtConstructorRepresentation ;
187
+ }
188
+ }
177
189
178
190
if ( threeTarget ) {
179
191
const threeInstance = prepare ( new threeTarget ( ...injectedArgs ) , name ) ;
You can’t perform that action at this time.
0 commit comments