@@ -370,6 +370,7 @@ class ArcballControls extends EventDispatcher {
370
370
child . geometry = curveGeometry
371
371
}
372
372
373
+ // @ts -ignore
373
374
this . dispatchEvent ( _changeEvent )
374
375
}
375
376
@@ -630,6 +631,7 @@ class ArcballControls extends EventDispatcher {
630
631
631
632
if ( mouseOp ) {
632
633
event . preventDefault ( )
634
+ // @ts -ignore
633
635
this . dispatchEvent ( _startEvent )
634
636
635
637
const notchDeltaY = 125 //distance of one notch of mouse wheel
@@ -681,7 +683,9 @@ class ArcballControls extends EventDispatcher {
681
683
682
684
this . updateTbState ( STATE . IDLE , false )
683
685
686
+ // @ts -ignore
684
687
this . dispatchEvent ( _changeEvent )
688
+ // @ts -ignore
685
689
this . dispatchEvent ( _endEvent )
686
690
687
691
break
@@ -748,7 +752,9 @@ class ArcballControls extends EventDispatcher {
748
752
749
753
this . updateTbState ( STATE . IDLE , false )
750
754
755
+ // @ts -ignore
751
756
this . dispatchEvent ( _changeEvent )
757
+ // @ts -ignore
752
758
this . dispatchEvent ( _endEvent )
753
759
754
760
break
@@ -759,6 +765,7 @@ class ArcballControls extends EventDispatcher {
759
765
760
766
private onSinglePanStart = ( event : PointerEvent , operation : Operation ) : void => {
761
767
if ( this . enabled && this . domElement ) {
768
+ // @ts -ignore
762
769
this . dispatchEvent ( _startEvent )
763
770
764
771
this . setCenter ( event . clientX , event . clientY )
@@ -773,6 +780,7 @@ class ArcballControls extends EventDispatcher {
773
780
this . _timeStart = - 1
774
781
775
782
this . activateGizmos ( false )
783
+ // @ts -ignore
776
784
this . dispatchEvent ( _changeEvent )
777
785
}
778
786
@@ -784,6 +792,7 @@ class ArcballControls extends EventDispatcher {
784
792
}
785
793
if ( this . enableGrid ) {
786
794
this . drawGrid ( )
795
+ // @ts -ignore
787
796
this . dispatchEvent ( _changeEvent )
788
797
}
789
798
}
@@ -816,6 +825,7 @@ class ArcballControls extends EventDispatcher {
816
825
}
817
826
}
818
827
828
+ // @ts -ignore
819
829
this . dispatchEvent ( _changeEvent )
820
830
break
821
831
@@ -829,6 +839,7 @@ class ArcballControls extends EventDispatcher {
829
839
this . _timeStart = - 1
830
840
831
841
this . activateGizmos ( false )
842
+ // @ts -ignore
832
843
this . dispatchEvent ( _changeEvent )
833
844
}
834
845
@@ -847,6 +858,7 @@ class ArcballControls extends EventDispatcher {
847
858
this . _timeStart = - 1
848
859
849
860
this . activateGizmos ( false )
861
+ // @ts -ignore
850
862
this . dispatchEvent ( _changeEvent )
851
863
}
852
864
@@ -869,7 +881,9 @@ class ArcballControls extends EventDispatcher {
869
881
if ( restart ) {
870
882
//switch to pan operation
871
883
884
+ // @ts -ignore
872
885
this . dispatchEvent ( _endEvent )
886
+ // @ts -ignore
873
887
this . dispatchEvent ( _startEvent )
874
888
875
889
this . updateTbState ( opState , true )
@@ -899,7 +913,9 @@ class ArcballControls extends EventDispatcher {
899
913
if ( restart ) {
900
914
//switch to rotate operation
901
915
916
+ // @ts -ignore
902
917
this . dispatchEvent ( _endEvent )
918
+ // @ts -ignore
903
919
this . dispatchEvent ( _startEvent )
904
920
905
921
this . updateTbState ( opState , true )
@@ -965,7 +981,9 @@ class ArcballControls extends EventDispatcher {
965
981
if ( restart ) {
966
982
//switch to zoom operation
967
983
984
+ // @ts -ignore
968
985
this . dispatchEvent ( _endEvent )
986
+ // @ts -ignore
969
987
this . dispatchEvent ( _startEvent )
970
988
971
989
this . updateTbState ( opState , true )
@@ -1003,7 +1021,9 @@ class ArcballControls extends EventDispatcher {
1003
1021
if ( restart ) {
1004
1022
//switch to fov operation
1005
1023
1024
+ // @ts -ignore
1006
1025
this . dispatchEvent ( _endEvent )
1026
+ // @ts -ignore
1007
1027
this . dispatchEvent ( _startEvent )
1008
1028
1009
1029
this . updateTbState ( opState , true )
@@ -1065,6 +1085,7 @@ class ArcballControls extends EventDispatcher {
1065
1085
break
1066
1086
}
1067
1087
1088
+ // @ts -ignore
1068
1089
this . dispatchEvent ( _changeEvent )
1069
1090
}
1070
1091
}
@@ -1092,11 +1113,13 @@ class ArcballControls extends EventDispatcher {
1092
1113
//cursor has been standing still for over 120 ms since last movement
1093
1114
this . updateTbState ( STATE . IDLE , false )
1094
1115
this . activateGizmos ( false )
1116
+ // @ts -ignore
1095
1117
this . dispatchEvent ( _changeEvent )
1096
1118
}
1097
1119
} else {
1098
1120
this . updateTbState ( STATE . IDLE , false )
1099
1121
this . activateGizmos ( false )
1122
+ // @ts -ignore
1100
1123
this . dispatchEvent ( _changeEvent )
1101
1124
}
1102
1125
} else if ( this . _state == STATE . PAN || this . _state == STATE . IDLE ) {
@@ -1107,14 +1130,17 @@ class ArcballControls extends EventDispatcher {
1107
1130
}
1108
1131
1109
1132
this . activateGizmos ( false )
1133
+ // @ts -ignore
1110
1134
this . dispatchEvent ( _changeEvent )
1111
1135
}
1112
1136
1137
+ // @ts -ignore
1113
1138
this . dispatchEvent ( _endEvent )
1114
1139
}
1115
1140
1116
1141
private onDoubleTap = ( event : PointerEvent ) : void => {
1117
1142
if ( this . enabled && this . enablePan && this . scene && this . camera && this . domElement ) {
1143
+ // @ts -ignore
1118
1144
this . dispatchEvent ( _startEvent )
1119
1145
1120
1146
this . setCenter ( event . clientX , event . clientY )
@@ -1135,15 +1161,18 @@ class ArcballControls extends EventDispatcher {
1135
1161
this . updateTbState ( STATE . FOCUS , true )
1136
1162
this . focus ( hitP , this . scaleFactor )
1137
1163
this . updateTbState ( STATE . IDLE , false )
1164
+ // @ts -ignore
1138
1165
this . dispatchEvent ( _changeEvent )
1139
1166
}
1140
1167
}
1141
1168
1169
+ // @ts -ignore
1142
1170
this . dispatchEvent ( _endEvent )
1143
1171
}
1144
1172
1145
1173
private onDoublePanStart = ( ) : void => {
1146
1174
if ( this . enabled && this . enablePan && this . camera && this . domElement ) {
1175
+ // @ts -ignore
1147
1176
this . dispatchEvent ( _startEvent )
1148
1177
1149
1178
this . updateTbState ( STATE . PAN , true )
@@ -1178,17 +1207,20 @@ class ArcballControls extends EventDispatcher {
1178
1207
const rayDir = this . unprojectOnTbPlane ( this . camera , _center . x , _center . y , this . domElement , true )
1179
1208
if ( rayDir !== undefined ) this . _currentCursorPosition . copy ( rayDir )
1180
1209
this . applyTransformMatrix ( this . pan ( this . _startCursorPosition , this . _currentCursorPosition , true ) )
1210
+ // @ts -ignore
1181
1211
this . dispatchEvent ( _changeEvent )
1182
1212
}
1183
1213
}
1184
1214
1185
1215
private onDoublePanEnd = ( ) : void => {
1186
1216
this . updateTbState ( STATE . IDLE , false )
1217
+ // @ts -ignore
1187
1218
this . dispatchEvent ( _endEvent )
1188
1219
}
1189
1220
1190
1221
private onRotateStart = ( ) : void => {
1191
1222
if ( this . enabled && this . enableRotate ) {
1223
+ // @ts -ignore
1192
1224
this . dispatchEvent ( _startEvent )
1193
1225
1194
1226
this . updateTbState ( STATE . ZROTATE , true )
@@ -1241,18 +1273,21 @@ class ArcballControls extends EventDispatcher {
1241
1273
if ( rotationPoint !== undefined ) {
1242
1274
this . applyTransformMatrix ( this . zRotate ( rotationPoint , amount ) )
1243
1275
}
1276
+ // @ts -ignore
1244
1277
this . dispatchEvent ( _changeEvent )
1245
1278
}
1246
1279
}
1247
1280
1248
1281
private onRotateEnd = ( ) : void => {
1249
1282
this . updateTbState ( STATE . IDLE , false )
1250
1283
this . activateGizmos ( false )
1284
+ // @ts -ignore
1251
1285
this . dispatchEvent ( _endEvent )
1252
1286
}
1253
1287
1254
1288
private onPinchStart = ( ) : void => {
1255
1289
if ( this . enabled && this . enableZoom ) {
1290
+ // @ts -ignore
1256
1291
this . dispatchEvent ( _startEvent )
1257
1292
this . updateTbState ( STATE . SCALE , true )
1258
1293
@@ -1302,17 +1337,20 @@ class ArcballControls extends EventDispatcher {
1302
1337
if ( scalePoint !== undefined ) {
1303
1338
this . applyTransformMatrix ( this . applyScale ( amount , scalePoint ) )
1304
1339
}
1340
+ // @ts -ignore
1305
1341
this . dispatchEvent ( _changeEvent )
1306
1342
}
1307
1343
}
1308
1344
1309
1345
private onPinchEnd = ( ) : void => {
1310
1346
this . updateTbState ( STATE . IDLE , false )
1347
+ // @ts -ignore
1311
1348
this . dispatchEvent ( _endEvent )
1312
1349
}
1313
1350
1314
1351
private onTriplePanStart = ( ) : void => {
1315
1352
if ( this . enabled && this . enableZoom && this . domElement ) {
1353
+ // @ts -ignore
1316
1354
this . dispatchEvent ( _startEvent )
1317
1355
1318
1356
this . updateTbState ( STATE . SCALE , true )
@@ -1401,12 +1439,14 @@ class ArcballControls extends EventDispatcher {
1401
1439
. multiplyScalar ( newDistance / x )
1402
1440
this . _m4_1 . makeTranslation ( direction . x , direction . y , direction . z )
1403
1441
1442
+ // @ts -ignore
1404
1443
this . dispatchEvent ( _changeEvent )
1405
1444
}
1406
1445
}
1407
1446
1408
1447
private onTriplePanEnd = ( ) : void => {
1409
1448
this . updateTbState ( STATE . IDLE , false )
1449
+ // @ts -ignore
1410
1450
this . dispatchEvent ( _endEvent )
1411
1451
//this.dispatchEvent( _changeEvent );
1412
1452
}
@@ -1933,6 +1973,7 @@ class ArcballControls extends EventDispatcher {
1933
1973
*/
1934
1974
public setGizmosVisible ( value : boolean ) : void {
1935
1975
this . _gizmos . visible = value
1976
+ // @ts -ignore
1936
1977
this . dispatchEvent ( _changeEvent )
1937
1978
}
1938
1979
@@ -2017,6 +2058,7 @@ class ArcballControls extends EventDispatcher {
2017
2058
this . updateTbState ( STATE . IDLE , false )
2018
2059
this . activateGizmos ( false )
2019
2060
2061
+ // @ts -ignore
2020
2062
this . dispatchEvent ( _changeEvent )
2021
2063
} else {
2022
2064
const amount = this . easeOutCubic ( animTime )
@@ -2025,6 +2067,7 @@ class ArcballControls extends EventDispatcher {
2025
2067
this . _gizmoMatrixState . decompose ( this . _gizmos . position , this . _gizmos . quaternion , this . _gizmos . scale )
2026
2068
this . focus ( point , size , amount )
2027
2069
2070
+ // @ts -ignore
2028
2071
this . dispatchEvent ( _changeEvent )
2029
2072
const self = this
2030
2073
this . _animationId = window . requestAnimationFrame ( function ( t ) {
@@ -2062,6 +2105,7 @@ class ArcballControls extends EventDispatcher {
2062
2105
//tetha = 0.5 * alpha * t^2 + w0 * t + tetha0
2063
2106
this . _angleCurrent = 0.5 * - this . dampingFactor * Math . pow ( deltaTime , 2 ) + w0 * deltaTime + 0
2064
2107
this . applyTransformMatrix ( this . rotate ( rotationAxis , this . _angleCurrent ) )
2108
+ // @ts -ignore
2065
2109
this . dispatchEvent ( _changeEvent )
2066
2110
const self = this
2067
2111
this . _animationId = window . requestAnimationFrame ( function ( t ) {
@@ -2074,6 +2118,7 @@ class ArcballControls extends EventDispatcher {
2074
2118
this . updateTbState ( STATE . IDLE , false )
2075
2119
this . activateGizmos ( false )
2076
2120
2121
+ // @ts -ignore
2077
2122
this . dispatchEvent ( _changeEvent )
2078
2123
}
2079
2124
} else {
@@ -2084,6 +2129,7 @@ class ArcballControls extends EventDispatcher {
2084
2129
2085
2130
if ( this . _state != STATE . ROTATE ) {
2086
2131
this . activateGizmos ( false )
2132
+ // @ts -ignore
2087
2133
this . dispatchEvent ( _changeEvent )
2088
2134
}
2089
2135
}
@@ -2156,6 +2202,7 @@ class ArcballControls extends EventDispatcher {
2156
2202
2157
2203
this . updateTbState ( STATE . IDLE , false )
2158
2204
2205
+ // @ts -ignore
2159
2206
this . dispatchEvent ( _changeEvent )
2160
2207
}
2161
2208
}
@@ -2774,6 +2821,7 @@ class ArcballControls extends EventDispatcher {
2774
2821
this . camera . lookAt ( this . _gizmos . position )
2775
2822
this . updateTbState ( STATE . IDLE , false )
2776
2823
2824
+ // @ts -ignore
2777
2825
this . dispatchEvent ( _changeEvent )
2778
2826
}
2779
2827
}
0 commit comments