@maptalks/transform-control 0.7.0 → 0.8.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,7 +1,7 @@
1
1
  /*!
2
- * @maptalks/transform-control v0.7.0
2
+ * @maptalks/transform-control v0.8.0
3
3
  * LICENSE : UNLICENSED
4
- * (c) 2016-2022 maptalks.org
4
+ * (c) 2016-2023 maptalks.org
5
5
  */
6
6
  !function(A,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@maptalks/gl"),require("maptalks")):"function"==typeof define&&define.amd?define(["exports","@maptalks/gl","maptalks"],t):t((A="undefined"!=typeof globalThis?globalThis:A||self).maptalks=A.maptalks||{},A.maptalksgl,A.maptalks)}(this,(function(A,t,e){"use strict";function s(A){if(A&&A.A)return A;var t=Object.create(null);return A&&Object.keys(A).forEach((function(e){if("default"!==e){var s=Object.getOwnPropertyDescriptor(A,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:function(){return A[e]}})}})),t.default=A,Object.freeze(t)}var n=s(e);const i={yuanhuan:{accessors:[{name:"����С��_1_0_positions",componentType:5126,count:104,min:[-5.407599925994873,-5.404099941253662,0],max:[5.405200004577637,5.406300067901611,0],type:"VEC3",bufferView:0,byteOffset:0},{name:"����С��_1_0_normals",componentType:5126,count:104,min:[0,0,1],max:[0,0,1],type:"VEC3",bufferView:1,byteOffset:0},{name:"����С��_1_0_indices",componentType:5123,count:288,min:[0],max:[103],type:"SCALAR",bufferView:2,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"缩放圈-新",byteLength:3072,uri:"data:application/octet-stream;base64,KVyjQLbzPT4AAAAAZvesQLbzPT4AAAAAhsmqQC7/YT8AAAAAZ0ShQDC7Vz8AAAAA+u2lwGKhxr8AAAAArK2cwLpJvL8AAAAAEFihwB04V78AAAAAXdyqwE7RYb8AAAAAat6lQEaUxj8AAAAAApqcQG+BvD8AAAAAB18EQFOWlcAAAAAA+u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AAAAIA/AAAAAAAAAAAAAIA/AAABAAIAAAACAAMABAAFAAYABAAGAAcAAwACAAgAAwAIAAkACgALAAwACgAMAA0ADQAMAA4ADQAOAA8ADwAOABAADwAQABEAEgATABQAEgAUABUAFgAXABgAFgAYABkAGgAbABwAGgAcAB0AHgALAAoAHwALAB4AHwAgAAsAIQAgAB8AIgAjACAAIgAgACEAJAAlACYAJAAmACcAJwAmACgAJwAoACkAKgArACwAKgAsAC0ALgAvADAALgAwADEAGQAYADIAGQAyADMANAA1ABsANAAbABoAFQAUADYAFQA2ADcAOAA5ADoAOAA6ADsAPAA9AD4APAA/AD0AQAA/ADwAQABBAD8AQgBBAEAAQgBAAEMARABFAEYARABGAEcARABHAEgARgBJAEcARgBKAEkASwBKAEYASwBMAEoASwBNAEwACQAIAC8ACQAvAC4ALQAsADkALQA5ADgAOwA6AE4AOwBOAE8ATwBOAE0ATwBNAEsAKQAoACsAKQArACoANwA2AFAANwBQAFEAUQBQAFIAUQBSAFMAUwBSAFQAUwBUAFUAVgBXAFgAVgBYAFkAVgBZAFoAWwBZAFgAXABZAFsAXABdAFkAXgBdAFwAXwBdAF4APAA+AGAAPABgAGEAMQAwABcAMQAXABYAYgBjADUAYgA1ADQAYQBgAGMAYQBjAGIAMwAyAF0AMwBdAF8AHQAcAGQAHQBkAGUAZQBkAAUAZQAFAAQAZgBnAAcAZgAHAAYAEQAQABMAEQATABIA"}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:1248,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:1248,byteOffset:1248,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:576,byteOffset:2496,target:34963}],materials:[{name:"SVGMat_001",pbrMetallicRoughness:{baseColorFactor:[.5,.5,.5,1],metallicFactor:0,roughnessFactor:1},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"����С��_1",primitives:[{attributes:{POSITION:0,NORMAL:1},indices:2,material:0,mode:4}]}],nodes:[{name:"����С��",mesh:0}],scene:0,scenes:[{nodes:[0]}]},yuanhuan41:{accessors:[{name:"Բ��_1_0_positions",componentType:5126,count:39,min:[0,0,0],max:[5.489999771118164,0,5.488900184631348],type:"VEC3",bufferView:0,byteOffset:0},{name:"Բ��_1_0_normals",componentType:5126,count:39,min:[0,-.999939501285553,-1],max:[.13969914615154266,1,1],type:"VEC3",bufferView:1,byteOffset:0},{name:"Բ��_1_0_indices",componentType:5123,count:105,min:[0],max:[38],type:"SCALAR",bufferView:2,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"yh41",byteLength:1148,uri:"data:application/octet-stream;base64,8tKXQAAAAACoNU09FK6vQAAAAAB1Ako/FK6vQAAAAAAAAACATfOAQAAAAAACmkg+K4dWQAAAAAAIrNw+WvUtQAAAAABbsT8/X5gIQAAAAACMSpI/OUWbQAAAAAD0/VQ/LbKHQAAAAAD0/XQ/W0JqQAAAAAC6SZQ/dLXNPwAAAACfq80/H4VHQAAAAAB0JLc/ZognQAAAAAA1XuI/YVSSPwAAAAAukAhABaMKQAAAAAB4nApABcU/PwAAAACF6y1Aw2TiPwAAAACRfidASS63PwAAAABKe0dAJLncPgAAAACze1ZAj1OUPwAAAADjNmpAAppIPgAAAADu64BAnRF1PwAAAAD8qYdAqDVNPQAAAADBypdAgQRVPwAAAAAIPZtAAAAAAAAAAAASpa9AAwlKPwAAAAASpa9AJJd/PAAAAAASpa9AAwlKPwAAAAASpa9AAAAAAAAAAAASpa9Asp1vPQAAAAASpa9AJLn8PQAAAAASpa9AqoJRPgAAAAASpa9ARwOYPgAAAAASpa9AHhbKPgAAAAASpa9A2hv8PgAAAAASpa9A5q4VPwAAAAASpa9A+n4qPwAAAAASpa9AQxw7PwAAAAASpa9AwhdGPwAAAAASpa9AAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAAAAAAAAAgD8AAACAJ5X/OwL+fz8AAACAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIC/Kzs0PAn8f78AAACApLK/PA7uf78AAACAeJkZPefRfz8AAACA+ZldPQSgf78AAACA6XSTPelVfz8AAACALLO3PdT3fr8AAACAfkjZPR2Ofr8AAACANf32Paohfj8AAACAeUYHPqDBfT8AAACASw0PPlt9fb8AAACAAAABAAIAAwABAAAABAABAAMABQABAAQABgAHAAUABwABAAUABgAIAAcABgAJAAgACgAJAAYACgALAAkACgAMAAsADQAMAAoADQAOAAwADwAOAA0ADwAQAA4ADwARABAAEgARAA8AEgATABEAFAATABIAFAAVABMAFgAVABQAFgAXABUAGAAXABYAGAAZABcAGgAbABwAHQAbABoAHgAbAB0AHwAbAB4AIAAbAB8AIQAbACAAIgAbACEAIwAbACIAJAAbACMAJQAbACQAJgAbACUAAAA="}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:468,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:468,byteOffset:468,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:212,byteOffset:936,target:34963}],materials:[{name:"SVGMat_002",pbrMetallicRoughness:{baseColorFactor:[.588,.588,.588,1],metallicFactor:0,roughnessFactor:.99},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"Բ��_1",primitives:[{attributes:{POSITION:0,NORMAL:1},indices:2,material:0,mode:4}]}],nodes:[{name:"Բ��",mesh:0}],scene:0,scenes:[{nodes:[0]}]},yuanhuan411:{accessors:[{name:"����СȦ_1_0_positions",componentType:5126,count:28,min:[.026000000536441803,-4.6834001541137695,0],max:[4.696700096130371,-.014800000004470348,0],type:"VEC3",bufferView:0,byteOffset:0},{name:"����СȦ_1_0_normals",componentType:5126,count:28,min:[0,0,1],max:[0,0,1],type:"VEC3",bufferView:1,byteOffset:0},{name:"����СȦ_1_0_indices",componentType:5123,count:78,min:[0],max:[27],type:"SCALAR",bufferView:2,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"yuanhuan411",byteLength:828,uri:"data:application/octet-stream;base64,ufwXQLN7Mr8AAAAAObRAQLFQK78AAAAA1ediQMWP8b4AAAAAGQQ6QCv2174AAAAAqFdeQHUCWr4AAAAA7FGCQL6fmr0AAAAAHHyDQDLmrr4AAAAAXkuWQJf/kL4AAAAAXkuWQLN7crwAAAAAMCrxP2RdhL8AAAAA/BgDQJeQn78AAAAADeARQAg9i78AAAAAukkIQISeXb8AAAAAZaogQH/Zbb8AAAAA7Q3ePr4wOcAAAAAA5IMuP9/gP8AAAAAAJQZxPwrXH8AAAAAAPZs1P6UsF8AAAAAAdy2hP0VHAsAAAAAAb/CFP5eQ778AAAAA0ES4P32utr8AAAAAAprQPyL9zr8AAAAAi/1lPqqCXcAAAAAA9dv3PtcSYsAAAAAADi2yPZvmgcAAAAAAYTK1PssQg8AAAAAA9P3UPGrelcAAAAAA4liXPmrelcAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAABAAIAAAACAAMAAwACAAQABQAGAAcABQAHAAgABAACAAYABAAGAAUACQAKAAsACQALAAwAAAANAAEADgAPABAADgAQABEAEQAQABIAEQASABMAFAAVAAoAFAAKAAkADAALAA0ADAANAAAAFgAXAA8AFgAPAA4AGAAZABcAGAAXABYAGgAZABgAGgAbABkAEwASABUAEwAVABQA"}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:336,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:336,byteOffset:336,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:156,byteOffset:672,target:34963}],materials:[{name:"SVGMat",pbrMetallicRoughness:{baseColorFactor:[.588,.588,.588,1],metallicFactor:0,roughnessFactor:.99},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"����СȦ_1",primitives:[{attributes:{POSITION:0,NORMAL:1},indices:2,material:0,mode:4}]}],nodes:[{name:"����СȦ",mesh:0}],scene:0,scenes:[{nodes:[0]}]},yuanpan:{accessors:[{name:"Circle001_1_0_positions",componentType:5126,count:28,min:[-1.9510999917984009,0,-1.9510999917984009],max:[1.9510999917984009,0,1.9510999917984009],type:"VEC3",bufferView:0,byteOffset:0},{name:"Circle001_1_0_normals",componentType:5126,count:28,min:[0,1,0],max:[0,1,0],type:"VEC3",bufferView:1,byteOffset:0},{name:"Circle001_1_0_indices",componentType:5123,count:78,min:[0],max:[27],type:"SCALAR",bufferView:2,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"yuanpan",byteLength:828,uri:"data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ABoAAAACABoA"}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:336,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:336,byteOffset:336,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:156,byteOffset:672,target:34963}],materials:[{name:"wire_008110135",pbrMetallicRoughness:{baseColorFactor:[.0314,.4314,.5294,1],metallicFactor:0,roughnessFactor:.968},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"Circle001_1",primitives:[{attributes:{POSITION:0,NORMAL:1},indices:2,material:0,mode:4}]}],nodes:[{name:"Circle001",mesh:0}],scene:0,scenes:[{nodes:[0]}]},zzhou:{accessors:[{name:"Cube.001-Mesh_0_positions",componentType:5126,count:45,min:[-.2711470127105713,-5.473427772521973,-.2711470127105713],max:[.2711470127105713,.46298399567604065,.2711470127105713],type:"VEC3",bufferView:0,byteOffset:0},{name:"Cube.001-Mesh_0_normals",componentType:5126,count:45,min:[-1,-1,-1],max:[1,1,1],type:"VEC3",bufferView:1,byteOffset:0},{name:"Cube.001-Mesh_0_texcoords",componentType:5126,count:45,min:[.125,0],max:[.875,1],type:"VEC2",bufferView:2,byteOffset:0},{name:"Cube.001-Mesh_0_indices",componentType:5123,count:72,min:[0],max:[44],type:"SCALAR",bufferView:3,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"Z",byteLength:1584,uri:"data:application/octet-stream;base64,/waNvZMdK77/Bo09/waNPZMdK77/Bo09/waNPR4Kr8D/Bo09l+KKPVImr8D/Bo09/waNvVImr8D/Bo09yNOKPsjTir7I04o+AAAAAD0M7T4AAAAAyNOKvsjTir7I04o+yNOKvsjTir7I04o+AAAAAD0M7T4AAAAAyNOKvsjTir7I04q+yNOKvsjTir7I04q+yNOKPsjTir7I04q+yNOKPsjTir7I04o+yNOKvsjTir7I04o+yNOKPsjTir7I04q+AAAAAD0M7T4AAAAAyNOKPsjTir7I04o+yNOKvsjTir7I04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AAAgD8AAAAAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAADAPgAAQD8AAMA+AACAP2L1Hz8AAIA/AAAgP3uDfz8AACA/AABAPwAAwD4AAIA+AAAgPwAAAAAAAMA+AAAAAAAAwD4AAIA/AAAgPwAAQD8AAMA+AABAPwAAAD4AAAA/AADAPgAAAD8AAMA+AACAPgAAAD4AAIA+AADAPgAAAD8AACA/AACAPgAAwD4AAIA+AADAPgAAQD8AACA/AAAAPwAAwD4AAAA/AADAPgAAAD8AAMA+AABAPwAAID8AAEA/AAAgPwAAAD9i9R8/AAAAPwAAwD4AAAA/AAAgPwAAAD8AACA/AACAPgAAwD4AAIA+AADAPgAAgD4AACA/AACAPgAAID8AAAAAAADAPgAAAAAAAAA+AAAAPwAAwD4AAAA/AADAPgAAgD4AAAA+AACAPgAAID8AAAA/vAJBP/mGwj4AACA/AACAPgAAYD8AAIA+AAAgPwAAgD97g18/AAAAPwAAYD8AAAA/AAABAAIAAgADAAQAAgAEAAAABQAGAAcACAAJAAoACwAMAA0ACwANAA4ADwAQABEAEgATABQAFQAWABcAFwAYABkAFwAZABUAGgAbABwAGgAcAB0AHgAfACAAHgAgACEAIgAjACQAIgAkACUAJgAnACgAKAAnACkAAwACACoAKQAnACsAKQArACwAJwAmACsA"}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:540,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:540,byteOffset:540,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:360,byteOffset:1080,byteStride:8,target:34962},{name:"bufferView_3",buffer:0,byteLength:144,byteOffset:1440,target:34963}],materials:[{name:"Material.001",pbrMetallicRoughness:{baseColorFactor:[.8,.8,.8,1],metallicFactor:0,roughnessFactor:.676000006},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"Cube.001-Mesh",primitives:[{attributes:{POSITION:0,NORMAL:1,TEXCOORD_0:2},indices:3,material:0,mode:4}]}],nodes:[{name:"Cube.001",mesh:0}],scene:0,scenes:[{nodes:[0]}]},jiantou:{accessors:[{name:"��ͷ_1_0_positions",componentType:5126,count:7,min:[-.47690001130104065,-.8044000267982483,0],max:[.47780001163482666,0,0],type:"VEC3",bufferView:0,byteOffset:0},{name:"��ͷ_1_0_normals",componentType:5126,count:7,min:[0,0,1],max:[0,0,1],type:"VEC3",bufferView:1,byteOffset:0},{name:"��ͷ_1_0_indices",componentType:5123,count:15,min:[0],max:[6],type:"SCALAR",bufferView:2,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"jiantou",byteLength:200,uri:"data:application/octet-stream;base64,bxIDOintTb8AAAAAH/RsvsKGp74AAAAAPSz0vsKGp74AAAAANs17PsKGp74AAAAANKL0PsKGp74AAAAANs17PgAAAAAAAAAAH/RsvgAAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAABAAIAAAADAAEAAAAEAAMAAQAFAAYAAQADAAUAAAA="}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:84,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:84,byteOffset:84,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:32,byteOffset:168,target:34963}],materials:[{name:"SVGMat_003",pbrMetallicRoughness:{baseColorFactor:[.588,.588,.588,1],metallicFactor:0,roughnessFactor:.99},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"��ͷ_1",primitives:[{attributes:{POSITION:0,NORMAL:1},indices:2,material:0,mode:4}]}],nodes:[{name:"��ͷ",mesh:0}],scene:0,scenes:[{nodes:[0]}]},xuanzhuan:{accessors:[{name:"��ת001_1_0_positions",componentType:5126,count:369,min:[-6.572299957275391,-7.298999786376953,0],max:[6.5742998123168945,7.298299789428711,0],type:"VEC3",bufferView:0,byteOffset:0},{name:"��ת001_1_0_normals",componentType:5126,count:369,min:[0,-1,0],max:[0,0,1],type:"VEC3",bufferView:1,byteOffset:0},{name:"��ת001_1_0_indices",componentType:5123,count:1089,min:[0],max:[368],type:"SCALAR",bufferView:2,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"旋转-新",byteLength:11036,uri:"data:application/octet-stream;base64,1zQDwHql3kAAAAAA48e4vgMJ1kAAAAAAQmD1v6yL6UAAAAAA2qxqv1Fr0EAAAAAAVHSkvnuD1UAAAAAAF7eRvjXv1EAAAAAAyeV/vqVO1EAAAAAA5INevsuh00AAAAAAW7E/vpHt0kAAAAAAZogjvoMv0kAAAAAAAwkKvrpr0UAAAAAA+aDnvTSi0EAAAAAAXCDBvWfVz0AAAAAAqoLZv4NRy0AAAAAALv+hvfcGz0AAAAAAAwmKvVg5zkAAAAAA/Yd0vYtszUAAAAAAak1zvSBBzUAAAAAA1xJyveQUzUAAAAAAIEFxvTLmzEAAAAAARdhwvd21zEAAAAAARdhwvbaEzEAAAAAAIEFxvb1SzEAAAAAAs3tyvSEfzEAAAAAARrZzvYXry0AAAAAAayt2vRe3y0AAAAAAkKB4vQaBy0AAAAAASFB8vfVKy0AAAAAAhXwcwLRZw0AAAAAAbjSAveQUy0AAAAAA3EaDvcX+ykAAAAAAb/CFvTLmykAAAAAAcM6IvRTQykAAAAAAcayLvSS5ykAAAAAAcoqOvQWjykAAAAAA4XqUvWx4ykAAAAAAUI2XvSBjykAAAAAACD2bvQFNykAAAAAAUrievbU3ykAAAAAAeJyivTojykAAAAAA5x2nve0NykAAAAAAMCqpvaMBykAAAAAAVp+rvVr1yUAAAAAAexSuvbPqyUAAAAAAxSCwvTvfyUAAAAAA6pWyvfLSyUAAAAAAoda0vUvIyUAAAAAAx0u3vQK8yUAAAAAAWvW5vVuxyUAAAAAA7Z68vYenyUAAAAAA7ny/veCcyUAAAAAAgSbCvQyT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QABBAD8AQQBCAD8AQgBDAD8AHABAAEQAHABEAEUAHABGAEUARgBHAEUARgBIAEcARgBJAEgARgBKAEkARgBLAEoARgBMAEsAHABNAEYAHABOAE0AHABPAE4AHABQAE8AHABRAFAAHABSAFEAUgBTAFEAUgBUAFMAUgBVAFQAUgBWAFUAUgBXAFYAUgBYAFcAHABZAFIAHABaAFkAHABbAFoAHABcAFsAHABdAFwAHABeAF0AHABfAF4AHABgAF8AHABhAGAAHABiAGEAHABjAGIAHABjAGQAZABlAGMAZQBmAGMAHABnAGQAaABpAGoAawBpAGgAbABpAGsAbQBpAGwAbgBpAG0AbwBpAG4AcABpAG8AcQBpAHAAcgBpAHEAcwBpAHIAdABnABwAdAB1AGcAdAB2AHUAdwB4AHkAdwB5AHoAegB5AHsAegB7AHwAfAB7AH0AfAB9AH4AfgB9AH8AfgB/AIAAgQCCAIMAgQCDAIQAhACDAIUAhACFAIYAhgCFAIcAhgCHAIgAiACHAIkAiACJAIoAiwCMAI0AiwCNAI4AjwCKAJAAigCJAJAAkQCSAJMAkQCTAJQAlACTAJUAlACVAJYAlgCVAJcAlgCXAJgAgAB/AIIAgACCAIEAmACXAJkAmACZAJoAmgCZAJsAmgCbAJwAnACbAJ0AnACdAJ4AngCdAHYAngB2AHQAnwB4AHcAoAB4AJ8AoAChAHgAogChAKAAowCkAKUAowCmAKQAowCnAKYAowCoAKcAowCpAKgAowCqAKkAowCrAKoAowCsAKsAowCtAKwAowCuAK0AowCvAK4AowCiAK8AowChAKIAsAChAKMAsQChALAAsgChALEAswChALIAtAChALMAtQChALQAtgChALUAtwChALYAuAChALcAuQChALgAugChALkAuwChALoAvAChALsAvQChALwAvgChAL0AvwChAL4AwAChAL8AwQChAMAAwgChAMEAwwChAMIAxAChAMMAxQChAMQAxgChAMUAxwChAMYAyAChAMcAyQChAMgAygChAMkAywChAMoAzAChAMsAzQChAMwAzgChAM0AzwChAM4A0AChAM8A0QChANAA0gChANEA0wChANIA1AChANMA1QChANQA1gChANUA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BYgFdAWABYgFjAV0BZAFhAV4BZAFlAWEBZgFjAWIBZAFnAWUBZwFjAWYBZAFjAWcBZAFoAWMBaQFoAWQBaQFqAWgBawFqAWkBawFsAWoBbQFsAWsBbQFuAWwBbwFwAUgBbwFIAUcBAAA="}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:4428,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:4428,byteOffset:4428,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:2180,byteOffset:8856,target:34963}],materials:[{name:"SVGMat",pbrMetallicRoughness:{baseColorFactor:[.5,.5,.5,1],metallicFactor:0,roughnessFactor:1},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"��ת001_1",primitives:[{attributes:{POSITION:0,NORMAL:1},indices:2,material:0,mode:4}]}],nodes:[{name:"��ת001",mesh:0}],scene:0,scenes:[{nodes:[0]}]},plane:{accessors:[{name:"Rectangle001_1_0_positions",componentType:5126,count:4,min:[-5,-5,0],max:[5,5,0],type:"VEC3",bufferView:0,byteOffset:0},{name:"Rectangle001_1_0_normals",componentType:5126,count:4,min:[0,0,1],max:[0,0,1],type:"VEC3",bufferView:1,byteOffset:0},{name:"Rectangle001_1_0_indices",componentType:5123,count:6,min:[0],max:[3],type:"SCALAR",bufferView:2,byteOffset:0}],asset:{generator:"obj2gltf",version:"2.0"},buffers:[{name:"plane",byteLength:108,uri:"data:application/octet-stream;base64,AACgQAAAoEAAAAAAAACgwAAAoEAAAAAAAACgwAAAoMAAAAAAAACgQAAAoMAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAABAAIAAgADAAAA"}],bufferViews:[{name:"bufferView_0",buffer:0,byteLength:48,byteOffset:0,byteStride:12,target:34962},{name:"bufferView_1",buffer:0,byteLength:48,byteOffset:48,byteStride:12,target:34962},{name:"bufferView_2",buffer:0,byteLength:12,byteOffset:96,target:34963}],materials:[{name:"wire_225198087",pbrMetallicRoughness:{baseColorFactor:[.8824,.7765,.3412,1],metallicFactor:0,roughnessFactor:.968},emissiveFactor:[0,0,0],alphaMode:"OPAQUE",doubleSided:!1}],meshes:[{name:"Rectangle001_1",primitives:[{attributes:{POSITION:0,NORMAL:1},indices:2,material:0,mode:4}]}],nodes:[{name:"Rectangle001",mesh:0}],scene:0,scenes:[{nodes:[0]}]}};var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o={exports:{}};!function(A){!function(t){function e(A){if(A){var t=this;A((function(A){t.resolve(A)}),(function(A){t.reject(A)}))}}function s(A,t){if("function"==typeof A.y)try{var e=A.y.call(r,t);A.p.resolve(e)}catch(t){A.p.reject(t)}else A.p.resolve(t)}function n(A,t){if("function"==typeof A.n)try{var e=A.n.call(r,t);A.p.resolve(e)}catch(t){A.p.reject(t)}else A.p.reject(t)}var i,r,o="fulfilled",a="undefined",h=function(){function A(){for(;e.length-s;){try{e[s]()}catch(A){t.console&&t.console.error(A)}e[s++]=r,s==n&&(e.splice(0,n),s=0)}}var e=[],s=0,n=1024,i=function(){if(typeof MutationObserver!==a){var t=document.createElement("div");return new MutationObserver(A).observe(t,{attributes:!0}),function(){t.setAttribute("a",0)}}return typeof setImmediate!==a?function(){setImmediate(A)}:function(){setTimeout(A,0)}}();return function(A){e.push(A),e.length-s==1&&i()}}();e.prototype={resolve:function(A){if(this.state===i){if(A===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(A&&("function"==typeof A||"object"==typeof A))try{var e=!0,n=A.then;if("function"==typeof n)return void n.call(A,(function(A){e&&(e=!1,t.resolve(A))}),(function(A){e&&(e=!1,t.reject(A))}))}catch(A){return void(e&&this.reject(A))}this.state=o,this.v=A,t.c&&h((function(){for(var e=0,n=t.c.length;n>e;e++)s(t.c[e],A)}))}},reject:function(A){if(this.state===i){this.state="rejected",this.v=A;var s=this.c;s?h((function(){for(var t=0,e=s.length;e>t;t++)n(s[t],A)})):!e.suppressUncaughtRejectionError&&t.console&&t.console.log("You upset Zousan. Please catch rejections: ",A,A?A.stack:null)}},then:function(A,t){var r=new e,a={y:A,n:t,p:r};if(this.state===i)this.c?this.c.push(a):this.c=[a];else{var c=this.state,I=this.v;h((function(){c===o?s(a,I):n(a,I)}))}return r},catch:function(A){return this.then(null,A)},finally:function(A){return this.then(A,A)},timeout:function(A,t){t=t||"Timeout";var s=this;return new e((function(e,n){setTimeout((function(){n(Error(t))}),A),s.then((function(A){e(A)}),(function(A){n(A)}))}))}},e.resolve=function(A){var t=new e;return t.resolve(A),t},e.reject=function(A){var t=new e;return t.reject(A),t},e.all=function(A){function t(t,r){t&&"function"==typeof t.then||(t=e.resolve(t)),t.then((function(t){s[r]=t,++n==A.length&&i.resolve(s)}),(function(A){i.reject(A)}))}for(var s=[],n=0,i=new e,r=0;r<A.length;r++)t(A[r],r);return A.length||i.resolve(s),i},A.exports&&(A.exports=e),t.define&&t.define.amd&&t.define([],(function(){return e})),t.Zousan=e,e.soon=h}(r)}(o);var a=o.exports,h="undefined"!=typeof Float32Array?Float32Array:Array;function c(){var A=new h(3);return h!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0),A}function I(A,t,e){var s=new h(3);return s[0]=A,s[1]=t,s[2]=e,s}function u(A,t){return A[0]=t[0],A[1]=t[1],A[2]=t[2],A}function f(A,t,e,s){return A[0]=t,A[1]=e,A[2]=s,A}function g(A,t,e,s,n){return A[0]=t,A[1]=e,A[2]=s,A[3]=n,A}function w(){var A=new h(4);return h!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0),A[3]=1,A}function l(A,t,e,s){var n=t[0],i=t[1],r=t[2],o=t[3],a=e[0],h=e[1],c=e[2],I=e[3],u=void 0,f=void 0,g=void 0,w=void 0,l=void 0;return(f=n*a+i*h+r*c+o*I)<0&&(f=-f,a=-a,h=-h,c=-c,I=-I),1-f>1e-6?(u=Math.acos(f),g=Math.sin(u),w=Math.sin((1-s)*u)/g,l=Math.sin(s*u)/g):(w=1-s,l=s),A[0]=w*n+l*a,A[1]=w*i+l*h,A[2]=w*r+l*c,A[3]=w*o+l*I,A}c(),function(){var A,t=(A=new h(4),h!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),A)}();var m,B=function(A,t){return A[0]=t[0],A[1]=t[1],A[2]=t[2],A[3]=t[3],A};c(),I(1,0,0),I(0,1,0),w(),w(),m=new h(9),h!=Float32Array&&(m[1]=0,m[2]=0,m[3]=0,m[5]=0,m[6]=0,m[7]=0),m[0]=1,m[4]=1,m[8]=1;
7
7
  /*!
@@ -9,4 +9,4 @@
9
9
  * LICENSE : UNLICENSED
10
10
  * (c) 2016-2021 maptalks.org
11
11
  */
12
- var C="undefined"!=typeof Promise?Promise:a;function y(A){return null==A}function b(A){return!y(A)}function P(A){for(let t=1;t<arguments.length;t++){const e=arguments[t];for(const t in e)A[t]=e[t]}return A}function Q(A){switch(A){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array}throw new Error("unsupported bufferView's component type: "+A)}function d(A){return 0===A.indexOf("data:")&&A.indexOf("base64,")>0}function v(A){const t=A.substring(A.indexOf(",")+1),e=window.atob(t),s=e.length,n=new Uint8Array(s);for(let A=0;A<s;A++)n[A]=e.charCodeAt(A);return n.buffer}const p={get:function(A,t){const e=p.t(),s=new C(((s,n)=>{if(e.open("GET",A,!0),t){for(const A in t.headers)e.setRequestHeader(A,t.headers[A]);e.withCredentials="include"===t.credentials,t.responseType&&(e.responseType=t.responseType)}e.onreadystatechange=p.i(e,(function(A,t){A?n(A):s(t)})),e.send(null)}));return s.xhr=e,s},i:function(A,t){return function(){if(4===A.readyState)if(200===A.status)"arraybuffer"===A.responseType?0===A.response.byteLength?t(new Error("http status 200 returned without content.")):t(null,{data:A.response,cacheControl:A.getResponseHeader("Cache-Control"),expires:A.getResponseHeader("Expires"),contentType:A.getResponseHeader("Content-Type")}):t(null,A.responseText);else{if(0===A.status)return;t(new Error(A.statusText+","+A.status))}}},t:function(){let A;try{A=new XMLHttpRequest}catch(t){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){}}}return A},getArrayBuffer:(A,t)=>(t||(t={}),t.responseType="arraybuffer",p.get(A,t)),getJSON:function(A,t){const e=p.get(A,t),s=e.then((A=>A?JSON.parse(A):null));return s.xhr=e.xhr,s}};class M{constructor(A,t,e){this.rootPath=A,this.gltf=t,this.requests={},this.buffers={},this.glbBuffer=e}iterate(A,t){const e=this.gltf[t];if(!e)return;let s=0;for(const t in e)A(t,e[t],s++)}createNode(A){const t={};return b(A.name)&&(t.name=A.name),b(A.children)&&(t.children=A.children),b(A.jointName)&&(t.jointName=A.jointName),b(A.matrix)&&(t.matrix=A.matrix),b(A.rotation)&&(t.rotation=A.rotation),b(A.scale)&&(t.scale=A.scale),b(A.translation)&&(t.translation=A.translation),b(A.extras)&&(t.extras=A.extras),b(A.meshes)&&(t.mesh=A.meshes[0]),t}o(A){const t={};for(const e in A){const s=A[e];let n;const i={baseColorTexture:{index:s.instanceTechnique&&s.instanceTechnique.values?(n=s.instanceTechnique).values.diffuse:(n=s).values.tex||n.values.diffuseTex||n.values.diffuse}};s.name&&(i.name=s.name),s.extensions&&(i.extensions=s.extensions),s.extras&&(i.extras=s.extras),t[e]=i}return t}h(A){if(A.bufferView||A.extensions&&(A.extensions.KHR_binary_glTF||A.extensions.binary_glTF)){const t=A.bufferView?A:A.extensions.KHR_binary_glTF||A.extensions.binary_glTF;if(A.extensions&&(A.mimeType=t.mimeType,A.width=t.width,A.height=t.height),this.buffers[t.bufferView])return Promise.resolve(this.buffers[t.bufferView]);const e=this.gltf.bufferViews[t.bufferView],s=(e.byteOffset||0)+this.glbBuffer.byteOffset,n=e.byteLength,i=this.buffers[t.bufferView]=new Uint8Array(this.glbBuffer.buffer,s,n);return Promise.resolve(i)}{const t=A.uri,e=this.rootPath+"/"+t;return this.requests[e]?this.requests[e].then((()=>this.buffers[e])):this.requests[e]=p.getArrayBuffer(e,null).then((A=>{const t=A.data;return this.buffers[e]=t,new Uint8Array(t)}))}}I(A){const t=this.gltf.textures[A];if(!t)return null;const e=this.gltf.images[t.source];return this.h(e).then((A=>{const s=this.gltf.samplers[t.sampler];return{image:{array:A,width:e.width,height:e.height,index:t.source,mimeType:e.mimeType,name:e.name,extras:e.extras},type:t.type||5121,sampler:s,format:t.format||6408,internalFormat:t.internalFormat||6408}}))}getBaseColorTexture(A){const t=this.gltf.materials[A];let e,s;if(void 0===(s=t.instanceTechnique&&t.instanceTechnique.values?(e=t.instanceTechnique).values.diffuse:(e=t).values.tex||e.values.diffuseTex||e.values.diffuse)||void 0===this.gltf.textures)return null;const n=this.gltf.textures[s];if(!n)return null;const i=this.gltf.samplers[n.sampler];return{format:n.format||6408,internalFormat:n.internalFormat||6408,type:n.type||5121,sampler:i,source:this.gltf.images[n.source]}}getMaterial(){return null}getAnimations(){return null}}const E=["SCALAR",1,"VEC2",2,"VEC3",3,"VEC4",4,"MAT2",4,"MAT3",9,"MAT4",16];class D{constructor(A,t,e,s){this.rootPath=A,this.gltf=t,this.glbBuffer=e,this.buffers={},this.requests={},this.accessors={},this.ignoreGLBOffset=s}u(A,t){const e=this.gltf,s=e.accessors[t],n=e.bufferViews[s.bufferView],i=e.buffers[n.buffer];if(this.accessors[s.id])return C.resolve(this.accessors[s.id]);if(this.buffers[i.id]){const e=this.buffers[i.id],s=this.g(A,t,e);return C.resolve(s)}if(this.requests[i.id])return this.requests[i.id].then((()=>{const e=this.buffers[i.id];return this.g(A,t,e)}));if("binary_glTF"!==n.buffer&&"KHR_binary_glTF"!==n.buffer&&i.uri){if(d(i.uri)){const e=this.buffers[i.id]=v(i.uri),n=this.accessors[s.id]=this.g(A,t,e);return C.resolve(n)}const e=this.rootPath+"/"+i.uri;return this.requests[i.id]=p.getArrayBuffer(e,null).then((e=>{const n=this.buffers[i.id]=e.data;return this.accessors[s.id]=this.g(A,t,n)}))}{const e=this.accessors[s.id]=this.g(A,t,this.glbBuffer.buffer,this.ignoreGLBOffset?0:this.glbBuffer.byteOffset);return C.resolve(e)}}g(A,t,e,s=0){const n=this.gltf,i=n.accessors[t],r=n.bufferViews[i.bufferView],o=(r.byteOffset||0)+s,a=this.l(i.type),h=Q(i.componentType),c=h.BYTES_PER_ELEMENT;let I=r.byteStride||0;I===c*a&&(I=0);const u={array:void 0,name:A,accessorName:t,bufferView:i.bufferView,byteOffset:I&&i.byteOffset||0,byteStride:I,byteLength:i.count*a*h.BYTES_PER_ELEMENT,componentType:i.componentType,count:i.count,type:i.type,itemSize:a};if(i.min&&(u.min=i.min),i.max&&(u.max=i.max),s=o+(i.byteOffset||0),0===I)s%h.BYTES_PER_ELEMENT!=0&&(e=e.slice(o,o+i.count*a*h.BYTES_PER_ELEMENT),s=0),u.array=new h(e,s,a*i.count);else{const A=[];for(let t=0;t<i.count;t++){const n=e.slice(s+I*t,s+I*t+a*h.BYTES_PER_ELEMENT);A.push(n)}const t=this.concatenate(h,A);u.array=new h(t,0,a*i.count)}return delete u.bufferView,u}concatenate(A,t){let e=0;for(const s of t)e+=s.byteLength/A.BYTES_PER_ELEMENT;const s=new A(e);let n=0;for(const e of t){const t=new A(e);s.set(t,n),n+=e.byteLength/A.BYTES_PER_ELEMENT}return s.buffer}l(A){const t=E.indexOf(A);return E[t+1]}}class x{constructor(A,t,e,s,n){this.rootPath=A,this.gltf=t,this.glbBuffer=e,this.images={},this.buffers={},this.requests={},this.m=s,this.accessor=new D(A,t,e),this.imageDecoders=n}iterate(A,t){const e=this.gltf[t];if(e)for(let t=0;t<e.length;t++)A(t,e[t],t)}createNode(A){const t={};return P(t,A),!b(A.weights)&&this.gltf.meshes&&b(t.mesh)?t.weights=this.gltf.meshes[t.mesh].weights:t.weights=A.weights,t}I(A){const t=this.gltf.textures[A];if(!t)return null;const e=this.gltf.images[t.source];return this.h(e).then((A=>{const s={image:{array:A.data,width:A.width,height:A.height,index:t.source,mimeType:e.mimeType,name:e.name,extensions:e.extensions,extras:e.extras}};P(s,t);const n=b(t.sampler)?this.gltf.samplers[t.sampler]:void 0;return n&&(s.sampler=n),A.format&&(s.format=A.format),s}))}h(A){if(!b(A.bufferView))return this.B(A);{const t=this.gltf.bufferViews[A.bufferView];if(this.images[A.id])return C.resolve(this.images[A.id]);const e=this.gltf.buffers[t.buffer];if(e.uri)return this.C(e,t,A);if(this.glbBuffer)return this.P(t,A)}return null}B(A){const t=0===A.uri.indexOf("data:image/")?A.uri:this.rootPath+"/"+A.uri;return this.requests[A.id]?this.requests[A.id].then((()=>this.images[A.id])):this.requests[A.id]=this.M(A.id,t)}C(A,t,e){const s=e.id;if(this.buffers[A.id]){const n=this.buffers[A.id],i=this.D(t,n),r=new Blob([i],{type:e.mimeType}),o=URL.createObjectURL(r);return this.M(s,o)}if(this.requests[A.id])return this.requests[A.id].then((()=>{const n=this.buffers[A.id],i=this.D(t,n),r=new Blob([i],{type:e.mimeType}),o=URL.createObjectURL(r);return this.M(s,o)}));if(d(A.uri)){const n=this.buffers[A.id]=v(A.uri),i=this.D(t,n),r=new Blob([i],{type:e.mimeType}),o=URL.createObjectURL(r);return this.M(s,o)}return this.requests[A.id]=p.getArrayBuffer(A.uri,null).then((n=>{const i=this.buffers[A.id]=n.data,r=this.D(t,i),o=new Blob([r],{type:e.mimeType}),a=URL.createObjectURL(o);return this.M(s,a)}))}P(A,t){const e=this.D(A,this.glbBuffer.buffer),s=this.imageDecoders;if(s[t.mimeType])return C.resolve(s[t.mimeType](e));const n=new Blob([e],{type:t.mimeType}),i=URL.createObjectURL(n);return this.M(t.bufferView,i)}M(A,t){return new C(((e,s)=>{this.m(t,((t,n)=>{t?s(t):(this.images[A]=n,e(this.images[A]))}))}))}D(A,t,e){e=e||0;const s=A.byteOffset+e,n=A.byteLength;return new Uint8Array(t,s,n)}F(A,t){const e=new Array(A.byteLength);for(let t=0;t<A.byteLength;t++)e[t]=String.fromCharCode(A[t]);return e.join(""),"data:"+(t=t||"image/png")+";base64,"+window.btoa(unescape(encodeURIComponent(e)))}getAnimations(A){const t=[];return A.forEach((A=>{t.push(this.getSamplers(A.samplers))})),C.all(t).then((t=>{for(let e=0;e<t.length;e++)A[e].samplers=t[e];return A}))}getSamplers(A){const t=[];for(let e=0;e<A.length;e++)(b(A[e].input)||b(A[e].output))&&(t.push(this.accessor.u("input",A[e].input)),t.push(this.accessor.u("output",A[e].output)));return C.all(t).then((t=>{for(let e=0;e<t.length/2;e++)A[e].input=t[2*e],A[e].output=t[2*e+1],A[e].interpolation||(A[e].interpolation="LINEAR");return A}))}}const F="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):null,U=1313821514,k=5130562;class O{static read(A,t=0){const e=new DataView(A,t),s=e.getUint32(4,!0);if(1===s)return O.readV1(e,t);if(2===s)return O.readV2(A,t);throw new Error("Unsupported glb version : "+s)}static readV1(A,t){const e=A.getUint32(8,!0),s=A.getUint32(12,!0);if(e!==A.buffer.byteLength-t)throw new Error("Length in GLB header is inconsistent with glb's byte length.");const n=L(A.buffer,20+t,s);return{json:JSON.parse(n),glbBuffer:{byteOffset:20+t+s,buffer:A.buffer}}}static readV2(A,t){let e,s;const n=new DataView(A,t+12);let i=0;for(;i<n.byteLength;){const r=n.getUint32(i,!0);i+=4;const o=n.getUint32(i,!0);if(i+=4,o===U)e=L(A,t+12+i,r);else if(o===k){const e=t+12+i;s=A.slice(e,e+r)}i+=r}return{json:JSON.parse(e),glbBuffer:{byteOffset:t,buffer:s}}}}function L(A,t,e){if(F){const s=new Uint8Array(A,t,e);return F.decode(s)}return function(A){const t=A.length;let e="";for(let s=0;s<t;){let n=A[s++];if(128&n){let e=S[n>>3&7];if(!(64&n)||!e||s+e>t)return null;for(n&=63>>e;e>0;e-=1){const t=A[s++];if(128!=(192&t))return null;n=n<<6|63&t}}e+=String.fromCharCode(n)}return e}(new Uint8Array(A,t,e))}const S=[1,1,1,1,2,2,3,0],V=[0,0,0],T=[0,0,0,1],N=[1,1,1],_={TRANSLATION:[0,0,0],ROTATION:[0,0,0,1],SCALE:[1,1,1]},H={PREVIOUS:null,NEXT:null,PREINDEX:null,NEXTINDEX:null,INTERPOLATION:null},R={U(A,t,e,s,n,i,r,o){const a=b(A)?t.animations:[t.animations[0]],h={};for(let t=0;t<a.length;t++){const c=a[t];if(b(A)&&c.name!==A)continue;const I=c.channelsMap[e];if(I)for(let A=0;A<I.length;A++){const t=I[A];"translation"===t.target.path?(this.k(n,c.samplers[t.sampler],s,1),h.translation=u(V,n)):"rotation"===t.target.path?(this.O(i,c.samplers[t.sampler],s,1),h.rotation=B(T,i)):"scale"===t.target.path?(this.k(r,c.samplers[t.sampler],s,1),h.scale=u(N,r)):"weights"===t.target.path&&o&&(this.k(o,c.samplers[t.sampler],s,o.length),h.weights=o)}}return h},k(A,t,e,s){switch(t.interpolation){case"LINEAR":{const n=this.L(H,t,e,1*s);n&&(A=function(A,t,e,s){for(let n=0;n<A.length;n++)A[n]=t[n]+s*(e[n]-t[n]);return A}(A,n.PREVIOUS,n.NEXT,n.INTERPOLATION));break}case"STEP":{const n=this.L(H,t,e,1*s);n&&(A=function(A,t){for(let e=0;e<A.length;e++)A[e]=t[e];return A}(A,...n.PREVIOUS));break}case"CUBICSPLINE":{const n=this.L(H,t,e,3*s);n&&(A=this.S(A,n,t.input.array,3*s));break}}return A},O(A,t,e){switch(t.interpolation){case"LINEAR":{const s=this.L(H,t,e,1);s&&l(A,s.PREVIOUS,s.NEXT,s.INTERPOLATION);break}case"STEP":{const s=this.L(H,t,e,1);s&&(A=g(A,...s.PREVIOUS));break}case"CUBICSPLINE":{const s=this.L(H,t,e,3);if(s){for(let A=0;A<s.PREVIOUS.length;A++)s.PREVIOUS[A]=Math.acos(s.PREVIOUS[A]),s.NEXT[A]=Math.acos(s.NEXT[A]);A=this.S(A,s,t.input.array,3);for(let t=0;t<A.length;t++)A[t]=Math.cos(A[t])}break}}return A},V(A,t){const e=A.length;let s=0,n=e-1,i=Math.floor((s+n)/2);for(;s<=e-1&&n>=0;){if(s===n)return null;if(A[i]<=t&&t<=A[i+1]){const e=A[i];return{preIndx:i,nextIndex:i+1,interpolation:(t-e)/(A[i+1]-e)}}t<A[i]?(n=i,i=Math.floor((s+n)/2)):A[i+1]<t&&(s=i,i=Math.floor((s+n)/2))}return null},L(A,t,e,s){const n=t.input.array,i=t.output.array,r=t.output.itemSize;(e<n[0]||e>n[n.length-1])&&(e=Math.max(n[0],Math.min(n[n.length-1],e))),e===n[n.length-1]&&(e=n[0]);const o=this.V(n,e);if(!o||!o.nextIndex)return null;const{preIndx:a,nextIndex:h,interpolation:c}=o;A.PREINDEX=a,A.NEXTINDEX=h,A.INTERPOLATION=c;const I=r*s;return A.PREVIOUS=i.subarray(A.PREINDEX*I,(A.PREINDEX+1)*I),A.NEXT=i.subarray(A.NEXTINDEX*I,(A.NEXTINDEX+1)*I),A},S(A,t,e,s){const n=t.INTERPOLATION,i=e[t.PREINDEX],r=e[t.NEXTINDEX];for(let e=0;e<3;e++){const o=t.PREVIOUS[s+e],a=(r-i)*t.PREVIOUS[2*s+e],h=t.NEXT[3+e],c=(r-i)*t.NEXT[e],I=(2*Math.pow(n,3)-3*Math.pow(n,2)+1)*o+(Math.pow(n,3)-2*Math.pow(n,2)+n)*a+(2*-Math.pow(n,3)+3*Math.pow(n,2))*h+(Math.pow(n,3)-Math.pow(n,2))*c;A[e]=I}return A},getAnimationClip(A,t,e,s){const n=A.nodes[t]&&A.nodes[t].weights;return f(V,..._.TRANSLATION),g(T,..._.ROTATION),f(N,..._.SCALE),this.U(s,A,t,e,V,T,N,n)},getTimeSpan(A){if(!A.animations)return null;if(A.timeSpan)return A.timeSpan;const t=A.animations;return A.timeSpan={},t.forEach(((t,e)=>{let s=-1/0,n=1/0;const i=t.channels;for(let A=0;A<i.length;A++){const e=i[A],r=t.samplers[e.sampler].input.array;r[r.length-1]>s&&(s=r[r.length-1]),r[0]<n&&(n=r[0])}const r=t.name||e;A.timeSpan[r]={max:s,min:n}})),A.timeSpan},getTimeSpanByName(A,t){const e=this.getTimeSpan(A);return e?b(t)?e[t]:e[Object.keys(e)[0]]:null}},K="undefined"==typeof document?null:document.createElement("canvas");class j{constructor(A,t,e){if(this.options=e||{},t.buffer instanceof ArrayBuffer){const{json:e,glbBuffer:s}=O.read(t.buffer,t.byteOffset);this.T(A,e,s)}else this.T(A,t)}load(){const A=this.N(),t=this._(),e=this.H();return C.all([A,t,e]).then((A=>(A[0].animations=A[1],A[0].textures=A[2],this.createChannelsMap(A[0]),A[0])))}createChannelsMap(A){const t=A.animations;if(t)for(let A=0;A<t.length;A++){const e=t[A];e.channelsMap={};for(let A=0;A<e.channels.length;A++){const t=e.channels[A];e.channelsMap[t.target.node]||(e.channelsMap[t.target.node]=[]),e.channelsMap[t.target.node].push(t)}}}getExternalResources(){const A=[];if(this.gltf){const{buffers:t,images:e}=this.gltf;for(let e=0;e<t.length;e++)t[e].uri&&t[e].uri.indexOf("data:application/octet-stream;base64")<0&&A.push({type:"buffer",uri:t[e].uri});for(let t=0;t<e.length;t++)e[t].uri&&e[t].uri.indexOf("data:image/")<0&&A.push({type:"image",uri:e[t].uri})}return A}static getAnimationClip(A,t,e,s){return R.getAnimationClip(A,t,e,s)}static getAnimationTimeSpan(A,t){return R.getTimeSpanByName(A,t)}static getTypedArrayCtor(A){return Q(A)}T(A,t,e){this.gltf=t,this.version=t.asset?+t.asset.version:1,this.rootPath=A,this.glbBuffer=e,this.buffers={},this.requests={},this.options.requestImage=this.options.requestImage||G,this.options.transferable&&(this.transferables=[]),2===this.version?(this.accessor=new D(A,t,e,!0),this.adapter=new x(A,t,e,this.options.requestImage,this.options.imageDecoders||{}),this.adapter.iterate(((A,t,e)=>{t.id="buffer_"+e}),"buffers"),this.adapter.iterate(((A,t,e)=>{t.id="image_"+e}),"images"),this.adapter.iterate(((A,t,e)=>{t.id="accessor_"+e}),"accessors")):(this.accessor=new D(A,t,e),this.adapter=new M(A,t,e),this.adapter.iterate(((A,t,e)=>{t.id="accessor_"+e}),"accessors"))}R(A,t){if(A.children&&A.children.length>0){if(!("number"==typeof(e=A.children[0])&&isFinite(e)||function(A){return!y(A)&&("string"==typeof A||null!==A.constructor&&A.constructor===String)}(A.children[0])))return A;const s=A.children.map((A=>{const e=t[A];return e.nodeIndex=A,this.R(e,t)}));A.children=s}var e;return A}N(){return this.K().then((A=>{const t=this.scenes=[];let e;for(const t in A)A[t]=this.R(A[t],A),A[t].nodeIndex=Number(t)?Number(t):t;this.adapter.iterate(((s,n,i)=>{const r={};n.name&&(r.name=n.name),n.nodes&&(r.nodes=n.nodes.map((t=>A[t]))),this.gltf.scene===s&&(e=i),t.push(r)}),"scenes");const s={asset:this.gltf.asset,scene:e,scenes:t,nodes:A,meshes:this.meshes,materials:this.gltf.materials,skins:this.skins};if(this.gltf.extensions&&(s.extensions=this.gltf.extensions),1===this.version){const A=this.adapter.o(this.gltf.materials);s.materials=A}return s}))}K(){return this.j().then((()=>{const A=this.nodes={};return this.adapter.iterate(((t,e)=>{const s=this.adapter.createNode(e,this.meshes,this.skins);A[t]=s}),"nodes"),A}))}G(){this.skins=[];const A=[];return this.adapter.iterate(((t,e,s)=>{A.push(this.Z(e).then((A=>{A.index=s,this.skins.push(A)})))}),"skins"),A}Z(A){const t=A.inverseBindMatrices;return this.accessor.u("inverseBindMatrices",t).then((t=>(A.inverseBindMatrices=t,A)))}_(){const A=this.gltf.animations;return b(A)?this.adapter.getAnimations(A):null}j(){this.meshes={};let A=[];return this.adapter.iterate(((t,e,s)=>{A.push(this.J(e).then((A=>{A.index=s,this.meshes[t]=A})))}),"meshes"),A=A.concat(this.G()),C.all(A)}J(A){const t=A.primitives.map((A=>this.q(A)));return C.all(t).then((t=>{const e={};return P(e,A),e.primitives=t,e}))}H(){const A=this.gltf.textures;if(!A)return null;const t=[];for(const e in A)t.push(this.adapter.I(e));return C.all(t).then((t=>{if(this.transferables)for(let A=0;A<t.length;A++)if(t[A].image.array){const e=t[A].image.array.buffer;this.transferables.indexOf(e)<0&&this.transferables.push(e)}if(!Array.isArray(A)){const e={},s=Object.keys(A);for(let A=0;A<t.length;A++)e[s[A]]=t[A];return e}return t}))}q(A){const t=[],e=A.attributes;for(const A in e){const s=this.accessor.u(A,e[A]);s&&t.push(s)}if(b(A.indices)){const e=this.accessor.u("indices",A.indices);e&&t.push(e)}if(b(A.targets))for(let e=0;e<A.targets.length;e++){const s=A.targets[e];for(const A in s){const n=this.accessor.u(`morphTargets_${A}_${e}`,s[A]);n&&t.push(n)}}return C.all(t).then((t=>{let e,s;const n={attributes:t.reduce(((A,t)=>("indices"===t.name?e=t:t.name.indexOf("morphTargets_")>-1?(s=s||{})[t.name.slice(13)]=t:A[t.name]=t,this.transferables&&this.transferables.indexOf(t.array.buffer)<0&&this.transferables.push(t.array.buffer),A)),{}),material:A.material};return e&&(n.indices=e),s&&(n.morphTargets=s),n.mode=b(A.mode)?A.mode:4,b(A.extras)&&(n.extras=A.extras),n}))}}function G(A,t){const e=new Image;e.crossOrigin="",e.onload=()=>{if(!K)return void t(new Error("There is no canvas to draw image!"));K.width=e.width,K.height=e.height;const A=K.getContext("2d");A.drawImage(e,0,0,e.width,e.height);const s=A.getImageData(0,0,e.width,e.height),n={width:e.width,height:e.height,data:new Uint8Array(s.data)};t(null,n)},e.onerror=function(A){t(A)},e.src=A}const z=[];function Z(A,e,s,n,r,o){const a=[],h=t.quat.fromEuler([],s[0],s[1],s[2]),c=t.mat4.fromRotationTranslationScale([],h,e,n),I=function(A){return new j("",i[A]).load().then((A=>A))}(A);return I.then((A=>{const i=t.reshader.GLTFHelper.exportGLTFPack(A).getMeshesInfo(),h=new t.reshader.Material({color:r});i.forEach((A=>{const i=new t.reshader.Mesh(A.geometry,h);i.setUniform("uPickingId",o);const I=i.getDefines();I.HAS_PICKING_ID=2,i.setDefines(I),i.translate=e,i.rotation=s,i.scaling=n,t.mat4.multiply(i.localTransform,c,A.nodeMatrix),i.originTransform=t.mat4.copy([],i.localTransform),i.originColor=r,a.push(i)}))})),a}function J(A,e){const s=A.getCoordinates(),i=e.coordinateToPointAtRes(s,e.getGLRes()),r=[i.x,i.y,0],o=A.getTranslation();t.vec3.add(r,r,o);const a=function(A,t,e,s){return A._pointAtResToContainerPoint(t,e,s)}(e,new n.Point(r[0],r[1]),e.getGLRes());a.x+=170;const h=function(A,e,s,i){if(i){const r=s/A._getResolution(),o=A.width/2,a=A.height/2;z[0]=(e.x-o)/o,z[1]=e.y/a-1,z[3]=i*r;const h=t.mat4.invert([],A.projViewMatrix);t.vec3.transformMat4(z,z,h);const c=A.getGLScale();return t.vec3.set(z,z[0]/c,z[1]/c,z[2]/c),t.vec3.scale(z,z,1/r),new n.Point(z[0],z[1])}{const t=A.containerPointToCoordinate(e);return A.coordinateToPointAtRes(t,s)}}(e,a,e.getGLRes());return Math.sqrt(Math.pow(h.x-r[0],2)+Math.pow(h.y-r[1],2))/5.272881136101205}class q{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=340/177,e=Z("jiantou",[1.2*t,0,0],[0,0,90],[t,t,t],[89/255,206/255,147/255,0],7),s=Z("jiantou",[0,1.2*t,0],[0,0,180],[t,t,t],[89/255,206/255,147/255,0],8),n=Z("jiantou",[-1.2*t,0,0],[0,0,270],[t,t,t],[89/255,206/255,147/255,0],9),i=Z("jiantou",[0,-1.2*t,0],[0,0,0],[t,t,t],[89/255,206/255,147/255,0],10);return A.push(e,s,n,i),A}getMeshes(){return this._meshes}}class Y{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=340/177,e=Z("xuanzhuan",[0,0,0],[180,0,0],[.5*t,.5*t,.5*t],[50/255,130/255,184/255,.8],11);return A.push(e),A}getMeshes(){return this._meshes}}class W{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=340/177,e=Z("yuanhuan",[0,0,0],[0,0,0],[.5*t,.5*t,.5*t],[149/255,179/255,199/255,.5],12);return A.push(e),A}getMeshes(){return this._meshes}}class X{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=Z("plane",[0,0,0],[0,0,0],[10,10,10],[1,0,0,.5],16);return A.push(t),A}getMeshes(){return this._meshes}}const $=[],AA=[],tA=[],eA=[],sA=[],nA=[177/170,177/170,177/170],iA=[1,2,3,4,12];class rA{constructor(){this.translate=new q,this.rotation=new Y,this.scaling=new W,this.planeHelper=new X,this._meshes=this.W(),this.X=!0}W(){const A={};A.translate=this.translate.getMeshes(),A.rotation=this.rotation.getMeshes(),A.scaling=this.scaling.getMeshes(),A.planeHelper=this.planeHelper.getMeshes();const t=340/177,e=Z("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=Z("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),n=Z("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),i=Z("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),r=Z("yuanpan",[0,0,0],[90,0,0],[.5*t,.5*t,.5*t],[89/255,206/255,147/255,.5],5),o=Z("zzhou",[0,0,6.5],[90,0,0],[1,1,1],[14/255,127/255,191/255,1],6);return A.translate.push(e,s,n,i,r,o),A}updateMatrix(A,e,s,n,i){const r=e.getCoordinates(),o=A.coordinateToPointAtRes(r,A.getGLRes()),a=e.getPointZ();t.vec3.set(AA,o.x,o.y,a);const h=t.vec3.copy($,i),c=e.getTranslation();t.vec3.add(AA,AA,c),t.vec3.add(AA,AA,h);for(const i in this._meshes)for(let r=0;r<this._meshes[i].length;r++){const o=this._meshes[i][r];for(let i=0;i<o.length;i++){const r=o[i],a=r.getUniform("uPickingId"),h=t.vec3.copy($,r.translate),c=[r.rotation[0],r.rotation[1],r.rotation[2]],I=r.scaling;if(11===a&&(this.X?(c[2]+=s,r.rotation[2]+=s):this.X||(c[2]+=s,r.rotation[2]+=s,c[0]=360,c[2]-=90)),iA.indexOf(a)>-1)if(12!==a)I[0]+=n,I[1]+=n,I[2]+=n;else{const A=this._meshes.translate[4][0];I[0]=1.2*A.scaling[0],I[1]=1.2*A.scaling[0],I[2]=1.2*A.scaling[0]}let u=J(e,A);if(u=t.vec3.set(tA,u,u,u),t.vec3.multiply(h,h,u),t.vec3.multiply(u,u,I),1===a||2===a||3===a||4===a){const A=t.vec3.multiply(sA,I,nA);t.vec3.multiply(h,h,A)}const f=t.quat.fromEuler(eA,c[0],c[1],c[2]);t.vec3.add(h,h,AA),t.mat4.fromRotationTranslationScale(r.localTransform,f,h,u)}}}getMeshes(A){const t={};return t.translate=this._meshes.translate,A&&"translate"!==A&&(t[A]=this._meshes[A]),t}$(A){this.X=A}dispose(){for(const A in this._meshes)for(let t=0;t<this._meshes[A].length;t++){const e=this._meshes[A][t];for(let A=0;A<e.length;A++){const t=e[A];t.geometry.dispose(),t.dispose()}}}}const oA=[5,6,7,8,9,10],aA=[5,7,8,9,10],hA=[2,4,11],cA=[1,3,12],IA=[12,16],uA=[1,2,3,4],fA=[1,2,3,4,12],gA=.01,wA=[],lA=[],mA=[],BA=[],CA=[],yA=[],bA=[];class PA extends(e.Eventable(e.Handlerable(e.Class))){constructor(A){super(A),this.options=A,this.mouseAction="moving",this.AA="translate",this.tA=!0,this.TransformHelper=new rA,this.helperScene=new t.reshader.Scene([]),this.addToMapCount=0}enable(){return this.tA=!0,this.layerRenderer&&this.layerRenderer.setToRedraw(),this}disable(){return this.tA=!1,this.layerRenderer&&this.layerRenderer.setToRedraw(),this.map&&this.map.resetCursor(),this}isEnable(){return this.tA}eA(A){oA.indexOf(A)>-1?this.AA="translate":hA.indexOf(A)>-1?this.AA="rotation":cA.indexOf(A)>-1?this.AA="scaling":this.AA="translate"}sA(){return this.AA}addTo(A){this.map&&(this.nA(),console.warn("transform control has been added to a map, it suggest remove from the map before")),this.addToMapCount++,this.map=A,this.container=A.getContainer(),A.on("dom:mousemove",this.iA,this),A.on("dom:mousedown",this.rA,this),A.on("dom:mouseup",this.oA,this),A.on("zooming moving dragrotating",this.aA,this),this.hA()}remove(){this.map&&this.container&&this.layerRenderer&&(this.nA(),this.TransformHelper.dispose(),this.layerRenderer.setToRedraw(),delete this.map,delete this.layer,delete this.layerRenderer,delete this.container,delete this.cA)}nA(){this.container&&this.map&&(this.map.off("mousemove",this.iA,this),this.map.off("mousedown",this.rA,this),this.map.off("mouseup",this.oA,this),this.map.off("zooming moving dragrotating",this.aA,this),this.layer&&this.layer.off("renderend",this.render,this))}iA(A){if(this.IA()){if(this.currentMousePosition={x:A.containerPoint.x,y:A.containerPoint.y},"moving"===this.mouseAction){const A=this.uA();this.currentPickingObject=this.fA(this.currentMousePosition,A,"meshes"),this.currentPickingObject&&null!=this.currentPickingObject.pickingId?(this.eA(this.currentPickingObject.pickingId),6===this.currentPickingObject.pickingId?this.gA(!0):this.gA(!1)):(this.gA(!1),this.eA()),this.wA()}this.lA(this.currentMousePosition)}}rA(A){if(!this.IA())return;const t=this.uA();this.currentMousePosition={x:A.containerPoint.x,y:A.containerPoint.y},this.mA=!0,this.currentPickingObject=this.fA(this.currentMousePosition,t,"meshes"),this.firstDownPoint=this.fA(this.currentMousePosition,t,"meshes"),this.currentPickingObject&&null!=this.currentPickingObject.meshId?(this.mouseAction="transform",this.BA(this.currentPickingObject.pickingId),this.map.config("zoomable",!1),this.map.config("draggable",!1),this.layerRenderer&&this.layerRenderer.setToRedraw()):(this.mouseAction="pan",this.map.config("zoomable",!0),this.map.config("draggable",!0),this.CA()),this.lastMousePosition=this.currentMousePosition,this.lastPickingObject=this.currentPickingObject,this.lastPickingMesh=t[this.currentPickingObject.meshId]}oA(){"transform"===this.mouseAction&&(this.firstDownPoint=null,this.CA(),this.mA=!0,this.fire("transformend",{action:this.yA,type:"transformend"})),this.mouseAction="moving",this.AA="translate",this.map.config("zoomable",!0),this.map.config("draggable",!0),this.layerRenderer&&this.layerRenderer.setToRedraw()}aA(){const A=this.TransformHelper.planeHelper.getMeshes()[0][0],t=this.map.getBearing();A.rotation[2]=-t,this.bA()}bA(){this.IA()&&(this.TransformHelper.updateMatrix(this.map,this.cA,0,0,[0,0,0]),this.mA=!0)}picked(A){if(!this.layerRenderer)return!1;const t=this.uA(),s=this.map;let n=A;A instanceof e.Point||(n=s.coordinateToContainerPoint(new e.Coordinate(A)));const i=this.fA(n,t,"picked");return!(!i||null===i.meshId)}CA(){const A=this.TransformHelper.getMeshes("scaling").scaling[0][0],t=340/177;A.scaling=[.6*t,.6*t,.6*t],this.layerRenderer&&(this.PA(A),this.QA())}QA(){this.TransformHelper._meshes.translate.forEach((A=>{for(let t=0;t<A.length;t++){const e=A[t];uA.indexOf(e.getUniform("uPickingId"))>-1&&e.material.set("color",e.originColor)}}))}PA(A){const e=this.cA.getCoordinates(),s=this.map.coordinateToPointAtRes(e,this.map.getGLRes()),n=[s.x,s.y,0],i=this.cA.getTranslation();t.vec3.add(n,n,i);const r=t.vec3.copy([],A.translate),o=A.scaling;let a=J(this.cA,this.map);a=t.vec3.set([],a,a,a),t.vec3.multiply(r,r,a),t.vec3.multiply(a,a,o),t.vec3.add(r,r,n),t.mat4.fromRotationTranslationScale(A.localTransform,[0,0,0,1],r,a);this.uA().forEach((A=>{const e=A.getUniform("uPickingId");if(1===e||3===e||2===e||4===e){const e=t.vec3.copy([],A.translate),s=170/177;A.scaling=[s,s,s];const i=A.scaling,r=A.rotation;let o=J(this.cA,this.map);o=t.vec3.set([],o,o,o),t.vec3.multiply(e,e,o),t.vec3.multiply(o,o,i),t.vec3.add(e,e,n);const a=t.quat.fromEuler([],r[0],r[1],r[2]);t.mat4.fromRotationTranslationScale(A.localTransform,a,e,o)}}))}dA(A){const t=this.map.containerPointToCoordinate(A),e=this.map.coordinateToPointAtRes(t,this.map.getGLRes());return{point:[e.x,e.y]}}lA(A){if("transform"===this.mouseAction){const A=this.sA(),s=this.cA.getTranslation(),n=this.cA.getPointZ(),i=this.cA.getCoordinates(),r=this.map.coordinateToPointAtRes(i,this.map.getGLRes()),o=this.cA.getRotation(),a=this.cA.getScale();let h=null,c=null;if(s[2]+n<.01&&"z-translate"!==this.yA)h=this.dA(this.currentMousePosition),c=this.dA(this.lastMousePosition);else{const A=this.TransformHelper.planeHelper.getMeshes()[0];if(h=this.fA(this.currentMousePosition,A,"plane"),c=this.fA(this.lastMousePosition,A,"plane"),!h||null===h.meshId||!c||null===c.meshId)return}const I=[0,0,0],u=[0,0,0];let f=0,g=0,w=0;if("translate"===A){if("xy-translate"===this.yA){const A=h.point[0]-c.point[0],t=h.point[1]-c.point[1];I[0]=A,I[1]=t}else if("x-translate"===this.yA){const A=h.point[0]-c.point[0];I[0]=A}else if("y-translate"===this.yA){const A=h.point[1]-c.point[1];I[1]=A}else if("z-translate"===this.yA){let A=0;if(this.vA()){const s=this.map.getGLRes(),n=this.map._pointAtResToContainerPoint(new e.Point(c.point[0],c.point[1]),s),i=this.map._pointAtResToContainerPoint(new e.Point(h.point[0],h.point[1]),s),r=t.vec2.length(t.vec2.set(BA,h.point[0]-c.point[0],h.point[1]-c.point[1]));A=i.y<n.y?r:-r}else A=h.point[2]-c.point[2];I[2]=Math.sign(A)*this.map.pointAtResToAltitude(A,this.map.getGLRes())}}else if("rotation"===A)g=this.pA(h.point,c.point),g>=0?this.TransformHelper.$(!0):this.TransformHelper.$(!1),u[2]+=g;else if("scaling"===A){const A=this.MA(),e=t.vec2.length(t.vec2.set(BA,this.firstDownPoint.point[0]-A[0],this.firstDownPoint.point[1]-A[1])),s=t.vec2.length(t.vec2.set(BA,c.point[0]-A[0],c.point[1]-A[1]));f=this.EA(h.point,c.point,A,s,a),w=this.EA(h.point,c.point,A,e)}const l=t.vec3.set([],r.x,r.y,i.z||0),m=t.vec3.add(l,l,I),B=this.map.pointAtResToCoordinate(new e.Coordinate(m[0],m[1]),this.map.getGLRes());B.z=m[2];let C=null;C=f>=0?f:f*(this.options&&this.options.scaleStrength||1);const y=t.vec3.add(a,t.vec3.set(BA,C,C*(a[1]/a[0]),C*(a[2]/a[0])),a);if(Math.min(...y)<gA){const A=Math.min(...a);y[0]=a[0]*(gA/A),y[1]=a[1]*(gA/A),y[2]=a[2]*(gA/A)}const b=t.vec3.add(o,u,o);this.TransformHelper.updateMatrix(this.map,this.cA,g,w,I),this.yA.indexOf("translate")>-1?this.fire("positionchange",{action:this.yA,type:"positionchange",target:this.cA,coordinate:B}):this.fire("transforming",{action:this.yA,type:"transforming",target:this.cA,translate:s,rotation:b,scale:y})}this.lastMousePosition=A,this.lastPickingObject=this.currentPickingObject;const s=this.uA();this.lastPickingMesh=s[this.currentPickingObject.meshId]}EA(A,e,s,n,i){const r=(t.vec2.length(t.vec2.set(BA,A[0]-s[0],A[1]-s[1]))-t.vec2.length(t.vec2.set(BA,e[0]-s[0],e[1]-s[1])))/n;return i?(i[0]-gA)*r:r}MA(){const A=this.map,e=this.cA.getCoordinates(),s=A.coordinateToPointAtRes(e,A.getGLRes()),n=t.vec3.set(CA,s.x,s.y,0),i=this.cA.getTranslation();return t.vec3.add(n,n,i),n}gA(A){const e=this.TransformHelper.planeHelper.getMeshes()[0][0],s=t.mat4.getTranslation(mA,e.localTransform),n=t.mat4.getScaling(lA,e.localTransform);let i=t.quat.fromEuler(wA,0,0,0);const r=this.map.getBearing();A&&!this.vA()?(i=t.quat.fromEuler(wA,90,0,-r),0===e.rotation[0]&&(this.mA=!0),t.vec3.set(e.rotation,90,0,-r)):(90===e.rotation[0]&&(this.mA=!0),t.vec3.set(e.rotation,0,0,-r)),t.mat4.fromRotationTranslationScale(e.localTransform,i,s,n)}vA(){if(this.map.getPitch())return!1;const A=this.map.cameraPosition,e=this.map.coordinateToPointAtRes(this.map.getCenter(),this.map.getGLRes());t.vec3.set(e,e.x,e.y,0);const s=this.cA.getCoordinates(),n=this.map.coordinateToPointAtRes(s,this.map.getGLRes()),i=this.cA.getTranslation(),r=t.vec3.set(mA,n.x,n.y,0),o=t.vec3.add(r,r,i),a=t.vec3.subtract([],A,o),h=t.vec3.subtract([],A,e);return t.vec3.angle(a,h)<1/180*Math.PI}wA(){const A=this.uA();if(this.currentPickingObject&&null!=this.currentPickingObject.meshId){this.DA(),this.lastPickingObject&&null!=this.lastPickingObject.meshId&&this.lastPickingObject.meshId!==this.currentPickingObject.meshId&&this.xA();const t=A[this.currentPickingObject.meshId];if(t&&IA.indexOf(this.currentPickingObject.pickingId)<0){const A=[t.originColor[0],t.originColor[1],t.originColor[2],.8];t.material.set("color",A),this.FA(t,.5)}this.layerRenderer.setToRedraw()}else this.lastPickingObject&&null!=this.lastPickingObject.meshId&&(this.map.resetCursor(),this.xA(),this.layerRenderer.setToRedraw())}DA(){6===this.currentPickingObject.pickingId?this.map.setCursor("ns-resize"):aA.indexOf(this.currentPickingObject.pickingId)>-1?this.map.setCursor("move"):this.map.setCursor("pointer")}xA(){const A=this.lastPickingMesh;if(!A)return;const t=A.getUniform("uPickingId"),e=this.uA();aA.indexOf(t)>-1?e.forEach((A=>{aA.indexOf(A.getUniform("uPickingId"))>-1&&A.material.set("color",A.originColor)})):fA.indexOf(t)>-1?e.forEach((A=>{const t=A.getUniform("uPickingId");uA.indexOf(t)>-1&&A.material.set("color",A.originColor)})):11===t&&e.forEach((A=>{uA.indexOf(A.getUniform("uPickingId"))>-1&&A.material.set("color",A.originColor)})),A.material.set("color",A.originColor)}FA(A,t){const e=A.getUniform("uPickingId"),s=this.uA();aA.indexOf(e)>-1?s.forEach((e=>{if(aA.indexOf(e.getUniform("uPickingId"))>-1&&e.getUniform("uPickingId")!==A.getUniform("uPickingId")){const A=[e.originColor[0],e.originColor[1],e.originColor[2],t];e.material.set("color",A)}})):"scaling"===this.AA?s.forEach((A=>{const t=A.getUniform("uPickingId");if(1===t||3===t||2===t||4===t){const t=[149/255,179/255,199/255,.8];A.material.set("color",t)}})):"rotation"===this.AA&&s.forEach((A=>{const t=A.getUniform("uPickingId");if(1===t||3===t||2===t||4===t){const t=A.originColor;A.material.set("color",[t[0],t[1],t[2],0])}}))}reset(){if(!this.map||!this.cA)return;this.cA.setTranslation(this.cA.originTrans),this.cA.setRotation(this.UA),this.cA.setScale(this.kA);const A=this.cA.getTranslation();t.vec3.scale(A,A,-1),this.TransformHelper.updateMatrix(this.map,this.cA,0,1,[0,0,0])}pA(A,e){const s=this.MA(),n=t.vec2.set(yA,e[0]-s[0],e[1]-s[1]),i=t.vec2.set(bA,A[0]-s[0],A[1]-s[1]),r=Math.atan2(n[1],n[0]);return(Math.atan2(i[1],i[0])-r)/Math.PI*180}BA(A){return this.yA=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",this.yA}transform(A){if(this.layerRenderer&&this.layerRenderer.layer&&(this.layerRenderer.layer.off("renderend",this.render),this.layerRenderer.layer.off("resizeCanvas",this.OA)),this.cA&&(this.cA.off("remove",this.LA,this),delete this.cA),this.cA=A,this.cA.on("remove",this.LA,this),!this.map)return void console.error("should add to a target first");const t=this.map;this.cA.originTrans||(this.cA.originTrans=this.cA.getTranslation(),this.cA.originRotation=this.cA.getRotation(),this.cA.originScale=this.cA.getScale()),this.TransformHelper.updateMatrix(t,A,0,0,[0,0,0]),this.SA(),this.mA=!0}getTransformTarget(){return this.cA}LA(){delete this.cA}SA(){const A=this.cA.getLayer();A&&(A.off("renderend",this.render),A.off("resizeCanvas",this.OA));const e=this.map.getLayers();let s=null;for(let A=0;A<e.length;A++)if(e[A]instanceof t.GroupGLLayer){s=e[A];break}if(!s)return;const n=s.getLayers(),i=n.indexOf(A);if(i<0)return;n.splice(i,1),n.push(A);const r=this.map,o=A.getRenderer();this.layerRenderer=o,this.regl=o.regl,this.renderer=o.renderer,this.VA=this.layerRenderer.getFBORayPicking(),this.TA={projViewMatrix:r.projViewMatrix},A.on("renderend",this.render,this),A.on("resizeCanvas",this.OA,this),o.setToRedraw()}OA(){this.VA.clear(),this.mA=!0}fA(A,t,e){const s=this.map;if(!(s&&this.VA&&this.layerRenderer&&this.layerRenderer.canvas))return null;const n=s.getDevicePixelRatio(),i=A.x*n,r=A.y*n,o={projViewMatrix:this.map.projViewMatrix,pointSize:1},a=this.layerRenderer.canvas.gl&&this.layerRenderer.canvas.gl.wrap;(this.mA||a||!this.NA||this.NA!==e)&&(this.VA.render(t,o,!0),this.NA=e,this.mA=!1);return this.VA.pick(i,r,10,o,{viewMatrix:this.map.viewMatrix,projMatrix:this.map.projMatrix,returnPoint:!0})}hA(){const A=this.map.getDevicePixelRatio(),e={x:0,y:0,width:()=>this.map?this.map.width*A:1,height:()=>this.map?this.map.height*A:1};this._A=new t.reshader.MeshShader({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",frag:"precision mediump float;\n\nuniform vec4 color;\n\n\n\nvoid main() {\n\n gl_FragColor = color;\n\n}\n\n",uniforms:["color",{name:"projViewModelMatrix",type:"function",fn:function(A,e){return t.mat4.multiply([],e.projViewMatrix,e.modelMatrix)}}],extraCommandProps:{viewport:e,depth:{enable:!0,func:"always",mask:!1,range:[0,0]},blend:{enable:!0,func:{src:"src alpha",dst:"one minus src alpha"},equation:"add"}},defines:{}})}render(){if(!this.IA())return;const A=this.uA();this.helperScene.setMeshes(A);const t=this.layerRenderer.getFrameContext();if(t&&t.renderTarget&&this.layerRenderer.getFrameTimestamp()!==t.timestamp)return;this.bA(),this._A.filter=t&&t.sceneFilter;const e=t&&t.renderTarget&&t.renderTarget.fbo;this.renderer.render(this._A,this.TA,this.helperScene,e)}uA(){let A=[];const t=this.TransformHelper.getMeshes(this.AA);for(const e in t){if("translate"===e)continue;const s=t[e];for(let t=0;t<s.length;t++)A=A.concat(s[t])}const e=t.translate;for(let t=0;t<e.length;t++)A=A.concat(e[t]);return A}IA(){const A=this.layerRenderer,t=A&&A.layer;return A&&this.cA&&t&&t.isVisible()&&this.cA.isVisible()&&this.regl&&this.tA}}PA.mergeOptions({scaleStrength:2}),A.TransformControl=PA,Object.defineProperty(A,"A",{value:!0}),"undefined"!=typeof console&&console.log("@maptalks/transform-control v0.7.0")}));
12
+ var C="undefined"!=typeof Promise?Promise:a;function y(A){return null==A}function b(A){return!y(A)}function P(A){for(let t=1;t<arguments.length;t++){const e=arguments[t];for(const t in e)A[t]=e[t]}return A}function Q(A){switch(A){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array}throw new Error("unsupported bufferView's component type: "+A)}function d(A){return 0===A.indexOf("data:")&&A.indexOf("base64,")>0}function v(A){const t=A.substring(A.indexOf(",")+1),e=window.atob(t),s=e.length,n=new Uint8Array(s);for(let A=0;A<s;A++)n[A]=e.charCodeAt(A);return n.buffer}const p={get:function(A,t){const e=p.t(),s=new C(((s,n)=>{if(e.open("GET",A,!0),t){for(const A in t.headers)e.setRequestHeader(A,t.headers[A]);e.withCredentials="include"===t.credentials,t.responseType&&(e.responseType=t.responseType)}e.onreadystatechange=p.i(e,(function(A,t){A?n(A):s(t)})),e.send(null)}));return s.xhr=e,s},i:function(A,t){return function(){if(4===A.readyState)if(200===A.status)"arraybuffer"===A.responseType?0===A.response.byteLength?t(new Error("http status 200 returned without content.")):t(null,{data:A.response,cacheControl:A.getResponseHeader("Cache-Control"),expires:A.getResponseHeader("Expires"),contentType:A.getResponseHeader("Content-Type")}):t(null,A.responseText);else{if(0===A.status)return;t(new Error(A.statusText+","+A.status))}}},t:function(){let A;try{A=new XMLHttpRequest}catch(t){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(A){}}}return A},getArrayBuffer:(A,t)=>(t||(t={}),t.responseType="arraybuffer",p.get(A,t)),getJSON:function(A,t){const e=p.get(A,t),s=e.then((A=>A?JSON.parse(A):null));return s.xhr=e.xhr,s}};class M{constructor(A,t,e){this.rootPath=A,this.gltf=t,this.requests={},this.buffers={},this.glbBuffer=e}iterate(A,t){const e=this.gltf[t];if(!e)return;let s=0;for(const t in e)A(t,e[t],s++)}createNode(A){const t={};return b(A.name)&&(t.name=A.name),b(A.children)&&(t.children=A.children),b(A.jointName)&&(t.jointName=A.jointName),b(A.matrix)&&(t.matrix=A.matrix),b(A.rotation)&&(t.rotation=A.rotation),b(A.scale)&&(t.scale=A.scale),b(A.translation)&&(t.translation=A.translation),b(A.extras)&&(t.extras=A.extras),b(A.meshes)&&(t.mesh=A.meshes[0]),t}o(A){const t={};for(const e in A){const s=A[e];let n;const i={baseColorTexture:{index:s.instanceTechnique&&s.instanceTechnique.values?(n=s.instanceTechnique).values.diffuse:(n=s).values.tex||n.values.diffuseTex||n.values.diffuse}};s.name&&(i.name=s.name),s.extensions&&(i.extensions=s.extensions),s.extras&&(i.extras=s.extras),t[e]=i}return t}h(A){if(A.bufferView||A.extensions&&(A.extensions.KHR_binary_glTF||A.extensions.binary_glTF)){const t=A.bufferView?A:A.extensions.KHR_binary_glTF||A.extensions.binary_glTF;if(A.extensions&&(A.mimeType=t.mimeType,A.width=t.width,A.height=t.height),this.buffers[t.bufferView])return Promise.resolve(this.buffers[t.bufferView]);const e=this.gltf.bufferViews[t.bufferView],s=(e.byteOffset||0)+this.glbBuffer.byteOffset,n=e.byteLength,i=this.buffers[t.bufferView]=new Uint8Array(this.glbBuffer.buffer,s,n);return Promise.resolve(i)}{const t=A.uri,e=this.rootPath+"/"+t;return this.requests[e]?this.requests[e].then((()=>this.buffers[e])):this.requests[e]=p.getArrayBuffer(e,null).then((A=>{const t=A.data;return this.buffers[e]=t,new Uint8Array(t)}))}}I(A){const t=this.gltf.textures[A];if(!t)return null;const e=this.gltf.images[t.source];return this.h(e).then((A=>{const s=this.gltf.samplers[t.sampler];return{image:{array:A,width:e.width,height:e.height,index:t.source,mimeType:e.mimeType,name:e.name,extras:e.extras},type:t.type||5121,sampler:s,format:t.format||6408,internalFormat:t.internalFormat||6408}}))}getBaseColorTexture(A){const t=this.gltf.materials[A];let e,s;if(void 0===(s=t.instanceTechnique&&t.instanceTechnique.values?(e=t.instanceTechnique).values.diffuse:(e=t).values.tex||e.values.diffuseTex||e.values.diffuse)||void 0===this.gltf.textures)return null;const n=this.gltf.textures[s];if(!n)return null;const i=this.gltf.samplers[n.sampler];return{format:n.format||6408,internalFormat:n.internalFormat||6408,type:n.type||5121,sampler:i,source:this.gltf.images[n.source]}}getMaterial(){return null}getAnimations(){return null}}const E=["SCALAR",1,"VEC2",2,"VEC3",3,"VEC4",4,"MAT2",4,"MAT3",9,"MAT4",16];class D{constructor(A,t,e,s){this.rootPath=A,this.gltf=t,this.glbBuffer=e,this.buffers={},this.requests={},this.accessors={},this.ignoreGLBOffset=s}u(A,t){const e=this.gltf,s=e.accessors[t],n=e.bufferViews[s.bufferView],i=e.buffers[n.buffer];if(this.accessors[s.id])return C.resolve(this.accessors[s.id]);if(this.buffers[i.id]){const e=this.buffers[i.id],s=this.g(A,t,e);return C.resolve(s)}if(this.requests[i.id])return this.requests[i.id].then((()=>{const e=this.buffers[i.id];return this.g(A,t,e)}));if("binary_glTF"!==n.buffer&&"KHR_binary_glTF"!==n.buffer&&i.uri){if(d(i.uri)){const e=this.buffers[i.id]=v(i.uri),n=this.accessors[s.id]=this.g(A,t,e);return C.resolve(n)}const e=this.rootPath+"/"+i.uri;return this.requests[i.id]=p.getArrayBuffer(e,null).then((e=>{const n=this.buffers[i.id]=e.data;return this.accessors[s.id]=this.g(A,t,n)}))}{const e=this.accessors[s.id]=this.g(A,t,this.glbBuffer.buffer,this.ignoreGLBOffset?0:this.glbBuffer.byteOffset);return C.resolve(e)}}g(A,t,e,s=0){const n=this.gltf,i=n.accessors[t],r=n.bufferViews[i.bufferView],o=(r.byteOffset||0)+s,a=this.l(i.type),h=Q(i.componentType),c=h.BYTES_PER_ELEMENT;let I=r.byteStride||0;I===c*a&&(I=0);const u={array:void 0,name:A,accessorName:t,bufferView:i.bufferView,byteOffset:I&&i.byteOffset||0,byteStride:I,byteLength:i.count*a*h.BYTES_PER_ELEMENT,componentType:i.componentType,count:i.count,type:i.type,itemSize:a};if(i.min&&(u.min=i.min),i.max&&(u.max=i.max),s=o+(i.byteOffset||0),0===I)s%h.BYTES_PER_ELEMENT!=0&&(e=e.slice(o,o+i.count*a*h.BYTES_PER_ELEMENT),s=0),u.array=new h(e,s,a*i.count);else{const A=[];for(let t=0;t<i.count;t++){const n=e.slice(s+I*t,s+I*t+a*h.BYTES_PER_ELEMENT);A.push(n)}const t=this.concatenate(h,A);u.array=new h(t,0,a*i.count)}return delete u.bufferView,u}concatenate(A,t){let e=0;for(const s of t)e+=s.byteLength/A.BYTES_PER_ELEMENT;const s=new A(e);let n=0;for(const e of t){const t=new A(e);s.set(t,n),n+=e.byteLength/A.BYTES_PER_ELEMENT}return s.buffer}l(A){const t=E.indexOf(A);return E[t+1]}}class x{constructor(A,t,e,s,n){this.rootPath=A,this.gltf=t,this.glbBuffer=e,this.images={},this.buffers={},this.requests={},this.m=s,this.accessor=new D(A,t,e),this.imageDecoders=n}iterate(A,t){const e=this.gltf[t];if(e)for(let t=0;t<e.length;t++)A(t,e[t],t)}createNode(A){const t={};return P(t,A),!b(A.weights)&&this.gltf.meshes&&b(t.mesh)?t.weights=this.gltf.meshes[t.mesh].weights:t.weights=A.weights,t}I(A){const t=this.gltf.textures[A];if(!t)return null;const e=this.gltf.images[t.source];return this.h(e).then((A=>{const s={image:{array:A.data,width:A.width,height:A.height,index:t.source,mimeType:e.mimeType,name:e.name,extensions:e.extensions,extras:e.extras}};P(s,t);const n=b(t.sampler)?this.gltf.samplers[t.sampler]:void 0;return n&&(s.sampler=n),A.format&&(s.format=A.format),s}))}h(A){if(!b(A.bufferView))return this.B(A);{const t=this.gltf.bufferViews[A.bufferView];if(this.images[A.id])return C.resolve(this.images[A.id]);const e=this.gltf.buffers[t.buffer];if(e.uri)return this.C(e,t,A);if(this.glbBuffer)return this.P(t,A)}return null}B(A){const t=0===A.uri.indexOf("data:image/")?A.uri:this.rootPath+"/"+A.uri;return this.requests[A.id]?this.requests[A.id].then((()=>this.images[A.id])):this.requests[A.id]=this.M(A.id,t)}C(A,t,e){const s=e.id;if(this.buffers[A.id]){const n=this.buffers[A.id],i=this.D(t,n),r=new Blob([i],{type:e.mimeType}),o=URL.createObjectURL(r);return this.M(s,o)}if(this.requests[A.id])return this.requests[A.id].then((()=>{const n=this.buffers[A.id],i=this.D(t,n),r=new Blob([i],{type:e.mimeType}),o=URL.createObjectURL(r);return this.M(s,o)}));if(d(A.uri)){const n=this.buffers[A.id]=v(A.uri),i=this.D(t,n),r=new Blob([i],{type:e.mimeType}),o=URL.createObjectURL(r);return this.M(s,o)}return this.requests[A.id]=p.getArrayBuffer(A.uri,null).then((n=>{const i=this.buffers[A.id]=n.data,r=this.D(t,i),o=new Blob([r],{type:e.mimeType}),a=URL.createObjectURL(o);return this.M(s,a)}))}P(A,t){const e=this.D(A,this.glbBuffer.buffer),s=this.imageDecoders;if(s[t.mimeType])return C.resolve(s[t.mimeType](e));const n=new Blob([e],{type:t.mimeType}),i=URL.createObjectURL(n);return this.M(t.bufferView,i)}M(A,t){return new C(((e,s)=>{this.m(t,((t,n)=>{t?s(t):(this.images[A]=n,e(this.images[A]))}))}))}D(A,t,e){e=e||0;const s=A.byteOffset+e,n=A.byteLength;return new Uint8Array(t,s,n)}F(A,t){const e=new Array(A.byteLength);for(let t=0;t<A.byteLength;t++)e[t]=String.fromCharCode(A[t]);return e.join(""),"data:"+(t=t||"image/png")+";base64,"+window.btoa(unescape(encodeURIComponent(e)))}getAnimations(A){const t=[];return A.forEach((A=>{t.push(this.getSamplers(A.samplers))})),C.all(t).then((t=>{for(let e=0;e<t.length;e++)A[e].samplers=t[e];return A}))}getSamplers(A){const t=[];for(let e=0;e<A.length;e++)(b(A[e].input)||b(A[e].output))&&(t.push(this.accessor.u("input",A[e].input)),t.push(this.accessor.u("output",A[e].output)));return C.all(t).then((t=>{for(let e=0;e<t.length/2;e++)A[e].input=t[2*e],A[e].output=t[2*e+1],A[e].interpolation||(A[e].interpolation="LINEAR");return A}))}}const F="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):null,U=1313821514,k=5130562;class O{static read(A,t=0){const e=new DataView(A,t),s=e.getUint32(4,!0);if(1===s)return O.readV1(e,t);if(2===s)return O.readV2(A,t);throw new Error("Unsupported glb version : "+s)}static readV1(A,t){const e=A.getUint32(8,!0),s=A.getUint32(12,!0);if(e!==A.buffer.byteLength-t)throw new Error("Length in GLB header is inconsistent with glb's byte length.");const n=L(A.buffer,20+t,s);return{json:JSON.parse(n),glbBuffer:{byteOffset:20+t+s,buffer:A.buffer}}}static readV2(A,t){let e,s;const n=new DataView(A,t+12);let i=0;for(;i<n.byteLength;){const r=n.getUint32(i,!0);i+=4;const o=n.getUint32(i,!0);if(i+=4,o===U)e=L(A,t+12+i,r);else if(o===k){const e=t+12+i;s=A.slice(e,e+r)}i+=r}return{json:JSON.parse(e),glbBuffer:{byteOffset:t,buffer:s}}}}function L(A,t,e){if(F){const s=new Uint8Array(A,t,e);return F.decode(s)}return function(A){const t=A.length;let e="";for(let s=0;s<t;){let n=A[s++];if(128&n){let e=S[n>>3&7];if(!(64&n)||!e||s+e>t)return null;for(n&=63>>e;e>0;e-=1){const t=A[s++];if(128!=(192&t))return null;n=n<<6|63&t}}e+=String.fromCharCode(n)}return e}(new Uint8Array(A,t,e))}const S=[1,1,1,1,2,2,3,0],V=[0,0,0],T=[0,0,0,1],N=[1,1,1],_={TRANSLATION:[0,0,0],ROTATION:[0,0,0,1],SCALE:[1,1,1]},H={PREVIOUS:null,NEXT:null,PREINDEX:null,NEXTINDEX:null,INTERPOLATION:null},R={U(A,t,e,s,n,i,r,o){const a=b(A)?t.animations:[t.animations[0]],h={};for(let t=0;t<a.length;t++){const c=a[t];if(b(A)&&c.name!==A)continue;const I=c.channelsMap[e];if(I)for(let A=0;A<I.length;A++){const t=I[A];"translation"===t.target.path?(this.k(n,c.samplers[t.sampler],s,1),h.translation=u(V,n)):"rotation"===t.target.path?(this.O(i,c.samplers[t.sampler],s,1),h.rotation=B(T,i)):"scale"===t.target.path?(this.k(r,c.samplers[t.sampler],s,1),h.scale=u(N,r)):"weights"===t.target.path&&o&&(this.k(o,c.samplers[t.sampler],s,o.length),h.weights=o)}}return h},k(A,t,e,s){switch(t.interpolation){case"LINEAR":{const n=this.L(H,t,e,1*s);n&&(A=function(A,t,e,s){for(let n=0;n<A.length;n++)A[n]=t[n]+s*(e[n]-t[n]);return A}(A,n.PREVIOUS,n.NEXT,n.INTERPOLATION));break}case"STEP":{const n=this.L(H,t,e,1*s);n&&(A=function(A,t){for(let e=0;e<A.length;e++)A[e]=t[e];return A}(A,...n.PREVIOUS));break}case"CUBICSPLINE":{const n=this.L(H,t,e,3*s);n&&(A=this.S(A,n,t.input.array,3*s));break}}return A},O(A,t,e){switch(t.interpolation){case"LINEAR":{const s=this.L(H,t,e,1);s&&l(A,s.PREVIOUS,s.NEXT,s.INTERPOLATION);break}case"STEP":{const s=this.L(H,t,e,1);s&&(A=g(A,...s.PREVIOUS));break}case"CUBICSPLINE":{const s=this.L(H,t,e,3);if(s){for(let A=0;A<s.PREVIOUS.length;A++)s.PREVIOUS[A]=Math.acos(s.PREVIOUS[A]),s.NEXT[A]=Math.acos(s.NEXT[A]);A=this.S(A,s,t.input.array,3);for(let t=0;t<A.length;t++)A[t]=Math.cos(A[t])}break}}return A},V(A,t){const e=A.length;let s=0,n=e-1,i=Math.floor((s+n)/2);for(;s<=e-1&&n>=0;){if(s===n)return null;if(A[i]<=t&&t<=A[i+1]){const e=A[i];return{preIndx:i,nextIndex:i+1,interpolation:(t-e)/(A[i+1]-e)}}t<A[i]?(n=i,i=Math.floor((s+n)/2)):A[i+1]<t&&(s=i,i=Math.floor((s+n)/2))}return null},L(A,t,e,s){const n=t.input.array,i=t.output.array,r=t.output.itemSize;(e<n[0]||e>n[n.length-1])&&(e=Math.max(n[0],Math.min(n[n.length-1],e))),e===n[n.length-1]&&(e=n[0]);const o=this.V(n,e);if(!o||!o.nextIndex)return null;const{preIndx:a,nextIndex:h,interpolation:c}=o;A.PREINDEX=a,A.NEXTINDEX=h,A.INTERPOLATION=c;const I=r*s;return A.PREVIOUS=i.subarray(A.PREINDEX*I,(A.PREINDEX+1)*I),A.NEXT=i.subarray(A.NEXTINDEX*I,(A.NEXTINDEX+1)*I),A},S(A,t,e,s){const n=t.INTERPOLATION,i=e[t.PREINDEX],r=e[t.NEXTINDEX];for(let e=0;e<3;e++){const o=t.PREVIOUS[s+e],a=(r-i)*t.PREVIOUS[2*s+e],h=t.NEXT[3+e],c=(r-i)*t.NEXT[e],I=(2*Math.pow(n,3)-3*Math.pow(n,2)+1)*o+(Math.pow(n,3)-2*Math.pow(n,2)+n)*a+(2*-Math.pow(n,3)+3*Math.pow(n,2))*h+(Math.pow(n,3)-Math.pow(n,2))*c;A[e]=I}return A},getAnimationClip(A,t,e,s){const n=A.nodes[t]&&A.nodes[t].weights;return f(V,..._.TRANSLATION),g(T,..._.ROTATION),f(N,..._.SCALE),this.U(s,A,t,e,V,T,N,n)},getTimeSpan(A){if(!A.animations)return null;if(A.timeSpan)return A.timeSpan;const t=A.animations;return A.timeSpan={},t.forEach(((t,e)=>{let s=-1/0,n=1/0;const i=t.channels;for(let A=0;A<i.length;A++){const e=i[A],r=t.samplers[e.sampler].input.array;r[r.length-1]>s&&(s=r[r.length-1]),r[0]<n&&(n=r[0])}const r=t.name||e;A.timeSpan[r]={max:s,min:n}})),A.timeSpan},getTimeSpanByName(A,t){const e=this.getTimeSpan(A);return e?b(t)?e[t]:e[Object.keys(e)[0]]:null}},K="undefined"==typeof document?null:document.createElement("canvas");class j{constructor(A,t,e){if(this.options=e||{},t.buffer instanceof ArrayBuffer){const{json:e,glbBuffer:s}=O.read(t.buffer,t.byteOffset);this.T(A,e,s)}else this.T(A,t)}load(){const A=this.N(),t=this._(),e=this.H();return C.all([A,t,e]).then((A=>(A[0].animations=A[1],A[0].textures=A[2],this.createChannelsMap(A[0]),A[0])))}createChannelsMap(A){const t=A.animations;if(t)for(let A=0;A<t.length;A++){const e=t[A];e.channelsMap={};for(let A=0;A<e.channels.length;A++){const t=e.channels[A];e.channelsMap[t.target.node]||(e.channelsMap[t.target.node]=[]),e.channelsMap[t.target.node].push(t)}}}getExternalResources(){const A=[];if(this.gltf){const{buffers:t,images:e}=this.gltf;for(let e=0;e<t.length;e++)t[e].uri&&t[e].uri.indexOf("data:application/octet-stream;base64")<0&&A.push({type:"buffer",uri:t[e].uri});for(let t=0;t<e.length;t++)e[t].uri&&e[t].uri.indexOf("data:image/")<0&&A.push({type:"image",uri:e[t].uri})}return A}static getAnimationClip(A,t,e,s){return R.getAnimationClip(A,t,e,s)}static getAnimationTimeSpan(A,t){return R.getTimeSpanByName(A,t)}static getTypedArrayCtor(A){return Q(A)}T(A,t,e){this.gltf=t,this.version=t.asset?+t.asset.version:1,this.rootPath=A,this.glbBuffer=e,this.buffers={},this.requests={},this.options.requestImage=this.options.requestImage||G,this.options.transferable&&(this.transferables=[]),2===this.version?(this.accessor=new D(A,t,e,!0),this.adapter=new x(A,t,e,this.options.requestImage,this.options.imageDecoders||{}),this.adapter.iterate(((A,t,e)=>{t.id="buffer_"+e}),"buffers"),this.adapter.iterate(((A,t,e)=>{t.id="image_"+e}),"images"),this.adapter.iterate(((A,t,e)=>{t.id="accessor_"+e}),"accessors")):(this.accessor=new D(A,t,e),this.adapter=new M(A,t,e),this.adapter.iterate(((A,t,e)=>{t.id="accessor_"+e}),"accessors"))}R(A,t){if(A.children&&A.children.length>0){if(!("number"==typeof(e=A.children[0])&&isFinite(e)||function(A){return!y(A)&&("string"==typeof A||null!==A.constructor&&A.constructor===String)}(A.children[0])))return A;const s=A.children.map((A=>{const e=t[A];return e.nodeIndex=A,this.R(e,t)}));A.children=s}var e;return A}N(){return this.K().then((A=>{const t=this.scenes=[];let e;for(const t in A)A[t]=this.R(A[t],A),A[t].nodeIndex=Number(t)?Number(t):t;this.adapter.iterate(((s,n,i)=>{const r={};n.name&&(r.name=n.name),n.nodes&&(r.nodes=n.nodes.map((t=>A[t]))),this.gltf.scene===s&&(e=i),t.push(r)}),"scenes");const s={asset:this.gltf.asset,scene:e,scenes:t,nodes:A,meshes:this.meshes,materials:this.gltf.materials,skins:this.skins};if(this.gltf.extensions&&(s.extensions=this.gltf.extensions),1===this.version){const A=this.adapter.o(this.gltf.materials);s.materials=A}return s}))}K(){return this.j().then((()=>{const A=this.nodes={};return this.adapter.iterate(((t,e)=>{const s=this.adapter.createNode(e,this.meshes,this.skins);A[t]=s}),"nodes"),A}))}G(){this.skins=[];const A=[];return this.adapter.iterate(((t,e,s)=>{A.push(this.Z(e).then((A=>{A.index=s,this.skins.push(A)})))}),"skins"),A}Z(A){const t=A.inverseBindMatrices;return this.accessor.u("inverseBindMatrices",t).then((t=>(A.inverseBindMatrices=t,A)))}_(){const A=this.gltf.animations;return b(A)?this.adapter.getAnimations(A):null}j(){this.meshes={};let A=[];return this.adapter.iterate(((t,e,s)=>{A.push(this.J(e).then((A=>{A.index=s,this.meshes[t]=A})))}),"meshes"),A=A.concat(this.G()),C.all(A)}J(A){const t=A.primitives.map((A=>this.q(A)));return C.all(t).then((t=>{const e={};return P(e,A),e.primitives=t,e}))}H(){const A=this.gltf.textures;if(!A)return null;const t=[];for(const e in A)t.push(this.adapter.I(e));return C.all(t).then((t=>{if(this.transferables)for(let A=0;A<t.length;A++)if(t[A].image.array){const e=t[A].image.array.buffer;this.transferables.indexOf(e)<0&&this.transferables.push(e)}if(!Array.isArray(A)){const e={},s=Object.keys(A);for(let A=0;A<t.length;A++)e[s[A]]=t[A];return e}return t}))}q(A){const t=[],e=A.attributes;for(const A in e){const s=this.accessor.u(A,e[A]);s&&t.push(s)}if(b(A.indices)){const e=this.accessor.u("indices",A.indices);e&&t.push(e)}if(b(A.targets))for(let e=0;e<A.targets.length;e++){const s=A.targets[e];for(const A in s){const n=this.accessor.u(`morphTargets_${A}_${e}`,s[A]);n&&t.push(n)}}return C.all(t).then((t=>{let e,s;const n={attributes:t.reduce(((A,t)=>("indices"===t.name?e=t:t.name.indexOf("morphTargets_")>-1?(s=s||{})[t.name.slice(13)]=t:A[t.name]=t,this.transferables&&this.transferables.indexOf(t.array.buffer)<0&&this.transferables.push(t.array.buffer),A)),{}),material:A.material};return e&&(n.indices=e),s&&(n.morphTargets=s),n.mode=b(A.mode)?A.mode:4,b(A.extras)&&(n.extras=A.extras),n}))}}function G(A,t){const e=new Image;e.crossOrigin="",e.onload=()=>{if(!K)return void t(new Error("There is no canvas to draw image!"));K.width=e.width,K.height=e.height;const A=K.getContext("2d");A.drawImage(e,0,0,e.width,e.height);const s=A.getImageData(0,0,e.width,e.height),n={width:e.width,height:e.height,data:new Uint8Array(s.data)};t(null,n)},e.onerror=function(A){t(A)},e.src=A}const z=[];function Z(A,e,s,n,r,o){const a=[],h=t.quat.fromEuler([],s[0],s[1],s[2]),c=t.mat4.fromRotationTranslationScale([],h,e,n),I=function(A){return new j("",i[A]).load().then((A=>A))}(A);return I.then((A=>{const i=t.reshader.GLTFHelper.exportGLTFPack(A).getMeshesInfo(),h=new t.reshader.Material({color:r});i.forEach((A=>{const i=new t.reshader.Mesh(A.geometry,h);i.setUniform("uPickingId",o);const I=i.getDefines();I.HAS_PICKING_ID=2,i.setDefines(I),i.translate=e,i.rotation=s,i.scaling=n,t.mat4.multiply(i.localTransform,c,A.nodeMatrix),i.originTransform=t.mat4.copy([],i.localTransform),i.originColor=r,a.push(i)}))})),a}function J(A,e){const s=A.getCoordinates(),i=e.coordinateToPointAtRes(s,e.getGLRes()),r=[i.x,i.y,0],o=A.getTranslation();t.vec3.add(r,r,o);const a=function(A,t,e,s){return A._pointAtResToContainerPoint(t,e,s)}(e,new n.Point(r[0],r[1]),e.getGLRes());a.x+=170;const h=function(A,e,s,i){if(i){const r=s/A._getResolution(),o=A.width/2,a=A.height/2;z[0]=(e.x-o)/o,z[1]=e.y/a-1,z[3]=i*r;const h=t.mat4.invert([],A.projViewMatrix);t.vec3.transformMat4(z,z,h);const c=A.getGLScale();return t.vec3.set(z,z[0]/c,z[1]/c,z[2]/c),t.vec3.scale(z,z,1/r),new n.Point(z[0],z[1])}{const t=A.containerPointToCoordinate(e);return A.coordinateToPointAtRes(t,s)}}(e,a,e.getGLRes());return Math.sqrt(Math.pow(h.x-r[0],2)+Math.pow(h.y-r[1],2))/5.272881136101205}class q{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=340/177,e=Z("jiantou",[1.2*t,0,0],[0,0,90],[t,t,t],[89/255,206/255,147/255,0],7),s=Z("jiantou",[0,1.2*t,0],[0,0,180],[t,t,t],[89/255,206/255,147/255,0],8),n=Z("jiantou",[-1.2*t,0,0],[0,0,270],[t,t,t],[89/255,206/255,147/255,0],9),i=Z("jiantou",[0,-1.2*t,0],[0,0,0],[t,t,t],[89/255,206/255,147/255,0],10);return A.push(e,s,n,i),A}getMeshes(){return this._meshes}}class Y{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=340/177,e=Z("xuanzhuan",[0,0,0],[180,0,0],[.5*t,.5*t,.5*t],[50/255,130/255,184/255,.8],11);return A.push(e),A}getMeshes(){return this._meshes}}class W{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=340/177,e=Z("yuanhuan",[0,0,0],[0,0,0],[.5*t,.5*t,.5*t],[149/255,179/255,199/255,.5],12);return A.push(e),A}getMeshes(){return this._meshes}}class X{constructor(A){this.Y=A,this._meshes=this.W()}setCoordinate(A){this.Y=A}W(){const A=[],t=Z("plane",[0,0,0],[0,0,0],[10,10,10],[1,0,0,.5],16);return A.push(t),A}getMeshes(){return this._meshes}}const $=[],AA=[],tA=[],eA=[],sA=[],nA=[177/170,177/170,177/170],iA=[1,2,3,4,12];class rA{constructor(){this.translate=new q,this.rotation=new Y,this.scaling=new W,this.planeHelper=new X,this._meshes=this.W(),this.X=!0}W(){const A={};A.translate=this.translate.getMeshes(),A.rotation=this.rotation.getMeshes(),A.scaling=this.scaling.getMeshes(),A.planeHelper=this.planeHelper.getMeshes();const t=340/177,e=Z("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=Z("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),n=Z("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),i=Z("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),r=Z("yuanpan",[0,0,0],[90,0,0],[.5*t,.5*t,.5*t],[89/255,206/255,147/255,.5],5),o=Z("zzhou",[0,0,6.5],[90,0,0],[1,1,1],[14/255,127/255,191/255,1],6);return A.translate.push(e,s,n,i,r,o),A}updateMatrix(A,e,s,n,i){const r=e.getCoordinates(),o=A.coordinateToPointAtRes(r,A.getGLRes()),a=e.getPointZ();t.vec3.set(AA,o.x,o.y,a);const h=t.vec3.copy($,i),c=e.getTranslation();t.vec3.add(AA,AA,c),t.vec3.add(AA,AA,h);for(const i in this._meshes)for(let r=0;r<this._meshes[i].length;r++){const o=this._meshes[i][r];for(let i=0;i<o.length;i++){const r=o[i],a=r.getUniform("uPickingId"),h=t.vec3.copy($,r.translate),c=[r.rotation[0],r.rotation[1],r.rotation[2]],I=r.scaling;if(11===a&&(this.X?(c[2]+=s,r.rotation[2]+=s):this.X||(c[2]+=s,r.rotation[2]+=s,c[0]=360,c[2]-=90)),iA.indexOf(a)>-1)if(12!==a)I[0]+=n,I[1]+=n,I[2]+=n;else{const A=this._meshes.translate[4][0];I[0]=1.2*A.scaling[0],I[1]=1.2*A.scaling[0],I[2]=1.2*A.scaling[0]}let u=J(e,A);if(u=t.vec3.set(tA,u,u,u),t.vec3.multiply(h,h,u),t.vec3.multiply(u,u,I),1===a||2===a||3===a||4===a){const A=t.vec3.multiply(sA,I,nA);t.vec3.multiply(h,h,A)}const f=t.quat.fromEuler(eA,c[0],c[1],c[2]);t.vec3.add(h,h,AA),t.mat4.fromRotationTranslationScale(r.localTransform,f,h,u)}}}getMeshes(A){const t={};return t.translate=this._meshes.translate,A&&"translate"!==A&&(t[A]=this._meshes[A]),t}$(A){this.X=A}dispose(){for(const A in this._meshes)for(let t=0;t<this._meshes[A].length;t++){const e=this._meshes[A][t];for(let A=0;A<e.length;A++){const t=e[A];t.geometry.dispose(),t.dispose()}}}}const oA=[5,6,7,8,9,10],aA=[5,7,8,9,10],hA=[2,4,11],cA=[1,3,12],IA=[12,16],uA=[1,2,3,4],fA=[1,2,3,4,12],gA=.01,wA=[],lA=[],mA=[],BA=[],CA=[],yA=[],bA=[];class PA extends(e.Eventable(e.Handlerable(e.Class))){constructor(A){super(A),this.options=A,this.mouseAction="moving",this.AA="translate",this.tA=!0,this.TransformHelper=new rA,this.helperScene=new t.reshader.Scene([]),this.addToMapCount=0}enable(){return this.tA=!0,this.layerRenderer&&this.layerRenderer.setToRedraw(),this}disable(){return this.tA=!1,this.layerRenderer&&this.layerRenderer.setToRedraw(),this.map&&this.map.resetCursor(),this}isEnable(){return this.tA}eA(A){oA.indexOf(A)>-1?this.AA="translate":hA.indexOf(A)>-1?this.AA="rotation":cA.indexOf(A)>-1?this.AA="scaling":this.AA="translate"}sA(){return this.AA}addTo(A){this.map&&(this.nA(),console.warn("transform control has been added to a map, it suggest remove from the map before")),this.addToMapCount++,this.map=A,this.container=A.getContainer(),A.on("dom:mousemove",this.iA,this),A.on("dom:mousedown",this.rA,this),A.on("dom:mouseup",this.oA,this),A.on("zooming moving dragrotating",this.aA,this),this.hA()}remove(){this.map&&this.container&&this.layerRenderer&&(this.nA(),this.TransformHelper.dispose(),this.layerRenderer.setToRedraw(),delete this.map,delete this.layer,delete this.layerRenderer,delete this.container,delete this.cA)}nA(){this.container&&this.map&&(this.map.off("mousemove",this.iA,this),this.map.off("mousedown",this.rA,this),this.map.off("mouseup",this.oA,this),this.map.off("zooming moving dragrotating",this.aA,this),this.layer&&this.layer.off("renderend",this.render,this))}iA(A){if(this.IA()){if(this.currentMousePosition={x:A.containerPoint.x,y:A.containerPoint.y},"moving"===this.mouseAction){const A=this.uA();this.currentPickingObject=this.fA(this.currentMousePosition,A,"meshes"),this.currentPickingObject&&null!=this.currentPickingObject.pickingId?(this.eA(this.currentPickingObject.pickingId),6===this.currentPickingObject.pickingId?this.gA(!0):this.gA(!1)):(this.gA(!1),this.eA()),this.wA()}this.lA(this.currentMousePosition)}}rA(A){if(!this.IA())return;const t=this.uA();this.currentMousePosition={x:A.containerPoint.x,y:A.containerPoint.y},this.mA=!0,this.currentPickingObject=this.fA(this.currentMousePosition,t,"meshes"),this.firstDownPoint=this.fA(this.currentMousePosition,t,"meshes"),this.currentPickingObject&&null!=this.currentPickingObject.meshId?(this.mouseAction="transform",this.BA(this.currentPickingObject.pickingId),this.map.config("zoomable",!1),this.map.config("draggable",!1),this.layerRenderer&&this.layerRenderer.setToRedraw()):(this.mouseAction="pan",this.map.config("zoomable",!0),this.map.config("draggable",!0),this.CA()),this.lastMousePosition=this.currentMousePosition,this.lastPickingObject=this.currentPickingObject,this.lastPickingMesh=t[this.currentPickingObject.meshId]}oA(){"transform"===this.mouseAction&&(this.firstDownPoint=null,this.CA(),this.mA=!0,this.fire("transformend",{action:this.yA,type:"transformend"})),this.mouseAction="moving",this.AA="translate",this.map.config("zoomable",!0),this.map.config("draggable",!0),this.layerRenderer&&this.layerRenderer.setToRedraw()}aA(){const A=this.TransformHelper.planeHelper.getMeshes()[0][0],t=this.map.getBearing();A.rotation[2]=-t,this.bA()}bA(){this.IA()&&(this.TransformHelper.updateMatrix(this.map,this.cA,0,0,[0,0,0]),this.mA=!0)}picked(A){if(!this.layerRenderer)return!1;const t=this.uA(),s=this.map;let n=A;A instanceof e.Point||(n=s.coordinateToContainerPoint(new e.Coordinate(A)));const i=this.fA(n,t,"picked");return!(!i||null===i.meshId)}CA(){const A=this.TransformHelper.getMeshes("scaling").scaling[0][0],t=340/177;A.scaling=[.6*t,.6*t,.6*t],this.layerRenderer&&(this.PA(A),this.QA())}QA(){this.TransformHelper._meshes.translate.forEach((A=>{for(let t=0;t<A.length;t++){const e=A[t];uA.indexOf(e.getUniform("uPickingId"))>-1&&e.material.set("color",e.originColor)}}))}PA(A){const e=this.cA.getCoordinates(),s=this.map.coordinateToPointAtRes(e,this.map.getGLRes()),n=[s.x,s.y,0],i=this.cA.getTranslation();t.vec3.add(n,n,i);const r=t.vec3.copy([],A.translate),o=A.scaling;let a=J(this.cA,this.map);a=t.vec3.set([],a,a,a),t.vec3.multiply(r,r,a),t.vec3.multiply(a,a,o),t.vec3.add(r,r,n),t.mat4.fromRotationTranslationScale(A.localTransform,[0,0,0,1],r,a);this.uA().forEach((A=>{const e=A.getUniform("uPickingId");if(1===e||3===e||2===e||4===e){const e=t.vec3.copy([],A.translate),s=170/177;A.scaling=[s,s,s];const i=A.scaling,r=A.rotation;let o=J(this.cA,this.map);o=t.vec3.set([],o,o,o),t.vec3.multiply(e,e,o),t.vec3.multiply(o,o,i),t.vec3.add(e,e,n);const a=t.quat.fromEuler([],r[0],r[1],r[2]);t.mat4.fromRotationTranslationScale(A.localTransform,a,e,o)}}))}dA(A){const t=this.map.containerPointToCoordinate(A),e=this.map.coordinateToPointAtRes(t,this.map.getGLRes());return{point:[e.x,e.y]}}lA(A){if("transform"===this.mouseAction){const A=this.sA(),s=this.cA.getTranslation(),n=this.cA.getPointZ(),i=this.cA.getCoordinates(),r=this.map.coordinateToPointAtRes(i,this.map.getGLRes()),o=this.cA.getRotation(),a=this.cA.getScale();let h=null,c=null;if(s[2]+n<.01&&"z-translate"!==this.yA)h=this.dA(this.currentMousePosition),c=this.dA(this.lastMousePosition);else{const A=this.TransformHelper.planeHelper.getMeshes()[0];if(h=this.fA(this.currentMousePosition,A,"plane"),c=this.fA(this.lastMousePosition,A,"plane"),!h||null===h.meshId||!c||null===c.meshId)return}const I=[0,0,0],u=[0,0,0];let f=0,g=0,w=0;if("translate"===A){if("xy-translate"===this.yA){const A=h.point[0]-c.point[0],t=h.point[1]-c.point[1];I[0]=A,I[1]=t}else if("x-translate"===this.yA){const A=h.point[0]-c.point[0];I[0]=A}else if("y-translate"===this.yA){const A=h.point[1]-c.point[1];I[1]=A}else if("z-translate"===this.yA){let A=0;if(this.vA()){const s=this.map.getGLRes(),n=this.map._pointAtResToContainerPoint(new e.Point(c.point[0],c.point[1]),s),i=this.map._pointAtResToContainerPoint(new e.Point(h.point[0],h.point[1]),s),r=t.vec2.length(t.vec2.set(BA,h.point[0]-c.point[0],h.point[1]-c.point[1]));A=i.y<n.y?r:-r}else A=h.point[2]-c.point[2];I[2]=Math.sign(A)*this.map.pointAtResToAltitude(A,this.map.getGLRes())}}else if("rotation"===A)g=this.pA(h.point,c.point),g>=0?this.TransformHelper.$(!0):this.TransformHelper.$(!1),u[2]+=g;else if("scaling"===A){const A=this.MA(),e=t.vec2.length(t.vec2.set(BA,this.firstDownPoint.point[0]-A[0],this.firstDownPoint.point[1]-A[1])),s=t.vec2.length(t.vec2.set(BA,c.point[0]-A[0],c.point[1]-A[1]));f=this.EA(h.point,c.point,A,s,a),w=this.EA(h.point,c.point,A,e)}const l=t.vec3.set([],r.x,r.y,i.z||0),m=t.vec3.add(l,l,I),B=this.map.pointAtResToCoordinate(new e.Coordinate(m[0],m[1]),this.map.getGLRes());B.z=m[2];let C=null;C=f>=0?f:f*(this.options&&this.options.scaleStrength||1);const y=t.vec3.add(a,t.vec3.set(BA,C,C*(a[1]/a[0]),C*(a[2]/a[0])),a);if(Math.min(...y)<gA){const A=Math.min(...a);y[0]=a[0]*(gA/A),y[1]=a[1]*(gA/A),y[2]=a[2]*(gA/A)}const b=t.vec3.add(o,u,o);this.TransformHelper.updateMatrix(this.map,this.cA,g,w,I),this.yA.indexOf("translate")>-1?this.fire("positionchange",{action:this.yA,type:"positionchange",target:this.cA,coordinate:B}):this.fire("transforming",{action:this.yA,type:"transforming",target:this.cA,translate:s,rotation:b,scale:y})}this.lastMousePosition=A,this.lastPickingObject=this.currentPickingObject;const s=this.uA();this.lastPickingMesh=s[this.currentPickingObject.meshId]}EA(A,e,s,n,i){const r=(t.vec2.length(t.vec2.set(BA,A[0]-s[0],A[1]-s[1]))-t.vec2.length(t.vec2.set(BA,e[0]-s[0],e[1]-s[1])))/n;return i?(i[0]-gA)*r:r}MA(){const A=this.map,e=this.cA.getCoordinates(),s=A.coordinateToPointAtRes(e,A.getGLRes()),n=t.vec3.set(CA,s.x,s.y,0),i=this.cA.getTranslation();return t.vec3.add(n,n,i),n}gA(A){const e=this.TransformHelper.planeHelper.getMeshes()[0][0],s=t.mat4.getTranslation(mA,e.localTransform),n=t.mat4.getScaling(lA,e.localTransform);let i=t.quat.fromEuler(wA,0,0,0);const r=this.map.getBearing();A&&!this.vA()?(i=t.quat.fromEuler(wA,90,0,-r),0===e.rotation[0]&&(this.mA=!0),t.vec3.set(e.rotation,90,0,-r)):(90===e.rotation[0]&&(this.mA=!0),t.vec3.set(e.rotation,0,0,-r)),t.mat4.fromRotationTranslationScale(e.localTransform,i,s,n)}vA(){if(this.map.getPitch())return!1;const A=this.map.cameraPosition,e=this.map.coordinateToPointAtRes(this.map.getCenter(),this.map.getGLRes());t.vec3.set(e,e.x,e.y,0);const s=this.cA.getCoordinates(),n=this.map.coordinateToPointAtRes(s,this.map.getGLRes()),i=this.cA.getTranslation(),r=t.vec3.set(mA,n.x,n.y,0),o=t.vec3.add(r,r,i),a=t.vec3.subtract([],A,o),h=t.vec3.subtract([],A,e);return t.vec3.angle(a,h)<1/180*Math.PI}wA(){const A=this.uA();if(this.currentPickingObject&&null!=this.currentPickingObject.meshId){this.DA(),this.lastPickingObject&&null!=this.lastPickingObject.meshId&&this.lastPickingObject.meshId!==this.currentPickingObject.meshId&&this.xA();const t=A[this.currentPickingObject.meshId];if(t&&IA.indexOf(this.currentPickingObject.pickingId)<0){const A=[t.originColor[0],t.originColor[1],t.originColor[2],.8];t.material.set("color",A),this.FA(t,.5)}this.layerRenderer.setToRedraw()}else this.lastPickingObject&&null!=this.lastPickingObject.meshId&&(this.map.resetCursor(),this.xA(),this.layerRenderer.setToRedraw())}DA(){6===this.currentPickingObject.pickingId?this.map.setCursor("ns-resize"):aA.indexOf(this.currentPickingObject.pickingId)>-1?this.map.setCursor("move"):this.map.setCursor("pointer")}xA(){const A=this.lastPickingMesh;if(!A)return;const t=A.getUniform("uPickingId"),e=this.uA();aA.indexOf(t)>-1?e.forEach((A=>{aA.indexOf(A.getUniform("uPickingId"))>-1&&A.material.set("color",A.originColor)})):fA.indexOf(t)>-1?e.forEach((A=>{const t=A.getUniform("uPickingId");uA.indexOf(t)>-1&&A.material.set("color",A.originColor)})):11===t&&e.forEach((A=>{uA.indexOf(A.getUniform("uPickingId"))>-1&&A.material.set("color",A.originColor)})),A.material.set("color",A.originColor)}FA(A,t){const e=A.getUniform("uPickingId"),s=this.uA();aA.indexOf(e)>-1?s.forEach((e=>{if(aA.indexOf(e.getUniform("uPickingId"))>-1&&e.getUniform("uPickingId")!==A.getUniform("uPickingId")){const A=[e.originColor[0],e.originColor[1],e.originColor[2],t];e.material.set("color",A)}})):"scaling"===this.AA?s.forEach((A=>{const t=A.getUniform("uPickingId");if(1===t||3===t||2===t||4===t){const t=[149/255,179/255,199/255,.8];A.material.set("color",t)}})):"rotation"===this.AA&&s.forEach((A=>{const t=A.getUniform("uPickingId");if(1===t||3===t||2===t||4===t){const t=A.originColor;A.material.set("color",[t[0],t[1],t[2],0])}}))}reset(){if(!this.map||!this.cA)return;this.cA.setTranslation(this.cA.originTrans),this.cA.setRotation(this.UA),this.cA.setScale(this.kA);const A=this.cA.getTranslation();t.vec3.scale(A,A,-1),this.TransformHelper.updateMatrix(this.map,this.cA,0,1,[0,0,0])}pA(A,e){const s=this.MA(),n=t.vec2.set(yA,e[0]-s[0],e[1]-s[1]),i=t.vec2.set(bA,A[0]-s[0],A[1]-s[1]),r=Math.atan2(n[1],n[0]);return(Math.atan2(i[1],i[0])-r)/Math.PI*180}BA(A){return this.yA=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",this.yA}transform(A){if(this.layerRenderer&&this.layerRenderer.layer&&(this.layerRenderer.layer.off("renderend",this.render),this.layerRenderer.layer.off("resizeCanvas",this.OA)),this.cA&&(this.cA.off("remove",this.LA,this),delete this.cA),this.cA=A,this.cA.on("remove",this.LA,this),!this.map)return void console.error("should add to a target first");const t=this.map;this.cA.originTrans||(this.cA.originTrans=this.cA.getTranslation(),this.cA.originRotation=this.cA.getRotation(),this.cA.originScale=this.cA.getScale()),this.TransformHelper.updateMatrix(t,A,0,0,[0,0,0]),this.SA(),this.mA=!0}getTransformTarget(){return this.cA}LA(){delete this.cA}SA(){const A=this.cA.getLayer();A&&(A.off("renderend",this.render),A.off("resizeCanvas",this.OA));const e=this.map.getLayers();let s=null;for(let A=0;A<e.length;A++)if(e[A]instanceof t.GroupGLLayer){s=e[A];break}if(!s)return;const n=s.getLayers(),i=n.indexOf(A);if(i<0)return;n.splice(i,1),n.push(A);const r=this.map,o=A.getRenderer();this.layerRenderer=o,this.regl=o.regl,this.renderer=o.renderer,this.VA=this.layerRenderer.getFBORayPicking(),this.TA={projViewMatrix:r.projViewMatrix},A.on("renderend",this.render,this),A.on("resizeCanvas",this.OA,this),o.setToRedraw()}OA(){this.VA.clear(),this.mA=!0}fA(A,t,e){const s=this.map;if(!(s&&this.VA&&this.layerRenderer&&this.layerRenderer.canvas))return null;const n=s.getDevicePixelRatio(),i=A.x*n,r=A.y*n,o={projViewMatrix:this.map.projViewMatrix,pointSize:1},a=this.layerRenderer.canvas.gl&&this.layerRenderer.canvas.gl.wrap;(this.mA||a||!this.NA||this.NA!==e)&&(this.VA.render(t,o,!0),this.NA=e,this.mA=!1);return this.VA.pick(i,r,10,o,{viewMatrix:this.map.viewMatrix,projMatrix:this.map.projMatrix,returnPoint:!0})}hA(){const A=this.map.getDevicePixelRatio(),e={x:0,y:0,width:()=>this.map?this.map.width*A:1,height:()=>this.map?this.map.height*A:1};this._A=new t.reshader.MeshShader({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",frag:"precision mediump float;\n\nuniform vec4 color;\n\n\n\nvoid main() {\n\n gl_FragColor = color;\n\n}\n\n",uniforms:["color",{name:"projViewModelMatrix",type:"function",fn:function(A,e){return t.mat4.multiply([],e.projViewMatrix,e.modelMatrix)}}],extraCommandProps:{viewport:e,depth:{enable:!0,func:"always",mask:!1,range:[0,0]},blend:{enable:!0,func:{src:"src alpha",dst:"one minus src alpha"},equation:"add"}},defines:{}})}render(){if(!this.IA())return;const A=this.uA();this.helperScene.setMeshes(A);const t=this.layerRenderer.getFrameContext();if(t&&t.renderTarget&&this.layerRenderer.getFrameTimestamp()!==t.timestamp)return;this.bA(),this._A.filter=t&&t.sceneFilter;const e=t&&t.renderTarget&&t.renderTarget.fbo;this.renderer.render(this._A,this.TA,this.helperScene,e)}uA(){let A=[];const t=this.TransformHelper.getMeshes(this.AA);for(const e in t){if("translate"===e)continue;const s=t[e];for(let t=0;t<s.length;t++)A=A.concat(s[t])}const e=t.translate;for(let t=0;t<e.length;t++)A=A.concat(e[t]);return A}IA(){const A=this.layerRenderer,t=A&&A.layer;return A&&this.cA&&t&&t.isVisible()&&this.cA.isVisible()&&this.regl&&this.tA}}PA.mergeOptions({scaleStrength:2}),A.TransformControl=PA,Object.defineProperty(A,"A",{value:!0}),"undefined"!=typeof console&&console.log("@maptalks/transform-control v0.8.0")}));
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * @maptalks/transform-control v0.7.0
2
+ * @maptalks/transform-control v0.8.0
3
3
  * LICENSE : UNLICENSED
4
- * (c) 2016-2022 maptalks.org
4
+ * (c) 2016-2023 maptalks.org
5
5
  */
6
6
  import { quat as A, mat4 as t, reshader as e, vec3 as s, vec2 as i, GroupGLLayer as n } from "@maptalks/gl";
7
7
 
@@ -1325,4 +1325,4 @@ R.mergeOptions({
1325
1325
 
1326
1326
  export { R as TransformControl };
1327
1327
 
1328
- "undefined" != typeof console && console.log("@maptalks/transform-control v0.7.0");
1328
+ "undefined" != typeof console && console.log("@maptalks/transform-control v0.8.0");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptalks/transform-control",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "a plugin to control model's translate、rotation and scale",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -50,7 +50,7 @@
50
50
  "mocha": "^5.2.0"
51
51
  },
52
52
  "dependencies": {
53
- "@maptalks/gl": "<2.0.0",
54
- "@maptalks/gltf-loader": "^0.11.1"
53
+ "@maptalks/gl": "^0.81.0",
54
+ "@maptalks/gltf-loader": "^0.27.2"
55
55
  }
56
56
  }