@@ -28,7 +28,7 @@ type XYZ = [number, number, number];
28
28
const colors = { bg : '#f0f0f0' , hover : '#999' , text : 'black' , stroke : 'black' } ;
29
29
const defaultFaces = [ 'Right' , 'Left' , 'Top' , 'Bottom' , 'Front' , 'Back' ] ;
30
30
31
- interface CommonOptions {
31
+ export interface NgtsViewcubeCommonOptions {
32
32
font : string ;
33
33
opacity : number ;
34
34
color : string ;
@@ -38,7 +38,7 @@ interface CommonOptions {
38
38
faces : string [ ] ;
39
39
}
40
40
41
- const defaultFaceMaterialOptions : CommonOptions = {
41
+ const defaultFaceMaterialOptions : NgtsViewcubeCommonOptions = {
42
42
font : '20px Inter var, Arial, sans-serif' ,
43
43
faces : defaultFaces ,
44
44
color : colors . bg ,
@@ -122,8 +122,8 @@ export class FaceMaterial {
122
122
standalone : true ,
123
123
template : `
124
124
<ngt-mesh
125
- (pointerout)="$event.stopPropagation(); hover.set(-1)"
126
- (pointermove)="$event.stopPropagation(); hover.set(Math.floor($any($event).faceIndex / 2))"
125
+ (pointerout)="$any($ event) .stopPropagation(); hover.set(-1)"
126
+ (pointermove)="$any($ event) .stopPropagation(); hover.set(Math.floor($any($event).faceIndex / 2))"
127
127
(click)="internalOnClick($any($event))"
128
128
>
129
129
<ngt-box-geometry />
@@ -137,7 +137,7 @@ export class FaceMaterial {
137
137
imports : [ FaceMaterial ] ,
138
138
} )
139
139
export class FaceCube {
140
- options = input ( { } as Partial < CommonOptions > ) ;
140
+ options = input ( { } as Partial < NgtsViewcubeCommonOptions > ) ;
141
141
onClick = input < NgtEventHandlers [ 'click' ] > ( ) ;
142
142
143
143
private gizmoHelper = inject ( NgtsGizmoHelper ) ;
@@ -168,8 +168,8 @@ export class FaceCube {
168
168
<ngt-mesh
169
169
[scale]="1.01"
170
170
[position]="position()"
171
- (pointerout)="$event.stopPropagation(); hover.set(false)"
172
- (pointerover)="$event.stopPropagation(); hover.set(true)"
171
+ (pointerout)="$any($ event) .stopPropagation(); hover.set(false)"
172
+ (pointerover)="$any($ event) .stopPropagation(); hover.set(true)"
173
173
(click)="internalOnClick($any($event))"
174
174
>
175
175
<ngt-mesh-basic-material [transparent]="true" [opacity]="0.6" [color]="color()" [visible]="hover()" />
@@ -210,7 +210,7 @@ export class EdgeCube {
210
210
}
211
211
}
212
212
213
- export type NgtsGizmoViewcubeOptions = Partial < CommonOptions > ;
213
+ export type NgtsGizmoViewcubeOptions = Partial < NgtsViewcubeCommonOptions > ;
214
214
215
215
@Component ( {
216
216
selector : 'ngts-gizmo-viewcube' ,
@@ -241,7 +241,7 @@ export type NgtsGizmoViewcubeOptions = Partial<CommonOptions>;
241
241
imports : [ FaceCube , EdgeCube ] ,
242
242
} )
243
243
export class NgtsGizmoViewcube {
244
- options = input ( { } as NgtsGizmoViewcubeOptions ) ;
244
+ options = input ( { } as Partial < NgtsGizmoViewcubeOptions > ) ;
245
245
click = output < NgtThreeEvent < MouseEvent > > ( ) ;
246
246
247
247
protected hoverColor = pick ( this . options , 'hoverColor' ) ;
0 commit comments