@@ -547,8 +547,8 @@ function parse(fileName, gltf, options = {}) {
547
547
const imports = `
548
548
import type * as THREE from 'three'
549
549
import { Group } from 'three'
550
- import { NgtGroup, NgtObjectEvents, NgtObjectEventsHostDirective ${ hasArgs ? ", NgtArgs" : "" } } from 'angular-three';
551
- import { Component, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Signal, input, computed, viewChild, ElementRef, inject, effect${ hasAnimations ? ", model" : "" } } from '@angular/core';
550
+ import { NgtGroup, NgtObjectEvents${ hasArgs ? ", NgtArgs" : "" } } from 'angular-three';
551
+ import { Component, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Signal, input, viewChild, ElementRef, inject, effect${ hasAnimations ? ", computed , model" : "" } } from '@angular/core';
552
552
import { injectGLTF } from 'angular-three-soba/loaders';
553
553
import { GLTF } from 'three-stdlib';
554
554
${ hasAnimations ? "import { injectAnimations } from 'angular-three-soba/misc';" : "" }
@@ -585,7 +585,27 @@ ${printTypes(objects, animations)}
585
585
imports: [NgtArgs],`
586
586
: ""
587
587
}
588
- hostDirectives: [NgtObjectEventsHostDirective],
588
+ hostDirectives: [
589
+ {
590
+ directive: NgtObjectEvents,
591
+ inputs: ['ngtObjectEvents'],
592
+ outputs: [
593
+ 'click',
594
+ 'dblclick',
595
+ 'contextmenu',
596
+ 'pointerup',
597
+ 'pointerdown',
598
+ 'pointerover',
599
+ 'pointerout',
600
+ 'pointerenter',
601
+ 'pointerleave',
602
+ 'pointermove',
603
+ 'pointermissed',
604
+ 'pointercancel',
605
+ 'wheel',
606
+ ],
607
+ },
608
+ ],
589
609
schemas: [CUSTOM_ELEMENTS_SCHEMA],
590
610
changeDetection: ChangeDetectionStrategy.OnPush
591
611
})
0 commit comments