@maptalks/transform-control 0.89.3 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * @maptalks/transform-control v0.89.3
2
+ * @maptalks/transform-control v0.91.0
3
3
  * LICENSE : UNLICENSED
4
4
  * (c) 2016-2023 maptalks.org
5
5
  */
6
- import { quat as A, mat4 as t, reshader as e, vec3 as s, vec2 as i, GroupGLLayer as n } from "@maptalks/gl";
6
+ import { quat as A, mat4 as e, reshader as t, vec3 as s, vec2 as i, GroupGLLayer as n } from "@maptalks/gl";
7
7
 
8
- import * as o from "maptalks";
8
+ import * as I from "maptalks";
9
9
 
10
- import { Eventable as I, Handlerable as r, Class as a, Point as h, Coordinate as g } from "maptalks";
10
+ import { Point as o, Coordinate as g, Eventable as r, Handlerable as C, Class as a } from "maptalks";
11
11
 
12
- import * as c from "@maptalks/gltf-loader";
12
+ import * as h from "@maptalks/gltf-loader";
13
13
 
14
14
  const w = {
15
15
  yuanhuan: {
@@ -756,60 +756,472 @@ const w = {
756
756
  scenes: [ {
757
757
  nodes: [ 0 ]
758
758
  } ]
759
+ },
760
+ xyzScale: {
761
+ asset: {
762
+ generator: "Khronos glTF Blender I/O v1.6.16",
763
+ version: "2.0"
764
+ },
765
+ scene: 0,
766
+ scenes: [ {
767
+ name: "Scene",
768
+ nodes: [ 0, 1, 2, 3, 4, 5, 6 ]
769
+ } ],
770
+ nodes: [ {
771
+ mesh: 0,
772
+ name: "Cube",
773
+ scale: [ .7008190751075745, .014999999664723873, .014999999664723873 ]
774
+ }, {
775
+ mesh: 1,
776
+ name: "Cube.001",
777
+ scale: [ .10000000149011612, .10000000149011612, .10000000149011612 ]
778
+ }, {
779
+ mesh: 2,
780
+ name: "Cube.004",
781
+ rotation: [ 0, -.7071068286895752, 0, .7071068286895752 ],
782
+ scale: [ .7008190751075745, .014999999664723873, .014999999664723873 ]
783
+ }, {
784
+ mesh: 3,
785
+ name: "Cube.003",
786
+ rotation: [ 0, -.7071068286895752, 0, .7071068286895752 ],
787
+ scale: [ .10000000149011612, .10000000149011612, .10000000149011612 ]
788
+ }, {
789
+ mesh: 4,
790
+ name: "Cube.006",
791
+ rotation: [ 0, 0, .7071068286895752, .7071068286895752 ],
792
+ scale: [ .7008190751075745, .014999999664723873, .014999999664723873 ]
793
+ }, {
794
+ mesh: 5,
795
+ name: "Cube.005",
796
+ rotation: [ 0, 0, .7071068286895752, .7071068286895752 ],
797
+ scale: [ .10000000149011612, .10000000149011612, .10000000149011612 ]
798
+ }, {
799
+ mesh: 6,
800
+ name: "Cube.002",
801
+ scale: [ .10000000149011612, .10000000149011612, .10000000149011612 ]
802
+ } ],
803
+ materials: [ {
804
+ doubleSided: !0,
805
+ name: "Material",
806
+ pbrMetallicRoughness: {
807
+ baseColorFactor: [ .6938720345497131, .020288480445742607, .011612260714173317, 1 ],
808
+ metallicFactor: 0,
809
+ roughnessFactor: .4000000059604645
810
+ }
811
+ }, {
812
+ doubleSided: !0,
813
+ name: "Material.001",
814
+ pbrMetallicRoughness: {
815
+ baseColorFactor: [ .6938720345497131, .020288480445742607, .011612260714173317, 1 ],
816
+ metallicFactor: 0,
817
+ roughnessFactor: .4000000059604645
818
+ }
819
+ }, {
820
+ doubleSided: !0,
821
+ name: "Material.002",
822
+ pbrMetallicRoughness: {
823
+ baseColorFactor: [ .226582869887352, .226582869887352, .226582869887352, 1 ],
824
+ metallicFactor: 0,
825
+ roughnessFactor: .4000000059604645
826
+ }
827
+ }, {
828
+ doubleSided: !0,
829
+ name: "Material.006",
830
+ pbrMetallicRoughness: {
831
+ baseColorFactor: [ .11193240433931351, .5583405494689941, .033104799687862396, 1 ],
832
+ metallicFactor: 0,
833
+ roughnessFactor: .4000000059604645
834
+ }
835
+ }, {
836
+ doubleSided: !0,
837
+ name: "Material.005",
838
+ pbrMetallicRoughness: {
839
+ baseColorFactor: [ .11193240433931351, .5583405494689941, .033104799687862396, 1 ],
840
+ metallicFactor: 0,
841
+ roughnessFactor: .4000000059604645
842
+ }
843
+ }, {
844
+ doubleSided: !0,
845
+ name: "Material.010",
846
+ pbrMetallicRoughness: {
847
+ baseColorFactor: [ .004391402006149292, .21223078668117523, .5209956169128418, 1 ],
848
+ metallicFactor: 0,
849
+ roughnessFactor: .4000000059604645
850
+ }
851
+ }, {
852
+ doubleSided: !0,
853
+ name: "Material.009",
854
+ pbrMetallicRoughness: {
855
+ baseColorFactor: [ .004391402006149292, .21223078668117523, .5209956169128418, 1 ],
856
+ metallicFactor: 0,
857
+ roughnessFactor: .4000000059604645
858
+ }
859
+ } ],
860
+ meshes: [ {
861
+ name: "Cube",
862
+ primitives: [ {
863
+ attributes: {
864
+ POSITION: 0,
865
+ NORMAL: 1,
866
+ TEXCOORD_0: 2
867
+ },
868
+ indices: 3,
869
+ material: 0
870
+ } ]
871
+ }, {
872
+ name: "Cube.001",
873
+ primitives: [ {
874
+ attributes: {
875
+ POSITION: 4,
876
+ NORMAL: 5,
877
+ TEXCOORD_0: 6
878
+ },
879
+ indices: 3,
880
+ material: 1
881
+ } ]
882
+ }, {
883
+ name: "Cube.006",
884
+ primitives: [ {
885
+ attributes: {
886
+ POSITION: 10,
887
+ NORMAL: 11,
888
+ TEXCOORD_0: 12
889
+ },
890
+ indices: 3,
891
+ material: 3
892
+ } ]
893
+ }, {
894
+ name: "Cube.005",
895
+ primitives: [ {
896
+ attributes: {
897
+ POSITION: 13,
898
+ NORMAL: 14,
899
+ TEXCOORD_0: 15
900
+ },
901
+ indices: 3,
902
+ material: 4
903
+ } ]
904
+ }, {
905
+ name: "Cube.010",
906
+ primitives: [ {
907
+ attributes: {
908
+ POSITION: 16,
909
+ NORMAL: 17,
910
+ TEXCOORD_0: 18
911
+ },
912
+ indices: 3,
913
+ material: 5
914
+ } ]
915
+ }, {
916
+ name: "Cube.009",
917
+ primitives: [ {
918
+ attributes: {
919
+ POSITION: 19,
920
+ NORMAL: 20,
921
+ TEXCOORD_0: 21
922
+ },
923
+ indices: 3,
924
+ material: 6
925
+ } ]
926
+ }, {
927
+ name: "Cube.002",
928
+ primitives: [ {
929
+ attributes: {
930
+ POSITION: 7,
931
+ NORMAL: 8,
932
+ TEXCOORD_0: 9
933
+ },
934
+ indices: 3,
935
+ material: 2
936
+ } ]
937
+ } ],
938
+ accessors: [ {
939
+ bufferView: 0,
940
+ componentType: 5126,
941
+ count: 24,
942
+ max: [ 2.0003609657287598, 1, 1 ],
943
+ min: [ .0003610849380493164, -1, -1 ],
944
+ type: "VEC3"
945
+ }, {
946
+ bufferView: 1,
947
+ componentType: 5126,
948
+ count: 24,
949
+ type: "VEC3"
950
+ }, {
951
+ bufferView: 2,
952
+ componentType: 5126,
953
+ count: 24,
954
+ type: "VEC2"
955
+ }, {
956
+ bufferView: 3,
957
+ componentType: 5123,
958
+ count: 36,
959
+ type: "SCALAR"
960
+ }, {
961
+ bufferView: 4,
962
+ componentType: 5126,
963
+ count: 24,
964
+ max: [ 14.549108505249023, 1, 1 ],
965
+ min: [ 12.549108505249023, -1, -1 ],
966
+ type: "VEC3"
967
+ }, {
968
+ bufferView: 5,
969
+ componentType: 5126,
970
+ count: 24,
971
+ type: "VEC3"
972
+ }, {
973
+ bufferView: 6,
974
+ componentType: 5126,
975
+ count: 24,
976
+ type: "VEC2"
977
+ }, {
978
+ bufferView: 7,
979
+ componentType: 5126,
980
+ count: 24,
981
+ max: [ 1, 1, 1 ],
982
+ min: [ -1, -1, -1 ],
983
+ type: "VEC3"
984
+ }, {
985
+ bufferView: 8,
986
+ componentType: 5126,
987
+ count: 24,
988
+ type: "VEC3"
989
+ }, {
990
+ bufferView: 9,
991
+ componentType: 5126,
992
+ count: 24,
993
+ type: "VEC2"
994
+ }, {
995
+ bufferView: 10,
996
+ componentType: 5126,
997
+ count: 24,
998
+ max: [ 2.0003609657287598, 1, 1 ],
999
+ min: [ .0003610849380493164, -1, -1 ],
1000
+ type: "VEC3"
1001
+ }, {
1002
+ bufferView: 11,
1003
+ componentType: 5126,
1004
+ count: 24,
1005
+ type: "VEC3"
1006
+ }, {
1007
+ bufferView: 12,
1008
+ componentType: 5126,
1009
+ count: 24,
1010
+ type: "VEC2"
1011
+ }, {
1012
+ bufferView: 13,
1013
+ componentType: 5126,
1014
+ count: 24,
1015
+ max: [ 14.549108505249023, 1, 1 ],
1016
+ min: [ 12.549108505249023, -1, -1 ],
1017
+ type: "VEC3"
1018
+ }, {
1019
+ bufferView: 14,
1020
+ componentType: 5126,
1021
+ count: 24,
1022
+ type: "VEC3"
1023
+ }, {
1024
+ bufferView: 15,
1025
+ componentType: 5126,
1026
+ count: 24,
1027
+ type: "VEC2"
1028
+ }, {
1029
+ bufferView: 16,
1030
+ componentType: 5126,
1031
+ count: 24,
1032
+ max: [ 2.0003609657287598, 1, 1 ],
1033
+ min: [ .0003610849380493164, -1, -1 ],
1034
+ type: "VEC3"
1035
+ }, {
1036
+ bufferView: 17,
1037
+ componentType: 5126,
1038
+ count: 24,
1039
+ type: "VEC3"
1040
+ }, {
1041
+ bufferView: 18,
1042
+ componentType: 5126,
1043
+ count: 24,
1044
+ type: "VEC2"
1045
+ }, {
1046
+ bufferView: 19,
1047
+ componentType: 5126,
1048
+ count: 24,
1049
+ max: [ 14.549108505249023, 1, 1 ],
1050
+ min: [ 12.549108505249023, -1, -1 ],
1051
+ type: "VEC3"
1052
+ }, {
1053
+ bufferView: 20,
1054
+ componentType: 5126,
1055
+ count: 24,
1056
+ type: "VEC3"
1057
+ }, {
1058
+ bufferView: 21,
1059
+ componentType: 5126,
1060
+ count: 24,
1061
+ type: "VEC2"
1062
+ } ],
1063
+ bufferViews: [ {
1064
+ buffer: 0,
1065
+ byteLength: 288,
1066
+ byteOffset: 0
1067
+ }, {
1068
+ buffer: 0,
1069
+ byteLength: 288,
1070
+ byteOffset: 288
1071
+ }, {
1072
+ buffer: 0,
1073
+ byteLength: 192,
1074
+ byteOffset: 576
1075
+ }, {
1076
+ buffer: 0,
1077
+ byteLength: 72,
1078
+ byteOffset: 768
1079
+ }, {
1080
+ buffer: 0,
1081
+ byteLength: 288,
1082
+ byteOffset: 840
1083
+ }, {
1084
+ buffer: 0,
1085
+ byteLength: 288,
1086
+ byteOffset: 1128
1087
+ }, {
1088
+ buffer: 0,
1089
+ byteLength: 192,
1090
+ byteOffset: 1416
1091
+ }, {
1092
+ buffer: 0,
1093
+ byteLength: 288,
1094
+ byteOffset: 1608
1095
+ }, {
1096
+ buffer: 0,
1097
+ byteLength: 288,
1098
+ byteOffset: 1896
1099
+ }, {
1100
+ buffer: 0,
1101
+ byteLength: 192,
1102
+ byteOffset: 2184
1103
+ }, {
1104
+ buffer: 0,
1105
+ byteLength: 288,
1106
+ byteOffset: 2376
1107
+ }, {
1108
+ buffer: 0,
1109
+ byteLength: 288,
1110
+ byteOffset: 2664
1111
+ }, {
1112
+ buffer: 0,
1113
+ byteLength: 192,
1114
+ byteOffset: 2952
1115
+ }, {
1116
+ buffer: 0,
1117
+ byteLength: 288,
1118
+ byteOffset: 3144
1119
+ }, {
1120
+ buffer: 0,
1121
+ byteLength: 288,
1122
+ byteOffset: 3432
1123
+ }, {
1124
+ buffer: 0,
1125
+ byteLength: 192,
1126
+ byteOffset: 3720
1127
+ }, {
1128
+ buffer: 0,
1129
+ byteLength: 288,
1130
+ byteOffset: 3912
1131
+ }, {
1132
+ buffer: 0,
1133
+ byteLength: 288,
1134
+ byteOffset: 4200
1135
+ }, {
1136
+ buffer: 0,
1137
+ byteLength: 192,
1138
+ byteOffset: 4488
1139
+ }, {
1140
+ buffer: 0,
1141
+ byteLength: 288,
1142
+ byteOffset: 4680
1143
+ }, {
1144
+ buffer: 0,
1145
+ byteLength: 288,
1146
+ byteOffset: 4968
1147
+ }, {
1148
+ buffer: 0,
1149
+ byteLength: 192,
1150
+ byteOffset: 5256
1151
+ } ],
1152
+ buffers: [ {
1153
+ byteLength: 5448,
1154
+ uri: "data:application/octet-stream;base64,6gUAQAAAgD8AAIC/6gUAQAAAgD8AAIC/6gUA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C/JslIQQAAgL8AAIC/JslIQQAAgD8AAIA/JslIQQAAgD8AAIA/JslIQQAAgD8AAIA/JslIQQAAgL8AAIA/JslIQQAAgL8AAIA/JslIQQAAgL8AAIA/AAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAPwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AACAPwAAAAAAAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAvwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AAAgPwAAAD8AACA/AAAAPwAAID8AAAA/AADAPgAAAD8AAMA+AAAAPwAAwD4AAAA/AAAgPwAAgD4AACA/AACAPgAAID8AAIA+AADAPgAAgD4AAMA+AACAPgAAwD4AAIA+AAAgPwAAQD8AACA/AABAPwAAYD8AAAA/AADAPgAAQD8AAAA+AAAAPwAAwD4AAEA/AAAgPwAAgD8AACA/AAAAAAAAYD8AAIA+AADAPgAAgD8AAAA+AACAPgAAwD4AAAAA"
1155
+ } ]
759
1156
  }
760
- }, f = [];
1157
+ }, c = [];
761
1158
 
762
- function B(s, i, n, o, I, r) {
763
- const a = [], h = A.fromEuler([], n[0], n[1], n[2]), g = t.fromRotationTranslationScale([], h, i, o);
1159
+ function Q(s, i, n, I, o, g) {
1160
+ const r = [], C = A.fromEuler([], n[0], n[1], n[2]), a = e.fromRotationTranslationScale([], C, i, I);
764
1161
  return function(A) {
765
- return new c.GLTFLoader("", w[A]).load().then(A => A);
1162
+ return new h.GLTFLoader("", w[A]).load().then(A => A);
766
1163
  }(s).then(A => {
767
- const s = e.GLTFHelper.exportGLTFPack(A).getMeshesInfo(), h = new e.Material({
768
- color: I
769
- });
770
- s.forEach(A => {
771
- const s = new e.Mesh(A.geometry, h);
772
- s.setUniform("uPickingId", r);
773
- const c = s.getDefines();
774
- c.HAS_PICKING_ID = 2, s.setDefines(c), s.translate = i, s.rotation = n, s.scaling = o,
775
- t.multiply(s.localTransform, g, A.nodeMatrix), s.originTransform = t.copy([], s.localTransform),
776
- s.originColor = I, a.push(s);
1164
+ t.GLTFHelper.exportGLTFPack(A).getMeshesInfo().forEach((A, s) => {
1165
+ const C = new t.Material({
1166
+ color: o || A.materialInfo.baseColorFactor
1167
+ }), h = new t.Mesh(A.geometry, C);
1168
+ h.setUniform("uPickingId", g + s);
1169
+ const w = h.getDefines();
1170
+ w.HAS_PICKING_ID = 2, h.setDefines(w), h.translate = i, h.rotation = n, h.scaling = I,
1171
+ e.multiply(h.localTransform, a, A.nodeMatrix), h.originTransform = e.copy([], h.localTransform),
1172
+ h.originColor = o || A.materialInfo.baseColorFactor, r.push(h);
777
1173
  });
778
- }), a;
1174
+ }), r;
779
1175
  }
780
1176
 
781
- function C(A, t) {
782
- return Math.abs(A) * Math.sign(t);
1177
+ function f(A, e) {
1178
+ return Math.abs(A) * Math.sign(e);
783
1179
  }
784
1180
 
785
- function P(A, e) {
786
- const i = A.getCoordinates(), n = e.coordinateToPointAtRes(i, e.getGLRes()), I = [ n.x, n.y, 0 ], r = m(e, A.getTranslation());
787
- s.add(I, I, r);
788
- const a = function(A, t, e, s) {
789
- return A._pointAtResToContainerPoint(t, e, s);
790
- }(e, new o.Point(I[0], I[1]), e.getGLRes());
791
- a.x += 170;
792
- const h = function(A, e, i, n) {
1181
+ function l(A, t) {
1182
+ const i = A.getCoordinates(), n = t.coordinateToPointAtRes(i, t.getGLRes()), o = [ n.x, n.y, 0 ], g = P(t, A.getTranslation());
1183
+ s.add(o, o, g);
1184
+ const r = function(A, e, t, s) {
1185
+ return A._pointAtResToContainerPoint(e, t, s);
1186
+ }(t, new I.Point(o[0], o[1]), t.getGLRes());
1187
+ r.x += 85;
1188
+ const C = function(A, t, i, n) {
793
1189
  if (n) {
794
- const I = i / A._getResolution(), r = A.width / 2, a = A.height / 2;
795
- f[0] = (e.x - r) / r, f[1] = e.y / a - 1, f[3] = n * I;
796
- const h = t.invert([], A.projViewMatrix);
797
- s.transformMat4(f, f, h);
798
- const g = A.getGLScale();
799
- return s.set(f, f[0] / g, f[1] / g, f[2] / g), s.scale(f, f, 1 / I), new o.Point(f[0], f[1]);
1190
+ const o = i / A._getResolution(), g = A.width / 2, r = A.height / 2;
1191
+ c[0] = (t.x - g) / g, c[1] = t.y / r - 1, c[3] = n * o;
1192
+ const C = e.invert([], A.projViewMatrix);
1193
+ s.transformMat4(c, c, C);
1194
+ const a = A.getGLScale();
1195
+ return s.set(c, c[0] / a, c[1] / a, c[2] / a), s.scale(c, c, 1 / o), new I.Point(c[0], c[1]);
800
1196
  }
801
1197
  {
802
- const t = A.containerPointToCoordinate(e);
803
- return A.coordinateToPointAtRes(t, i);
1198
+ const e = A.containerPointToCoordinate(t);
1199
+ return A.coordinateToPointAtRes(e, i);
804
1200
  }
805
- }(e, a, e.getGLRes());
806
- return Math.sqrt(Math.pow(h.x - I[0], 2) + Math.pow(h.y - I[1], 2)) / 5.272881136101205;
1201
+ }(t, r, t.getGLRes());
1202
+ return Math.sqrt(Math.pow(C.x - o[0], 2) + Math.pow(C.y - o[1], 2)) / 5.272881136101205;
1203
+ }
1204
+
1205
+ function P(A, e) {
1206
+ if (!A) return e;
1207
+ const t = A.distanceToPointAtRes(e[0], e[1], A.getGLRes()), i = A.altitudeToPoint(e[2], A.getGLRes());
1208
+ return s.set([], f(t.x, e[0]), f(t.y, e[1]), f(i, e[2]));
807
1209
  }
808
1210
 
809
- function m(A, t) {
810
- if (!A) return t;
811
- const e = A.distanceToPointAtRes(t[0], t[1], A.getGLRes()), i = A.altitudeToPoint(t[2], A.getGLRes());
812
- return s.set([], C(e.x, t[0]), C(e.y, t[1]), C(i, t[2]));
1211
+ class D {
1212
+ constructor(A) {
1213
+ this.A = A, this._meshes = this.t();
1214
+ }
1215
+ setCoordinate(A) {
1216
+ this.A = A;
1217
+ }
1218
+ t() {
1219
+ const A = [], e = 340 / 177, t = Q("jiantou", [ 1.2 * e, 0, 0 ], [ 0, 0, 90 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 7), s = Q("jiantou", [ 0, 1.2 * e, 0 ], [ 0, 0, 180 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 8), i = Q("jiantou", [ -1.2 * e, 0, 0 ], [ 0, 0, 270 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 9), n = Q("jiantou", [ 0, -1.2 * e, 0 ], [ 0, 0, 0 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 10);
1220
+ return A.push(t, s, i, n), A;
1221
+ }
1222
+ getMeshes() {
1223
+ return this._meshes;
1224
+ }
813
1225
  }
814
1226
 
815
1227
  class u {
@@ -820,15 +1232,15 @@ class u {
820
1232
  this.A = A;
821
1233
  }
822
1234
  t() {
823
- const A = [], t = 340 / 177, e = B("jiantou", [ 1.2 * t, 0, 0 ], [ 0, 0, 90 ], [ t, t, t ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 7), s = B("jiantou", [ 0, 1.2 * t, 0 ], [ 0, 0, 180 ], [ t, t, t ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 8), i = B("jiantou", [ -1.2 * t, 0, 0 ], [ 0, 0, 270 ], [ t, t, t ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 9), n = B("jiantou", [ 0, -1.2 * t, 0 ], [ 0, 0, 0 ], [ t, t, t ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 10);
824
- return A.push(e, s, i, n), A;
1235
+ const A = [], e = Q("xuanzhuan", [ 0, 0, 0 ], [ 180, 0, 0 ], [ 340 / 177 * .5, 340 / 177 * .5, 340 / 177 * .5 ], [ 50 / 255, 130 / 255, 184 / 255, .8 ], 11);
1236
+ return A.push(e), A;
825
1237
  }
826
1238
  getMeshes() {
827
1239
  return this._meshes;
828
1240
  }
829
1241
  }
830
1242
 
831
- class Q {
1243
+ class m {
832
1244
  constructor(A) {
833
1245
  this.A = A, this._meshes = this.t();
834
1246
  }
@@ -836,15 +1248,15 @@ class Q {
836
1248
  this.A = A;
837
1249
  }
838
1250
  t() {
839
- const A = [], t = B("xuanzhuan", [ 0, 0, 0 ], [ 180, 0, 0 ], [ 340 / 177 * .5, 340 / 177 * .5, 340 / 177 * .5 ], [ 50 / 255, 130 / 255, 184 / 255, .8 ], 11);
840
- return A.push(t), A;
1251
+ const A = [], e = Q("yuanhuan", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 340 / 177 * .5, 340 / 177 * .5, 340 / 177 * .5 ], [ 149 / 255, 179 / 255, 199 / 255, .5 ], 12);
1252
+ return A.push(e), A;
841
1253
  }
842
1254
  getMeshes() {
843
1255
  return this._meshes;
844
1256
  }
845
1257
  }
846
1258
 
847
- class l {
1259
+ class b {
848
1260
  constructor(A) {
849
1261
  this.A = A, this._meshes = this.t();
850
1262
  }
@@ -852,15 +1264,15 @@ class l {
852
1264
  this.A = A;
853
1265
  }
854
1266
  t() {
855
- const A = [], t = B("yuanhuan", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 340 / 177 * .5, 340 / 177 * .5, 340 / 177 * .5 ], [ 149 / 255, 179 / 255, 199 / 255, .5 ], 12);
856
- return A.push(t), A;
1267
+ const A = [], e = Q("plane", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 10, 10, 10 ], [ 1, 0, 0, .5 ], 16);
1268
+ return A.push(e), A;
857
1269
  }
858
1270
  getMeshes() {
859
1271
  return this._meshes;
860
1272
  }
861
1273
  }
862
1274
 
863
- class b {
1275
+ class B {
864
1276
  constructor(A) {
865
1277
  this.A = A, this._meshes = this.t();
866
1278
  }
@@ -868,418 +1280,535 @@ class b {
868
1280
  this.A = A;
869
1281
  }
870
1282
  t() {
871
- const A = [], t = B("plane", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 10, 10, 10 ], [ 1, 0, 0, .5 ], 16);
872
- return A.push(t), A;
1283
+ const A = [], e = Q("xyzScale", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 2, 2, 2 ], null, 113);
1284
+ return A.push(e), A;
873
1285
  }
874
1286
  getMeshes() {
875
1287
  return this._meshes;
876
1288
  }
877
1289
  }
878
1290
 
879
- const y = [], v = [], M = [], E = [], D = [], p = [ 177 / 170, 177 / 170, 177 / 170 ], d = [ 1, 2, 3, 4, 12 ];
1291
+ const y = [], p = [], v = [], L = [], M = [], d = [ 177 / 170, 177 / 170, 177 / 170 ], E = [ 1, 2, 3, 4, 12 ];
880
1292
 
881
- class x {
1293
+ class O {
882
1294
  constructor() {
883
- this.translate = new u, this.rotation = new Q, this.scaling = new l, this.planeHelper = new b,
884
- this._meshes = this.t(), this.s = !0;
1295
+ this.translate = new D, this.rotation = new u, this.scaling = new m, this.planeHelper = new b,
1296
+ this.xyzScaleHelper = new B, this._meshes = this.t(), this.s = !0;
885
1297
  }
886
1298
  t() {
887
1299
  const A = {};
888
1300
  A.translate = this.translate.getMeshes(), A.rotation = this.rotation.getMeshes(),
889
- A.scaling = this.scaling.getMeshes(), A.planeHelper = this.planeHelper.getMeshes();
890
- const t = 340 / 177, e = B("yuanhuan41", [ -2.745 * t, 2.745 * t, 0 ], [ 90, 0, 0 ], [ .5 * t, .5 * t, .5 * t ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 1), s = B("yuanhuan41", [ 2.745 * t, 2.745 * t, 0 ], [ -90, 0, 180 ], [ .5 * t, .5 * t, .5 * t ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 2), i = B("yuanhuan41", [ 2.745 * t, -2.745 * t, 0 ], [ 90, 0, 180 ], [ .5 * t, .5 * t, .5 * t ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 3), n = B("yuanhuan41", [ -2.745 * t, -2.745 * t, 0 ], [ -90, 0, 0 ], [ .5 * t, .5 * t, .5 * t ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 4), o = B("yuanpan", [ 0, 0, 0 ], [ 90, 0, 0 ], [ .5 * t, .5 * t, .5 * t ], [ 89 / 255, 206 / 255, 147 / 255, .5 ], 5), I = B("zzhou", [ 0, 0, 6.5 ], [ 90, 0, 0 ], [ 1, 1, 1 ], [ 14 / 255, 127 / 255, 191 / 255, 1 ], 6);
891
- return A.translate.push(e, s, i, n, o, I), A;
892
- }
893
- updateMatrix(e, i, n, o, I) {
894
- const r = i.getCoordinates(), a = e.coordinateToPointAtRes(r, e.getGLRes()), h = i.getPointZ();
895
- s.set(v, a.x, a.y, h);
896
- const g = s.copy(y, I), c = m(e, i.getTranslation());
897
- s.add(v, v, c), s.add(v, v, g);
898
- for (const I in this._meshes) for (let r = 0; r < this._meshes[I].length; r++) {
899
- const a = this._meshes[I][r];
900
- for (let I = 0; I < a.length; I++) {
901
- const r = a[I], h = r.getUniform("uPickingId"), g = s.copy(y, r.translate), c = [ r.rotation[0], r.rotation[1], r.rotation[2] ], w = r.scaling;
902
- if (11 === h && (this.s ? (c[2] += n, r.rotation[2] += n) : this.s || (c[2] += n,
903
- r.rotation[2] += n, c[0] = 360, c[2] -= 90)), d.indexOf(h) > -1) if (12 !== h) w[0] += o,
904
- w[1] += o, w[2] += o; else {
1301
+ A.scaling = this.scaling.getMeshes(), A.planeHelper = this.planeHelper.getMeshes(),
1302
+ A.xyzScale = this.xyzScaleHelper.getMeshes();
1303
+ const e = 340 / 177, t = Q("yuanhuan41", [ -2.745 * e, 2.745 * e, 0 ], [ 90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 1), s = Q("yuanhuan41", [ 2.745 * e, 2.745 * e, 0 ], [ -90, 0, 180 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 2), i = Q("yuanhuan41", [ 2.745 * e, -2.745 * e, 0 ], [ 90, 0, 180 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 3), n = Q("yuanhuan41", [ -2.745 * e, -2.745 * e, 0 ], [ -90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 4), I = Q("yuanpan", [ 0, 0, 0 ], [ 90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 89 / 255, 206 / 255, 147 / 255, .5 ], 5), o = Q("zzhou", [ 0, 0, 6.5 ], [ 90, 0, 0 ], [ 1, 1, 1 ], [ 14 / 255, 127 / 255, 191 / 255, 1 ], 6);
1304
+ return A.translate.push(t, s, i, n, I, o), A;
1305
+ }
1306
+ updateMatrix(t, i, n, I, o) {
1307
+ const g = i.getCoordinates(), r = t.coordinateToPointAtRes(g, t.getGLRes()), C = i.i();
1308
+ s.set(p, r.x, r.y, C);
1309
+ const a = s.copy(y, o), h = P(t, i.getTranslation());
1310
+ s.add(p, p, h), s.add(p, p, a);
1311
+ for (const o in this._meshes) for (let g = 0; g < this._meshes[o].length; g++) {
1312
+ const r = this._meshes[o][g];
1313
+ for (let g = 0; g < r.length; g++) {
1314
+ const C = r[g], a = C.getUniform("uPickingId"), h = s.copy(y, C.translate), w = [ C.rotation[0], C.rotation[1], C.rotation[2] ], c = C.scaling;
1315
+ if (11 === a && (this.s ? (w[2] += n, C.rotation[2] += n) : this.s || (w[2] += n,
1316
+ C.rotation[2] += n, w[0] = 360, w[2] -= 90)), E.indexOf(a) > -1) if (12 !== a) c[0] += I,
1317
+ c[1] += I, c[2] += I; else {
905
1318
  const A = this._meshes.translate[4][0];
906
- w[0] = 1.2 * A.scaling[0], w[1] = 1.2 * A.scaling[0], w[2] = 1.2 * A.scaling[0];
1319
+ c[0] = 1.2 * A.scaling[0], c[1] = 1.2 * A.scaling[0], c[2] = 1.2 * A.scaling[0];
907
1320
  }
908
- let f = P(i, e);
909
- if (f = s.set(M, f, f, f), s.multiply(g, g, f), s.multiply(f, f, w), 1 === h || 2 === h || 3 === h || 4 === h) {
910
- const A = s.multiply(D, w, p);
911
- s.multiply(g, g, A);
1321
+ let Q = l(i, t);
1322
+ if (Q = s.set(v, Q, Q, Q), s.multiply(h, h, Q), s.multiply(Q, Q, c), 1 === a || 2 === a || 3 === a || 4 === a) {
1323
+ const A = s.multiply(M, c, d);
1324
+ s.multiply(h, h, A);
912
1325
  }
913
- const B = A.fromEuler(E, c[0], c[1], c[2]);
914
- s.add(g, g, v), t.fromRotationTranslationScale(r.localTransform, B, g, f);
1326
+ const f = A.fromEuler(L, w[0], w[1], w[2]);
1327
+ if (s.add(h, h, p), "xyzScale" === o) {
1328
+ const A = e.fromRotationTranslationScale([], f, h, Q);
1329
+ e.multiply(C.localTransform, A, C.originTransform);
1330
+ } else e.fromRotationTranslationScale(C.localTransform, f, h, Q);
915
1331
  }
916
1332
  }
917
1333
  }
918
1334
  getMeshes(A) {
919
- const t = {};
920
- return t.translate = this._meshes.translate, A && "translate" !== A && (t[A] = this._meshes[A]),
921
- t;
1335
+ const e = {};
1336
+ return A ? ("xyzScale" === A ? e[A] = this._meshes[A] : (e.translate = this._meshes.translate,
1337
+ "translate" !== A && (e[A] = this._meshes[A])), e) : e;
922
1338
  }
923
- i(A) {
1339
+ I(A) {
924
1340
  this.s = A;
925
1341
  }
926
1342
  dispose() {
927
- for (const A in this._meshes) for (let t = 0; t < this._meshes[A].length; t++) {
928
- const e = this._meshes[A][t];
929
- for (let A = 0; A < e.length; A++) {
930
- const t = e[A];
931
- t.geometry.dispose(), t.dispose();
1343
+ for (const A in this._meshes) for (let e = 0; e < this._meshes[A].length; e++) {
1344
+ const t = this._meshes[A][e];
1345
+ for (let A = 0; A < t.length; A++) {
1346
+ const e = t[A];
1347
+ e.geometry.dispose(), e.dispose();
932
1348
  }
933
1349
  }
934
1350
  }
935
1351
  }
936
1352
 
937
- const F = [ 5, 6, 7, 8, 9, 10 ], U = [ 5, 7, 8, 9, 10 ], k = [ 2, 4, 11 ], L = [ 1, 3, 12 ], V = [ 12, 16 ], O = [ 1, 2, 3, 4 ], S = [ 1, 2, 3, 4, 12 ], H = [], N = [], T = [], K = [], _ = [], R = [], G = [];
1353
+ const F = [], x = [], U = [], V = new o(0, 0), S = [], k = [], T = [];
938
1354
 
939
- class j extends(I(r(a))){
940
- constructor(A) {
941
- super(A), this.options = A, this.mouseAction = "moving", this.o = "translate", this.I = !0,
942
- this.TransformHelper = new x, this.helperScene = new e.Scene([]), this.addToMapCount = 0;
1355
+ class H {
1356
+ constructor() {
1357
+ this.o = [], this.g = [ 0, 0, 0 ], this.C = [ 1, 1, 1 ], this.h = [ 0, 0, 0 ];
1358
+ }
1359
+ l(A) {
1360
+ Array.isArray(A) ? A.forEach(A => {
1361
+ this.l(A);
1362
+ }) : (A.on("remove", this.P, this), A.D = {
1363
+ coordinate: A.getCoordinates(),
1364
+ translation: A.getTranslation(),
1365
+ rotation: A.getRotation(),
1366
+ scale: A.getScale()
1367
+ }, this.o.push(A));
1368
+ }
1369
+ u() {
1370
+ this.o.forEach(A => {
1371
+ A.off("remove", this.P, this);
1372
+ }), this.o = [];
1373
+ }
1374
+ m(A, e, t, i, n, I, o) {
1375
+ for (let o = 0; o < this.o.length; o++) {
1376
+ const g = this.o[o], r = g.getCoordinates(), C = I.coordinateToPointAtRes(r, I.getGLRes(), V), a = g.getRotation(), h = g.getScale(), w = s.set(F, C.x, C.y, r.z || 0), c = s.add(w, w, e), Q = this.B(I, g, i, t, e);
1377
+ Q.z = c[2];
1378
+ let f = null;
1379
+ f = i >= 0 ? i : i * (this.options && this.options.scaleStrength || 1);
1380
+ const l = s.add(T, s.set(F, f, f * (h[1] / h[0]), f * (h[2] / h[0])), h);
1381
+ if (Math.min(...l) < n) {
1382
+ const A = Math.min(...l);
1383
+ l[0] = l[0] * (n / A), l[1] = l[1] * (n / A), l[2] = l[2] * (n / A);
1384
+ }
1385
+ const P = s.add(a, t, a);
1386
+ g.setCoordinates(Q), this.p(A, l, h);
1387
+ const D = g.getTranslation();
1388
+ g.setTRS(D, P, l);
1389
+ }
1390
+ s.set(T, i, i, i), s.add(this.h, t, this.h), s.add(this.C, T, this.C), s.add(this.g, e, this.g),
1391
+ A.indexOf("translate") > -1 ? o.fire("positionchange", {
1392
+ action: A,
1393
+ type: "positionchange",
1394
+ target: this.o,
1395
+ center: this.getCoordinates(),
1396
+ scale: this.C,
1397
+ rotation: this.h,
1398
+ translation: this.g,
1399
+ deltaTranslate: e,
1400
+ deltaRotation: t,
1401
+ deltaScale: i
1402
+ }) : o.fire("transforming", {
1403
+ action: A,
1404
+ type: "transforming",
1405
+ target: this.o,
1406
+ center: this.o[0].getTransformOrigin(),
1407
+ scale: this.C,
1408
+ rotation: this.h,
1409
+ translation: this.g,
1410
+ deltaTranslate: e,
1411
+ deltaRotation: t,
1412
+ deltaScale: i
1413
+ });
1414
+ }
1415
+ B(t, i, n, I, o) {
1416
+ const g = i.getCenter(), r = i.getTransformOrigin(), C = t.getGLRes(), a = t.coordinateToPointAtRes(g, C, V);
1417
+ s.set(S, a.x, a.y, a.z || 0);
1418
+ const h = t.coordinateToPointAtRes(r, C, V);
1419
+ s.set(k, h.x, h.y, h.z || 0);
1420
+ const w = s.sub(F, S, k), c = A.fromEuler(x, 0, 0, I[2]);
1421
+ s.set(T, n + 1, n + 1, n + 1);
1422
+ const Q = e.fromRotationTranslationScale(U, c, o, T);
1423
+ s.transformMat4(w, w, Q), s.add(w, w, k), V.set(w[0], w[1]);
1424
+ const f = t.pointAtResToCoordinate(V, C);
1425
+ return f.z = w[2] / t.altitudeToPoint(1, C), f;
1426
+ }
1427
+ p(A, e, t) {
1428
+ return "x-scale" === A && (e[1] = t[1], e[2] = t[2]), "y-scale" === A && (e[0] = t[0],
1429
+ e[2] = t[2]), "z-scale" === A && (e[0] = t[0], e[1] = t[1]), e;
1430
+ }
1431
+ v() {
1432
+ this.o.forEach(A => {
1433
+ if (A.D) {
1434
+ const {coordinate: e, translation: t, rotation: s, scale: i} = A.D;
1435
+ A.setCoordinates(e), A.setTRS(t, s, i);
1436
+ }
1437
+ });
1438
+ }
1439
+ getScale() {
1440
+ return this.C;
1441
+ }
1442
+ getTranslation() {
1443
+ return this.g;
1444
+ }
1445
+ getRotation() {
1446
+ return this.h;
1447
+ }
1448
+ L() {
1449
+ return this.o[0] ? this.o[0].getLayer() : null;
1450
+ }
1451
+ getCoordinates() {
1452
+ let A = 0, e = 0, t = 0;
1453
+ const s = this.o.length;
1454
+ if (!s) return null;
1455
+ for (let i = 0; i < s; i++) {
1456
+ const s = this.o[i].getCenter();
1457
+ A += s.x, e += s.y, t += s.z || 0;
1458
+ }
1459
+ A /= s, e /= s, t /= s;
1460
+ const i = new g(A, e, t);
1461
+ for (let A = 0; A < s; A++) this.o[A].setTransformOrigin(i);
1462
+ return i;
1463
+ }
1464
+ P(A) {
1465
+ const e = A.target, t = this.o.indexOf(e);
1466
+ t > -1 && (delete e.D, this.o.splice(t, 1));
1467
+ }
1468
+ getTargets() {
1469
+ return this.o;
1470
+ }
1471
+ i() {
1472
+ let A = 0;
1473
+ const e = this.o.length;
1474
+ for (let t = 0; t < e; t++) {
1475
+ A += this.o[t].getPointZ();
1476
+ }
1477
+ return A /= e, A;
1478
+ }
1479
+ M() {
1480
+ for (let A = 0; A < this.o.length; A++) if (this.o[A].isVisible()) return !0;
1481
+ return !1;
1482
+ }
1483
+ }
1484
+
1485
+ const J = [ 5, 6, 7, 8, 9, 10 ], N = [ 5, 7, 8, 9, 10 ], R = [ 2, 4, 11 ], _ = [ 1, 3, 12 ], K = [ 12, 16 ], z = [ 1, 2, 3, 4 ], G = [ 1, 2, 3, 4, 12 ], j = [], Z = [], Y = [], W = [], q = [], X = [], $ = [];
1486
+
1487
+ class AA extends(r(C(a))){
1488
+ constructor(A = {}) {
1489
+ super(A), this.options = A, this.mouseAction = "moving", this.O = this.options.mode || "translate",
1490
+ this.F = !0, this.TransformHelper = new O, this.U = new H, this.helperScene = new t.Scene([]),
1491
+ this.addToMapCount = 0;
943
1492
  }
944
1493
  enable() {
945
- return this.I = !0, this.layerRenderer && this.layerRenderer.setToRedraw(), this;
1494
+ return this.F = !0, this.layerRenderer && this.layerRenderer.setToRedraw(), this;
946
1495
  }
947
1496
  disable() {
948
- return this.I = !1, this.layerRenderer && this.layerRenderer.setToRedraw(), this.map && this.map.resetCursor(),
1497
+ return this.F = !1, this.layerRenderer && this.layerRenderer.setToRedraw(), this.map && this.map.resetCursor(),
949
1498
  this;
950
1499
  }
1500
+ setMode(A) {
1501
+ this.O = A, this.layerRenderer && this.layerRenderer.setToRedraw();
1502
+ }
1503
+ getMode() {
1504
+ return this.O;
1505
+ }
951
1506
  isEnable() {
952
- return this.I;
1507
+ return this.F;
953
1508
  }
954
- h(A) {
955
- F.indexOf(A) > -1 ? this.o = "translate" : k.indexOf(A) > -1 ? this.o = "rotation" : L.indexOf(A) > -1 ? this.o = "scaling" : this.o = "translate";
1509
+ V(A) {
1510
+ J.indexOf(A) > -1 ? this.O = "translate" : R.indexOf(A) > -1 ? this.O = "rotation" : _.indexOf(A) > -1 ? this.O = "scaling" : "xyzScale" !== this.O && (this.O = "translate");
956
1511
  }
957
- g() {
958
- return this.o;
1512
+ S() {
1513
+ return this.O;
959
1514
  }
960
1515
  addTo(A) {
961
- this.map && (this.B(), console.warn("transform control has been added to a map, it suggest remove from the map before")),
962
- this.addToMapCount++, this.map = A, this.container = A.getContainer(), A.on("dom:mousemove", this.C, this),
963
- A.on("dom:mousedown", this.P, this), A.on("dom:mouseup", this.m, this), A.on("zooming moving dragrotating", this.u, this),
964
- this.l();
1516
+ this.map && (this.k(), console.warn("transform control has been added to a map, it suggest remove from the map before")),
1517
+ this.addToMapCount++, this.map = A, this.container = A.getContainer(), A.on("dom:mousemove", this.T, this),
1518
+ A.on("dom:mousedown", this.H, this), A.on("dom:mouseup", this.J, this), A.on("zooming moving dragrotating", this.N, this),
1519
+ this.R();
965
1520
  }
966
1521
  remove() {
967
- this.map && this.container && this.layerRenderer && (this.B(), this.TransformHelper.dispose(),
1522
+ this.map && this.container && this.layerRenderer && (this.k(), this.TransformHelper.dispose(),
968
1523
  this.layerRenderer.setToRedraw(), delete this.map, delete this.layer, delete this.layerRenderer,
969
- delete this.container, delete this.v);
1524
+ delete this.container, delete this.U);
970
1525
  }
971
- B() {
972
- this.container && this.map && (this.map.off("mousemove", this.C, this), this.map.off("mousedown", this.P, this),
973
- this.map.off("mouseup", this.m, this), this.map.off("zooming moving dragrotating", this.u, this),
1526
+ k() {
1527
+ this.container && this.map && (this.map.off("dom:mousemove", this.T, this), this.map.off("dom:mousedown", this.H, this),
1528
+ this.map.off("dom:mouseup", this.J, this), this.map.off("zooming moving dragrotating", this.N, this),
974
1529
  this.layer && this.layer.off("renderend", this.render, this));
975
1530
  }
976
- C(A) {
977
- if (this.M()) {
1531
+ T(A) {
1532
+ if (this._()) {
978
1533
  if (this.currentMousePosition = {
979
1534
  x: A.containerPoint.x,
980
1535
  y: A.containerPoint.y
981
1536
  }, "moving" === this.mouseAction) {
982
- const A = this.D();
983
- this.currentPickingObject = this.p(this.currentMousePosition, A, "meshes"), this.currentPickingObject && null != this.currentPickingObject.pickingId ? (this.h(this.currentPickingObject.pickingId),
984
- 6 === this.currentPickingObject.pickingId ? this.F(!0) : this.F(!1)) : (this.F(!1),
985
- this.h()), this.U();
1537
+ const A = this.K();
1538
+ this.currentPickingObject = this.G(this.currentMousePosition, A, "meshes"), this.currentPickingObject && null != this.currentPickingObject.pickingId ? (this.V(this.currentPickingObject.pickingId),
1539
+ 6 === this.currentPickingObject.pickingId ? this.j(!0) : this.j(!1)) : (this.j(!1),
1540
+ this.V()), this.Z();
986
1541
  }
987
- this.k(this.currentMousePosition);
1542
+ this.Y(this.currentMousePosition);
988
1543
  }
989
1544
  }
990
- P(A) {
991
- if (!this.M()) return;
992
- const t = this.D();
1545
+ H(A) {
1546
+ if (!this._()) return;
1547
+ const e = this.K();
993
1548
  this.currentMousePosition = {
994
1549
  x: A.containerPoint.x,
995
1550
  y: A.containerPoint.y
996
- }, this.L = !0, this.currentPickingObject = this.p(this.currentMousePosition, t, "meshes"),
997
- this.firstDownPoint = this.p(this.currentMousePosition, t, "meshes"), this.currentPickingObject && null != this.currentPickingObject.meshId ? (this.mouseAction = "transform",
998
- this.V(this.currentPickingObject.pickingId), this.map.config("zoomable", !1), this.map.config("draggable", !1),
1551
+ }, this.W = !0, this.currentPickingObject = this.G(this.currentMousePosition, e, "meshes"),
1552
+ this.firstDownPoint = this.G(this.currentMousePosition, e, "meshes"), this.currentPickingObject && null != this.currentPickingObject.meshId ? (this.mouseAction = "transform",
1553
+ this.q(this.currentPickingObject.pickingId), this.map.config("zoomable", !1), this.map.config("draggable", !1),
999
1554
  this.layerRenderer && this.layerRenderer.setToRedraw()) : (this.mouseAction = "pan",
1000
- this.map.config("zoomable", !0), this.map.config("draggable", !0), this.O()), this.lastMousePosition = this.currentMousePosition,
1001
- this.lastPickingObject = this.currentPickingObject, this.lastPickingMesh = t[this.currentPickingObject.meshId];
1555
+ this.map.config("zoomable", !0), this.map.config("draggable", !0), this.X()), this.lastMousePosition = this.currentMousePosition,
1556
+ this.lastPickingObject = this.currentPickingObject, this.lastPickingMesh = e[this.currentPickingObject.meshId];
1002
1557
  }
1003
- m() {
1004
- "transform" === this.mouseAction && (this.firstDownPoint = null, this.O(), this.L = !0,
1558
+ J() {
1559
+ "transform" === this.mouseAction && (this.firstDownPoint = null, this.X(), this.W = !0,
1005
1560
  this.fire("transformend", {
1006
- action: this.S,
1561
+ action: this.$,
1007
1562
  type: "transformend"
1008
- })), this.mouseAction = "moving", this.o = "translate", this.map.config("zoomable", !0),
1009
- this.map.config("draggable", !0), this.layerRenderer && this.layerRenderer.setToRedraw();
1563
+ })), this.mouseAction = "moving", "xyzScale" !== this.O && (this.O = "translate"),
1564
+ this.map.config("zoomable", !0), this.map.config("draggable", !0), this.layerRenderer && this.layerRenderer.setToRedraw();
1010
1565
  }
1011
- u() {
1012
- const A = this.TransformHelper.planeHelper.getMeshes()[0][0], t = this.map.getBearing();
1013
- A.rotation[2] = -t, this.H();
1566
+ N() {
1567
+ const A = this.TransformHelper.planeHelper.getMeshes()[0][0], e = this.map.getBearing();
1568
+ A.rotation[2] = -e, this.AA();
1014
1569
  }
1015
- H() {
1016
- this.M() && (this.TransformHelper.updateMatrix(this.map, this.v, 0, 0, [ 0, 0, 0 ]),
1017
- this.L = !0);
1570
+ AA() {
1571
+ this._() && (this.TransformHelper.updateMatrix(this.map, this.U, 0, 0, [ 0, 0, 0 ]),
1572
+ this.W = !0);
1018
1573
  }
1019
1574
  picked(A) {
1020
1575
  if (!this.layerRenderer) return !1;
1021
- const t = this.D(), e = this.map;
1576
+ const e = this.K(), t = this.map;
1022
1577
  let s = A;
1023
- A instanceof h || (s = e.coordinateToContainerPoint(new g(A)));
1024
- const i = this.p(s, t, "picked");
1578
+ A instanceof o || (s = t.coordinateToContainerPoint(new g(A)));
1579
+ const i = this.G(s, e, "picked");
1025
1580
  return !(!i || null === i.meshId);
1026
1581
  }
1027
- O() {
1582
+ X() {
1028
1583
  const A = this.TransformHelper.getMeshes("scaling").scaling[0][0];
1029
- A.scaling = [ 340 / 177 * .6, 340 / 177 * .6, 340 / 177 * .6 ], this.layerRenderer && (this.N(A),
1030
- this.T());
1584
+ A.scaling = [ 340 / 177 * .6, 340 / 177 * .6, 340 / 177 * .6 ], this.layerRenderer && (this.eA(A),
1585
+ this.tA());
1031
1586
  }
1032
- T() {
1587
+ tA() {
1033
1588
  this.TransformHelper._meshes.translate.forEach(A => {
1034
- for (let t = 0; t < A.length; t++) {
1035
- const e = A[t];
1036
- O.indexOf(e.getUniform("uPickingId")) > -1 && e.material.set("color", e.originColor);
1589
+ for (let e = 0; e < A.length; e++) {
1590
+ const t = A[e];
1591
+ z.indexOf(t.getUniform("uPickingId")) > -1 && t.material.set("color", t.originColor);
1037
1592
  }
1038
1593
  });
1039
1594
  }
1040
- N(e) {
1041
- const i = this.v.getCoordinates(), n = this.map.coordinateToPointAtRes(i, this.map.getGLRes()), o = [ n.x, n.y, 0 ], I = m(this.map, this.v.getTranslation());
1042
- s.add(o, o, I);
1043
- const r = s.copy([], e.translate), a = e.scaling;
1044
- let h = P(this.v, this.map);
1045
- h = s.set([], h, h, h), s.multiply(r, r, h), s.multiply(h, h, a), s.add(r, r, o),
1046
- t.fromRotationTranslationScale(e.localTransform, [ 0, 0, 0, 1 ], r, h);
1047
- this.D().forEach(e => {
1048
- const i = e.getUniform("uPickingId");
1595
+ eA(t) {
1596
+ const i = this.U.getCoordinates(), n = this.map.coordinateToPointAtRes(i, this.map.getGLRes()), I = [ n.x, n.y, 0 ], o = P(this.map, this.U.getTranslation());
1597
+ s.add(I, I, o);
1598
+ const g = s.copy([], t.translate), r = t.scaling;
1599
+ let C = l(this.U, this.map);
1600
+ C = s.set([], C, C, C), s.multiply(g, g, C), s.multiply(C, C, r), s.add(g, g, I),
1601
+ e.fromRotationTranslationScale(t.localTransform, [ 0, 0, 0, 1 ], g, C);
1602
+ this.K().forEach(t => {
1603
+ const i = t.getUniform("uPickingId");
1049
1604
  if (1 === i || 3 === i || 2 === i || 4 === i) {
1050
- const i = s.copy([], e.translate), n = 170 / 177;
1051
- e.scaling = [ n, n, n ];
1052
- const I = e.scaling, r = e.rotation;
1053
- let a = P(this.v, this.map);
1054
- a = s.set([], a, a, a), s.multiply(i, i, a), s.multiply(a, a, I), s.add(i, i, o);
1055
- const h = A.fromEuler([], r[0], r[1], r[2]);
1056
- t.fromRotationTranslationScale(e.localTransform, h, i, a);
1605
+ const i = s.copy([], t.translate), n = 170 / 177;
1606
+ t.scaling = [ n, n, n ];
1607
+ const o = t.scaling, g = t.rotation;
1608
+ let r = l(this.U, this.map);
1609
+ r = s.set([], r, r, r), s.multiply(i, i, r), s.multiply(r, r, o), s.add(i, i, I);
1610
+ const C = A.fromEuler([], g[0], g[1], g[2]);
1611
+ e.fromRotationTranslationScale(t.localTransform, C, i, r);
1057
1612
  }
1058
1613
  });
1059
1614
  }
1060
- K(A) {
1061
- const t = this.map.containerPointToCoordinate(A), e = this.map.coordinateToPointAtRes(t, this.map.getGLRes());
1615
+ sA(A) {
1616
+ const e = this.map.containerPointToCoordinate(A), t = this.map.coordinateToPointAtRes(e, this.map.getGLRes());
1062
1617
  return {
1063
- point: [ e.x, e.y ]
1618
+ point: [ t.x, t.y ]
1064
1619
  };
1065
1620
  }
1066
- k(A) {
1621
+ Y(A) {
1067
1622
  if ("transform" === this.mouseAction) {
1068
- const A = this.g(), t = m(this.map, this.v.getTranslation()), e = this.v.getPointZ(), n = this.v.getCoordinates(), o = this.map.coordinateToPointAtRes(n, this.map.getGLRes()), I = this.v.getRotation(), r = this.v.getScale();
1069
- let a = null, c = null;
1070
- if (t[2] + e < .01 && "z-translate" !== this.S) a = this.K(this.currentMousePosition),
1071
- c = this.K(this.lastMousePosition); else {
1623
+ const A = this.S(), e = P(this.map, this.U.getTranslation()), t = this.U.i();
1624
+ let s = null, n = null;
1625
+ if (e[2] + t < .01 && "z-translate" !== this.$) s = this.sA(this.currentMousePosition),
1626
+ n = this.sA(this.lastMousePosition); else {
1072
1627
  const A = this.TransformHelper.planeHelper.getMeshes()[0];
1073
- if (a = this.p(this.currentMousePosition, A, "plane"), c = this.p(this.lastMousePosition, A, "plane"),
1074
- !a || null === a.meshId || !c || null === c.meshId) return;
1628
+ if (s = this.G(this.currentMousePosition, A, "plane"), n = this.G(this.lastMousePosition, A, "plane"),
1629
+ !s || null === s.meshId || !n || null === n.meshId) return;
1075
1630
  }
1076
- const w = [ 0, 0, 0 ], f = [ 0, 0, 0 ];
1077
- let B = 0, C = 0, P = 0;
1631
+ const I = [ 0, 0, 0 ], g = [ 0, 0, 0 ];
1632
+ let r = 0, C = 0, a = 0;
1078
1633
  if ("translate" === A) {
1079
- if ("xy-translate" === this.S) {
1080
- const A = a.point[0] - c.point[0], t = a.point[1] - c.point[1];
1081
- w[0] = A, w[1] = t;
1082
- } else if ("x-translate" === this.S) {
1083
- const A = a.point[0] - c.point[0];
1084
- w[0] = A;
1085
- } else if ("y-translate" === this.S) {
1086
- const A = a.point[1] - c.point[1];
1087
- w[1] = A;
1088
- } else if ("z-translate" === this.S) {
1634
+ if ("xy-translate" === this.$) {
1635
+ const A = s.point[0] - n.point[0], e = s.point[1] - n.point[1];
1636
+ I[0] = A, I[1] = e;
1637
+ } else if ("x-translate" === this.$) {
1638
+ const A = s.point[0] - n.point[0];
1639
+ I[0] = A;
1640
+ } else if ("y-translate" === this.$) {
1641
+ const A = s.point[1] - n.point[1];
1642
+ I[1] = A;
1643
+ } else if ("z-translate" === this.$) {
1089
1644
  let A = 0;
1090
- if (this._()) {
1091
- const t = this.map.getGLRes(), e = this.map._pointAtResToContainerPoint(new h(c.point[0], c.point[1]), t), s = this.map._pointAtResToContainerPoint(new h(a.point[0], a.point[1]), t), n = i.length(i.set(K, a.point[0] - c.point[0], a.point[1] - c.point[1]));
1092
- A = s.y < e.y ? n : -n;
1093
- } else A = a.point[2] - c.point[2];
1094
- w[2] = Math.sign(A) * this.map.pointAtResToAltitude(A, this.map.getGLRes());
1645
+ if (this.iA()) {
1646
+ const e = this.map.getGLRes(), t = this.map._pointAtResToContainerPoint(new o(n.point[0], n.point[1]), e), I = this.map._pointAtResToContainerPoint(new o(s.point[0], s.point[1]), e), g = i.length(i.set(W, s.point[0] - n.point[0], s.point[1] - n.point[1]));
1647
+ A = I.y < t.y ? g : -g;
1648
+ } else A = s.point[2] - n.point[2];
1649
+ I[2] = Math.sign(A) * this.map.pointAtResToAltitude(A, this.map.getGLRes());
1095
1650
  }
1096
- } else if ("rotation" === A) C = this.R(a.point, c.point), C >= 0 ? this.TransformHelper.i(!0) : this.TransformHelper.i(!1),
1097
- f[2] += C; else if ("scaling" === A) {
1098
- const A = this.G(), t = i.length(i.set(K, this.firstDownPoint.point[0] - A[0], this.firstDownPoint.point[1] - A[1])), e = i.length(i.set(K, c.point[0] - A[0], c.point[1] - A[1]));
1099
- B = this.j(a.point, c.point, A, e, r), P = this.j(a.point, c.point, A, t);
1100
- }
1101
- const u = s.set([], o.x, o.y, n.z || 0), Q = s.add(u, u, w), l = this.map.pointAtResToCoordinate(new g(Q[0], Q[1]), this.map.getGLRes());
1102
- l.z = Q[2];
1103
- let b = null;
1104
- b = B >= 0 ? B : B * (this.options && this.options.scaleStrength || 1);
1105
- const y = s.add(r, s.set(K, b, b * (r[1] / r[0]), b * (r[2] / r[0])), r);
1106
- if (Math.min(...y) < .01) {
1107
- const A = Math.min(...r);
1108
- y[0] = r[0] * (.01 / A), y[1] = r[1] * (.01 / A), y[2] = r[2] * (.01 / A);
1651
+ } else if ("rotation" === A) C = this.nA(s.point, n.point), C >= 0 ? this.TransformHelper.I(!0) : this.TransformHelper.I(!1),
1652
+ g[2] += C; else if ("scaling" === A || "xyzScale" === A) {
1653
+ const A = this.IA(), e = i.length(i.set(W, this.firstDownPoint.point[0] - A[0], this.firstDownPoint.point[1] - A[1])), t = i.length(i.set(W, n.point[0] - A[0], n.point[1] - A[1]));
1654
+ r = this.oA(s.point, n.point, A, t), a = this.oA(s.point, n.point, A, e);
1109
1655
  }
1110
- const v = s.add(I, f, I);
1111
- this.TransformHelper.updateMatrix(this.map, this.v, C, P, w), this.S.indexOf("translate") > -1 ? this.fire("positionchange", {
1112
- action: this.S,
1113
- type: "positionchange",
1114
- target: this.v,
1115
- coordinate: l
1116
- }) : this.fire("transforming", {
1117
- action: this.S,
1118
- type: "transforming",
1119
- target: this.v,
1120
- translate: t,
1121
- rotation: v,
1122
- scale: y
1123
- });
1656
+ this.TransformHelper.updateMatrix(this.map, this.U, C, a, I), this.U.m(this.$, I, g, r, .01, this.map, this);
1124
1657
  }
1125
1658
  this.lastMousePosition = A, this.lastPickingObject = this.currentPickingObject;
1126
- const t = this.D();
1127
- this.lastPickingMesh = t[this.currentPickingObject.meshId];
1659
+ const e = this.K();
1660
+ this.lastPickingMesh = e[this.currentPickingObject.meshId];
1128
1661
  }
1129
- j(A, t, e, s, n) {
1130
- const o = (i.length(i.set(K, A[0] - e[0], A[1] - e[1])) - i.length(i.set(K, t[0] - e[0], t[1] - e[1]))) / s;
1131
- return n ? (n[0] - .01) * o : o;
1662
+ oA(A, e, t, s, n) {
1663
+ const I = (i.length(i.set(W, A[0] - t[0], A[1] - t[1])) - i.length(i.set(W, e[0] - t[0], e[1] - t[1]))) / s;
1664
+ return n ? (n[0] - .01) * I : I;
1132
1665
  }
1133
- G() {
1134
- const A = this.map, t = this.v.getCoordinates(), e = A.coordinateToPointAtRes(t, A.getGLRes()), i = s.set(_, e.x, e.y, 0), n = m(A, this.v.getTranslation());
1666
+ IA() {
1667
+ const A = this.map, e = this.U.getCoordinates(), t = A.coordinateToPointAtRes(e, A.getGLRes()), i = s.set(q, t.x, t.y, 0), n = P(A, this.U.getTranslation());
1135
1668
  return s.add(i, i, n), i;
1136
1669
  }
1137
- F(e) {
1138
- const i = this.TransformHelper.planeHelper.getMeshes()[0][0], n = t.getTranslation(T, i.localTransform), o = t.getScaling(N, i.localTransform);
1139
- let I = A.fromEuler(H, 0, 0, 0);
1140
- const r = this.map.getBearing();
1141
- e && !this._() ? (I = A.fromEuler(H, 90, 0, -r), 0 === i.rotation[0] && (this.L = !0),
1142
- s.set(i.rotation, 90, 0, -r)) : (90 === i.rotation[0] && (this.L = !0), s.set(i.rotation, 0, 0, -r)),
1143
- t.fromRotationTranslationScale(i.localTransform, I, n, o);
1670
+ j(t) {
1671
+ const i = this.TransformHelper.planeHelper.getMeshes()[0][0], n = e.getTranslation(Y, i.localTransform), I = e.getScaling(Z, i.localTransform);
1672
+ let o = A.fromEuler(j, 0, 0, 0);
1673
+ const g = this.map.getBearing();
1674
+ t && !this.iA() ? (o = A.fromEuler(j, 90, 0, -g), 0 === i.rotation[0] && (this.W = !0),
1675
+ s.set(i.rotation, 90, 0, -g)) : (90 === i.rotation[0] && (this.W = !0), s.set(i.rotation, 0, 0, -g)),
1676
+ e.fromRotationTranslationScale(i.localTransform, o, n, I);
1144
1677
  }
1145
- _() {
1678
+ iA() {
1146
1679
  if (this.map.getPitch()) return !1;
1147
- const A = this.map.cameraPosition, t = this.map.coordinateToPointAtRes(this.map.getCenter(), this.map.getGLRes());
1148
- s.set(t, t.x, t.y, 0);
1149
- const e = this.v.getCoordinates(), i = this.map.coordinateToPointAtRes(e, this.map.getGLRes()), n = m(this.map, this.v.getTranslation()), o = s.set(T, i.x, i.y, 0), I = s.add(o, o, n), r = s.subtract([], A, I), a = s.subtract([], A, t);
1150
- return s.angle(r, a) < 1 / 180 * Math.PI;
1680
+ const A = this.map.cameraPosition, e = this.map.coordinateToPointAtRes(this.map.getCenter(), this.map.getGLRes());
1681
+ s.set(e, e.x, e.y, 0);
1682
+ const t = this.U.getCoordinates(), i = this.map.coordinateToPointAtRes(t, this.map.getGLRes()), n = P(this.map, this.U.getTranslation()), I = s.set(Y, i.x, i.y, 0), o = s.add(I, I, n), g = s.subtract([], A, o), r = s.subtract([], A, e);
1683
+ return s.angle(g, r) < 1 / 180 * Math.PI;
1151
1684
  }
1152
- U() {
1153
- const A = this.D();
1685
+ Z() {
1686
+ const A = this.K();
1154
1687
  if (this.currentPickingObject && null != this.currentPickingObject.meshId) {
1155
- this.Z(), this.lastPickingObject && null != this.lastPickingObject.meshId && this.lastPickingObject.meshId !== this.currentPickingObject.meshId && this.J();
1156
- const t = A[this.currentPickingObject.meshId];
1157
- if (t && V.indexOf(this.currentPickingObject.pickingId) < 0) {
1158
- const A = [ t.originColor[0], t.originColor[1], t.originColor[2], .8 ];
1159
- t.material.set("color", A), this.Y(t, .5);
1688
+ this.gA(), this.lastPickingObject && null != this.lastPickingObject.meshId && this.lastPickingObject.meshId !== this.currentPickingObject.meshId && this.rA();
1689
+ const e = A[this.currentPickingObject.meshId];
1690
+ if (e && K.indexOf(this.currentPickingObject.pickingId) < 0) {
1691
+ const A = [ e.originColor[0], e.originColor[1], e.originColor[2], .8 ];
1692
+ e.material.set("color", A), this.CA(e, .5);
1160
1693
  }
1161
1694
  this.layerRenderer.setToRedraw();
1162
1695
  } else this.lastPickingObject && null != this.lastPickingObject.meshId && (this.map.resetCursor(),
1163
- this.J(), this.layerRenderer.setToRedraw());
1696
+ this.rA(), this.layerRenderer.setToRedraw());
1164
1697
  }
1165
- Z() {
1166
- 6 === this.currentPickingObject.pickingId ? this.map.setCursor("ns-resize") : U.indexOf(this.currentPickingObject.pickingId) > -1 ? this.map.setCursor("move") : this.map.setCursor("pointer");
1698
+ gA() {
1699
+ 6 === this.currentPickingObject.pickingId ? this.map.setCursor("ns-resize") : N.indexOf(this.currentPickingObject.pickingId) > -1 ? this.map.setCursor("move") : this.map.setCursor("pointer");
1167
1700
  }
1168
- J() {
1701
+ rA() {
1169
1702
  const A = this.lastPickingMesh;
1170
1703
  if (!A) return;
1171
- const t = A.getUniform("uPickingId"), e = this.D();
1172
- U.indexOf(t) > -1 ? e.forEach(A => {
1173
- U.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1174
- }) : S.indexOf(t) > -1 ? e.forEach(A => {
1175
- const t = A.getUniform("uPickingId");
1176
- O.indexOf(t) > -1 && A.material.set("color", A.originColor);
1177
- }) : 11 === t && e.forEach(A => {
1178
- O.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1704
+ const e = A.getUniform("uPickingId"), t = this.K();
1705
+ N.indexOf(e) > -1 ? t.forEach(A => {
1706
+ N.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1707
+ }) : G.indexOf(e) > -1 ? t.forEach(A => {
1708
+ const e = A.getUniform("uPickingId");
1709
+ z.indexOf(e) > -1 && A.material.set("color", A.originColor);
1710
+ }) : 11 === e && t.forEach(A => {
1711
+ z.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1179
1712
  }), A.material.set("color", A.originColor);
1180
1713
  }
1181
- Y(A, t) {
1182
- const e = A.getUniform("uPickingId"), s = this.D();
1183
- U.indexOf(e) > -1 ? s.forEach(e => {
1184
- if (U.indexOf(e.getUniform("uPickingId")) > -1 && e.getUniform("uPickingId") !== A.getUniform("uPickingId")) {
1185
- const A = [ e.originColor[0], e.originColor[1], e.originColor[2], t ];
1186
- e.material.set("color", A);
1714
+ CA(A, e) {
1715
+ const t = A.getUniform("uPickingId"), s = this.K();
1716
+ N.indexOf(t) > -1 ? s.forEach(t => {
1717
+ if (N.indexOf(t.getUniform("uPickingId")) > -1 && t.getUniform("uPickingId") !== A.getUniform("uPickingId")) {
1718
+ const A = [ t.originColor[0], t.originColor[1], t.originColor[2], e ];
1719
+ t.material.set("color", A);
1187
1720
  }
1188
- }) : "scaling" === this.o ? s.forEach(A => {
1189
- const t = A.getUniform("uPickingId");
1190
- if (1 === t || 3 === t || 2 === t || 4 === t) {
1191
- const t = [ 149 / 255, 179 / 255, 199 / 255, .8 ];
1192
- A.material.set("color", t);
1721
+ }) : "scaling" === this.O ? s.forEach(A => {
1722
+ const e = A.getUniform("uPickingId");
1723
+ if (1 === e || 3 === e || 2 === e || 4 === e) {
1724
+ const e = [ 149 / 255, 179 / 255, 199 / 255, .8 ];
1725
+ A.material.set("color", e);
1193
1726
  }
1194
- }) : "rotation" === this.o && s.forEach(A => {
1195
- const t = A.getUniform("uPickingId");
1196
- if (1 === t || 3 === t || 2 === t || 4 === t) {
1197
- const t = A.originColor;
1198
- A.material.set("color", [ t[0], t[1], t[2], 0 ]);
1727
+ }) : "rotation" === this.O && s.forEach(A => {
1728
+ const e = A.getUniform("uPickingId");
1729
+ if (1 === e || 3 === e || 2 === e || 4 === e) {
1730
+ const e = A.originColor;
1731
+ A.material.set("color", [ e[0], e[1], e[2], 0 ]);
1199
1732
  }
1200
1733
  });
1201
1734
  }
1202
1735
  reset() {
1203
- if (!this.map || !this.v) return;
1204
- this.v.setTranslation(this.v.originTrans), this.v.setRotation(this.W), this.v.setScale(this.q);
1205
- const A = m(this.map, this.v.getTranslation());
1206
- s.scale(A, A, -1), this.TransformHelper.updateMatrix(this.map, this.v, 0, 1, [ 0, 0, 0 ]);
1736
+ this.map && this.U && (this.U.v(), this.TransformHelper.updateMatrix(this.map, this.U, 0, 0, [ 0, 0, 0 ]));
1207
1737
  }
1208
- R(A, t) {
1209
- const e = this.G(), s = i.set(R, t[0] - e[0], t[1] - e[1]), n = i.set(G, A[0] - e[0], A[1] - e[1]), o = Math.atan2(s[1], s[0]);
1210
- return (Math.atan2(n[1], n[0]) - o) / Math.PI * 180;
1738
+ nA(A, e) {
1739
+ const t = this.IA(), s = i.set(X, e[0] - t[0], e[1] - t[1]), n = i.set($, A[0] - t[0], A[1] - t[1]), I = Math.atan2(s[1], s[0]);
1740
+ return (Math.atan2(n[1], n[0]) - I) / Math.PI * 180;
1211
1741
  }
1212
- V(A) {
1213
- return this.S = 5 === A ? "xy-translate" : 6 === A ? "z-translate" : 7 === A || 9 === A ? "x-translate" : 8 === A || 10 === A ? "y-translate" : 11 === A ? "z-rotate" : "scale",
1214
- this.S;
1742
+ q(A) {
1743
+ return this.$ = 113 === A || 114 === A ? "x-scale" : 115 === A || 116 === A ? "z-scale" : 117 === A || 118 === A ? "y-scale" : 119 === A ? "xyz-scale" : 5 === A ? "xy-translate" : 6 === A ? "z-translate" : 7 === A || 9 === A ? "x-translate" : 8 === A || 10 === A ? "y-translate" : 11 === A ? "z-rotate" : "scale",
1744
+ this.$;
1215
1745
  }
1216
1746
  transform(A) {
1747
+ if (!A) return;
1217
1748
  if (this.layerRenderer && this.layerRenderer.layer && (this.layerRenderer.layer.off("renderend", this.render),
1218
- this.layerRenderer.layer.off("resizeCanvas", this.X)), this.v && (this.v.off("remove", this.$, this),
1219
- delete this.v), this.v = A, this.v.on("remove", this.$, this), !this.map) return void console.error("should add to a target first");
1220
- const t = this.map;
1221
- this.v.originTrans || (this.v.originTrans = m(t, this.v.getTranslation()), this.v.originRotation = this.v.getRotation(),
1222
- this.v.originScale = this.v.getScale()), this.TransformHelper.updateMatrix(t, A, 0, 0, [ 0, 0, 0 ]),
1223
- this.AA(), this.L = !0;
1749
+ this.layerRenderer.layer.off("resizeCanvas", this.aA)), !this.map) return void console.error("should add to a target first");
1750
+ if (this.U && (this.U.u(), this.U.l(A)), !this.U.getTargets().length) return;
1751
+ const e = this.map;
1752
+ this.TransformHelper.updateMatrix(e, this.U, 0, 0, [ 0, 0, 0 ]), this.hA(), this.W = !0;
1224
1753
  }
1225
1754
  getTransformTarget() {
1226
- return this.v;
1227
- }
1228
- $() {
1229
- delete this.v;
1230
- }
1231
- AA() {
1232
- const A = this.v.getLayer();
1233
- A && (A.off("renderend", this.render), A.off("resizeCanvas", this.X));
1234
- const t = this.map.getLayers();
1235
- let e = null;
1236
- for (let A = 0; A < t.length; A++) if (t[A] instanceof n) {
1237
- e = t[A];
1755
+ return this.U;
1756
+ }
1757
+ P() {
1758
+ delete this.U;
1759
+ }
1760
+ hA() {
1761
+ const A = this.U.L();
1762
+ A && (A.off("renderend", this.render), A.off("resizeCanvas", this.aA));
1763
+ const e = this.map.getLayers();
1764
+ let t = null;
1765
+ for (let A = 0; A < e.length; A++) if (e[A] instanceof n) {
1766
+ t = e[A];
1238
1767
  break;
1239
1768
  }
1240
- if (!e) return;
1241
- const s = e.getLayers(), i = s.indexOf(A);
1769
+ if (!t) return;
1770
+ const s = t.getLayers(), i = s.indexOf(A);
1242
1771
  if (i < 0) return;
1243
1772
  s.splice(i, 1), s.push(A);
1244
- const o = this.map, I = A.getRenderer();
1245
- this.layerRenderer = I, this.regl = I.regl, this.renderer = I.renderer, this.tA = this.layerRenderer.getFBORayPicking(),
1246
- this.eA = {
1247
- projViewMatrix: o.projViewMatrix
1248
- }, A.on("renderend", this.render, this), A.on("resizeCanvas", this.X, this), I.setToRedraw();
1773
+ const I = this.map, o = A.getRenderer();
1774
+ this.layerRenderer = o, this.regl = o.regl, this.renderer = o.renderer, this.wA = this.layerRenderer.getFBORayPicking(),
1775
+ this.cA = {
1776
+ projViewMatrix: I.projViewMatrix
1777
+ }, A.on("renderend", this.render, this), A.on("resizeCanvas", this.aA, this), o.setToRedraw();
1249
1778
  }
1250
- X() {
1251
- this.tA.clear(), this.L = !0;
1779
+ aA() {
1780
+ this.wA.clear(), this.W = !0;
1252
1781
  }
1253
- p(A, t, e) {
1782
+ G(A, e, t) {
1254
1783
  const s = this.map;
1255
- if (!(s && this.tA && this.layerRenderer && this.layerRenderer.canvas)) return null;
1256
- const i = s.getDevicePixelRatio(), n = A.x * i, o = A.y * i, I = {
1784
+ if (!(s && this.wA && this.layerRenderer && this.layerRenderer.canvas)) return null;
1785
+ const i = s.getDevicePixelRatio(), n = A.x * i, I = A.y * i, o = {
1257
1786
  projViewMatrix: this.map.projViewMatrix,
1258
1787
  pointSize: 1
1259
- }, r = this.layerRenderer.canvas.gl && this.layerRenderer.canvas.gl.wrap;
1260
- (this.L || r || !this.sA || this.sA !== e) && (this.tA.render(t, I, !0), this.sA = e,
1261
- this.L = !1);
1262
- return this.tA.pick(n, o, 10, I, {
1788
+ }, g = this.layerRenderer.canvas.gl && this.layerRenderer.canvas.gl.wrap;
1789
+ (this.W || g || !this.QA || this.QA !== t) && (this.wA.render(e, o, !0), this.QA = t,
1790
+ this.W = !1);
1791
+ return this.wA.pick(n, I, 10, o, {
1263
1792
  viewMatrix: this.map.viewMatrix,
1264
1793
  projMatrix: this.map.projMatrix,
1265
1794
  returnPoint: !0
1266
1795
  });
1267
1796
  }
1268
- l() {
1797
+ R() {
1269
1798
  const A = this.map.getDevicePixelRatio(), s = {
1270
1799
  x: 0,
1271
1800
  y: 0,
1272
1801
  width: () => this.map ? this.map.width * A : 1,
1273
1802
  height: () => this.map ? this.map.height * A : 1
1274
1803
  };
1275
- this.iA = new e.MeshShader({
1804
+ this.fA = new t.MeshShader({
1276
1805
  vert: "attribute vec3 aPosition;\n\nuniform mat4 projViewModelMatrix;\n\n\n\nvoid main()\n\n{\n\n gl_Position = projViewModelMatrix * vec4(aPosition, 1.0);\n\n\n\n}\n\n",
1277
1806
  frag: "precision mediump float;\n\nuniform vec4 color;\n\n\n\nvoid main() {\n\n gl_FragColor = color;\n\n}\n\n",
1278
1807
  uniforms: [ "color", {
1279
1808
  name: "projViewModelMatrix",
1280
1809
  type: "function",
1281
- fn: function(A, e) {
1282
- return t.multiply([], e.projViewMatrix, e.modelMatrix);
1810
+ fn: function(A, t) {
1811
+ return e.multiply([], t.projViewMatrix, t.modelMatrix);
1283
1812
  }
1284
1813
  } ],
1285
1814
  extraCommandProps: {
@@ -1303,37 +1832,37 @@ class j extends(I(r(a))){
1303
1832
  });
1304
1833
  }
1305
1834
  render() {
1306
- if (!this.M()) return;
1307
- const A = this.D();
1835
+ if (!this._()) return;
1836
+ const A = this.K();
1308
1837
  this.helperScene.setMeshes(A);
1309
- const t = this.layerRenderer.getFrameContext();
1310
- if (t && t.renderTarget && this.layerRenderer.getFrameTimestamp() !== t.timestamp) return;
1311
- this.H(), this.iA.filter = t && t.sceneFilter;
1312
- const e = t && t.renderTarget && t.renderTarget.fbo;
1313
- this.renderer.render(this.iA, this.eA, this.helperScene, e);
1838
+ const e = this.layerRenderer.getFrameContext();
1839
+ if (e && e.renderTarget && this.layerRenderer.getFrameTimestamp() !== e.timestamp) return;
1840
+ this.AA(), this.fA.filter = e && e.sceneFilter;
1841
+ const t = e && e.renderTarget && e.renderTarget.fbo;
1842
+ this.renderer.render(this.fA, this.cA, this.helperScene, t);
1314
1843
  }
1315
- D() {
1844
+ K() {
1316
1845
  let A = [];
1317
- const t = this.TransformHelper.getMeshes(this.o);
1318
- for (const e in t) {
1319
- if ("translate" === e) continue;
1320
- const s = t[e];
1321
- for (let t = 0; t < s.length; t++) A = A.concat(s[t]);
1846
+ const e = this.TransformHelper.getMeshes(this.O);
1847
+ for (const t in e) {
1848
+ if ("translate" === t) continue;
1849
+ const s = e[t];
1850
+ for (let e = 0; e < s.length; e++) A = A.concat(s[e]);
1322
1851
  }
1323
- const e = t.translate;
1324
- for (let t = 0; t < e.length; t++) A = A.concat(e[t]);
1852
+ const t = e.translate;
1853
+ if (t) for (let e = 0; e < t.length; e++) A = A.concat(t[e]);
1325
1854
  return A;
1326
1855
  }
1327
- M() {
1328
- const A = this.layerRenderer, t = A && A.layer;
1329
- return A && this.v && t && t.isVisible() && this.v.isVisible() && this.regl && this.I;
1856
+ _() {
1857
+ const A = this.layerRenderer, e = A && A.layer;
1858
+ return A && this.U && e && e.isVisible() && this.U.M() && this.regl && this.F;
1330
1859
  }
1331
1860
  }
1332
1861
 
1333
- j.mergeOptions({
1862
+ AA.mergeOptions({
1334
1863
  scaleStrength: 2
1335
1864
  });
1336
1865
 
1337
- export { j as TransformControl };
1866
+ export { AA as TransformControl };
1338
1867
 
1339
- "undefined" != typeof console && console.log("@maptalks/transform-control v0.89.3");
1868
+ "undefined" != typeof console && console.log("@maptalks/transform-control v0.91.0");