@@ -28,7 +28,7 @@ type XYZ = [number, number, number];
2828const colors = { bg : '#f0f0f0' , hover : '#999' , text : 'black' , stroke : 'black' } ;
2929const defaultFaces = [ 'Right' , 'Left' , 'Top' , 'Bottom' , 'Front' , 'Back' ] ;
3030
31- interface CommonOptions {
31+ export interface NgtsViewcubeCommonOptions {
3232 font : string ;
3333 opacity : number ;
3434 color : string ;
@@ -38,7 +38,7 @@ interface CommonOptions {
3838 faces : string [ ] ;
3939}
4040
41- const defaultFaceMaterialOptions : CommonOptions = {
41+ const defaultFaceMaterialOptions : NgtsViewcubeCommonOptions = {
4242 font : '20px Inter var, Arial, sans-serif' ,
4343 faces : defaultFaces ,
4444 color : colors . bg ,
@@ -122,8 +122,8 @@ export class FaceMaterial {
122122 standalone : true ,
123123 template : `
124124 <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))"
127127 (click)="internalOnClick($any($event))"
128128 >
129129 <ngt-box-geometry />
@@ -137,7 +137,7 @@ export class FaceMaterial {
137137 imports : [ FaceMaterial ] ,
138138} )
139139export class FaceCube {
140- options = input ( { } as Partial < CommonOptions > ) ;
140+ options = input ( { } as Partial < NgtsViewcubeCommonOptions > ) ;
141141 onClick = input < NgtEventHandlers [ 'click' ] > ( ) ;
142142
143143 private gizmoHelper = inject ( NgtsGizmoHelper ) ;
@@ -168,8 +168,8 @@ export class FaceCube {
168168 <ngt-mesh
169169 [scale]="1.01"
170170 [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)"
173173 (click)="internalOnClick($any($event))"
174174 >
175175 <ngt-mesh-basic-material [transparent]="true" [opacity]="0.6" [color]="color()" [visible]="hover()" />
@@ -210,7 +210,7 @@ export class EdgeCube {
210210 }
211211}
212212
213- export type NgtsGizmoViewcubeOptions = Partial < CommonOptions > ;
213+ export type NgtsGizmoViewcubeOptions = Partial < NgtsViewcubeCommonOptions > ;
214214
215215@Component ( {
216216 selector : 'ngts-gizmo-viewcube' ,
@@ -241,7 +241,7 @@ export type NgtsGizmoViewcubeOptions = Partial<CommonOptions>;
241241 imports : [ FaceCube , EdgeCube ] ,
242242} )
243243export class NgtsGizmoViewcube {
244- options = input ( { } as NgtsGizmoViewcubeOptions ) ;
244+ options = input ( { } as Partial < NgtsGizmoViewcubeOptions > ) ;
245245 click = output < NgtThreeEvent < MouseEvent > > ( ) ;
246246
247247 protected hoverColor = pick ( this . options , 'hoverColor' ) ;
0 commit comments