@@ -24,7 +24,6 @@ import { NgtsCenter, NgtsRenderTexture, NgtsRenderTextureContent } from 'angular
2424import { Group } from 'three' ;
2525
2626import { NgTemplateOutlet } from '@angular/common' ;
27- import CameraControls from 'camera-controls' ;
2827import boldFont from './bold.blob' ;
2928
3029@Component ( {
@@ -36,7 +35,6 @@ import boldFont from './bold.blob';
3635 [options]="{ restitution: 0.1, colliders: 'cuboid' }"
3736 [position]="position()"
3837 [rotation]="rotation()"
39- (pointermissed)="onPointerMissed($any($event))"
4038 >
4139 <ngts-center>
4240 <ngts-text-3d
@@ -56,6 +54,7 @@ import boldFont from './bold.blob';
5654 bevelOffset: 0,
5755 }"
5856 (dblclick)="onDblClick($any($event))"
57+ (pointermissed)="onPointerMissed($any($event))"
5958 >
6059 <ngts-mesh-transmission-material
6160 [options]="$any({ clearcoat: 1, samples: 3, thickness: 40, chromaticAberration: 0.25, anisotropy: 0.4 })"
@@ -120,20 +119,20 @@ export class Letter {
120119 }
121120
122121 onDblClick ( event : NgtThreeEvent < MouseEvent > ) {
123- event . stopPropagation ( ) ;
124- const controls = this . controls ( ) as CameraControls ;
125- if ( ! controls ) return ;
126-
127- // TODO: not sure why this is not working as expected.
128- // This is supposed to zoom to the center of the letter, but it's always zooming to the center of the scene
129- void controls . fitToBox ( this . centerRef ( ) . groupRef ( ) . nativeElement , true ) ;
122+ // event.stopPropagation();
123+ // const controls = this.controls() as CameraControls;
124+ // if (!controls) return;
125+ //
126+ // // TODO: not sure why this is not working as expected.
127+ // // This is supposed to zoom to the center of the letter, but it's always zooming to the center of the scene
128+ // void controls.fitToBox(this.centerRef().groupRef().nativeElement, true);
130129 }
131130
132131 onPointerMissed ( event : NgtThreeEvent < MouseEvent > ) {
133- event . stopPropagation ( ) ;
134- const controls = this . controls ( ) as CameraControls ;
135- if ( ! controls ) return ;
136-
137- void controls . reset ( true ) ;
132+ // event.stopPropagation();
133+ // const controls = this.controls() as CameraControls;
134+ // if (!controls) return;
135+ //
136+ // void controls.reset(true);
138137 }
139138}
0 commit comments