🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@maptalks/video-layer

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maptalks/video-layer - npm Package Compare versions

Comparing version
0.102.2
to
0.102.3
+2
-2
dist/maptalks.video.es.js
/*!
* @maptalks/video-layer v0.102.2
* @maptalks/video-layer v0.102.3
* LICENSE : UNLICENSED

@@ -11,3 +11,3 @@ * (c) 2016-2025 maptalks.org

* https://github.com/mrdoob/three.js
*/for(var c=[],u=0;u<6;u++)c[u]=[];var p=[];function f(t,e,i){var s,r,o,n,a,h,l,d,u,f,_,g,x,w,y,b,O;r=(s=t)[0],o=s[1],n=s[2],a=s[3],h=s[4],l=s[5],d=s[6],u=s[7],f=s[8],_=s[9],g=s[10],x=s[11],w=s[12],y=s[13],b=s[14],O=s[15],m(c[0],a-r,u-h,x-f,O-w),m(c[1],a+r,u+h,x+f,O+w),m(c[2],a+o,u+l,x+_,O+y),m(c[3],a-o,u-l,x-_,O-y),m(c[4],a-n,u-d,x-g,O-b),m(c[5],a+n,u+d,x+g,O+b);for(var S=0;S<6;S++){var T=c[S];if(p[0]=T[0]>0?e[1][0]:e[0][0],p[1]=T[1]>0?e[1][1]:e[0][1],p[2]=T[2]>0?e[1][2]:e[0][2],v(T,p)<0)return!1}return!0}function m(t,e,i,s,r){var o=1/Math.sqrt(e*e+i*i+s*s);return t[0]=e*o,t[1]=i*o,t[2]=s*o,t[3]=r*o,t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]}const _={vert:"\n attribute vec3 aPosition;\n attribute vec2 aTexCoord;\n uniform mat4 projViewModelMatrix;\n uniform mat4 positionMatrix;\n uniform mat4 modelMatrix;\n varying vec2 vTexCoords;\n #include <get_output>\n void main()\n {\n mat4 localPositionMatrix = getPositionMatrix();\n vec4 localPosition = getPosition(aPosition);\n gl_Position = projViewModelMatrix * localPositionMatrix * localPosition;\n vTexCoords = aTexCoord;\n }\n",frag:"\n precision mediump float;\n uniform sampler2D videoTexture;\n uniform float opacity;\n\n varying vec2 vTexCoords;\n void main() {\n vec4 color = texture2D(videoTexture, vTexCoords);\n gl_FragColor = color * opacity;\n }\n",uniforms:[{name:"projViewModelMatrix",type:"function",fn:(t,e)=>l.multiply([],e.projViewMatrix,e.modelMatrix)},"texture","opacity"],positionAttribute:"POSITION",extraCommandProps:{depth:{enable:!0,func:"always"},cull:{enable:!1,face:"back"},frontFace:"cw",blend:{enable:!0,func:{src:"src alpha",dst:"one minus src alpha"},equation:"add"}}},g=[1,0,3,3,2,1];class x extends t.renderer.CanvasRenderer{constructor(t){super(t),this.t={}}draw(t,e){this.prepareCanvas(),this.i(e)}drawOnInteracting(t,e,i){this.i(i)}needToRedraw(){return!0}hitDetect(){return!1}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap(),this.regl=this.canvas.gl.regl;else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,stencil:!0};this.glOptions=t,this.gl=this.gl||this.o(this.canvas,t),this.regl=a({gl:this.gl,extensions:["ANGLE_instanced_arrays","OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear","EXT_shader_texture_lod","OES_element_index_uint","OES_standard_derivatives","WEBGL_depth_texture"],optionalExtensions:this.layer.options.glExtensions||[]})}this.h(),this.l();const t=this.layer.getVideoSurfaces();for(let e=0;e<t.length;e++)this.u(t[e])}o(t,e){const i=["webgl","experimental-webgl"];let s=null;for(let r=0;r<i.length;++r){try{s=t.getContext(i[r],e)}catch(t){}if(s)break}return s}l(){const t=this.layer.getMap(),e=new h.Renderer(this.regl);this.renderer=e,this.p={projMatrix:t.projMatrix,projViewMatrix:t.projViewMatrix,viewMatrix:t.viewMatrix,halton:[.2107,-.0202],uHalton:[.2107,-.0202],uCameraPosition:t.cameraPosition,cameraPosition:t.cameraPosition,globalTexSize:[t.width,t.height]}}m(){return this.regl}h(){this.viewport={x:0,y:0,width:()=>this.canvas?this.canvas.width:1,height:()=>this.canvas?this.canvas.height:1},this.v()}v(){this._&&this._.dispose(),this.layer.options.showTopAlways?(_.extraCommandProps.depth.mask=!1,_.extraCommandProps.depth.range=[0,0]):(delete _.extraCommandProps.depth.mask,delete _.extraCommandProps.depth.range),_.extraCommandProps.cull.enable=!this.layer.options.doubleSide,this._=new h.MeshShader(_)}u(t){const e=this.regl.texture(),i=new h.Material({videoTexture:e,opacity:1}),s=t.getCoordinates(),{worldCenter:r,points:o}=this.O(s),n=this.S(o),a=new h.Mesh(n,i);this.T(a,r);const l=new h.Scene(a),d=t.C();this.t[d]=l}M(t){const e=t.C(),i=this.t[e].getMeshes()[0],s=t.getCoordinates();i.geometry.dispose();const{worldCenter:r,points:o}=this.O(s),n=this.S(o);i.geometry=n,this.T(i,r)}i(t){const e=this.layer.getVideoSurfaces().filter((t=>t.isVisible()));if(!e.length)return;const i=this.P(e);if(!i)return;let s=null;t&&(s=t.renderTarget&&t.renderTarget.fbo),this.renderer.render(this._,this.p,i,s)}S(t){return new h.Geometry({POSITION:t,TEXCOORD:[0,0,1,0,1,1,0,1]},g,0,{primitive:"triangles",positionAttribute:"POSITION",uv0Attribute:"TEXCOORD",normalAttribute:"NORMAL",positionSize:3})}O(e){let i=[];const s=this.getMap(),r=new t.Polygon(e).getCenter(),o=w(s,r,0);return this.V=o,s&&e.forEach((e=>{const r=new t.Coordinate(e[0],e[1]),n=s.altitudeToPoint(e[2]||0,s.getGLRes()),a=w(s,r,n);a[0]=a[0]-o[0],a[1]=a[1]-o[1],i=i.concat(a)})),{worldCenter:o,points:i}}P(t){const e=[],i=this.layer.getMap();for(let s=0;s<t.length;s++){const r=t[s],o=this.t[r.C()];if(!o)continue;const n=o.getMeshes();for(let t=0;t<n.length;t++){const s=n[t],o=s.getMaterial(),a=o.get("videoTexture");a&&r.A()&&(a(r.video),o.set("opacity",r.getOpacity())),f(i.projViewMatrix,s.getBoundingBox())&&e.push(s)}}return e.length?new h.Scene(e):null}T(t,e){l.fromRotationTranslationScale(t.localTransform,d.fromEuler([],0,0,0),e,[1,1,1])}remove(){this._&&this._.dispose(),super.remove()}clearCanvas(){this.canvas&&(this.regl.clear({color:[0,0,0,0],depth:1,stencil:0}),super.clearCanvas())}k(t){const e=this.t[t];if(!e)return;e.getMeshes().forEach((t=>{t.geometry.dispose(),t.material&&t.material.dispose(),t.dispose()}))}}function w(t,e,i){if(!t)return null;const s=t.coordinateToPointAtRes(e,t.getGLRes());return[s.x,s.y,i]}class y extends(e(i(s))){constructor(t,e){super(e),this.setCoordinates(t),this.I()}setCoordinates(t){this.R=t}getCoordinates(){return this.R}setVideo(t){this.D="stop",this.options.url=t,delete this.options.elementId,this.I()}setElementId(t){this.D="stop",this.options.elementId=t,delete this.options.url,this.I()}I(){this.D="stop";const t=this.options.url,e=this.options.elementId;let i=document.getElementById(e);if(t&&(i=document.createElement("video"),i.src=t),!i)throw new Error("there is no element or url setting for video mask");i.autoplay=!0,i.loop=!0,i.muted=!0,i.play(),i.addEventListener("playing",(()=>{this.D="playing",this.fire("playing",{state:this.D,url:t})})),i.addEventListener("pause",(()=>{this.D="pause",this.fire("pause",{state:this.D,url:t})})),i.addEventListener("error",(()=>{throw this.D="pause",this.fire("error",{state:this.D,url:t}),new Error("video resource load error")})),this.video=i}getVideo(){return this.video}L(t){this.j=t}C(){return this.j}addTo(t){if(this.F)throw new Error("VideoSurface cannot be added to two or more layers at the same time.");return t.addSurfaces(this),this}show(){return this.options.visible=!0,this}hide(){return this.options.visible=!1,this}isVisible(){return this.options.visible}play(){this.video&&this.video.play()}pause(){this.video&&this.video.pause()}setAudio(t){this.video.muted=t}setOpacity(t){this.options.opacity=t}getOpacity(){return this.options.opacity}remove(){delete this.video;const t=this.getLayer();t&&t.removeVideoSurfaces(this),this.endEdit()}getLayer(){return this.F}A(){return"playing"===this.D}startEdit(){const t=this.getLayer();if(!t)return void console.warn("videosurface should be added to a map before edit");const e=t.getMap();if(!e)return void console.warn("videosurface should be added to a map before edit");if(this.N(),!this.G){const i=t.getId();this.G=new r(`internal_${i}_edit`,{enableAltitude:!0}).addTo(e)}const i=this.getCoordinates();this.H=new o(i,{symbol:{lineColor:"#34495e",lineWidth:2,polygonFill:"rgb(135,196,240)",polygonOpacity:.1}}).addTo(this.G),this.H.startEdit({newVertexHandleSymbol:{polygonFill:"rgba(0, 0, 0, 0)",polygonOpacity:0,markerType:"ellipse",markerWidth:1,markerHeight:1}}),this.H.on("shapechange",(e=>{const i=e.target.getCoordinates()[0].slice(0,4).map((t=>[t.x,t.y,0]));this.setCoordinates(i);t.getRenderer().M(this)}),this)}endEdit(){this.G&&(this.H.endEdit(),this.H.remove(),this.G.remove()),delete this.G,delete this.H}N(){this.G&&this.G.clear(),delete this.H}}y.mergeOptions({opacity:1,visible:!0});class b extends n{constructor(t,e,i){!e||Array.isArray(e)||e instanceof y||(i=e,e=null),super(t,i),this.W={},this.videoId=0,this.W={},this.videoId=0,e&&this.addSurfaces(e)}addSurfaces(t){if(t)if(Array.isArray(t))t.forEach((t=>{this.addMarker(t)}));else{t.F=this,this.W[this.videoId]=t,t.L(this.videoId);const e=this.getRenderer();e?e.m()&&e.u(t):this.on("renderercreate",(e=>{e.renderer.m()&&e.renderer.u(t)})),this.videoId++}}showTopAlways(t){this.options.showTopAlways=t;const e=this.getRenderer();e&&e.v()}setDoubleSide(t){this.options.doubleSide=t;const e=this.getRenderer();e&&e.v()}getVideoSurfaces(){const t=[];for(const e in this.W)t.push(this.W[e]);return t}removeVideoSurfaces(t){if(Array.isArray(t))t.forEach((t=>{this.removeVideoSurfaces(t)}));else{const e=t.C(),i=this.getRenderer();i&&i.k(e),delete this.W[e]}}remove(){this.clear(),super.remove()}clear(){const t=this.getVideoSurfaces();for(let e=0;e<t.length;e++)t[e].remove()}}b.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,markerEvents:!0,forceRenderOnZooming:!0,forceRenderOnMoving:!0,forceRenderOnRotating:!0,showTopAlways:!0,doubleSide:!0}),b.registerJSONType("VideoLayer"),b.registerRenderer("gl",x);export{b as VideoLayer,y as VideoSurface};"undefined"!=typeof console&&console.log("@maptalks/video-layer v0.102.2");
*/for(var c=[],u=0;u<6;u++)c[u]=[];var p=[];function f(t,e,i){var s,r,o,n,a,h,l,d,u,f,_,g,x,w,y,b,O;r=(s=t)[0],o=s[1],n=s[2],a=s[3],h=s[4],l=s[5],d=s[6],u=s[7],f=s[8],_=s[9],g=s[10],x=s[11],w=s[12],y=s[13],b=s[14],O=s[15],m(c[0],a-r,u-h,x-f,O-w),m(c[1],a+r,u+h,x+f,O+w),m(c[2],a+o,u+l,x+_,O+y),m(c[3],a-o,u-l,x-_,O-y),m(c[4],a-n,u-d,x-g,O-b),m(c[5],a+n,u+d,x+g,O+b);for(var S=0;S<6;S++){var T=c[S];if(p[0]=T[0]>0?e[1][0]:e[0][0],p[1]=T[1]>0?e[1][1]:e[0][1],p[2]=T[2]>0?e[1][2]:e[0][2],v(T,p)<0)return!1}return!0}function m(t,e,i,s,r){var o=1/Math.sqrt(e*e+i*i+s*s);return t[0]=e*o,t[1]=i*o,t[2]=s*o,t[3]=r*o,t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]}const _={vert:"\n attribute vec3 aPosition;\n attribute vec2 aTexCoord;\n uniform mat4 projViewModelMatrix;\n uniform mat4 positionMatrix;\n uniform mat4 modelMatrix;\n varying vec2 vTexCoords;\n #include <get_output>\n void main()\n {\n mat4 localPositionMatrix = getPositionMatrix();\n vec4 localPosition = getPosition(aPosition);\n gl_Position = projViewModelMatrix * localPositionMatrix * localPosition;\n vTexCoords = aTexCoord;\n }\n",frag:"\n precision mediump float;\n uniform sampler2D videoTexture;\n uniform float opacity;\n\n varying vec2 vTexCoords;\n void main() {\n vec4 color = texture2D(videoTexture, vTexCoords);\n gl_FragColor = color * opacity;\n }\n",uniforms:[{name:"projViewModelMatrix",type:"function",fn:(t,e)=>l.multiply([],e.projViewMatrix,e.modelMatrix)},"texture","opacity"],positionAttribute:"POSITION",extraCommandProps:{depth:{enable:!0,func:"always"},cull:{enable:!1,face:"back"},frontFace:"cw",blend:{enable:!0,func:{src:"src alpha",dst:"one minus src alpha"},equation:"add"}}},g=[1,0,3,3,2,1];class x extends t.renderer.CanvasRenderer{constructor(t){super(t),this.t={}}draw(t,e){this.prepareCanvas(),this.i(e)}drawOnInteracting(t,e,i){this.i(i)}needToRedraw(){return!0}hitDetect(){return!1}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap(),this.regl=this.canvas.gl.regl;else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,stencil:!0};this.glOptions=t,this.gl=this.gl||this.o(this.canvas,t),this.regl=a({gl:this.gl,extensions:["ANGLE_instanced_arrays","OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear","EXT_shader_texture_lod","OES_element_index_uint","OES_standard_derivatives","WEBGL_depth_texture"],optionalExtensions:this.layer.options.glExtensions||[]})}this.h(),this.l();const t=this.layer.getVideoSurfaces();for(let e=0;e<t.length;e++)this.u(t[e])}o(t,e){const i=["webgl","experimental-webgl"];let s=null;for(let r=0;r<i.length;++r){try{s=t.getContext(i[r],e)}catch(t){}if(s)break}return s}l(){const t=this.layer.getMap(),e=new h.Renderer(this.regl);this.renderer=e,this.p={projMatrix:t.projMatrix,projViewMatrix:t.projViewMatrix,viewMatrix:t.viewMatrix,halton:[.2107,-.0202],uHalton:[.2107,-.0202],uCameraPosition:t.cameraPosition,cameraPosition:t.cameraPosition,globalTexSize:[t.width,t.height]}}m(){return this.regl}h(){this.viewport={x:0,y:0,width:()=>this.canvas?this.canvas.width:1,height:()=>this.canvas?this.canvas.height:1},this.v()}v(){this._&&this._.dispose(),this.layer.options.showTopAlways?(_.extraCommandProps.depth.mask=!1,_.extraCommandProps.depth.range=[0,0]):(delete _.extraCommandProps.depth.mask,delete _.extraCommandProps.depth.range),_.extraCommandProps.cull.enable=!this.layer.options.doubleSide,this._=new h.MeshShader(_)}u(t){const e=this.regl.texture(),i=new h.Material({videoTexture:e,opacity:1}),s=t.getCoordinates(),{worldCenter:r,points:o}=this.O(s),n=this.S(o),a=new h.Mesh(n,i);this.T(a,r);const l=new h.Scene(a),d=t.C();this.t[d]=l}M(t){const e=t.C(),i=this.t[e].getMeshes()[0],s=t.getCoordinates();i.geometry.dispose();const{worldCenter:r,points:o}=this.O(s),n=this.S(o);i.geometry=n,this.T(i,r)}i(t){const e=this.layer.getVideoSurfaces().filter((t=>t.isVisible()));if(!e.length)return;const i=this.P(e);if(!i)return;let s=null;t&&(s=t.renderTarget&&t.renderTarget.fbo),this.renderer.render(this._,this.p,i,s)}S(t){return new h.Geometry({POSITION:t,TEXCOORD:[0,0,1,0,1,1,0,1]},g,0,{primitive:"triangles",positionAttribute:"POSITION",uv0Attribute:"TEXCOORD",normalAttribute:"NORMAL",positionSize:3})}O(e){let i=[];const s=this.getMap(),r=new t.Polygon(e).getCenter(),o=w(s,r,0);return this.V=o,s&&e.forEach((e=>{const r=new t.Coordinate(e[0],e[1]),n=s.altitudeToPoint(e[2]||0,s.getGLRes()),a=w(s,r,n);a[0]=a[0]-o[0],a[1]=a[1]-o[1],i=i.concat(a)})),{worldCenter:o,points:i}}P(t){const e=[],i=this.layer.getMap();for(let s=0;s<t.length;s++){const r=t[s],o=this.t[r.C()];if(!o)continue;const n=o.getMeshes();for(let t=0;t<n.length;t++){const s=n[t],o=s.getMaterial(),a=o.get("videoTexture");a&&r.A()&&(a(r.video),o.set("opacity",r.getOpacity())),f(i.projViewMatrix,s.getBoundingBox())&&e.push(s)}}return e.length?new h.Scene(e):null}T(t,e){l.fromRotationTranslationScale(t.localTransform,d.fromEuler([],0,0,0),e,[1,1,1])}remove(){this._&&this._.dispose(),super.remove()}clearCanvas(){this.canvas&&(this.regl.clear({color:[0,0,0,0],depth:1,stencil:0}),super.clearCanvas())}k(t){const e=this.t[t];if(!e)return;e.getMeshes().forEach((t=>{t.geometry.dispose(),t.material&&t.material.dispose(),t.dispose()}))}}function w(t,e,i){if(!t)return null;const s=t.coordinateToPointAtRes(e,t.getGLRes());return[s.x,s.y,i]}class y extends(e(i(s))){constructor(t,e){super(e),this.setCoordinates(t),this.I()}setCoordinates(t){this.R=t}getCoordinates(){return this.R}setVideo(t){this.D="stop",this.options.url=t,delete this.options.elementId,this.I()}setElementId(t){this.D="stop",this.options.elementId=t,delete this.options.url,this.I()}I(){this.D="stop";const t=this.options.url,e=this.options.elementId;let i=document.getElementById(e);if(t&&(i=document.createElement("video"),i.src=t),!i)throw new Error("there is no element or url setting for video mask");i.autoplay=!0,i.loop=!0,i.muted=!0,i.play(),i.addEventListener("playing",(()=>{this.D="playing",this.fire("playing",{state:this.D,url:t})})),i.addEventListener("pause",(()=>{this.D="pause",this.fire("pause",{state:this.D,url:t})})),i.addEventListener("error",(()=>{throw this.D="pause",this.fire("error",{state:this.D,url:t}),new Error("video resource load error")})),this.video=i}getVideo(){return this.video}L(t){this.j=t}C(){return this.j}addTo(t){if(this.F)throw new Error("VideoSurface cannot be added to two or more layers at the same time.");return t.addSurfaces(this),this}show(){return this.options.visible=!0,this}hide(){return this.options.visible=!1,this}isVisible(){return this.options.visible}play(){this.video&&this.video.play()}pause(){this.video&&this.video.pause()}setAudio(t){this.video.muted=t}setOpacity(t){this.options.opacity=t}getOpacity(){return this.options.opacity}remove(){delete this.video;const t=this.getLayer();t&&t.removeVideoSurfaces(this),this.endEdit()}getLayer(){return this.F}A(){return"playing"===this.D}startEdit(){const t=this.getLayer();if(!t)return void console.warn("videosurface should be added to a map before edit");const e=t.getMap();if(!e)return void console.warn("videosurface should be added to a map before edit");if(this.N(),!this.G){const i=t.getId();this.G=new r(`internal_${i}_edit`,{enableAltitude:!0}).addTo(e)}const i=this.getCoordinates();this.H=new o(i,{symbol:{lineColor:"#34495e",lineWidth:2,polygonFill:"rgb(135,196,240)",polygonOpacity:.1}}).addTo(this.G),this.H.startEdit({newVertexHandleSymbol:{polygonFill:"rgba(0, 0, 0, 0)",polygonOpacity:0,markerType:"ellipse",markerWidth:1,markerHeight:1}}),this.H.on("shapechange",(e=>{const i=e.target.getCoordinates()[0].slice(0,4).map((t=>[t.x,t.y,0]));this.setCoordinates(i);t.getRenderer().M(this)}),this)}endEdit(){this.G&&(this.H.endEdit(),this.H.remove(),this.G.remove()),delete this.G,delete this.H}N(){this.G&&this.G.clear(),delete this.H}}y.mergeOptions({opacity:1,visible:!0});class b extends n{constructor(t,e,i){!e||Array.isArray(e)||e instanceof y||(i=e,e=null),super(t,i),this.W={},this.videoId=0,this.W={},this.videoId=0,e&&this.addSurfaces(e)}addSurfaces(t){if(t)if(Array.isArray(t))t.forEach((t=>{this.addMarker(t)}));else{t.F=this,this.W[this.videoId]=t,t.L(this.videoId);const e=this.getRenderer();e?e.m()&&e.u(t):this.on("renderercreate",(e=>{e.renderer.m()&&e.renderer.u(t)})),this.videoId++}}showTopAlways(t){this.options.showTopAlways=t;const e=this.getRenderer();e&&e.v()}setDoubleSide(t){this.options.doubleSide=t;const e=this.getRenderer();e&&e.v()}getVideoSurfaces(){const t=[];for(const e in this.W)t.push(this.W[e]);return t}removeVideoSurfaces(t){if(Array.isArray(t))t.forEach((t=>{this.removeVideoSurfaces(t)}));else{const e=t.C(),i=this.getRenderer();i&&i.k(e),delete this.W[e]}}remove(){this.clear(),super.remove()}clear(){const t=this.getVideoSurfaces();for(let e=0;e<t.length;e++)t[e].remove()}}b.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,markerEvents:!0,forceRenderOnZooming:!0,forceRenderOnMoving:!0,forceRenderOnRotating:!0,showTopAlways:!0,doubleSide:!0}),b.registerJSONType("VideoLayer"),b.registerRenderer("gl",x);export{b as VideoLayer,y as VideoSurface};"undefined"!=typeof console&&console.log("@maptalks/video-layer v0.102.3");
//# sourceMappingURL=maptalks.video.es.js.map
/*!
* @maptalks/video-layer v0.102.2
* @maptalks/video-layer v0.102.3
* LICENSE : UNLICENSED

@@ -11,3 +11,3 @@ * (c) 2016-2025 maptalks.org

* https://github.com/mrdoob/three.js
*/;n<6;n++)o[n]=[];var a=[];function h(t,e,i){var s,r,n,h,d,u,p,f,m,g,v,_,x,y,w,b,O;r=(s=t)[0],n=s[1],h=s[2],d=s[3],u=s[4],p=s[5],f=s[6],m=s[7],g=s[8],v=s[9],_=s[10],x=s[11],y=s[12],w=s[13],b=s[14],O=s[15],l(o[0],d-r,m-u,x-g,O-y),l(o[1],d+r,m+u,x+g,O+y),l(o[2],d+n,m+p,x+v,O+w),l(o[3],d-n,m-p,x-v,O-w),l(o[4],d-h,m-f,x-_,O-b),l(o[5],d+h,m+f,x+_,O+b);for(var T=0;T<6;T++){var S=o[T];if(a[0]=S[0]>0?e[1][0]:e[0][0],a[1]=S[1]>0?e[1][1]:e[0][1],a[2]=S[2]>0?e[1][2]:e[0][2],c(S,a)<0)return!1}return!0}function l(t,e,i,s,r){var o=1/Math.sqrt(e*e+i*i+s*s);return t[0]=e*o,t[1]=i*o,t[2]=s*o,t[3]=r*o,t}function c(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]}const d={vert:"\n attribute vec3 aPosition;\n attribute vec2 aTexCoord;\n uniform mat4 projViewModelMatrix;\n uniform mat4 positionMatrix;\n uniform mat4 modelMatrix;\n varying vec2 vTexCoords;\n #include <get_output>\n void main()\n {\n mat4 localPositionMatrix = getPositionMatrix();\n vec4 localPosition = getPosition(aPosition);\n gl_Position = projViewModelMatrix * localPositionMatrix * localPosition;\n vTexCoords = aTexCoord;\n }\n",frag:"\n precision mediump float;\n uniform sampler2D videoTexture;\n uniform float opacity;\n\n varying vec2 vTexCoords;\n void main() {\n vec4 color = texture2D(videoTexture, vTexCoords);\n gl_FragColor = color * opacity;\n }\n",uniforms:[{name:"projViewModelMatrix",type:"function",fn:(t,e)=>i.mat4.multiply([],e.projViewMatrix,e.modelMatrix)},"texture","opacity"],positionAttribute:"POSITION",extraCommandProps:{depth:{enable:!0,func:"always"},cull:{enable:!1,face:"back"},frontFace:"cw",blend:{enable:!0,func:{src:"src alpha",dst:"one minus src alpha"},equation:"add"}}},u=[1,0,3,3,2,1];class p extends r.renderer.CanvasRenderer{constructor(t){super(t),this.t={}}draw(t,e){this.prepareCanvas(),this.i(e)}drawOnInteracting(t,e,i){this.i(i)}needToRedraw(){return!0}hitDetect(){return!1}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap(),this.regl=this.canvas.gl.regl;else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,stencil:!0};this.glOptions=t,this.gl=this.gl||this.o(this.canvas,t),this.regl=i.createREGL({gl:this.gl,extensions:["ANGLE_instanced_arrays","OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear","EXT_shader_texture_lod","OES_element_index_uint","OES_standard_derivatives","WEBGL_depth_texture"],optionalExtensions:this.layer.options.glExtensions||[]})}this.h(),this.l();const t=this.layer.getVideoSurfaces();for(let e=0;e<t.length;e++)this.u(t[e])}o(t,e){const i=["webgl","experimental-webgl"];let s=null;for(let r=0;r<i.length;++r){try{s=t.getContext(i[r],e)}catch(t){}if(s)break}return s}l(){const t=this.layer.getMap(),e=new i.reshader.Renderer(this.regl);this.renderer=e,this.p={"projMatrix":t.projMatrix,"projViewMatrix":t.projViewMatrix,"viewMatrix":t.viewMatrix,"halton":[.2107,-.0202],"uHalton":[.2107,-.0202],"uCameraPosition":t.cameraPosition,"cameraPosition":t.cameraPosition,"globalTexSize":[t.width,t.height]}}m(){return this.regl}h(){this.viewport={x:0,y:0,width:()=>this.canvas?this.canvas.width:1,height:()=>this.canvas?this.canvas.height:1},this.v()}v(){this._&&this._.dispose(),this.layer.options.showTopAlways?(d.extraCommandProps.depth.mask=!1,d.extraCommandProps.depth.range=[0,0]):(delete d.extraCommandProps.depth.mask,delete d.extraCommandProps.depth.range),d.extraCommandProps.cull.enable=!this.layer.options.doubleSide,this._=new i.reshader.MeshShader(d)}u(t){const e=this.regl.texture(),s=new i.reshader.Material({videoTexture:e,opacity:1}),r=t.getCoordinates(),{worldCenter:o,points:n}=this.O(r),a=this.T(n),h=new i.reshader.Mesh(a,s);this.S(h,o);const l=new i.reshader.Scene(h),c=t.C();this.t[c]=l}M(t){const e=t.C(),i=this.t[e].getMeshes()[0],s=t.getCoordinates();i.geometry.dispose();const{worldCenter:r,points:o}=this.O(s),n=this.T(o);i.geometry=n,this.S(i,r)}i(t){const e=this.layer.getVideoSurfaces().filter((t=>t.isVisible()));if(!e.length)return;const i=this.P(e);if(!i)return;let s=null;t&&(s=t.renderTarget&&t.renderTarget.fbo),this.renderer.render(this._,this.p,i,s)}T(t){return new i.reshader.Geometry({POSITION:t,TEXCOORD:[0,0,1,0,1,1,0,1]},u,0,{primitive:"triangles",positionAttribute:"POSITION",uv0Attribute:"TEXCOORD",normalAttribute:"NORMAL",positionSize:3})}O(t){let e=[];const i=this.getMap(),s=new r.Polygon(t).getCenter(),o=f(i,s,0);return this.V=o,i&&t.forEach((t=>{const s=new r.Coordinate(t[0],t[1]),n=i.altitudeToPoint(t[2]||0,i.getGLRes()),a=f(i,s,n);a[0]=a[0]-o[0],a[1]=a[1]-o[1],e=e.concat(a)})),{worldCenter:o,points:e}}P(t){const e=[],s=this.layer.getMap();for(let i=0;i<t.length;i++){const r=t[i],o=this.t[r.C()];if(!o)continue;const n=o.getMeshes();for(let t=0;t<n.length;t++){const i=n[t],o=i.getMaterial(),a=o.get("videoTexture");a&&r.A()&&(a(r.video),o.set("opacity",r.getOpacity())),h(s.projViewMatrix,i.getBoundingBox())&&e.push(i)}}return e.length?new i.reshader.Scene(e):null}S(t,e){i.mat4.fromRotationTranslationScale(t.localTransform,i.quat.fromEuler([],0,0,0),e,[1,1,1])}remove(){this._&&this._.dispose(),super.remove()}clearCanvas(){this.canvas&&(this.regl.clear({color:[0,0,0,0],depth:1,stencil:0}),super.clearCanvas())}k(t){const e=this.t[t];if(!e)return;e.getMeshes().forEach((t=>{t.geometry.dispose(),t.material&&t.material.dispose(),t.dispose()}))}}function f(t,e,i){if(!t)return null;const s=t.coordinateToPointAtRes(e,t.getGLRes());return[s.x,s.y,i]}class m extends(e.Eventable(e.Handlerable(e.Class))){constructor(t,e){super(e),this.setCoordinates(t),this.j()}setCoordinates(t){this.I=t}getCoordinates(){return this.I}setVideo(t){this.R="stop",this.options.url=t,delete this.options.elementId,this.j()}setElementId(t){this.R="stop",this.options.elementId=t,delete this.options.url,this.j()}j(){this.R="stop";const t=this.options.url,e=this.options.elementId;let i=document.getElementById(e);if(t&&(i=document.createElement("video"),i.src=t),!i)throw new Error("there is no element or url setting for video mask");i.autoplay=!0,i.loop=!0,i.muted=!0,i.play(),i.addEventListener("playing",(()=>{this.R="playing",this.fire("playing",{state:this.R,url:t})})),i.addEventListener("pause",(()=>{this.R="pause",this.fire("pause",{state:this.R,url:t})})),i.addEventListener("error",(()=>{throw this.R="pause",this.fire("error",{state:this.R,url:t}),new Error("video resource load error")})),this.video=i}getVideo(){return this.video}D(t){this.L=t}C(){return this.L}addTo(t){if(this.F)throw new Error("VideoSurface cannot be added to two or more layers at the same time.");return t.addSurfaces(this),this}show(){return this.options.visible=!0,this}hide(){return this.options.visible=!1,this}isVisible(){return this.options.visible}play(){this.video&&this.video.play()}pause(){this.video&&this.video.pause()}setAudio(t){this.video.muted=t}setOpacity(t){this.options.opacity=t}getOpacity(){return this.options.opacity}remove(){delete this.video;const t=this.getLayer();t&&t.removeVideoSurfaces(this),this.endEdit()}getLayer(){return this.F}A(){return"playing"===this.R}startEdit(){const t=this.getLayer();if(!t)return void console.warn("videosurface should be added to a map before edit");const i=t.getMap();if(!i)return void console.warn("videosurface should be added to a map before edit");if(this.N(),!this.G){const s=t.getId();this.G=new e.VectorLayer(`internal_${s}_edit`,{enableAltitude:!0}).addTo(i)}const s=this.getCoordinates();this.H=new e.Polygon(s,{symbol:{lineColor:"#34495e",lineWidth:2,polygonFill:"rgb(135,196,240)",polygonOpacity:.1}}).addTo(this.G),this.H.startEdit({newVertexHandleSymbol:{polygonFill:"rgba(0, 0, 0, 0)",polygonOpacity:0,markerType:"ellipse",markerWidth:1,markerHeight:1}}),this.H.on("shapechange",(e=>{const i=e.target.getCoordinates()[0].slice(0,4).map((t=>[t.x,t.y,0]));this.setCoordinates(i);t.getRenderer().M(this)}),this)}endEdit(){this.G&&(this.H.endEdit(),this.H.remove(),this.G.remove()),delete this.G,delete this.H}N(){this.G&&this.G.clear(),delete this.H}}m.mergeOptions({opacity:1,visible:!0});class g extends e.Layer{constructor(t,e,i){!e||Array.isArray(e)||e instanceof m||(i=e,e=null),super(t,i),this.W={},this.videoId=0,this.W={},this.videoId=0,e&&this.addSurfaces(e)}addSurfaces(t){if(t)if(Array.isArray(t))t.forEach((t=>{this.addMarker(t)}));else{t.F=this,this.W[this.videoId]=t,t.D(this.videoId);const e=this.getRenderer();e?e.m()&&e.u(t):this.on("renderercreate",(e=>{e.renderer.m()&&e.renderer.u(t)})),this.videoId++}}showTopAlways(t){this.options.showTopAlways=t;const e=this.getRenderer();e&&e.v()}setDoubleSide(t){this.options.doubleSide=t;const e=this.getRenderer();e&&e.v()}getVideoSurfaces(){const t=[];for(const e in this.W)t.push(this.W[e]);return t}removeVideoSurfaces(t){if(Array.isArray(t))t.forEach((t=>{this.removeVideoSurfaces(t)}));else{const e=t.C(),i=this.getRenderer();i&&i.k(e),delete this.W[e]}}remove(){this.clear(),super.remove()}clear(){const t=this.getVideoSurfaces();for(let e=0;e<t.length;e++)t[e].remove()}}g.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,markerEvents:!0,forceRenderOnZooming:!0,forceRenderOnMoving:!0,forceRenderOnRotating:!0,showTopAlways:!0,doubleSide:!0}),g.registerJSONType("VideoLayer"),g.registerRenderer("gl",p),t.VideoLayer=g,t.VideoSurface=m,"undefined"!=typeof console&&console.log("@maptalks/video-layer v0.102.2")}));
*/;n<6;n++)o[n]=[];var a=[];function h(t,e,i){var s,r,n,h,d,u,p,f,m,g,v,_,x,y,w,b,O;r=(s=t)[0],n=s[1],h=s[2],d=s[3],u=s[4],p=s[5],f=s[6],m=s[7],g=s[8],v=s[9],_=s[10],x=s[11],y=s[12],w=s[13],b=s[14],O=s[15],l(o[0],d-r,m-u,x-g,O-y),l(o[1],d+r,m+u,x+g,O+y),l(o[2],d+n,m+p,x+v,O+w),l(o[3],d-n,m-p,x-v,O-w),l(o[4],d-h,m-f,x-_,O-b),l(o[5],d+h,m+f,x+_,O+b);for(var T=0;T<6;T++){var S=o[T];if(a[0]=S[0]>0?e[1][0]:e[0][0],a[1]=S[1]>0?e[1][1]:e[0][1],a[2]=S[2]>0?e[1][2]:e[0][2],c(S,a)<0)return!1}return!0}function l(t,e,i,s,r){var o=1/Math.sqrt(e*e+i*i+s*s);return t[0]=e*o,t[1]=i*o,t[2]=s*o,t[3]=r*o,t}function c(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]}const d={vert:"\n attribute vec3 aPosition;\n attribute vec2 aTexCoord;\n uniform mat4 projViewModelMatrix;\n uniform mat4 positionMatrix;\n uniform mat4 modelMatrix;\n varying vec2 vTexCoords;\n #include <get_output>\n void main()\n {\n mat4 localPositionMatrix = getPositionMatrix();\n vec4 localPosition = getPosition(aPosition);\n gl_Position = projViewModelMatrix * localPositionMatrix * localPosition;\n vTexCoords = aTexCoord;\n }\n",frag:"\n precision mediump float;\n uniform sampler2D videoTexture;\n uniform float opacity;\n\n varying vec2 vTexCoords;\n void main() {\n vec4 color = texture2D(videoTexture, vTexCoords);\n gl_FragColor = color * opacity;\n }\n",uniforms:[{name:"projViewModelMatrix",type:"function",fn:(t,e)=>i.mat4.multiply([],e.projViewMatrix,e.modelMatrix)},"texture","opacity"],positionAttribute:"POSITION",extraCommandProps:{depth:{enable:!0,func:"always"},cull:{enable:!1,face:"back"},frontFace:"cw",blend:{enable:!0,func:{src:"src alpha",dst:"one minus src alpha"},equation:"add"}}},u=[1,0,3,3,2,1];class p extends r.renderer.CanvasRenderer{constructor(t){super(t),this.t={}}draw(t,e){this.prepareCanvas(),this.i(e)}drawOnInteracting(t,e,i){this.i(i)}needToRedraw(){return!0}hitDetect(){return!1}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap(),this.regl=this.canvas.gl.regl;else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,stencil:!0};this.glOptions=t,this.gl=this.gl||this.o(this.canvas,t),this.regl=i.createREGL({gl:this.gl,extensions:["ANGLE_instanced_arrays","OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear","EXT_shader_texture_lod","OES_element_index_uint","OES_standard_derivatives","WEBGL_depth_texture"],optionalExtensions:this.layer.options.glExtensions||[]})}this.h(),this.l();const t=this.layer.getVideoSurfaces();for(let e=0;e<t.length;e++)this.u(t[e])}o(t,e){const i=["webgl","experimental-webgl"];let s=null;for(let r=0;r<i.length;++r){try{s=t.getContext(i[r],e)}catch(t){}if(s)break}return s}l(){const t=this.layer.getMap(),e=new i.reshader.Renderer(this.regl);this.renderer=e,this.p={"projMatrix":t.projMatrix,"projViewMatrix":t.projViewMatrix,"viewMatrix":t.viewMatrix,"halton":[.2107,-.0202],"uHalton":[.2107,-.0202],"uCameraPosition":t.cameraPosition,"cameraPosition":t.cameraPosition,"globalTexSize":[t.width,t.height]}}m(){return this.regl}h(){this.viewport={x:0,y:0,width:()=>this.canvas?this.canvas.width:1,height:()=>this.canvas?this.canvas.height:1},this.v()}v(){this._&&this._.dispose(),this.layer.options.showTopAlways?(d.extraCommandProps.depth.mask=!1,d.extraCommandProps.depth.range=[0,0]):(delete d.extraCommandProps.depth.mask,delete d.extraCommandProps.depth.range),d.extraCommandProps.cull.enable=!this.layer.options.doubleSide,this._=new i.reshader.MeshShader(d)}u(t){const e=this.regl.texture(),s=new i.reshader.Material({videoTexture:e,opacity:1}),r=t.getCoordinates(),{worldCenter:o,points:n}=this.O(r),a=this.T(n),h=new i.reshader.Mesh(a,s);this.S(h,o);const l=new i.reshader.Scene(h),c=t.C();this.t[c]=l}M(t){const e=t.C(),i=this.t[e].getMeshes()[0],s=t.getCoordinates();i.geometry.dispose();const{worldCenter:r,points:o}=this.O(s),n=this.T(o);i.geometry=n,this.S(i,r)}i(t){const e=this.layer.getVideoSurfaces().filter((t=>t.isVisible()));if(!e.length)return;const i=this.P(e);if(!i)return;let s=null;t&&(s=t.renderTarget&&t.renderTarget.fbo),this.renderer.render(this._,this.p,i,s)}T(t){return new i.reshader.Geometry({POSITION:t,TEXCOORD:[0,0,1,0,1,1,0,1]},u,0,{primitive:"triangles",positionAttribute:"POSITION",uv0Attribute:"TEXCOORD",normalAttribute:"NORMAL",positionSize:3})}O(t){let e=[];const i=this.getMap(),s=new r.Polygon(t).getCenter(),o=f(i,s,0);return this.V=o,i&&t.forEach((t=>{const s=new r.Coordinate(t[0],t[1]),n=i.altitudeToPoint(t[2]||0,i.getGLRes()),a=f(i,s,n);a[0]=a[0]-o[0],a[1]=a[1]-o[1],e=e.concat(a)})),{worldCenter:o,points:e}}P(t){const e=[],s=this.layer.getMap();for(let i=0;i<t.length;i++){const r=t[i],o=this.t[r.C()];if(!o)continue;const n=o.getMeshes();for(let t=0;t<n.length;t++){const i=n[t],o=i.getMaterial(),a=o.get("videoTexture");a&&r.A()&&(a(r.video),o.set("opacity",r.getOpacity())),h(s.projViewMatrix,i.getBoundingBox())&&e.push(i)}}return e.length?new i.reshader.Scene(e):null}S(t,e){i.mat4.fromRotationTranslationScale(t.localTransform,i.quat.fromEuler([],0,0,0),e,[1,1,1])}remove(){this._&&this._.dispose(),super.remove()}clearCanvas(){this.canvas&&(this.regl.clear({color:[0,0,0,0],depth:1,stencil:0}),super.clearCanvas())}k(t){const e=this.t[t];if(!e)return;e.getMeshes().forEach((t=>{t.geometry.dispose(),t.material&&t.material.dispose(),t.dispose()}))}}function f(t,e,i){if(!t)return null;const s=t.coordinateToPointAtRes(e,t.getGLRes());return[s.x,s.y,i]}class m extends(e.Eventable(e.Handlerable(e.Class))){constructor(t,e){super(e),this.setCoordinates(t),this.j()}setCoordinates(t){this.I=t}getCoordinates(){return this.I}setVideo(t){this.R="stop",this.options.url=t,delete this.options.elementId,this.j()}setElementId(t){this.R="stop",this.options.elementId=t,delete this.options.url,this.j()}j(){this.R="stop";const t=this.options.url,e=this.options.elementId;let i=document.getElementById(e);if(t&&(i=document.createElement("video"),i.src=t),!i)throw new Error("there is no element or url setting for video mask");i.autoplay=!0,i.loop=!0,i.muted=!0,i.play(),i.addEventListener("playing",(()=>{this.R="playing",this.fire("playing",{state:this.R,url:t})})),i.addEventListener("pause",(()=>{this.R="pause",this.fire("pause",{state:this.R,url:t})})),i.addEventListener("error",(()=>{throw this.R="pause",this.fire("error",{state:this.R,url:t}),new Error("video resource load error")})),this.video=i}getVideo(){return this.video}D(t){this.L=t}C(){return this.L}addTo(t){if(this.F)throw new Error("VideoSurface cannot be added to two or more layers at the same time.");return t.addSurfaces(this),this}show(){return this.options.visible=!0,this}hide(){return this.options.visible=!1,this}isVisible(){return this.options.visible}play(){this.video&&this.video.play()}pause(){this.video&&this.video.pause()}setAudio(t){this.video.muted=t}setOpacity(t){this.options.opacity=t}getOpacity(){return this.options.opacity}remove(){delete this.video;const t=this.getLayer();t&&t.removeVideoSurfaces(this),this.endEdit()}getLayer(){return this.F}A(){return"playing"===this.R}startEdit(){const t=this.getLayer();if(!t)return void console.warn("videosurface should be added to a map before edit");const i=t.getMap();if(!i)return void console.warn("videosurface should be added to a map before edit");if(this.N(),!this.G){const s=t.getId();this.G=new e.VectorLayer(`internal_${s}_edit`,{enableAltitude:!0}).addTo(i)}const s=this.getCoordinates();this.H=new e.Polygon(s,{symbol:{lineColor:"#34495e",lineWidth:2,polygonFill:"rgb(135,196,240)",polygonOpacity:.1}}).addTo(this.G),this.H.startEdit({newVertexHandleSymbol:{polygonFill:"rgba(0, 0, 0, 0)",polygonOpacity:0,markerType:"ellipse",markerWidth:1,markerHeight:1}}),this.H.on("shapechange",(e=>{const i=e.target.getCoordinates()[0].slice(0,4).map((t=>[t.x,t.y,0]));this.setCoordinates(i);t.getRenderer().M(this)}),this)}endEdit(){this.G&&(this.H.endEdit(),this.H.remove(),this.G.remove()),delete this.G,delete this.H}N(){this.G&&this.G.clear(),delete this.H}}m.mergeOptions({opacity:1,visible:!0});class g extends e.Layer{constructor(t,e,i){!e||Array.isArray(e)||e instanceof m||(i=e,e=null),super(t,i),this.W={},this.videoId=0,this.W={},this.videoId=0,e&&this.addSurfaces(e)}addSurfaces(t){if(t)if(Array.isArray(t))t.forEach((t=>{this.addMarker(t)}));else{t.F=this,this.W[this.videoId]=t,t.D(this.videoId);const e=this.getRenderer();e?e.m()&&e.u(t):this.on("renderercreate",(e=>{e.renderer.m()&&e.renderer.u(t)})),this.videoId++}}showTopAlways(t){this.options.showTopAlways=t;const e=this.getRenderer();e&&e.v()}setDoubleSide(t){this.options.doubleSide=t;const e=this.getRenderer();e&&e.v()}getVideoSurfaces(){const t=[];for(const e in this.W)t.push(this.W[e]);return t}removeVideoSurfaces(t){if(Array.isArray(t))t.forEach((t=>{this.removeVideoSurfaces(t)}));else{const e=t.C(),i=this.getRenderer();i&&i.k(e),delete this.W[e]}}remove(){this.clear(),super.remove()}clear(){const t=this.getVideoSurfaces();for(let e=0;e<t.length;e++)t[e].remove()}}g.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,markerEvents:!0,forceRenderOnZooming:!0,forceRenderOnMoving:!0,forceRenderOnRotating:!0,showTopAlways:!0,doubleSide:!0}),g.registerJSONType("VideoLayer"),g.registerRenderer("gl",p),t.VideoLayer=g,t.VideoSurface=m,"undefined"!=typeof console&&console.log("@maptalks/video-layer v0.102.3")}));
//# sourceMappingURL=maptalks.video.js.map
{
"name": "@maptalks/video-layer",
"version": "0.102.2",
"version": "0.102.3",
"description": "A maptalks Layer to render video",

@@ -34,6 +34,6 @@ "license": "UNLICENSED",

"karma-mocha-reporter": "^2.2.5",
"maptalks": "^1.1.2",
"maptalks": "^1.1.3",
"mocha": "^10.3.0",
"rollup": "^4.17.2",
"@maptalks/gl": "0.106.2"
"@maptalks/gl": "0.106.3"
},

@@ -40,0 +40,0 @@ "dependencies": {