@realsee/five 6.1.2 → 6.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/umd/five-line.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/28/2024
5
- * Version: 6.1.2
4
+ * Generated: 2024/9/4
5
+ * Version: 6.1.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -451,4 +451,4 @@
451
451
  #include <premultiplied_alpha_fragment>
452
452
 
453
453
  }
454
- `},b=function(a){y(r,a);function r(t){var n=a.call(this,{uniforms:i.UniformsUtils.clone(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,clipping:!0})||this;return n.type="LineMaterial",n.dashed=!1,Object.defineProperties(n,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),n.setValues(t),n}return r}(i.ShaderMaterial);Object.assign(b.prototype,{isLineMaterial:!0});var E=function(a){y(r,a);function r(t,n){var e=a.call(this)||this;return e.type="LineSegments2",e.geometry=t!==void 0?t:new S,e.material=n!==void 0?n:new b({color:Math.random()*16777215}),e}return r.prototype.computeLineDistances=function(){for(var t=this.geometry,n=t.attributes.instanceStart,e=t.attributes.instanceEnd,o=new Float32Array(2*n.count),s=new i.Vector3,f=new i.Vector3,v=0,u=0,M=n.count;v<M;v++,u+=2)s.fromBufferAttribute(n,v),f.fromBufferAttribute(e,v),o[u]=u===0?0:o[u-1],o[u+1]=o[u]+s.distanceTo(f);var A=new i.InstancedInterleavedBuffer(o,2,1);return t.setAttribute("instanceDistanceStart",new i.InterleavedBufferAttribute(A,1,0)),t.setAttribute("instanceDistanceEnd",new i.InterleavedBufferAttribute(A,1,1)),this},r.prototype.raycast=function(t,n){t.camera===null&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var e=t.ray,o=t.camera,s=o.projectionMatrix,f=this.geometry,v=this.material,u=v.resolution,M=v.linewidth,A=f.attributes.instanceStart,F=f.attributes.instanceEnd,l=new i.Vector4,d=new i.Vector4,m=new i.Vector4,C=new i.Vector3,P=new i.Matrix4,p=new i.Line3,I=new i.Vector3;e.at(1,m),m.w=1,m.applyMatrix4(o.matrixWorldInverse),m.applyMatrix4(s),m.multiplyScalar(1/m.w),m.x*=u.x/2,m.y*=u.y/2,m.z=0,C.copy(m);var U=this.matrixWorld;P.multiplyMatrices(o.matrixWorldInverse,U);for(var h=0,k=A.count;h<k;h++){l.fromBufferAttribute(A,h),d.fromBufferAttribute(F,h),l.w=1,d.w=1,l.applyMatrix4(P),d.applyMatrix4(P),l.applyMatrix4(s),d.applyMatrix4(s),l.multiplyScalar(1/l.w),d.multiplyScalar(1/d.w);var Q=l.z<-1&&d.z<-1,Z=l.z>1&&d.z>1;if(!(Q||Z)){l.x*=u.x/2,l.y*=u.y/2,d.x*=u.x/2,d.y*=u.y/2,p.start.copy(l),p.start.z=0,p.end.copy(d),p.end.z=0;var _=p.closestPointToPointParameter(C,!0);p.at(_,I);var N=i.MathUtils.lerp(l.z,d.z,_),X=N>=-1&&N<=1,J=C.distanceTo(I)<M*.5;if(X&&J){p.start.fromBufferAttribute(A,h),p.end.fromBufferAttribute(F,h),p.start.applyMatrix4(U),p.end.applyMatrix4(U);var j=new i.Vector3,z=new i.Vector3;e.distanceSqToSegment(p.start,p.end,z,j),n.push({point:z,pointOnLine:j,distance:e.origin.distanceTo(z),object:this,faceIndex:h})}}}},r}(i.Mesh);Object.assign(E.prototype,{isLineSegments2:!0});var B=function(a){y(r,a);function r(t,n){var e=a.call(this,t,n)||this;return e.type="Line2",e}return r}(E);Object.assign(B.prototype,{isLine2:!0});var L=function(a){y(r,a);function r(){var t=a.call(this)||this;return t.type="LineGeometry",t}return r.prototype.setPositions=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setPositions.call(this,e),this},r.prototype.setColors=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setColors.call(this,e),this},r.prototype.fromLine=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.copy=function(){return this},r}(S);Object.assign(L.prototype,{isLineGeometry:!0});var W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==",D=14467195,T=8,H=2,R=20,O=null,V=function(a){y(r,a);function r(t,n){t===void 0&&(t=new i.Vector3),n===void 0&&(n=new i.Vector3);var e=a.call(this)||this;e.type="FiveLine",e.needsRender=!0;var o=new L,s=new b({color:D,linewidth:H,dashScale:R,dashed:!1});e.line=new B(o,s);var f=new i.BufferGeometry,v=new i.PointsMaterial({color:D,size:T,map:O||(O=new i.TextureLoader().load(W)),sizeAttenuation:!1,transparent:!0});return e.points=new i.Points(f,v),e.points.renderOrder=11,e.points.frustumCulled=!1,e.setPoints(t,n),e.add(e.line,e.points),e}return Object.defineProperty(r,"version",{get:function(){return"6.1.2"},enumerable:!1,configurable:!0}),r.prototype.setPoints=function(t,n){var e=[].concat(t.toArray(),n.toArray());this.points.geometry.setAttribute("position",new i.BufferAttribute(new Float32Array(e),3)),this.line.geometry.setPositions(e),this.line.computeLineDistances(),this.needsRender=!0},r.prototype.getPoints=function(){var t=this.points.geometry.attributes.position.array;return[new i.Vector3(t[0],t[1],t[2]),new i.Vector3(t[3],t[4],t[5])]},r.prototype.setMaterial=function(t){var n=this.line.material;for(var e in t)if(t.hasOwnProperty(e)){var o=t[e];e==="dashed"?(n.dashed=o,o?n.defines.USE_DASH="":delete n.defines.USE_DASH,n.needsUpdate=!0):n[e]=t[e]}this.needsRender=!0},r.prototype.setResolution=function(t,n){var e=this.line.material.resolution;(e.x!==t||e.y!==n)&&(e.set(t,n),this.needsRender=!0)},r}(i.Object3D);Object.assign(V.prototype,{isFiveLine:!0}),c.Line=V,c.LineGeometry=L,c.LineMaterial=b,c.LineSegmentsGeometry=S,c.THREE_Line2=B,c.THREE_LineSegments2=E,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
454
+ `},b=function(a){y(r,a);function r(t){var n=a.call(this,{uniforms:i.UniformsUtils.clone(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,clipping:!0})||this;return n.type="LineMaterial",n.dashed=!1,Object.defineProperties(n,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),n.setValues(t),n}return r}(i.ShaderMaterial);Object.assign(b.prototype,{isLineMaterial:!0});var E=function(a){y(r,a);function r(t,n){var e=a.call(this)||this;return e.type="LineSegments2",e.geometry=t!==void 0?t:new S,e.material=n!==void 0?n:new b({color:Math.random()*16777215}),e}return r.prototype.computeLineDistances=function(){for(var t=this.geometry,n=t.attributes.instanceStart,e=t.attributes.instanceEnd,o=new Float32Array(2*n.count),s=new i.Vector3,f=new i.Vector3,v=0,u=0,M=n.count;v<M;v++,u+=2)s.fromBufferAttribute(n,v),f.fromBufferAttribute(e,v),o[u]=u===0?0:o[u-1],o[u+1]=o[u]+s.distanceTo(f);var A=new i.InstancedInterleavedBuffer(o,2,1);return t.setAttribute("instanceDistanceStart",new i.InterleavedBufferAttribute(A,1,0)),t.setAttribute("instanceDistanceEnd",new i.InterleavedBufferAttribute(A,1,1)),this},r.prototype.raycast=function(t,n){t.camera===null&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var e=t.ray,o=t.camera,s=o.projectionMatrix,f=this.geometry,v=this.material,u=v.resolution,M=v.linewidth,A=f.attributes.instanceStart,F=f.attributes.instanceEnd,l=new i.Vector4,d=new i.Vector4,m=new i.Vector4,C=new i.Vector3,P=new i.Matrix4,p=new i.Line3,I=new i.Vector3;e.at(1,m),m.w=1,m.applyMatrix4(o.matrixWorldInverse),m.applyMatrix4(s),m.multiplyScalar(1/m.w),m.x*=u.x/2,m.y*=u.y/2,m.z=0,C.copy(m);var U=this.matrixWorld;P.multiplyMatrices(o.matrixWorldInverse,U);for(var h=0,k=A.count;h<k;h++){l.fromBufferAttribute(A,h),d.fromBufferAttribute(F,h),l.w=1,d.w=1,l.applyMatrix4(P),d.applyMatrix4(P),l.applyMatrix4(s),d.applyMatrix4(s),l.multiplyScalar(1/l.w),d.multiplyScalar(1/d.w);var Q=l.z<-1&&d.z<-1,Z=l.z>1&&d.z>1;if(!(Q||Z)){l.x*=u.x/2,l.y*=u.y/2,d.x*=u.x/2,d.y*=u.y/2,p.start.copy(l),p.start.z=0,p.end.copy(d),p.end.z=0;var _=p.closestPointToPointParameter(C,!0);p.at(_,I);var N=i.MathUtils.lerp(l.z,d.z,_),X=N>=-1&&N<=1,J=C.distanceTo(I)<M*.5;if(X&&J){p.start.fromBufferAttribute(A,h),p.end.fromBufferAttribute(F,h),p.start.applyMatrix4(U),p.end.applyMatrix4(U);var j=new i.Vector3,z=new i.Vector3;e.distanceSqToSegment(p.start,p.end,z,j),n.push({point:z,pointOnLine:j,distance:e.origin.distanceTo(z),object:this,faceIndex:h})}}}},r}(i.Mesh);Object.assign(E.prototype,{isLineSegments2:!0});var B=function(a){y(r,a);function r(t,n){var e=a.call(this,t,n)||this;return e.type="Line2",e}return r}(E);Object.assign(B.prototype,{isLine2:!0});var L=function(a){y(r,a);function r(){var t=a.call(this)||this;return t.type="LineGeometry",t}return r.prototype.setPositions=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setPositions.call(this,e),this},r.prototype.setColors=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setColors.call(this,e),this},r.prototype.fromLine=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.copy=function(){return this},r}(S);Object.assign(L.prototype,{isLineGeometry:!0});var W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==",D=14467195,T=8,H=2,R=20,O=null,V=function(a){y(r,a);function r(t,n){t===void 0&&(t=new i.Vector3),n===void 0&&(n=new i.Vector3);var e=a.call(this)||this;e.type="FiveLine",e.needsRender=!0;var o=new L,s=new b({color:D,linewidth:H,dashScale:R,dashed:!1});e.line=new B(o,s);var f=new i.BufferGeometry,v=new i.PointsMaterial({color:D,size:T,map:O||(O=new i.TextureLoader().load(W)),sizeAttenuation:!1,transparent:!0});return e.points=new i.Points(f,v),e.points.renderOrder=11,e.points.frustumCulled=!1,e.setPoints(t,n),e.add(e.line,e.points),e}return Object.defineProperty(r,"version",{get:function(){return"6.1.4"},enumerable:!1,configurable:!0}),r.prototype.setPoints=function(t,n){var e=[].concat(t.toArray(),n.toArray());this.points.geometry.setAttribute("position",new i.BufferAttribute(new Float32Array(e),3)),this.line.geometry.setPositions(e),this.line.computeLineDistances(),this.needsRender=!0},r.prototype.getPoints=function(){var t=this.points.geometry.attributes.position.array;return[new i.Vector3(t[0],t[1],t[2]),new i.Vector3(t[3],t[4],t[5])]},r.prototype.setMaterial=function(t){var n=this.line.material;for(var e in t)if(t.hasOwnProperty(e)){var o=t[e];e==="dashed"?(n.dashed=o,o?n.defines.USE_DASH="":delete n.defines.USE_DASH,n.needsUpdate=!0):n[e]=t[e]}this.needsRender=!0},r.prototype.setResolution=function(t,n){var e=this.line.material.resolution;(e.x!==t||e.y!==n)&&(e.set(t,n),this.needsRender=!0)},r}(i.Object3D);Object.assign(V.prototype,{isFiveLine:!0}),c.Line=V,c.LineGeometry=L,c.LineMaterial=b,c.LineSegmentsGeometry=S,c.THREE_Line2=B,c.THREE_LineSegments2=E,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/28/2024
5
- * Version: 6.1.2
4
+ * Generated: 2024/9/4
5
+ * Version: 6.1.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/umd/five-react.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/28/2024
5
- * Version: 6.1.2
4
+ * Generated: 2024/9/4
5
+ * Version: 6.1.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */(function(f,w){typeof exports=="object"&&typeof module!="undefined"?w(exports,require("react"),require("three"),require("@realsee/five")):typeof define=="function"&&define.amd?define(["exports","react","three","@realsee/five"],w):(f=typeof globalThis!="undefined"?globalThis:f||self,w(f.FiveSDK_React={},f.React,f.THREE,f.FiveSDK))})(this,function(f,w,K,V){"use strict";function O(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=O(w),g=O(K);var k=function(e,n){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])},k(e,n)};function D(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");k(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}var y=function(){return y=Object.assign||function(n){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(n[u]=t[u])}return n},y.apply(this,arguments)};function F(e,n,t){if(t||arguments.length===2)for(var r=0,a=n.length,u;r<a;r++)(u||!(r in n))&&(u||(u=Array.prototype.slice.call(n,0,r)),u[r]=n[r]);return e.concat(u||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var E=[],R=[];function Q(e){var n=e===void 0?{}:e,t=n.backgroundColor,r=t===void 0?1579548:t,a=n.backgroundAlpha,u=a===void 0?1:a,i=n.preserveDrawingBuffer,s=i===void 0?!0:i,c=n.pixelRatio,d=c===void 0?1:c,v=n.webgl2,m=v===void 0?!1:v;if(typeof window!="undefined"){var p=null;if(m?p=E.shift():p=R.shift(),!p){if(m){var S=document.createElement("canvas"),b=S.getContext("webgl2");b?p=new g.WebGLRenderer({preserveDrawingBuffer:s,antialias:!0,alpha:!0,stencil:!0,canvas:S,context:b}):(console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."),p=new g.WebGLRenderer({preserveDrawingBuffer:s,antialias:!1,alpha:!0,stencil:!0}))}else p=new g.WebGLRenderer({preserveDrawingBuffer:s,antialias:!1,alpha:!0,stencil:!0});p.outputEncoding=g.sRGBEncoding}return p.setPixelRatio(d),p.setClearColor(r,u),p.autoClear=!0,p}}function X(e){if(e){var n=e.capabilities.isWebGL2;n?R.indexOf(e)===-1&&R.push(e):E.indexOf(e)===-1&&E.push(e)}}var L=o.createContext(null);function h(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.five}function W(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.loadWork}function Y(e,n){var t=Array.isArray(e)?e:[e],r=Array.isArray(n)?n:[n];if(t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(t[a].workCode!==r[a].workCode)return!1;return!0}function Z(e){return e===void 0&&(e={}),function(n){D(t,n);function t(r){var a=n.call(this,r)||this;return a.__fiveEventDisposers=[],a.__fiveDisposeTimer=null,a.five=new V.Five(y(y({},e),{renderer:void 0})),a.loadWork=a.loadWork.bind(a),a.state={},a}return t.prototype.loadWork=function(r,a,u,i){if(i===void 0&&(i=!0),this.props.work)throw new Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return this.five.load(r,a,u,i)},t.prototype.shouldComponentUpdate=function(r){return this.five.renderer&&this.five&&r.work&&!Y(r.work,this.five.works)&&this.five.load(r.work,r.initialState,r.initialOptions),!0},t.prototype.componentDidMount=function(){var r=this,a;clearTimeout(this.__fiveDisposeTimer),this.__fiveDisposeTimer=null;var u;if(typeof window!="undefined"){var i=V.getViewportScale(),s=i===1?window.devicePixelRatio:1;u=Q({pixelRatio:s,backgroundAlpha:e.backgroundAlpha,backgroundColor:e.backgroundColor,webgl2:e==null?void 0:e.webgl2,preserveDrawingBuffer:e==null?void 0:e.preserveDrawingBuffer})}this.five.renderer=u,this.setState({renderer:u}),this.__fiveEventDisposers.push(this.five.on("load",function(){r.props.onWorksChange&&r.props.onWorksChange(r.five.works)})),this.__fiveEventDisposers.push(this.five.on("stateChange",function(d,v){r.props.onStateChange&&r.props.onStateChange(d,v)})),this.__fiveEventDisposers.push(this.five.on("currentStateChange",function(d,v){r.props.onCurrentStateChange&&r.props.onCurrentStateChange(d,v)})),this.__fiveEventDisposers.push(this.five.on("error",function(d){r.props.onError?r.props.onError(d):console.warn(d.message)}));var c=this.props.work||this.props.initialWork;c&&this.five.load(c,this.props.initialState,void 0,(a=this.props.initialUserAction)!==null&&a!==void 0?a:!0)},t.prototype.componentWillUnmount=function(){var r=this,a;(a=this.five.controller)===null||a===void 0||a.destroy();var u=this.five.renderer;this.five.renderer=void 0,X(u),this.setState({renderer:void 0}),this.__fiveDisposeTimer=setTimeout(function(){r.__fiveDisposeTimer=null,r.five.dispose()},1e3)},t.prototype.render=function(){var r=this.five,a=this.loadWork,u=this.state.renderer;return o.createElement(L.Provider,{value:{renderer:u,five:r,loadWork:a}},this.props.children)},t}(o.Component)}var ee=typeof window!="undefined"?o.useLayoutEffect:o.useEffect,re={display:"inline-block",overflow:"hidden"},te=function(e){var n=e.width,t=e.height,r=h(),a=o.createRef(),u=y({width:n,height:t},re);return ee(function(){var i=a.current;if(i&&r.renderer){var s=r.renderer.domElement;if(s.parentNode!==null&&s.parentNode!==i)throw new Error("There are more than 2 fiveCanvas in this context.");return s.parentNode!==i&&i.appendChild(s),r.camera.aspect=n/t,r.camera.updateProjectionMatrix(),r.renderer.setSize(n,t),r.refresh({width:n,height:t}),r.needsRender=!0,function(){s.parentNode===i&&i.removeChild(s)}}},[r,r.renderer,n,t,a.current]),o.createElement("div",{ref:a,style:u})};function ne(){return h()}function M(e,n){var t=h(),r=[t];n!==void 0&&(r=r.concat(n)),o.useLayoutEffect(function(){return e(t.scene)},r)}var ae=M;function oe(){var e=h(),n=W(),t=o.useState(function(){return e.works}),r=t[0],a=t[1];return o.useLayoutEffect(function(){return e.on("load",function(){return a(e.works)})},[e]),[r,n]}function j(e){return y({},e.state)}function ue(){var e=h(),n=o.useState(function(){return j(e)}),t=n[0],r=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("stateChange",function(){return r(j(e))})},[e]),[t,a]}function ie(){var e=h(),n=o.useState(function(){return e.getCurrentState()}),t=n[0],r=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return r(e.getCurrentState())})},[e]),[t,a]}function se(){var e=h(),n=o.useState(function(){return e.getCurrentState()}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return r(e.getCurrentState())})},[e]),e.works.getResolvedObserver(t)}function ce(e,n,t){var r=h(),a=[r,e];t!==void 0&&(a=a.concat(t)),o.useLayoutEffect(function(){return r.on(e,n)},a)}function fe(){var e=h(),n=o.useCallback(function(i,s){return e.updateCamera(i,s)},[e]),t=o.useCallback(function(i,s,c,d,v){return e.getPixels(i,s,c,d,v)},[e]),r=o.useCallback(function(i){return e.render(i)},[e]),a=o.useCallback(function(){return e.needsRender=!0},[e]),u=o.useCallback(function(i,s){return e.preloadPano(i,s)},[e]);return{updateCamera:n,getPixels:t,render:r,needsRender:a,preloadPano:u}}function le(){var e=h(),n=o.useState(function(){return Symbol()});n[0];var t=n[1];o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return t(Symbol())})},[e]);var r=o.useCallback(function(a,u){return e.project2d(a,u)},[e]);return r}function U(e){var n=e.camera.getWorldDirection(new g.Vector3),t=new g.Raycaster(e.camera.position,n);return t}function de(){var e=h(),n=o.useState(function(){return U(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return r(U(e))})},[e]),t}function T(e){return e.camera.getWorldDirection(new g.Vector3)}function ve(){var e=h(),n=o.useState(function(){return T(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return r(T(e))})},[e]),t}function pe(){var e=h(),n=o.useCallback(function(t){return e.model.intersectRaycaster(t)},[e]);return n}function N(e){return e.model.empty?"Empty":"Loaded"}function he(){var e=h(),n=o.useState(function(){return N(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("modelLoaded",function(){return r(N(e))})},[e]),t}function ge(){var e=h(),n=o.useState(e.model.shownFloor),t=n[0],r=n[1],a=o.useState(e.model.floorLength),u=a[0],i=a[1],s=o.useCallback(function(c){typeof c=="number"?e.model.show(c):e.model.show()},[e]);return o.useLayoutEffect(function(){var c=[];return c.push(e.on("modelShownFloorChange",function(){return r(e.model.shownFloor)})),c.push(e.on("modelLoaded",function(){return i(e.model.floorLength)})),function(){for(var d;d=c.shift();)d()}},[e]),[t,u,s]}function ye(){var e=h(),n=o.useState(e.helperVisible),t=n[0],r=n[1],a=o.useCallback(function(u){e.helperVisible=u},[e]);return o.useLayoutEffect(function(){return e.on("helpersVisibleChange",function(u){return r(u)})},[e]),[t,a]}var me="$five";function l(e,n){return n.indexOf(e)>=0}function x(e,n){for(var t=0,r=Object.keys(n);t<r.length;t++){var a=r[t];n[a]!==void 0&&(e[a]=n[a])}}function Se(e,n){var t=l("state",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return y({},e.state)},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("stateChange",function(){return u(Symbol())})},[e]),[i,a]}function be(e,n){var t=l("currentState",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.getCurrentState()},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("currentStateChange",function(){return u(Symbol())})},[e]),[i,a]}function we(e,n){var t=l("currentObserver",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.getCurrentState()},[e,a]);o.useLayoutEffect(function(){if(t)return e.on("currentStateChange",function(){return u(Symbol())})},[e]);var s=void 0;return i&&(s=e.works.getResolvedObserver(i)),[s,a]}function Ce(e,n){var t=l("unsafe__fiveInstance",n);return[t?e:void 0]}function Fe(e,n){var t=l("works",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.works},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("load",function(){return u(Symbol())})},[e]),[i,a]}function ke(e,n){var t=l("model",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function Ee(e,n){var t=l("scene",n);return[t?e.scene:void 0]}function Re(e,n){var t=l("cameraDirection",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.camera.getWorldDirection(new g.Vector3)},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function Le(e,n){var t=l("cameraRaycaster",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t){var s=e.camera.getWorldDirection(new g.Vector3),c=new g.Raycaster(e.camera.position,s);return c}},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function _e(e,n){var t=l("modelReadyState",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model.empty?"Empty":"Loaded"},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function Pe(e,n){var t=l("shownFloor",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model.shownFloor},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelShownFloorChange",function(){return u(Symbol())})},[e]),[i,a]}function Ve(e,n){var t=l("helperVisible",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.helperVisible},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("helpersVisibleChange",function(){return u(Symbol())})},[e]),[i,a]}function Oe(e,n){if(l("loadWork",n))return e}function De(e,n){if(l("setState",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.setState.apply(e,t)}}function We(e,n){if(l("on",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.on.apply(e,t)}}function Me(e,n){if(l("on",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.once.apply(e,t)}}function je(e,n){if(l("off",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.off.apply(e,t)}}function Ue(e,n){if(l("intersectRaycaster",n))return function(){for(var t,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return(t=e.model).intersectRaycaster.apply(t,r)}}function Te(e,n){if(l("project2d",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.project2d.apply(e,t)}}function Ne(e,n){if(l("updateCamera",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.updateCamera.apply(e,t)}}function xe(e,n){if(l("getPixels",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.getPixels.apply(e,t)}}function $e(e,n){if(l("render",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.render.apply(e,t)}}function He(e,n){if(l("needsRender",n))return function(){e.needsRender=!0}}function Be(e,n){if(l("preloadPano",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.preloadPano.apply(e,t)}}function Ae(e,n){if(l("showFloor",n))return function(t){typeof t=="number"?e.model.show(t):e.model.show()}}function Ge(e,n){if(l("toggleHelperVisible",n))return function(t){e.helperVisible=t}}function Ie(e){return function(n){return o.forwardRef(function(t,r){var a=h(),u=W(),i=Ce(a,e)[0],s=Se(a,e),c=s[0],d=s[1],v=be(a,e),m=v[0],p=v[1],S=we(a,e),b=S[0],P=S[1],H=Fe(a,e),Qe=H[0],Xe=H[1],B=ke(a,e),Ye=B[0],Ze=B[1],er=Ee(a,e)[0],A=Re(a,e),rr=A[0],tr=A[1],G=Le(a,e),nr=G[0],ar=G[1],I=_e(a,e),or=I[0],ur=I[1],q=Pe(a,e),ir=q[0],sr=q[1],z=Ve(a,e),cr=z[0],fr=z[1],J=o.useMemo(function(){var C={};return x(C,{setState:De(a,e),loadWork:Oe(u,e),on:We(a,e),once:Me(a,e),off:je(a,e),intersectRaycaster:Ue(a,e),project2d:Te(a,e),updateCamera:Ne(a,e),getPixels:xe(a,e),render:$e(a,e),needsRender:He(a,e),preloadPano:Be(a,e),showFloor:Ae(a,e),toggleHelperVisible:Ge(a,e)}),C},[a,u]),lr=o.useMemo(function(){var C=y({},J);return x(C,{unsafe__fiveInstance:i,state:c,currentState:m,currentObserver:b,work:Qe,model:Ye,scene:er,cameraDirection:rr,cameraRaycaster:nr,modelReadyState:or,shownFloor:ir,helperVisible:cr}),C},[a,J,d,p,P,Xe,Ze,tr,ar,ur,sr,fr]);return o.createElement(n,y({ref:r,$five:lr},t))})}}function qe(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e}function _(e,n){for(var t={},r=n.length,a=-1;++a<r;){var u=n[a];u in e&&(t[u]=e[u])}return t}function ze(e,n){return typeof e=="number"&&typeof n=="number"&&isNaN(e)&&isNaN(n)?!0:e===n}function Je(e,n){for(var t=0;t<e.length;t++)for(var r=0;r<n.length;r++)if(e[t]===n[r])return!0;return!1}var $=function(){function e(n,t){this.values=n,this.listeners=[],this.onValuesChange=t}return e.prototype.on=function(n,t){var r=this,a=[n,t];return this.listeners.push(a),function(){var u=r.listeners.indexOf(a);u>=0&&r.listeners.splice(u,1)}},e.prototype.getValues=function(n){return _(this.values,n)},e.prototype.setValues=function(n,t){var r=[];for(var a in t)n.indexOf(a)>=0&&!ze(t[a],this.values[a])&&r.push(a);if(r.length!==0){for(var u=y({},this.values),i=0,s=r;i<s.length;i++){var c=s[i];this.values[c]=t[c]}this.onValuesChange&&this.onValuesChange(this.values,u);for(var d=0,v=this.listeners;d<v.length;d++){var m=v[d],p=m[0],S=m[1];if(Je(p,r)){var b=_(u,p),P=_(this.values,p);S(P,b)}}}},e}();function Ke(e){var n=o.createContext(null);return{useStore:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useRef(!0),u=o.useState(r.getValues(t)),i=u[0],s=u[1],c=F([r],t,!0);o.useLayoutEffect(function(){return a.current?a.current=!1:s(r.getValues(t)),r.on(t,function(v){return s(v)})},c);var d=o.useCallback(function(v){return r.setValues(t,v)},c);return[i,d]},useStoreSetter:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(u){return r.setValues(t,u)},F([r],t,!0));return a},watchStore:function(t,r,a){var u=o.useContext(n);if(u===null)throw new Error("StoreProvider never found.");var i=F([u],t,!0);a!==void 0&&(i=i.concat(a)),o.useLayoutEffect(function(){return u.on(t,r)},i)},useStoreAction:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(){for(var u=[],i=0;i<arguments.length;i++)u[i]=arguments[i];var s=e[t],c=s[0],d=s.slice(1),v=function(){return r.getValues(d)},m=function(p){return r.setValues(d,p)};return c.apply(void 0,F([v,m],u,!1))},[]);return a},StoreProvider:function(t){D(r,t);function r(a){var u=t.call(this,a)||this;return u.store=new $(a.initialValue,function(){for(var i,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];u.props.onValuesChange&&(i=u.props).onValuesChange.apply(i,s)}),u}return r.prototype.shouldComponentUpdate=function(a){return a.children!==this.props.children},r.prototype.render=function(){return o.createElement(n.Provider,{value:this.store},this.props.children)},r}(o.Component)}}f.FiveCanvas=te,f.INJECTION_PROPNAME=me,f.Store=$,f.createFiveFeature=qe,f.createFiveProvider=Z,f.createStore=Ke,f.unsafe__useFiveInstance=ne,f.useFiveAction=fe,f.useFiveCameraDirection=ve,f.useFiveCameraRaycaster=de,f.useFiveCurrentObserver=se,f.useFiveCurrentState=ie,f.useFiveEventCallback=ce,f.useFiveFloor=ge,f.useFiveHelper=ye,f.useFiveModelIntersectRaycaster=pe,f.useFiveModelReadyState=he,f.useFiveProject2d=le,f.useFiveScene=ae,f.useFiveSceneEffect=M,f.useFiveState=ue,f.useFiveWork=oe,f.withFive=Ie,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
255
+ */(function(f,w){typeof exports=="object"&&typeof module!="undefined"?w(exports,require("react"),require("three"),require("@realsee/five")):typeof define=="function"&&define.amd?define(["exports","react","three","@realsee/five"],w):(f=typeof globalThis!="undefined"?globalThis:f||self,w(f.FiveSDK_React={},f.React,f.THREE,f.FiveSDK))})(this,function(f,w,K,V){"use strict";function O(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=O(w),g=O(K);var k=function(e,n){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])},k(e,n)};function D(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");k(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}var y=function(){return y=Object.assign||function(n){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(n[u]=t[u])}return n},y.apply(this,arguments)};function F(e,n,t){if(t||arguments.length===2)for(var r=0,a=n.length,u;r<a;r++)(u||!(r in n))&&(u||(u=Array.prototype.slice.call(n,0,r)),u[r]=n[r]);return e.concat(u||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var E=[],R=[];function Q(e){var n=e===void 0?{}:e,t=n.backgroundColor,r=t===void 0?1579548:t,a=n.backgroundAlpha,u=a===void 0?1:a,i=n.preserveDrawingBuffer,s=i===void 0?!0:i,c=n.pixelRatio,v=c===void 0?1:c,d=n.webgl2,m=d===void 0?!1:d;if(typeof window!="undefined"){var p=null;if(m?p=E.shift():p=R.shift(),!p){if(m){var S=document.createElement("canvas"),b=S.getContext("webgl2");b?p=new g.WebGLRenderer({preserveDrawingBuffer:s,antialias:!0,alpha:!0,stencil:!0,canvas:S,context:b}):(console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."),p=new g.WebGLRenderer({preserveDrawingBuffer:s,antialias:!1,alpha:!0,stencil:!0}))}else p=new g.WebGLRenderer({preserveDrawingBuffer:s,antialias:!1,alpha:!0,stencil:!0});p.outputEncoding=g.sRGBEncoding}return p.setPixelRatio(v),p.setClearColor(r,u),p.autoClear=!0,p}}function X(e){if(e){var n=e.capabilities.isWebGL2;n?R.indexOf(e)===-1&&R.push(e):E.indexOf(e)===-1&&E.push(e)}}var L=o.createContext(null);function h(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.five}function W(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.loadWork}function Y(e,n){var t=Array.isArray(e)?e:[e],r=Array.isArray(n)?n:[n];if(t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(t[a].workCode!==r[a].workCode)return!1;return!0}function Z(e){return e===void 0&&(e={}),function(n){D(t,n);function t(r){var a=n.call(this,r)||this;return a.__fiveEventDisposers=[],a.__fiveDisposeTimer=null,a.five=new V.Five(y(y({},e),{renderer:void 0})),a.loadWork=a.loadWork.bind(a),a.state={},a}return t.prototype.loadWork=function(r,a,u,i){if(i===void 0&&(i=!0),this.props.work)throw new Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return this.five.load(r,a,u,i)},t.prototype.shouldComponentUpdate=function(r){return this.five.renderer&&this.five&&r.work&&!Y(r.work,this.five.works)&&this.five.load(r.work,r.initialState,r.initialOptions),!0},t.prototype.componentDidMount=function(){var r=this,a;clearTimeout(this.__fiveDisposeTimer),this.__fiveDisposeTimer=null;var u;if(typeof window!="undefined"){var i=V.getViewportScale(),s=i===1?window.devicePixelRatio:1;u=Q({pixelRatio:s,backgroundAlpha:e.backgroundAlpha,backgroundColor:e.backgroundColor,webgl2:e==null?void 0:e.webgl2,preserveDrawingBuffer:e==null?void 0:e.preserveDrawingBuffer})}this.five.renderer=u,this.setState({renderer:u}),this.__fiveEventDisposers.push(this.five.on("load",function(){r.props.onWorksChange&&r.props.onWorksChange(r.five.works)})),this.__fiveEventDisposers.push(this.five.on("stateChange",function(v,d){r.props.onStateChange&&r.props.onStateChange(v,d)})),this.__fiveEventDisposers.push(this.five.on("currentStateChange",function(v,d){r.props.onCurrentStateChange&&r.props.onCurrentStateChange(v,d)})),this.__fiveEventDisposers.push(this.five.on("error",function(v){r.props.onError?r.props.onError(v):console.warn(v.message)}));var c=this.props.work||this.props.initialWork;c&&this.five.load(c,this.props.initialState,this.props.initialOptions,(a=this.props.initialUserAction)!==null&&a!==void 0?a:!0)},t.prototype.componentWillUnmount=function(){var r=this,a;(a=this.five.controller)===null||a===void 0||a.destroy();var u=this.five.renderer;this.five.renderer=void 0,X(u),this.setState({renderer:void 0}),this.__fiveDisposeTimer=setTimeout(function(){r.__fiveDisposeTimer=null,r.five.dispose()},1e3)},t.prototype.render=function(){var r=this.five,a=this.loadWork,u=this.state.renderer;return o.createElement(L.Provider,{value:{renderer:u,five:r,loadWork:a}},this.props.children)},t}(o.Component)}var ee=typeof window!="undefined"?o.useLayoutEffect:o.useEffect,re={display:"inline-block",overflow:"hidden"},te=function(e){var n=e.width,t=e.height,r=h(),a=o.createRef(),u=y({width:n,height:t},re);return ee(function(){var i=a.current;if(i&&r.renderer){var s=r.renderer.domElement;if(s.parentNode!==null&&s.parentNode!==i)throw new Error("There are more than 2 fiveCanvas in this context.");return s.parentNode!==i&&i.appendChild(s),r.camera.aspect=n/t,r.camera.updateProjectionMatrix(),r.renderer.setSize(n,t),r.refresh({width:n,height:t}),r.needsRender=!0,function(){s.parentNode===i&&i.removeChild(s)}}},[r,r.renderer,n,t,a.current]),o.createElement("div",{ref:a,style:u})};function ne(){return h()}function M(e,n){var t=h(),r=[t];n!==void 0&&(r=r.concat(n)),o.useLayoutEffect(function(){return e(t.scene)},r)}var ae=M;function oe(){var e=h(),n=W(),t=o.useState(function(){return e.works}),r=t[0],a=t[1];return o.useLayoutEffect(function(){return e.on("load",function(){return a(e.works)})},[e]),[r,n]}function j(e){return y({},e.state)}function ue(){var e=h(),n=o.useState(function(){return j(e)}),t=n[0],r=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("stateChange",function(){return r(j(e))})},[e]),[t,a]}function ie(){var e=h(),n=o.useState(function(){return e.getCurrentState()}),t=n[0],r=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return r(e.getCurrentState())})},[e]),[t,a]}function se(){var e=h(),n=o.useState(function(){return e.getCurrentState()}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return r(e.getCurrentState())})},[e]),e.works.getResolvedObserver(t)}function ce(e,n,t){var r=h(),a=[r,e];t!==void 0&&(a=a.concat(t)),o.useLayoutEffect(function(){return r.on(e,n)},a)}function fe(){var e=h(),n=o.useCallback(function(i,s){return e.updateCamera(i,s)},[e]),t=o.useCallback(function(i,s,c,v,d){return e.getPixels(i,s,c,v,d)},[e]),r=o.useCallback(function(i){return e.render(i)},[e]),a=o.useCallback(function(){return e.needsRender=!0},[e]),u=o.useCallback(function(i,s){return e.preloadPano(i,s)},[e]);return{updateCamera:n,getPixels:t,render:r,needsRender:a,preloadPano:u}}function le(){var e=h(),n=o.useState(function(){return Symbol()});n[0];var t=n[1];o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return t(Symbol())})},[e]);var r=o.useCallback(function(a,u){return e.project2d(a,u)},[e]);return r}function U(e){var n=e.camera.getWorldDirection(new g.Vector3),t=new g.Raycaster(e.camera.position,n);return t}function ve(){var e=h(),n=o.useState(function(){return U(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return r(U(e))})},[e]),t}function T(e){return e.camera.getWorldDirection(new g.Vector3)}function de(){var e=h(),n=o.useState(function(){return T(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return r(T(e))})},[e]),t}function pe(){var e=h(),n=o.useCallback(function(t){return e.model.intersectRaycaster(t)},[e]);return n}function N(e){return e.model.empty?"Empty":"Loaded"}function he(){var e=h(),n=o.useState(function(){return N(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("modelLoaded",function(){return r(N(e))})},[e]),t}function ge(){var e=h(),n=o.useState(e.model.shownFloor),t=n[0],r=n[1],a=o.useState(e.model.floorLength),u=a[0],i=a[1],s=o.useCallback(function(c){typeof c=="number"?e.model.show(c):e.model.show()},[e]);return o.useLayoutEffect(function(){var c=[];return c.push(e.on("modelShownFloorChange",function(){return r(e.model.shownFloor)})),c.push(e.on("modelLoaded",function(){return i(e.model.floorLength)})),function(){for(var v;v=c.shift();)v()}},[e]),[t,u,s]}function ye(){var e=h(),n=o.useState(e.helperVisible),t=n[0],r=n[1],a=o.useCallback(function(u){e.helperVisible=u},[e]);return o.useLayoutEffect(function(){return e.on("helpersVisibleChange",function(u){return r(u)})},[e]),[t,a]}var me="$five";function l(e,n){return n.indexOf(e)>=0}function x(e,n){for(var t=0,r=Object.keys(n);t<r.length;t++){var a=r[t];n[a]!==void 0&&(e[a]=n[a])}}function Se(e,n){var t=l("state",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return y({},e.state)},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("stateChange",function(){return u(Symbol())})},[e]),[i,a]}function be(e,n){var t=l("currentState",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.getCurrentState()},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("currentStateChange",function(){return u(Symbol())})},[e]),[i,a]}function we(e,n){var t=l("currentObserver",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.getCurrentState()},[e,a]);o.useLayoutEffect(function(){if(t)return e.on("currentStateChange",function(){return u(Symbol())})},[e]);var s=void 0;return i&&(s=e.works.getResolvedObserver(i)),[s,a]}function Ce(e,n){var t=l("unsafe__fiveInstance",n);return[t?e:void 0]}function Fe(e,n){var t=l("works",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.works},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("load",function(){return u(Symbol())})},[e]),[i,a]}function ke(e,n){var t=l("model",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function Ee(e,n){var t=l("scene",n);return[t?e.scene:void 0]}function Re(e,n){var t=l("cameraDirection",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.camera.getWorldDirection(new g.Vector3)},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function Le(e,n){var t=l("cameraRaycaster",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t){var s=e.camera.getWorldDirection(new g.Vector3),c=new g.Raycaster(e.camera.position,s);return c}},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function _e(e,n){var t=l("modelReadyState",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model.empty?"Empty":"Loaded"},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function Pe(e,n){var t=l("shownFloor",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model.shownFloor},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelShownFloorChange",function(){return u(Symbol())})},[e]),[i,a]}function Ve(e,n){var t=l("helperVisible",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.helperVisible},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("helpersVisibleChange",function(){return u(Symbol())})},[e]),[i,a]}function Oe(e,n){if(l("loadWork",n))return e}function De(e,n){if(l("setState",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.setState.apply(e,t)}}function We(e,n){if(l("on",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.on.apply(e,t)}}function Me(e,n){if(l("on",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.once.apply(e,t)}}function je(e,n){if(l("off",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.off.apply(e,t)}}function Ue(e,n){if(l("intersectRaycaster",n))return function(){for(var t,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return(t=e.model).intersectRaycaster.apply(t,r)}}function Te(e,n){if(l("project2d",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.project2d.apply(e,t)}}function Ne(e,n){if(l("updateCamera",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.updateCamera.apply(e,t)}}function xe(e,n){if(l("getPixels",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.getPixels.apply(e,t)}}function $e(e,n){if(l("render",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.render.apply(e,t)}}function He(e,n){if(l("needsRender",n))return function(){e.needsRender=!0}}function Be(e,n){if(l("preloadPano",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.preloadPano.apply(e,t)}}function Ae(e,n){if(l("showFloor",n))return function(t){typeof t=="number"?e.model.show(t):e.model.show()}}function Ge(e,n){if(l("toggleHelperVisible",n))return function(t){e.helperVisible=t}}function Ie(e){return function(n){return o.forwardRef(function(t,r){var a=h(),u=W(),i=Ce(a,e)[0],s=Se(a,e),c=s[0],v=s[1],d=be(a,e),m=d[0],p=d[1],S=we(a,e),b=S[0],P=S[1],H=Fe(a,e),Qe=H[0],Xe=H[1],B=ke(a,e),Ye=B[0],Ze=B[1],er=Ee(a,e)[0],A=Re(a,e),rr=A[0],tr=A[1],G=Le(a,e),nr=G[0],ar=G[1],I=_e(a,e),or=I[0],ur=I[1],q=Pe(a,e),ir=q[0],sr=q[1],z=Ve(a,e),cr=z[0],fr=z[1],J=o.useMemo(function(){var C={};return x(C,{setState:De(a,e),loadWork:Oe(u,e),on:We(a,e),once:Me(a,e),off:je(a,e),intersectRaycaster:Ue(a,e),project2d:Te(a,e),updateCamera:Ne(a,e),getPixels:xe(a,e),render:$e(a,e),needsRender:He(a,e),preloadPano:Be(a,e),showFloor:Ae(a,e),toggleHelperVisible:Ge(a,e)}),C},[a,u]),lr=o.useMemo(function(){var C=y({},J);return x(C,{unsafe__fiveInstance:i,state:c,currentState:m,currentObserver:b,work:Qe,model:Ye,scene:er,cameraDirection:rr,cameraRaycaster:nr,modelReadyState:or,shownFloor:ir,helperVisible:cr}),C},[a,J,v,p,P,Xe,Ze,tr,ar,ur,sr,fr]);return o.createElement(n,y({ref:r,$five:lr},t))})}}function qe(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e}function _(e,n){for(var t={},r=n.length,a=-1;++a<r;){var u=n[a];u in e&&(t[u]=e[u])}return t}function ze(e,n){return typeof e=="number"&&typeof n=="number"&&isNaN(e)&&isNaN(n)?!0:e===n}function Je(e,n){for(var t=0;t<e.length;t++)for(var r=0;r<n.length;r++)if(e[t]===n[r])return!0;return!1}var $=function(){function e(n,t){this.values=n,this.listeners=[],this.onValuesChange=t}return e.prototype.on=function(n,t){var r=this,a=[n,t];return this.listeners.push(a),function(){var u=r.listeners.indexOf(a);u>=0&&r.listeners.splice(u,1)}},e.prototype.getValues=function(n){return _(this.values,n)},e.prototype.setValues=function(n,t){var r=[];for(var a in t)n.indexOf(a)>=0&&!ze(t[a],this.values[a])&&r.push(a);if(r.length!==0){for(var u=y({},this.values),i=0,s=r;i<s.length;i++){var c=s[i];this.values[c]=t[c]}this.onValuesChange&&this.onValuesChange(this.values,u);for(var v=0,d=this.listeners;v<d.length;v++){var m=d[v],p=m[0],S=m[1];if(Je(p,r)){var b=_(u,p),P=_(this.values,p);S(P,b)}}}},e}();function Ke(e){var n=o.createContext(null);return{useStore:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useRef(!0),u=o.useState(r.getValues(t)),i=u[0],s=u[1],c=F([r],t,!0);o.useLayoutEffect(function(){return a.current?a.current=!1:s(r.getValues(t)),r.on(t,function(d){return s(d)})},c);var v=o.useCallback(function(d){return r.setValues(t,d)},c);return[i,v]},useStoreSetter:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(u){return r.setValues(t,u)},F([r],t,!0));return a},watchStore:function(t,r,a){var u=o.useContext(n);if(u===null)throw new Error("StoreProvider never found.");var i=F([u],t,!0);a!==void 0&&(i=i.concat(a)),o.useLayoutEffect(function(){return u.on(t,r)},i)},useStoreAction:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(){for(var u=[],i=0;i<arguments.length;i++)u[i]=arguments[i];var s=e[t],c=s[0],v=s.slice(1),d=function(){return r.getValues(v)},m=function(p){return r.setValues(v,p)};return c.apply(void 0,F([d,m],u,!1))},[]);return a},StoreProvider:function(t){D(r,t);function r(a){var u=t.call(this,a)||this;return u.store=new $(a.initialValue,function(){for(var i,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];u.props.onValuesChange&&(i=u.props).onValuesChange.apply(i,s)}),u}return r.prototype.shouldComponentUpdate=function(a){return a.children!==this.props.children},r.prototype.render=function(){return o.createElement(n.Provider,{value:this.store},this.props.children)},r}(o.Component)}}f.FiveCanvas=te,f.INJECTION_PROPNAME=me,f.Store=$,f.createFiveFeature=qe,f.createFiveProvider=Z,f.createStore=Ke,f.unsafe__useFiveInstance=ne,f.useFiveAction=fe,f.useFiveCameraDirection=de,f.useFiveCameraRaycaster=ve,f.useFiveCurrentObserver=se,f.useFiveCurrentState=ie,f.useFiveEventCallback=ce,f.useFiveFloor=ge,f.useFiveHelper=ye,f.useFiveModelIntersectRaycaster=pe,f.useFiveModelReadyState=he,f.useFiveProject2d=le,f.useFiveScene=ae,f.useFiveSceneEffect=M,f.useFiveState=ue,f.useFiveWork=oe,f.withFive=Ie,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/28/2024
5
- * Version: 6.1.2
4
+ * Generated: 2024/9/4
5
+ * Version: 6.1.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */(function(s,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],u):(s=typeof globalThis!="undefined"?globalThis:s||self,u(s.FiveSDK_Sticker={},s.THREE))})(this,function(s,u){"use strict";function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const o=w(u);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},m(t,n)};function T(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}typeof SuppressedError=="function"&&SuppressedError;var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),_=new Float32Array([0,0,1,0,0,1,1,1]),R=new Uint8Array([0,1,2,1,3,2]),c=new o.BufferGeometry;c.setAttribute("position",new o.BufferAttribute(E,3)),c.setAttribute("uv",new o.BufferAttribute(_,2)),c.setIndex(new o.BufferAttribute(R,1));var l=window,g=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame||function(t){return setTimeout(t,16)},S=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),v=typeof performance!="undefined"?function(){return S+performance.now()}:function(){return Date.now()};function A(t,n){t.naturalWidth>0&&g(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function b(t,n){var e=v(),r=!1,i=function(){r=!0,n();var f=v();f-e<3e3?g(i):r=!1},a=function(){e=v(),r===!1&&i()};return t.addEventListener("timeupdate",a,!1),function(){t.removeEventListener("timeupdate",a,!1),r=!1}}function h(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var O=function(t){T(n,t);function n(e,r,i){var a=this,f=new o.MeshBasicMaterial;if(a=t.call(this,c,f)||this,a._needsRender=!1,a.scale.set(e,r,1),typeof i=="string"){f.transparent=/\.png$/.test(i);var y=new Image;y.src=i,y.crossOrigin="",i=y}if(i instanceof HTMLImageElement){var p=f.map=new o.Texture;p.wrapS=o.ClampToEdgeWrapping,p.wrapT=o.ClampToEdgeWrapping,p.minFilter=o.LinearFilter,p.encoding=o.sRGBEncoding,h(p,A(i,function(){p.image=i,p.needsUpdate=!0,a._needsRender=!0}))}else if(i instanceof HTMLCanvasElement)f.map=new o.CanvasTexture(i);else if(i instanceof HTMLVideoElement){var d=f.map=new o.VideoTexture(i);d.wrapS=o.ClampToEdgeWrapping,d.wrapT=o.ClampToEdgeWrapping,d.minFilter=o.LinearFilter,d.encoding=o.sRGBEncoding,h(d,b(i,function(){a._needsRender=!0}))}return a}return Object.defineProperty(n,"version",{get:function(){return"6.1.2"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,r){this.scale.set(e,r,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,r){r===void 0&&(r=.005);var i=e.point,a=e.face;this.position.copy(i),a&&(this.position.add(a.normal.clone().setLength(r)),this.lookAt(i.clone().add(a.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n}(o.Mesh);s.Sticker=O,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
255
+ */(function(s,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],u):(s=typeof globalThis!="undefined"?globalThis:s||self,u(s.FiveSDK_Sticker={},s.THREE))})(this,function(s,u){"use strict";function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const o=w(u);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},m(t,n)};function T(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}typeof SuppressedError=="function"&&SuppressedError;var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),_=new Float32Array([0,0,1,0,0,1,1,1]),R=new Uint8Array([0,1,2,1,3,2]),c=new o.BufferGeometry;c.setAttribute("position",new o.BufferAttribute(E,3)),c.setAttribute("uv",new o.BufferAttribute(_,2)),c.setIndex(new o.BufferAttribute(R,1));var l=window,g=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame||function(t){return setTimeout(t,16)},S=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),v=typeof performance!="undefined"?function(){return S+performance.now()}:function(){return Date.now()};function A(t,n){t.naturalWidth>0&&g(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function b(t,n){var e=v(),r=!1,i=function(){r=!0,n();var f=v();f-e<3e3?g(i):r=!1},a=function(){e=v(),r===!1&&i()};return t.addEventListener("timeupdate",a,!1),function(){t.removeEventListener("timeupdate",a,!1),r=!1}}function h(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var O=function(t){T(n,t);function n(e,r,i){var a=this,f=new o.MeshBasicMaterial;if(a=t.call(this,c,f)||this,a._needsRender=!1,a.scale.set(e,r,1),typeof i=="string"){f.transparent=/\.png$/.test(i);var y=new Image;y.src=i,y.crossOrigin="",i=y}if(i instanceof HTMLImageElement){var p=f.map=new o.Texture;p.wrapS=o.ClampToEdgeWrapping,p.wrapT=o.ClampToEdgeWrapping,p.minFilter=o.LinearFilter,p.encoding=o.sRGBEncoding,h(p,A(i,function(){p.image=i,p.needsUpdate=!0,a._needsRender=!0}))}else if(i instanceof HTMLCanvasElement)f.map=new o.CanvasTexture(i);else if(i instanceof HTMLVideoElement){var d=f.map=new o.VideoTexture(i);d.wrapS=o.ClampToEdgeWrapping,d.wrapT=o.ClampToEdgeWrapping,d.minFilter=o.LinearFilter,d.encoding=o.sRGBEncoding,h(d,b(i,function(){a._needsRender=!0}))}return a}return Object.defineProperty(n,"version",{get:function(){return"6.1.4"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,r){this.scale.set(e,r,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,r){r===void 0&&(r=.005);var i=e.point,a=e.face;this.position.copy(i),a&&(this.position.add(a.normal.clone().setLength(r)),this.lookAt(i.clone().add(a.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n}(o.Mesh);s.Sticker=O,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
package/umd/five-vfx.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/28/2024
5
- * Version: 6.1.2
4
+ * Generated: 2024/9/4
5
+ * Version: 6.1.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/umd/five-vue.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/28/2024
5
- * Version: 6.1.2
4
+ * Generated: 2024/9/4
5
+ * Version: 6.1.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021