@@ -5,6 +5,34 @@ import { NgtsOrbitControls } from 'angular-three-soba/controls';
55import { NgtsDetailed } from 'angular-three-soba/performances' ;
66import { storyDecorators , storyFunction } from '../setup-canvas' ;
77
8+ @Component ( {
9+ template : `
10+ <ngts-detailed [distances]="[0, 50]">
11+ <ngt-group>
12+ <ngt-mesh (pointermove)="onHover()">
13+ <ngt-icosahedron-geometry *args="[10, 3]" />
14+ <ngt-mesh-basic-material color="hotpink" wireframe />
15+ </ngt-mesh>
16+ </ngt-group>
17+
18+ <ngt-mesh>
19+ <ngt-icosahedron-geometry *args="[10, 1]" />
20+ <ngt-mesh-basic-material color="lightblue" wireframe />
21+ </ngt-mesh>
22+ </ngts-detailed>
23+
24+ <ngts-orbit-controls [options]="{ enablePan: false, enableRotate: false, zoomSpeed: 0.5 }" />
25+ ` ,
26+ schemas : [ CUSTOM_ELEMENTS_SCHEMA ] ,
27+ changeDetection : ChangeDetectionStrategy . OnPush ,
28+ imports : [ NgtsDetailed , NgtArgs , NgtsOrbitControls ] ,
29+ } )
30+ class WithEventDetailedStory {
31+ protected onHover ( ) {
32+ console . log ( 'hovered' ) ;
33+ }
34+ }
35+
836@Component ( {
937 template : `
1038 <ngts-detailed [distances]="[0, 50, 150]">
@@ -41,3 +69,8 @@ export const Default = storyFunction(DefaultDetailedStory, {
4169 camera : { position : [ 0 , 0 , 100 ] } ,
4270 controls : false ,
4371} ) ;
72+
73+ export const WithEvent = storyFunction ( WithEventDetailedStory , {
74+ camera : { position : [ 0 , 0 , 100 ] } ,
75+ controls : false ,
76+ } ) ;
0 commit comments