@maptalks/transform-control 0.89.3 → 0.90.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.
- package/dist/transform-control.es.js +850 -346
- package/dist/transform-control.js +4 -4
- package/package.json +4 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/transform-control v0.
|
|
2
|
+
* @maptalks/transform-control v0.90.0
|
|
3
3
|
* LICENSE : UNLICENSED
|
|
4
4
|
* (c) 2016-2023 maptalks.org
|
|
5
5
|
*/
|
|
6
|
-
import { quat as A, mat4 as
|
|
6
|
+
import { quat as A, mat4 as e, reshader as t, vec3 as s, vec2 as i, GroupGLLayer as I } from "@maptalks/gl";
|
|
7
7
|
|
|
8
|
-
import * as
|
|
8
|
+
import * as n from "maptalks";
|
|
9
9
|
|
|
10
|
-
import { Eventable as
|
|
10
|
+
import { Coordinate as o, Eventable as g, Handlerable as r, Class as C, Point as a } from "maptalks";
|
|
11
11
|
|
|
12
|
-
import * as
|
|
12
|
+
import * as h from "@maptalks/gltf-loader";
|
|
13
13
|
|
|
14
14
|
const w = {
|
|
15
15
|
yuanhuan: {
|
|
@@ -756,63 +756,459 @@ 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/6gUAQAAAgD8AAIC/6gUAQAAAgL8AAIC/6gUAQAAAgL8AAIC/6gUAQAAAgL8AAIC/6gUAQAAAgD8AAIA/6gUAQAAAgD8AAIA/6gUAQAAAgD8AAIA/6gUAQAAAgL8AAIA/6gUAQAAAgL8AAIA/6gUAQAAAgL8AAIA/AFC9OQAAgD8AAIC/AFC9OQAAgD8AAIC/AFC9OQAAgD8AAIC/AFC9OQAAgL8AAIC/AFC9OQAAgL8AAIC/AFC9OQAAgL8AAIC/AFC9OQAAgD8AAIA/AFC9OQAAgD8AAIA/AFC9OQAAgD8AAIA/AFC9OQAAgL8AAIA/AFC9OQAAgL8AAIA/AFC9OQAAgL8AAIA/AAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAPwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AACAPwAAAAAAAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAA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A/AADAPgAAQD8AAAA+AAAAPwAAwD4AAEA/AAAgPwAAgD8AACA/AAAAAAAAYD8AAIA+AADAPgAAgD8AAAA+AACAPgAAwD4AAAAA"
|
|
1155
|
+
} ]
|
|
759
1156
|
}
|
|
760
|
-
},
|
|
1157
|
+
}, c = [];
|
|
761
1158
|
|
|
762
|
-
function
|
|
763
|
-
const
|
|
1159
|
+
function Q(s, i, I, n, o, g) {
|
|
1160
|
+
const r = [], C = A.fromEuler([], I[0], I[1], I[2]), a = e.fromRotationTranslationScale([], C, i, n);
|
|
764
1161
|
return function(A) {
|
|
765
|
-
return new
|
|
1162
|
+
return new h.GLTFLoader("", w[A]).load().then(A => A);
|
|
766
1163
|
}(s).then(A => {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
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 = I, h.scaling = n,
|
|
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
|
-
}),
|
|
1174
|
+
}), r;
|
|
779
1175
|
}
|
|
780
1176
|
|
|
781
|
-
function
|
|
782
|
-
return Math.abs(A) * Math.sign(
|
|
1177
|
+
function f(A, e) {
|
|
1178
|
+
return Math.abs(A) * Math.sign(e);
|
|
783
1179
|
}
|
|
784
1180
|
|
|
785
|
-
function P(A,
|
|
786
|
-
const i = A.getCoordinates(),
|
|
787
|
-
s.add(
|
|
788
|
-
const
|
|
789
|
-
return A._pointAtResToContainerPoint(
|
|
790
|
-
}(
|
|
791
|
-
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
s.transformMat4(
|
|
798
|
-
const
|
|
799
|
-
return s.set(
|
|
1181
|
+
function P(A, t) {
|
|
1182
|
+
const i = A.getCoordinates(), I = t.coordinateToPointAtRes(i, t.getGLRes()), o = [ I.x, I.y, 0 ], g = l(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 n.Point(o[0], o[1]), t.getGLRes());
|
|
1187
|
+
r.x += 170;
|
|
1188
|
+
const C = function(A, t, i, I) {
|
|
1189
|
+
if (I) {
|
|
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] = I * 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 n.Point(c[0], c[1]);
|
|
800
1196
|
}
|
|
801
1197
|
{
|
|
802
|
-
const
|
|
803
|
-
return A.coordinateToPointAtRes(
|
|
1198
|
+
const e = A.containerPointToCoordinate(t);
|
|
1199
|
+
return A.coordinateToPointAtRes(e, i);
|
|
804
1200
|
}
|
|
805
|
-
}(
|
|
806
|
-
return Math.sqrt(Math.pow(
|
|
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;
|
|
807
1203
|
}
|
|
808
1204
|
|
|
809
|
-
function
|
|
810
|
-
if (!A) return
|
|
811
|
-
const
|
|
812
|
-
return s.set([],
|
|
1205
|
+
function l(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]));
|
|
813
1209
|
}
|
|
814
1210
|
|
|
815
|
-
class
|
|
1211
|
+
class D {
|
|
816
1212
|
constructor(A) {
|
|
817
1213
|
this.A = A, this._meshes = this.t();
|
|
818
1214
|
}
|
|
@@ -820,15 +1216,15 @@ class u {
|
|
|
820
1216
|
this.A = A;
|
|
821
1217
|
}
|
|
822
1218
|
t() {
|
|
823
|
-
const A = [],
|
|
824
|
-
return A.push(
|
|
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), I = 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, I), A;
|
|
825
1221
|
}
|
|
826
1222
|
getMeshes() {
|
|
827
1223
|
return this._meshes;
|
|
828
1224
|
}
|
|
829
1225
|
}
|
|
830
1226
|
|
|
831
|
-
class
|
|
1227
|
+
class u {
|
|
832
1228
|
constructor(A) {
|
|
833
1229
|
this.A = A, this._meshes = this.t();
|
|
834
1230
|
}
|
|
@@ -836,15 +1232,15 @@ class Q {
|
|
|
836
1232
|
this.A = A;
|
|
837
1233
|
}
|
|
838
1234
|
t() {
|
|
839
|
-
const A = [],
|
|
840
|
-
return A.push(
|
|
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;
|
|
841
1237
|
}
|
|
842
1238
|
getMeshes() {
|
|
843
1239
|
return this._meshes;
|
|
844
1240
|
}
|
|
845
1241
|
}
|
|
846
1242
|
|
|
847
|
-
class
|
|
1243
|
+
class m {
|
|
848
1244
|
constructor(A) {
|
|
849
1245
|
this.A = A, this._meshes = this.t();
|
|
850
1246
|
}
|
|
@@ -852,8 +1248,8 @@ class l {
|
|
|
852
1248
|
this.A = A;
|
|
853
1249
|
}
|
|
854
1250
|
t() {
|
|
855
|
-
const A = [],
|
|
856
|
-
return A.push(
|
|
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;
|
|
857
1253
|
}
|
|
858
1254
|
getMeshes() {
|
|
859
1255
|
return this._meshes;
|
|
@@ -868,418 +1264,526 @@ class b {
|
|
|
868
1264
|
this.A = A;
|
|
869
1265
|
}
|
|
870
1266
|
t() {
|
|
871
|
-
const A = [],
|
|
872
|
-
return A.push(
|
|
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;
|
|
1269
|
+
}
|
|
1270
|
+
getMeshes() {
|
|
1271
|
+
return this._meshes;
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
class B {
|
|
1276
|
+
constructor(A) {
|
|
1277
|
+
this.A = A, this._meshes = this.t();
|
|
1278
|
+
}
|
|
1279
|
+
setCoordinate(A) {
|
|
1280
|
+
this.A = A;
|
|
1281
|
+
}
|
|
1282
|
+
t() {
|
|
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 = [],
|
|
1291
|
+
const y = [], p = [], v = [], L = [], M = [], E = [ 177 / 170, 177 / 170, 177 / 170 ], d = [ 1, 2, 3, 4, 12 ];
|
|
880
1292
|
|
|
881
|
-
class
|
|
1293
|
+
class O {
|
|
882
1294
|
constructor() {
|
|
883
|
-
this.translate = new
|
|
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
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
s.
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
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), I = 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), n = 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, I, n, o), A;
|
|
1305
|
+
}
|
|
1306
|
+
updateMatrix(t, i, I, n, 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 = l(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] += I, C.rotation[2] += I) : this.s || (w[2] += I,
|
|
1316
|
+
C.rotation[2] += I, w[0] = 360, w[2] -= 90)), d.indexOf(a) > -1) if (12 !== a) c[0] += n,
|
|
1317
|
+
c[1] += n, c[2] += n; else {
|
|
905
1318
|
const A = this._meshes.translate[4][0];
|
|
906
|
-
|
|
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
|
|
909
|
-
if (
|
|
910
|
-
const A = s.multiply(
|
|
911
|
-
s.multiply(
|
|
1321
|
+
let Q = P(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, E);
|
|
1324
|
+
s.multiply(h, h, A);
|
|
912
1325
|
}
|
|
913
|
-
const
|
|
914
|
-
s.add(
|
|
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
|
|
920
|
-
return
|
|
921
|
-
|
|
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
|
-
|
|
1339
|
+
I(A) {
|
|
924
1340
|
this.s = A;
|
|
925
1341
|
}
|
|
926
1342
|
dispose() {
|
|
927
|
-
for (const A in this._meshes) for (let
|
|
928
|
-
const
|
|
929
|
-
for (let A = 0; A <
|
|
930
|
-
const
|
|
931
|
-
|
|
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 = [
|
|
1353
|
+
const F = [];
|
|
938
1354
|
|
|
939
|
-
class
|
|
940
|
-
constructor(
|
|
941
|
-
|
|
942
|
-
|
|
1355
|
+
class x {
|
|
1356
|
+
constructor() {
|
|
1357
|
+
this.o = [], this.g = [ 0, 0, 0 ], this.C = [ 1, 1, 1 ], this.h = [ 0, 0, 0 ];
|
|
1358
|
+
}
|
|
1359
|
+
P(A) {
|
|
1360
|
+
Array.isArray(A) ? A.forEach(A => {
|
|
1361
|
+
this.P(A);
|
|
1362
|
+
}) : (A.on("remove", this.l, 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.l, this);
|
|
1372
|
+
}), this.o = [];
|
|
1373
|
+
}
|
|
1374
|
+
m(A, e, t, i, I, n, g) {
|
|
1375
|
+
for (let r = 0; r < this.o.length; r++) {
|
|
1376
|
+
const C = this.o[r], a = C.getCoordinates(), h = n.coordinateToPointAtRes(a, n.getGLRes()), w = C.getRotation(), c = C.getScale(), Q = s.set([], h.x, h.y, a.z || 0), f = s.add(Q, Q, e), P = n.pointAtResToCoordinate(new o(f[0], f[1]), n.getGLRes());
|
|
1377
|
+
P.z = f[2];
|
|
1378
|
+
let l = null;
|
|
1379
|
+
l = i >= 0 ? i : i * (this.options && this.options.scaleStrength || 1);
|
|
1380
|
+
const D = s.add([], s.set(F, l, l * (c[1] / c[0]), l * (c[2] / c[0])), c);
|
|
1381
|
+
if (Math.min(...D) < I) {
|
|
1382
|
+
const A = Math.min(...D);
|
|
1383
|
+
D[0] = D[0] * (I / A), D[1] = D[1] * (I / A), D[2] = D[2] * (I / A);
|
|
1384
|
+
}
|
|
1385
|
+
const u = s.add(w, t, w);
|
|
1386
|
+
if (A.indexOf("translate") > -1) g.fire("positionchange", {
|
|
1387
|
+
action: A,
|
|
1388
|
+
type: "positionchange",
|
|
1389
|
+
target: this,
|
|
1390
|
+
coordinate: P
|
|
1391
|
+
}), C.setCoordinates(P); else {
|
|
1392
|
+
this.B(A, D, c);
|
|
1393
|
+
const e = C.getTranslation();
|
|
1394
|
+
C.setTRS(e, u, D), g.fire("transforming", {
|
|
1395
|
+
action: this.p,
|
|
1396
|
+
type: "transforming",
|
|
1397
|
+
target: this,
|
|
1398
|
+
translate: e,
|
|
1399
|
+
rotation: u,
|
|
1400
|
+
scale: D
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
B(A, e, t) {
|
|
1406
|
+
return "x-scale" === A && (e[1] = t[1], e[2] = t[2]), "y-scale" === A && (e[0] = t[0],
|
|
1407
|
+
e[2] = t[2]), "z-scale" === A && (e[0] = t[0], e[1] = t[1]), e;
|
|
1408
|
+
}
|
|
1409
|
+
v() {
|
|
1410
|
+
this.o.forEach(A => {
|
|
1411
|
+
if (A.D) {
|
|
1412
|
+
const {coordinate: e, translation: t, rotation: s, scale: i} = A.D;
|
|
1413
|
+
A.setCoordinates(e), A.setTRS(t, s, i);
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
getScale() {
|
|
1418
|
+
return this.C;
|
|
1419
|
+
}
|
|
1420
|
+
getTranslation() {
|
|
1421
|
+
return this.g;
|
|
1422
|
+
}
|
|
1423
|
+
getRotation() {
|
|
1424
|
+
return this.h;
|
|
1425
|
+
}
|
|
1426
|
+
L() {
|
|
1427
|
+
return this.o[0] ? this.o[0].getLayer() : null;
|
|
1428
|
+
}
|
|
1429
|
+
getCoordinates() {
|
|
1430
|
+
let A = 0, e = 0, t = 0;
|
|
1431
|
+
const s = this.o.length;
|
|
1432
|
+
if (!s) return null;
|
|
1433
|
+
for (let i = 0; i < s; i++) {
|
|
1434
|
+
const s = this.o[i].getCenter();
|
|
1435
|
+
A += s.x, e += s.y, t += s.z || 0;
|
|
1436
|
+
}
|
|
1437
|
+
return A /= s, e /= s, t /= s, new o(A, e, t);
|
|
1438
|
+
}
|
|
1439
|
+
l(A) {
|
|
1440
|
+
const e = A.target, t = this.o.indexOf(e);
|
|
1441
|
+
t > -1 && (delete e.D, this.o.splice(t, 1));
|
|
1442
|
+
}
|
|
1443
|
+
getTargets() {
|
|
1444
|
+
return this.o;
|
|
1445
|
+
}
|
|
1446
|
+
i() {
|
|
1447
|
+
let A = 0;
|
|
1448
|
+
const e = this.o.length;
|
|
1449
|
+
for (let t = 0; t < e; t++) {
|
|
1450
|
+
A += this.o[t].getPointZ();
|
|
1451
|
+
}
|
|
1452
|
+
return A /= e, A;
|
|
1453
|
+
}
|
|
1454
|
+
M() {
|
|
1455
|
+
for (let A = 0; A < this.o.length; A++) if (this.o[A].isVisible()) return !0;
|
|
1456
|
+
return !1;
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
const U = [ 5, 6, 7, 8, 9, 10 ], V = [ 5, 7, 8, 9, 10 ], S = [ 2, 4, 11 ], k = [ 1, 3, 12 ], T = [ 12, 16 ], H = [ 1, 2, 3, 4 ], J = [ 1, 2, 3, 4, 12 ], N = [], R = [], _ = [], K = [], z = [], G = [], j = [];
|
|
1461
|
+
|
|
1462
|
+
class Z extends(g(r(C))){
|
|
1463
|
+
constructor(A = {}) {
|
|
1464
|
+
super(A), this.options = A, this.mouseAction = "moving", this.O = this.options.mode || "translate",
|
|
1465
|
+
this.F = !0, this.TransformHelper = new O, this.U = new x, this.helperScene = new t.Scene([]),
|
|
1466
|
+
this.addToMapCount = 0;
|
|
943
1467
|
}
|
|
944
1468
|
enable() {
|
|
945
|
-
return this.
|
|
1469
|
+
return this.F = !0, this.layerRenderer && this.layerRenderer.setToRedraw(), this;
|
|
946
1470
|
}
|
|
947
1471
|
disable() {
|
|
948
|
-
return this.
|
|
1472
|
+
return this.F = !1, this.layerRenderer && this.layerRenderer.setToRedraw(), this.map && this.map.resetCursor(),
|
|
949
1473
|
this;
|
|
950
1474
|
}
|
|
1475
|
+
setMode(A) {
|
|
1476
|
+
this.O = A, this.layerRenderer && this.layerRenderer.setToRedraw();
|
|
1477
|
+
}
|
|
1478
|
+
getMode() {
|
|
1479
|
+
return this.O;
|
|
1480
|
+
}
|
|
951
1481
|
isEnable() {
|
|
952
|
-
return this.
|
|
1482
|
+
return this.F;
|
|
953
1483
|
}
|
|
954
|
-
|
|
955
|
-
|
|
1484
|
+
V(A) {
|
|
1485
|
+
U.indexOf(A) > -1 ? this.O = "translate" : S.indexOf(A) > -1 ? this.O = "rotation" : k.indexOf(A) > -1 ? this.O = "scaling" : "xyzScale" !== this.O && (this.O = "translate");
|
|
956
1486
|
}
|
|
957
|
-
|
|
958
|
-
return this.
|
|
1487
|
+
S() {
|
|
1488
|
+
return this.O;
|
|
959
1489
|
}
|
|
960
1490
|
addTo(A) {
|
|
961
|
-
this.map && (this.
|
|
962
|
-
this.addToMapCount++, this.map = A, this.container = A.getContainer(), A.on("dom:mousemove", this.
|
|
963
|
-
A.on("dom:mousedown", this.
|
|
964
|
-
this.
|
|
1491
|
+
this.map && (this.k(), console.warn("transform control has been added to a map, it suggest remove from the map before")),
|
|
1492
|
+
this.addToMapCount++, this.map = A, this.container = A.getContainer(), A.on("dom:mousemove", this.T, this),
|
|
1493
|
+
A.on("dom:mousedown", this.H, this), A.on("dom:mouseup", this.J, this), A.on("zooming moving dragrotating", this.N, this),
|
|
1494
|
+
this.R();
|
|
965
1495
|
}
|
|
966
1496
|
remove() {
|
|
967
|
-
this.map && this.container && this.layerRenderer && (this.
|
|
1497
|
+
this.map && this.container && this.layerRenderer && (this.k(), this.TransformHelper.dispose(),
|
|
968
1498
|
this.layerRenderer.setToRedraw(), delete this.map, delete this.layer, delete this.layerRenderer,
|
|
969
|
-
delete this.container, delete this.
|
|
1499
|
+
delete this.container, delete this.U);
|
|
970
1500
|
}
|
|
971
|
-
|
|
972
|
-
this.container && this.map && (this.map.off("mousemove", this.
|
|
973
|
-
this.map.off("mouseup", this.
|
|
1501
|
+
k() {
|
|
1502
|
+
this.container && this.map && (this.map.off("dom:mousemove", this.T, this), this.map.off("dom:mousedown", this.H, this),
|
|
1503
|
+
this.map.off("dom:mouseup", this.J, this), this.map.off("zooming moving dragrotating", this.N, this),
|
|
974
1504
|
this.layer && this.layer.off("renderend", this.render, this));
|
|
975
1505
|
}
|
|
976
|
-
|
|
977
|
-
if (this.
|
|
1506
|
+
T(A) {
|
|
1507
|
+
if (this._()) {
|
|
978
1508
|
if (this.currentMousePosition = {
|
|
979
1509
|
x: A.containerPoint.x,
|
|
980
1510
|
y: A.containerPoint.y
|
|
981
1511
|
}, "moving" === this.mouseAction) {
|
|
982
|
-
const A = this.
|
|
983
|
-
this.currentPickingObject = this.
|
|
984
|
-
6 === this.currentPickingObject.pickingId ? this.
|
|
985
|
-
this.
|
|
1512
|
+
const A = this.K();
|
|
1513
|
+
this.currentPickingObject = this.G(this.currentMousePosition, A, "meshes"), this.currentPickingObject && null != this.currentPickingObject.pickingId ? (this.V(this.currentPickingObject.pickingId),
|
|
1514
|
+
6 === this.currentPickingObject.pickingId ? this.j(!0) : this.j(!1)) : (this.j(!1),
|
|
1515
|
+
this.V()), this.Z();
|
|
986
1516
|
}
|
|
987
|
-
this.
|
|
1517
|
+
this.Y(this.currentMousePosition);
|
|
988
1518
|
}
|
|
989
1519
|
}
|
|
990
|
-
|
|
991
|
-
if (!this.
|
|
992
|
-
const
|
|
1520
|
+
H(A) {
|
|
1521
|
+
if (!this._()) return;
|
|
1522
|
+
const e = this.K();
|
|
993
1523
|
this.currentMousePosition = {
|
|
994
1524
|
x: A.containerPoint.x,
|
|
995
1525
|
y: A.containerPoint.y
|
|
996
|
-
}, this.
|
|
997
|
-
this.firstDownPoint = this.
|
|
998
|
-
this.
|
|
1526
|
+
}, this.W = !0, this.currentPickingObject = this.G(this.currentMousePosition, e, "meshes"),
|
|
1527
|
+
this.firstDownPoint = this.G(this.currentMousePosition, e, "meshes"), this.currentPickingObject && null != this.currentPickingObject.meshId ? (this.mouseAction = "transform",
|
|
1528
|
+
this.q(this.currentPickingObject.pickingId), this.map.config("zoomable", !1), this.map.config("draggable", !1),
|
|
999
1529
|
this.layerRenderer && this.layerRenderer.setToRedraw()) : (this.mouseAction = "pan",
|
|
1000
|
-
this.map.config("zoomable", !0), this.map.config("draggable", !0), this.
|
|
1001
|
-
this.lastPickingObject = this.currentPickingObject, this.lastPickingMesh =
|
|
1530
|
+
this.map.config("zoomable", !0), this.map.config("draggable", !0), this.X()), this.lastMousePosition = this.currentMousePosition,
|
|
1531
|
+
this.lastPickingObject = this.currentPickingObject, this.lastPickingMesh = e[this.currentPickingObject.meshId];
|
|
1002
1532
|
}
|
|
1003
|
-
|
|
1004
|
-
"transform" === this.mouseAction && (this.firstDownPoint = null, this.
|
|
1533
|
+
J() {
|
|
1534
|
+
"transform" === this.mouseAction && (this.firstDownPoint = null, this.X(), this.W = !0,
|
|
1005
1535
|
this.fire("transformend", {
|
|
1006
|
-
action: this.
|
|
1536
|
+
action: this.p,
|
|
1007
1537
|
type: "transformend"
|
|
1008
|
-
})), this.mouseAction = "moving", this.
|
|
1009
|
-
this.map.config("draggable", !0), this.layerRenderer && this.layerRenderer.setToRedraw();
|
|
1538
|
+
})), this.mouseAction = "moving", "xyzScale" !== this.O && (this.O = "translate"),
|
|
1539
|
+
this.map.config("zoomable", !0), this.map.config("draggable", !0), this.layerRenderer && this.layerRenderer.setToRedraw();
|
|
1010
1540
|
}
|
|
1011
|
-
|
|
1012
|
-
const A = this.TransformHelper.planeHelper.getMeshes()[0][0],
|
|
1013
|
-
A.rotation[2] = -
|
|
1541
|
+
N() {
|
|
1542
|
+
const A = this.TransformHelper.planeHelper.getMeshes()[0][0], e = this.map.getBearing();
|
|
1543
|
+
A.rotation[2] = -e, this.$();
|
|
1014
1544
|
}
|
|
1015
|
-
|
|
1016
|
-
this.
|
|
1017
|
-
this.
|
|
1545
|
+
$() {
|
|
1546
|
+
this._() && (this.TransformHelper.updateMatrix(this.map, this.U, 0, 0, [ 0, 0, 0 ]),
|
|
1547
|
+
this.W = !0);
|
|
1018
1548
|
}
|
|
1019
1549
|
picked(A) {
|
|
1020
1550
|
if (!this.layerRenderer) return !1;
|
|
1021
|
-
const
|
|
1551
|
+
const e = this.K(), t = this.map;
|
|
1022
1552
|
let s = A;
|
|
1023
|
-
A instanceof
|
|
1024
|
-
const i = this.
|
|
1553
|
+
A instanceof a || (s = t.coordinateToContainerPoint(new o(A)));
|
|
1554
|
+
const i = this.G(s, e, "picked");
|
|
1025
1555
|
return !(!i || null === i.meshId);
|
|
1026
1556
|
}
|
|
1027
|
-
|
|
1557
|
+
X() {
|
|
1028
1558
|
const A = this.TransformHelper.getMeshes("scaling").scaling[0][0];
|
|
1029
|
-
A.scaling = [ 340 / 177 * .6, 340 / 177 * .6, 340 / 177 * .6 ], this.layerRenderer && (this.
|
|
1030
|
-
this.
|
|
1559
|
+
A.scaling = [ 340 / 177 * .6, 340 / 177 * .6, 340 / 177 * .6 ], this.layerRenderer && (this.AA(A),
|
|
1560
|
+
this.eA());
|
|
1031
1561
|
}
|
|
1032
|
-
|
|
1562
|
+
eA() {
|
|
1033
1563
|
this.TransformHelper._meshes.translate.forEach(A => {
|
|
1034
|
-
for (let
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1564
|
+
for (let e = 0; e < A.length; e++) {
|
|
1565
|
+
const t = A[e];
|
|
1566
|
+
H.indexOf(t.getUniform("uPickingId")) > -1 && t.material.set("color", t.originColor);
|
|
1037
1567
|
}
|
|
1038
1568
|
});
|
|
1039
1569
|
}
|
|
1040
|
-
|
|
1041
|
-
const i = this.
|
|
1042
|
-
s.add(
|
|
1043
|
-
const
|
|
1044
|
-
let
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
this.
|
|
1048
|
-
const i =
|
|
1570
|
+
AA(t) {
|
|
1571
|
+
const i = this.U.getCoordinates(), I = this.map.coordinateToPointAtRes(i, this.map.getGLRes()), n = [ I.x, I.y, 0 ], o = l(this.map, this.U.getTranslation());
|
|
1572
|
+
s.add(n, n, o);
|
|
1573
|
+
const g = s.copy([], t.translate), r = t.scaling;
|
|
1574
|
+
let C = P(this.U, this.map);
|
|
1575
|
+
C = s.set([], C, C, C), s.multiply(g, g, C), s.multiply(C, C, r), s.add(g, g, n),
|
|
1576
|
+
e.fromRotationTranslationScale(t.localTransform, [ 0, 0, 0, 1 ], g, C);
|
|
1577
|
+
this.K().forEach(t => {
|
|
1578
|
+
const i = t.getUniform("uPickingId");
|
|
1049
1579
|
if (1 === i || 3 === i || 2 === i || 4 === i) {
|
|
1050
|
-
const i = s.copy([],
|
|
1051
|
-
|
|
1052
|
-
const
|
|
1053
|
-
let
|
|
1054
|
-
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1580
|
+
const i = s.copy([], t.translate), I = 170 / 177;
|
|
1581
|
+
t.scaling = [ I, I, I ];
|
|
1582
|
+
const o = t.scaling, g = t.rotation;
|
|
1583
|
+
let r = P(this.U, this.map);
|
|
1584
|
+
r = s.set([], r, r, r), s.multiply(i, i, r), s.multiply(r, r, o), s.add(i, i, n);
|
|
1585
|
+
const C = A.fromEuler([], g[0], g[1], g[2]);
|
|
1586
|
+
e.fromRotationTranslationScale(t.localTransform, C, i, r);
|
|
1057
1587
|
}
|
|
1058
1588
|
});
|
|
1059
1589
|
}
|
|
1060
|
-
|
|
1061
|
-
const
|
|
1590
|
+
tA(A) {
|
|
1591
|
+
const e = this.map.containerPointToCoordinate(A), t = this.map.coordinateToPointAtRes(e, this.map.getGLRes());
|
|
1062
1592
|
return {
|
|
1063
|
-
point: [
|
|
1593
|
+
point: [ t.x, t.y ]
|
|
1064
1594
|
};
|
|
1065
1595
|
}
|
|
1066
|
-
|
|
1596
|
+
Y(A) {
|
|
1067
1597
|
if ("transform" === this.mouseAction) {
|
|
1068
|
-
const A = this.
|
|
1069
|
-
let
|
|
1070
|
-
if (
|
|
1071
|
-
|
|
1598
|
+
const A = this.S(), e = l(this.map, this.U.getTranslation()), t = this.U.i();
|
|
1599
|
+
let s = null, I = null;
|
|
1600
|
+
if (e[2] + t < .01 && "z-translate" !== this.p) s = this.tA(this.currentMousePosition),
|
|
1601
|
+
I = this.tA(this.lastMousePosition); else {
|
|
1072
1602
|
const A = this.TransformHelper.planeHelper.getMeshes()[0];
|
|
1073
|
-
if (
|
|
1074
|
-
!
|
|
1603
|
+
if (s = this.G(this.currentMousePosition, A, "plane"), I = this.G(this.lastMousePosition, A, "plane"),
|
|
1604
|
+
!s || null === s.meshId || !I || null === I.meshId) return;
|
|
1075
1605
|
}
|
|
1076
|
-
const
|
|
1077
|
-
let
|
|
1606
|
+
const n = [ 0, 0, 0 ], o = [ 0, 0, 0 ];
|
|
1607
|
+
let g = 0, r = 0, C = 0;
|
|
1078
1608
|
if ("translate" === A) {
|
|
1079
|
-
if ("xy-translate" === this.
|
|
1080
|
-
const A =
|
|
1081
|
-
|
|
1082
|
-
} else if ("x-translate" === this.
|
|
1083
|
-
const A =
|
|
1084
|
-
|
|
1085
|
-
} else if ("y-translate" === this.
|
|
1086
|
-
const A =
|
|
1087
|
-
|
|
1088
|
-
} else if ("z-translate" === this.
|
|
1609
|
+
if ("xy-translate" === this.p) {
|
|
1610
|
+
const A = s.point[0] - I.point[0], e = s.point[1] - I.point[1];
|
|
1611
|
+
n[0] = A, n[1] = e;
|
|
1612
|
+
} else if ("x-translate" === this.p) {
|
|
1613
|
+
const A = s.point[0] - I.point[0];
|
|
1614
|
+
n[0] = A;
|
|
1615
|
+
} else if ("y-translate" === this.p) {
|
|
1616
|
+
const A = s.point[1] - I.point[1];
|
|
1617
|
+
n[1] = A;
|
|
1618
|
+
} else if ("z-translate" === this.p) {
|
|
1089
1619
|
let A = 0;
|
|
1090
|
-
if (this.
|
|
1091
|
-
const
|
|
1092
|
-
A =
|
|
1093
|
-
} else A =
|
|
1094
|
-
|
|
1620
|
+
if (this.sA()) {
|
|
1621
|
+
const e = this.map.getGLRes(), t = this.map._pointAtResToContainerPoint(new a(I.point[0], I.point[1]), e), n = this.map._pointAtResToContainerPoint(new a(s.point[0], s.point[1]), e), o = i.length(i.set(K, s.point[0] - I.point[0], s.point[1] - I.point[1]));
|
|
1622
|
+
A = n.y < t.y ? o : -o;
|
|
1623
|
+
} else A = s.point[2] - I.point[2];
|
|
1624
|
+
n[2] = Math.sign(A) * this.map.pointAtResToAltitude(A, this.map.getGLRes());
|
|
1095
1625
|
}
|
|
1096
|
-
} else if ("rotation" === A)
|
|
1097
|
-
|
|
1098
|
-
const A = this.
|
|
1099
|
-
|
|
1626
|
+
} else if ("rotation" === A) r = this.iA(s.point, I.point), r >= 0 ? this.TransformHelper.I(!0) : this.TransformHelper.I(!1),
|
|
1627
|
+
o[2] += r; else if ("scaling" === A || "xyzScale" === A) {
|
|
1628
|
+
const A = this.IA(), e = i.length(i.set(K, this.firstDownPoint.point[0] - A[0], this.firstDownPoint.point[1] - A[1])), t = i.length(i.set(K, I.point[0] - A[0], I.point[1] - A[1]));
|
|
1629
|
+
g = this.nA(s.point, I.point, A, t), C = this.nA(s.point, I.point, A, e);
|
|
1100
1630
|
}
|
|
1101
|
-
|
|
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);
|
|
1109
|
-
}
|
|
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
|
-
});
|
|
1631
|
+
this.TransformHelper.updateMatrix(this.map, this.U, r, C, n), this.U.m(this.p, n, o, g, .01, this.map, this);
|
|
1124
1632
|
}
|
|
1125
1633
|
this.lastMousePosition = A, this.lastPickingObject = this.currentPickingObject;
|
|
1126
|
-
const
|
|
1127
|
-
this.lastPickingMesh =
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
const
|
|
1131
|
-
return
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
const A = this.map,
|
|
1135
|
-
return s.add(i, i,
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
const i = this.TransformHelper.planeHelper.getMeshes()[0][0],
|
|
1139
|
-
let
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1142
|
-
s.set(i.rotation, 90, 0, -
|
|
1143
|
-
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1634
|
+
const e = this.K();
|
|
1635
|
+
this.lastPickingMesh = e[this.currentPickingObject.meshId];
|
|
1636
|
+
}
|
|
1637
|
+
nA(A, e, t, s, I) {
|
|
1638
|
+
const n = (i.length(i.set(K, A[0] - t[0], A[1] - t[1])) - i.length(i.set(K, e[0] - t[0], e[1] - t[1]))) / s;
|
|
1639
|
+
return I ? (I[0] - .01) * n : n;
|
|
1640
|
+
}
|
|
1641
|
+
IA() {
|
|
1642
|
+
const A = this.map, e = this.U.getCoordinates(), t = A.coordinateToPointAtRes(e, A.getGLRes()), i = s.set(z, t.x, t.y, 0), I = l(A, this.U.getTranslation());
|
|
1643
|
+
return s.add(i, i, I), i;
|
|
1644
|
+
}
|
|
1645
|
+
j(t) {
|
|
1646
|
+
const i = this.TransformHelper.planeHelper.getMeshes()[0][0], I = e.getTranslation(_, i.localTransform), n = e.getScaling(R, i.localTransform);
|
|
1647
|
+
let o = A.fromEuler(N, 0, 0, 0);
|
|
1648
|
+
const g = this.map.getBearing();
|
|
1649
|
+
t && !this.sA() ? (o = A.fromEuler(N, 90, 0, -g), 0 === i.rotation[0] && (this.W = !0),
|
|
1650
|
+
s.set(i.rotation, 90, 0, -g)) : (90 === i.rotation[0] && (this.W = !0), s.set(i.rotation, 0, 0, -g)),
|
|
1651
|
+
e.fromRotationTranslationScale(i.localTransform, o, I, n);
|
|
1652
|
+
}
|
|
1653
|
+
sA() {
|
|
1146
1654
|
if (this.map.getPitch()) return !1;
|
|
1147
|
-
const A = this.map.cameraPosition,
|
|
1148
|
-
s.set(
|
|
1149
|
-
const
|
|
1150
|
-
return s.angle(
|
|
1655
|
+
const A = this.map.cameraPosition, e = this.map.coordinateToPointAtRes(this.map.getCenter(), this.map.getGLRes());
|
|
1656
|
+
s.set(e, e.x, e.y, 0);
|
|
1657
|
+
const t = this.U.getCoordinates(), i = this.map.coordinateToPointAtRes(t, this.map.getGLRes()), I = l(this.map, this.U.getTranslation()), n = s.set(_, i.x, i.y, 0), o = s.add(n, n, I), g = s.subtract([], A, o), r = s.subtract([], A, e);
|
|
1658
|
+
return s.angle(g, r) < 1 / 180 * Math.PI;
|
|
1151
1659
|
}
|
|
1152
|
-
|
|
1153
|
-
const A = this.
|
|
1660
|
+
Z() {
|
|
1661
|
+
const A = this.K();
|
|
1154
1662
|
if (this.currentPickingObject && null != this.currentPickingObject.meshId) {
|
|
1155
|
-
this.
|
|
1156
|
-
const
|
|
1157
|
-
if (
|
|
1158
|
-
const A = [
|
|
1159
|
-
|
|
1663
|
+
this.oA(), this.lastPickingObject && null != this.lastPickingObject.meshId && this.lastPickingObject.meshId !== this.currentPickingObject.meshId && this.gA();
|
|
1664
|
+
const e = A[this.currentPickingObject.meshId];
|
|
1665
|
+
if (e && T.indexOf(this.currentPickingObject.pickingId) < 0) {
|
|
1666
|
+
const A = [ e.originColor[0], e.originColor[1], e.originColor[2], .8 ];
|
|
1667
|
+
e.material.set("color", A), this.rA(e, .5);
|
|
1160
1668
|
}
|
|
1161
1669
|
this.layerRenderer.setToRedraw();
|
|
1162
1670
|
} else this.lastPickingObject && null != this.lastPickingObject.meshId && (this.map.resetCursor(),
|
|
1163
|
-
this.
|
|
1671
|
+
this.gA(), this.layerRenderer.setToRedraw());
|
|
1164
1672
|
}
|
|
1165
|
-
|
|
1166
|
-
6 === this.currentPickingObject.pickingId ? this.map.setCursor("ns-resize") :
|
|
1673
|
+
oA() {
|
|
1674
|
+
6 === this.currentPickingObject.pickingId ? this.map.setCursor("ns-resize") : V.indexOf(this.currentPickingObject.pickingId) > -1 ? this.map.setCursor("move") : this.map.setCursor("pointer");
|
|
1167
1675
|
}
|
|
1168
|
-
|
|
1676
|
+
gA() {
|
|
1169
1677
|
const A = this.lastPickingMesh;
|
|
1170
1678
|
if (!A) return;
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
}) :
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1177
|
-
}) : 11 ===
|
|
1178
|
-
|
|
1679
|
+
const e = A.getUniform("uPickingId"), t = this.K();
|
|
1680
|
+
V.indexOf(e) > -1 ? t.forEach(A => {
|
|
1681
|
+
V.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
|
|
1682
|
+
}) : J.indexOf(e) > -1 ? t.forEach(A => {
|
|
1683
|
+
const e = A.getUniform("uPickingId");
|
|
1684
|
+
H.indexOf(e) > -1 && A.material.set("color", A.originColor);
|
|
1685
|
+
}) : 11 === e && t.forEach(A => {
|
|
1686
|
+
H.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
|
|
1179
1687
|
}), A.material.set("color", A.originColor);
|
|
1180
1688
|
}
|
|
1181
|
-
|
|
1182
|
-
const
|
|
1183
|
-
|
|
1184
|
-
if (
|
|
1185
|
-
const A = [
|
|
1186
|
-
|
|
1689
|
+
rA(A, e) {
|
|
1690
|
+
const t = A.getUniform("uPickingId"), s = this.K();
|
|
1691
|
+
V.indexOf(t) > -1 ? s.forEach(t => {
|
|
1692
|
+
if (V.indexOf(t.getUniform("uPickingId")) > -1 && t.getUniform("uPickingId") !== A.getUniform("uPickingId")) {
|
|
1693
|
+
const A = [ t.originColor[0], t.originColor[1], t.originColor[2], e ];
|
|
1694
|
+
t.material.set("color", A);
|
|
1187
1695
|
}
|
|
1188
|
-
}) : "scaling" === this.
|
|
1189
|
-
const
|
|
1190
|
-
if (1 ===
|
|
1191
|
-
const
|
|
1192
|
-
A.material.set("color",
|
|
1696
|
+
}) : "scaling" === this.O ? s.forEach(A => {
|
|
1697
|
+
const e = A.getUniform("uPickingId");
|
|
1698
|
+
if (1 === e || 3 === e || 2 === e || 4 === e) {
|
|
1699
|
+
const e = [ 149 / 255, 179 / 255, 199 / 255, .8 ];
|
|
1700
|
+
A.material.set("color", e);
|
|
1193
1701
|
}
|
|
1194
|
-
}) : "rotation" === this.
|
|
1195
|
-
const
|
|
1196
|
-
if (1 ===
|
|
1197
|
-
const
|
|
1198
|
-
A.material.set("color", [
|
|
1702
|
+
}) : "rotation" === this.O && s.forEach(A => {
|
|
1703
|
+
const e = A.getUniform("uPickingId");
|
|
1704
|
+
if (1 === e || 3 === e || 2 === e || 4 === e) {
|
|
1705
|
+
const e = A.originColor;
|
|
1706
|
+
A.material.set("color", [ e[0], e[1], e[2], 0 ]);
|
|
1199
1707
|
}
|
|
1200
1708
|
});
|
|
1201
1709
|
}
|
|
1202
1710
|
reset() {
|
|
1203
|
-
|
|
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 ]);
|
|
1711
|
+
this.map && this.U && (this.U.v(), this.TransformHelper.updateMatrix(this.map, this.U, 0, 0, [ 0, 0, 0 ]));
|
|
1207
1712
|
}
|
|
1208
|
-
|
|
1209
|
-
const
|
|
1210
|
-
return (Math.atan2(
|
|
1713
|
+
iA(A, e) {
|
|
1714
|
+
const t = this.IA(), s = i.set(G, e[0] - t[0], e[1] - t[1]), I = i.set(j, A[0] - t[0], A[1] - t[1]), n = Math.atan2(s[1], s[0]);
|
|
1715
|
+
return (Math.atan2(I[1], I[0]) - n) / Math.PI * 180;
|
|
1211
1716
|
}
|
|
1212
|
-
|
|
1213
|
-
return this.
|
|
1214
|
-
this.
|
|
1717
|
+
q(A) {
|
|
1718
|
+
return this.p = 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",
|
|
1719
|
+
this.p;
|
|
1215
1720
|
}
|
|
1216
1721
|
transform(A) {
|
|
1722
|
+
if (!A) return;
|
|
1217
1723
|
if (this.layerRenderer && this.layerRenderer.layer && (this.layerRenderer.layer.off("renderend", this.render),
|
|
1218
|
-
this.layerRenderer.layer.off("resizeCanvas", this.
|
|
1219
|
-
|
|
1220
|
-
const
|
|
1221
|
-
this.
|
|
1222
|
-
this.v.originScale = this.v.getScale()), this.TransformHelper.updateMatrix(t, A, 0, 0, [ 0, 0, 0 ]),
|
|
1223
|
-
this.AA(), this.L = !0;
|
|
1724
|
+
this.layerRenderer.layer.off("resizeCanvas", this.CA)), !this.map) return void console.error("should add to a target first");
|
|
1725
|
+
if (this.U && (this.U.u(), this.U.P(A)), !this.U.getTargets().length) return;
|
|
1726
|
+
const e = this.map;
|
|
1727
|
+
this.TransformHelper.updateMatrix(e, this.U, 0, 0, [ 0, 0, 0 ]), this.aA(), this.W = !0;
|
|
1224
1728
|
}
|
|
1225
1729
|
getTransformTarget() {
|
|
1226
|
-
return this.
|
|
1730
|
+
return this.U;
|
|
1227
1731
|
}
|
|
1228
|
-
|
|
1229
|
-
delete this.
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
const A = this.
|
|
1233
|
-
A && (A.off("renderend", this.render), A.off("resizeCanvas", this.
|
|
1234
|
-
const
|
|
1235
|
-
let
|
|
1236
|
-
for (let A = 0; A <
|
|
1237
|
-
|
|
1732
|
+
l() {
|
|
1733
|
+
delete this.U;
|
|
1734
|
+
}
|
|
1735
|
+
aA() {
|
|
1736
|
+
const A = this.U.L();
|
|
1737
|
+
A && (A.off("renderend", this.render), A.off("resizeCanvas", this.CA));
|
|
1738
|
+
const e = this.map.getLayers();
|
|
1739
|
+
let t = null;
|
|
1740
|
+
for (let A = 0; A < e.length; A++) if (e[A] instanceof I) {
|
|
1741
|
+
t = e[A];
|
|
1238
1742
|
break;
|
|
1239
1743
|
}
|
|
1240
|
-
if (!
|
|
1241
|
-
const s =
|
|
1744
|
+
if (!t) return;
|
|
1745
|
+
const s = t.getLayers(), i = s.indexOf(A);
|
|
1242
1746
|
if (i < 0) return;
|
|
1243
1747
|
s.splice(i, 1), s.push(A);
|
|
1244
|
-
const
|
|
1245
|
-
this.layerRenderer =
|
|
1246
|
-
this.
|
|
1247
|
-
projViewMatrix:
|
|
1248
|
-
}, A.on("renderend", this.render, this), A.on("resizeCanvas", this.
|
|
1748
|
+
const n = this.map, o = A.getRenderer();
|
|
1749
|
+
this.layerRenderer = o, this.regl = o.regl, this.renderer = o.renderer, this.hA = this.layerRenderer.getFBORayPicking(),
|
|
1750
|
+
this.wA = {
|
|
1751
|
+
projViewMatrix: n.projViewMatrix
|
|
1752
|
+
}, A.on("renderend", this.render, this), A.on("resizeCanvas", this.CA, this), o.setToRedraw();
|
|
1249
1753
|
}
|
|
1250
|
-
|
|
1251
|
-
this.
|
|
1754
|
+
CA() {
|
|
1755
|
+
this.hA.clear(), this.W = !0;
|
|
1252
1756
|
}
|
|
1253
|
-
|
|
1757
|
+
G(A, e, t) {
|
|
1254
1758
|
const s = this.map;
|
|
1255
|
-
if (!(s && this.
|
|
1256
|
-
const i = s.getDevicePixelRatio(),
|
|
1759
|
+
if (!(s && this.hA && this.layerRenderer && this.layerRenderer.canvas)) return null;
|
|
1760
|
+
const i = s.getDevicePixelRatio(), I = A.x * i, n = A.y * i, o = {
|
|
1257
1761
|
projViewMatrix: this.map.projViewMatrix,
|
|
1258
1762
|
pointSize: 1
|
|
1259
|
-
},
|
|
1260
|
-
(this.
|
|
1261
|
-
this.
|
|
1262
|
-
return this.
|
|
1763
|
+
}, g = this.layerRenderer.canvas.gl && this.layerRenderer.canvas.gl.wrap;
|
|
1764
|
+
(this.W || g || !this.cA || this.cA !== t) && (this.hA.render(e, o, !0), this.cA = t,
|
|
1765
|
+
this.W = !1);
|
|
1766
|
+
return this.hA.pick(I, n, 10, o, {
|
|
1263
1767
|
viewMatrix: this.map.viewMatrix,
|
|
1264
1768
|
projMatrix: this.map.projMatrix,
|
|
1265
1769
|
returnPoint: !0
|
|
1266
1770
|
});
|
|
1267
1771
|
}
|
|
1268
|
-
|
|
1772
|
+
R() {
|
|
1269
1773
|
const A = this.map.getDevicePixelRatio(), s = {
|
|
1270
1774
|
x: 0,
|
|
1271
1775
|
y: 0,
|
|
1272
1776
|
width: () => this.map ? this.map.width * A : 1,
|
|
1273
1777
|
height: () => this.map ? this.map.height * A : 1
|
|
1274
1778
|
};
|
|
1275
|
-
this.
|
|
1779
|
+
this.QA = new t.MeshShader({
|
|
1276
1780
|
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
1781
|
frag: "precision mediump float;\n\nuniform vec4 color;\n\n\n\nvoid main() {\n\n gl_FragColor = color;\n\n}\n\n",
|
|
1278
1782
|
uniforms: [ "color", {
|
|
1279
1783
|
name: "projViewModelMatrix",
|
|
1280
1784
|
type: "function",
|
|
1281
|
-
fn: function(A,
|
|
1282
|
-
return
|
|
1785
|
+
fn: function(A, t) {
|
|
1786
|
+
return e.multiply([], t.projViewMatrix, t.modelMatrix);
|
|
1283
1787
|
}
|
|
1284
1788
|
} ],
|
|
1285
1789
|
extraCommandProps: {
|
|
@@ -1303,37 +1807,37 @@ class j extends(I(r(a))){
|
|
|
1303
1807
|
});
|
|
1304
1808
|
}
|
|
1305
1809
|
render() {
|
|
1306
|
-
if (!this.
|
|
1307
|
-
const A = this.
|
|
1810
|
+
if (!this._()) return;
|
|
1811
|
+
const A = this.K();
|
|
1308
1812
|
this.helperScene.setMeshes(A);
|
|
1309
|
-
const
|
|
1310
|
-
if (
|
|
1311
|
-
this
|
|
1312
|
-
const
|
|
1313
|
-
this.renderer.render(this.
|
|
1813
|
+
const e = this.layerRenderer.getFrameContext();
|
|
1814
|
+
if (e && e.renderTarget && this.layerRenderer.getFrameTimestamp() !== e.timestamp) return;
|
|
1815
|
+
this.$(), this.QA.filter = e && e.sceneFilter;
|
|
1816
|
+
const t = e && e.renderTarget && e.renderTarget.fbo;
|
|
1817
|
+
this.renderer.render(this.QA, this.wA, this.helperScene, t);
|
|
1314
1818
|
}
|
|
1315
|
-
|
|
1819
|
+
K() {
|
|
1316
1820
|
let A = [];
|
|
1317
|
-
const
|
|
1318
|
-
for (const
|
|
1319
|
-
if ("translate" ===
|
|
1320
|
-
const s = t
|
|
1321
|
-
for (let
|
|
1821
|
+
const e = this.TransformHelper.getMeshes(this.O);
|
|
1822
|
+
for (const t in e) {
|
|
1823
|
+
if ("translate" === t) continue;
|
|
1824
|
+
const s = e[t];
|
|
1825
|
+
for (let e = 0; e < s.length; e++) A = A.concat(s[e]);
|
|
1322
1826
|
}
|
|
1323
|
-
const
|
|
1324
|
-
for (let
|
|
1827
|
+
const t = e.translate;
|
|
1828
|
+
if (t) for (let e = 0; e < t.length; e++) A = A.concat(t[e]);
|
|
1325
1829
|
return A;
|
|
1326
1830
|
}
|
|
1327
|
-
|
|
1328
|
-
const A = this.layerRenderer,
|
|
1329
|
-
return A && this.
|
|
1831
|
+
_() {
|
|
1832
|
+
const A = this.layerRenderer, e = A && A.layer;
|
|
1833
|
+
return A && this.U && e && e.isVisible() && this.U.M() && this.regl && this.F;
|
|
1330
1834
|
}
|
|
1331
1835
|
}
|
|
1332
1836
|
|
|
1333
|
-
|
|
1837
|
+
Z.mergeOptions({
|
|
1334
1838
|
scaleStrength: 2
|
|
1335
1839
|
});
|
|
1336
1840
|
|
|
1337
|
-
export {
|
|
1841
|
+
export { Z as TransformControl };
|
|
1338
1842
|
|
|
1339
|
-
"undefined" != typeof console && console.log("@maptalks/transform-control v0.
|
|
1843
|
+
"undefined" != typeof console && console.log("@maptalks/transform-control v0.90.0");
|