Skip to content

Commit b62b21d

Browse files
committed
fix(core): adjust portals with new renderer (2)
1 parent f0243b9 commit b62b21d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

libs/core/src/lib/portal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { updateCamera } from './utils/update';
3939
schemas: [CUSTOM_ELEMENTS_SCHEMA],
4040
changeDetection: ChangeDetectionStrategy.OnPush,
4141
})
42-
export class NgtPortalBeforeRender {
42+
export class NgtPortalAutoRender {
4343
private portalStore = injectStore({ host: true });
4444
private parentStore = injectStore({ skipSelf: true });
4545
private portal = inject(NgtPortal, { host: true });

libs/core/src/lib/three-types.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ export type NgtMathProperties<P> = {
3333
[K in keyof P as P[K] extends NgtMathTypes ? K : never]: P[K] extends NgtMathTypes ? NgtMathType<P[K]> : never;
3434
};
3535

36+
export type NgtNullableRaycast<P> = {
37+
[K in keyof P as K extends 'raycast' ? K : never]: K extends 'raycast' ? P[K] | null : never;
38+
};
39+
3640
export type NgtVector2 = NgtMathType<THREE.Vector2>;
3741
export type NgtVector3 = NgtMathType<THREE.Vector3>;
3842
export type NgtVector4 = NgtMathType<THREE.Vector4>;
@@ -100,7 +104,8 @@ export interface NgtNodeEventListener<
100104
export type NgtElementProperties<
101105
TConstructor extends NgtConstructorRepresentation,
102106
TInstance = InstanceType<TConstructor>,
103-
> = Partial<NgtOverwrite<TInstance, NgtMathProperties<TInstance>>> & NgtNodeElement<TConstructor, TInstance>;
107+
> = Partial<NgtOverwrite<TInstance, NgtMathProperties<TInstance> & NgtNullableRaycast<TInstance>>> &
108+
NgtNodeElement<TConstructor, TInstance>;
104109

105110
export type NgtThreeElement<TConstructor extends NgtConstructorRepresentation> = NgtMutable<
106111
NgtElementProperties<TConstructor>

0 commit comments

Comments
 (0)