Skip to content

Commit e44c2b8

Browse files
committed
feat(core): add change as THREE native events
1 parent 0d0f37f commit e44c2b8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

libs/core/src/lib/renderer/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export const NGT_DOM_PARENT_FLAG = '__ngt_dom_parent__';
1010
export const NGT_DELEGATE_RENDERER_DESTROY_NODE_PATCHED_FLAG = '__ngt_delegate_renderer_destroy_node_patched__';
1111
export const NGT_HTML_FLAG = '__ngt_html__';
1212

13-
export const THREE_NATIVE_EVENTS = ['added', 'removed', 'childadded', 'childremoved', 'disposed'];
13+
export const THREE_NATIVE_EVENTS = ['added', 'removed', 'childadded', 'childremoved', 'change', 'disposed'];

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface NgtRaycastableRepresentation {
5252
}
5353

5454
export type ThreeDisposeEvent = { type: 'dispose'; target: any };
55+
export type ThreeChangeEvent = { type: 'change'; target: any };
5556
export type ThreeAddedEvent = { type: 'added'; target: any };
5657
export type ThreeRemovedEvent = { type: 'removed'; target: any };
5758
export type ThreeChildAddedEvent = { type: 'childadded'; target: any; child: any };
@@ -71,6 +72,7 @@ export type NgtObject3DEventsMap = {
7172
removed: ThreeRemovedEvent;
7273
childadded: ThreeChildAddedEvent;
7374
childremoved: ThreeChildRemovedEvent;
75+
change: ThreeChangeEvent;
7476
};
7577

7678
export type NgtAllObject3DEventsMap<TInstance> = NgtObject3DEventsMap & NgtNodeEventMap<TInstance>;

0 commit comments

Comments
 (0)