@realsee/five 6.1.0 → 6.1.2

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/sticker/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
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
- */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(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)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||function(t){return setTimeout(t,16)},R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?function(){return R+performance.now()}:function(){return Date.now()};function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var f=s.map=new a.Texture;f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,S(r,function(){f.image=r,f.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var p=s.map=new a.VideoTexture(r);p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,A(r,function(){o._needsRender=!0}))}return o}return Object.defineProperty(n,"version",{get:function(){return"6.1.0"},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,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n}(a.Mesh);exports.Sticker=b;
255
+ */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(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)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||function(t){return setTimeout(t,16)},R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?function(){return R+performance.now()}:function(){return Date.now()};function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var f=s.map=new a.Texture;f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,S(r,function(){f.image=r,f.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var p=s.map=new a.VideoTexture(r);p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,A(r,function(){o._needsRender=!0}))}return o}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,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n}(a.Mesh);exports.Sticker=b;
package/sticker/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -366,7 +366,7 @@ var A = (
366
366
  }
367
367
  return Object.defineProperty(n, "version", {
368
368
  get: function() {
369
- return "6.1.0";
369
+ return "6.1.2";
370
370
  },
371
371
  enumerable: !1,
372
372
  configurable: !0
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -258,4 +258,4 @@
258
258
  `),a=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
259
259
  `),i=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor.rgb;"].join(`
260
260
  `),s={specular:{value:new l.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(o){for(var f in s)o.uniforms[f]=s[f];o.fragmentShader=o.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;"),o.fragmentShader=o.fragmentShader.replace("uniform float metalness;","uniform float glossiness;"),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_pars_fragment>",r),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_pars_fragment>",n),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_fragment>",t),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_fragment>",a),o.fragmentShader=o.fragmentShader.replace("#include <lights_physical_fragment>",i)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(o){s.specular.value=o}},specularMap:{get:function(){return s.specularMap.value},set:function(o){s.specularMap.value=o}},glossiness:{get:function(){return s.glossiness.value},set:function(o){s.glossiness.value=o}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(o){s.glossinessMap.value=o,o?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_ROUGHNESSMAP=""):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}I.prototype=Object.create(l.MeshStandardMaterial.prototype),I.prototype.constructor=I,I.prototype.copy=function(e){return l.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this};function X(){return{name:u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return I},extendParams:function(e,r,n){var t=r.extensions[this.name];e.color=new l.Color(1,1,1),e.opacity=1;var a=[];if(Array.isArray(t.diffuseFactor)){var i=t.diffuseFactor;e.color.fromArray(i),e.opacity=i[3]}if(t.diffuseTexture!==void 0&&a.push(n.assignTexture(e,"map",t.diffuseTexture)),e.emissive=new l.Color(0,0,0),e.glossiness=t.glossinessFactor!==void 0?t.glossinessFactor:1,e.specular=new l.Color(1,1,1),Array.isArray(t.specularFactor)&&e.specular.fromArray(t.specularFactor),t.specularGlossinessTexture!==void 0){var s=t.specularGlossinessTexture;a.push(n.assignTexture(e,"glossinessMap",s)),a.push(n.assignTexture(e,"specularMap",s))}return Promise.all(a)},createMaterial:function(e){var r=new I(e);return r.fog=!0,r.color=e.color,r.map=e.map===void 0?null:e.map,r.lightMap=null,r.lightMapIntensity=1,r.aoMap=e.aoMap===void 0?null:e.aoMap,r.aoMapIntensity=1,r.emissive=e.emissive,r.emissiveIntensity=1,r.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,r.bumpMap=e.bumpMap===void 0?null:e.bumpMap,r.bumpScale=1,r.normalMap=e.normalMap===void 0?null:e.normalMap,r.normalMapType=l.TangentSpaceNormalMap,e.normalScale&&(r.normalScale=e.normalScale),r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.specularMap=e.specularMap===void 0?null:e.specularMap,r.specular=e.specular,r.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,r.glossiness=e.glossiness,r.alphaMap=null,r.envMap=e.envMap===void 0?null:e.envMap,r.envMapIntensity=1,r.refractionRatio=.98,r}}}function ee(){this.name=u.KHR_MESH_QUANTIZATION}function U(e,r,n,t){l.Interpolant.call(this,e,r,n,t)}U.prototype=Object.create(l.Interpolant.prototype),U.prototype.constructor=U,U.prototype.copySampleValue_=function(e){for(var r=this.resultBuffer,n=this.sampleValues,t=this.valueSize,a=e*t*3+t,i=0;i!==t;i++)r[i]=n[a+i];return r},U.prototype.beforeStart_=U.prototype.copySampleValue_,U.prototype.afterEnd_=U.prototype.copySampleValue_,U.prototype.interpolate_=function(e,r,n,t){for(var a=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=s*2,f=s*3,c=t-r,v=(n-r)/c,d=v*v,h=d*v,T=e*f,M=T-f,y=-2*h+3*d,w=h-d,L=1-y,D=w-d+v,N=0;N!==s;N++){var ne=i[M+N+s],ae=i[M+N+o]*c,Z=i[T+N+s],j=i[T+N]*c;a[N]=L*ne+D*ae+y*Z+w*j}return a};var K={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},re={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},te={9728:l.NearestFilter,9729:l.LinearFilter,9984:l.NearestMipmapNearestFilter,9985:l.LinearMipmapNearestFilter,9986:l.NearestMipmapLinearFilter,9987:l.LinearMipmapLinearFilter},Q={33071:l.ClampToEdgeWrapping,33648:l.MirroredRepeatWrapping,10497:l.RepeatWrapping},Y={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},z={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},W={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Te={CUBICSPLINE:void 0,LINEAR:l.InterpolateLinear,STEP:l.InterpolateDiscrete},ue={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},pe={"image/png":l.RGBAFormat,"image/jpeg":l.RGBFormat};function he(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}function Le(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new l.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:l.FrontSide})),e.DefaultMaterial}function oe(e,r,n){for(var t in n.extensions)e[t]===void 0&&(r.userData.gltfExtensions=r.userData.gltfExtensions||{},r.userData.gltfExtensions[t]=n.extensions[t])}function q(e,r){r.extras!==void 0&&(typeof r.extras=="object"?Object.assign(e.userData,r.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+r.extras))}function _e(e,r,n){for(var t=!1,a=!1,i=0,s=r.length;i<s;i++){var o=r[i];if(o.POSITION!==void 0&&(t=!0),o.NORMAL!==void 0&&(a=!0),t&&a)break}if(!t&&!a)return Promise.resolve(e);for(var f=[],c=[],i=0,s=r.length;i<s;i++){var o=r[i];if(t){var v=o.POSITION!==void 0?n.getDependency("accessor",o.POSITION):e.attributes.position;f.push(v)}if(a){var v=o.NORMAL!==void 0?n.getDependency("accessor",o.NORMAL):e.attributes.normal;c.push(v)}}return Promise.all([Promise.all(f),Promise.all(c)]).then(function(d){var h=d[0],T=d[1];return t&&(e.morphAttributes.position=h),a&&(e.morphAttributes.normal=T),e.morphTargetsRelative=!0,e})}function Me(e,r){if(e.updateMorphTargets(),r.weights!==void 0)for(var n=0,t=r.weights.length;n<t;n++)e.morphTargetInfluences[n]=r.weights[n];if(r.extras&&Array.isArray(r.extras.targetNames)){var a=r.extras.targetNames;if(e.morphTargetInfluences.length===a.length){e.morphTargetDictionary={};for(var n=0,t=a.length;n<t;n++)e.morphTargetDictionary[a[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function we(e){var r=e.extensions&&e.extensions[u.KHR_DRACO_MESH_COMPRESSION],n;return r?n="draco:"+r.bufferView+":"+r.indices+":"+G(r.attributes):n=e.indices+":"+G(e.attributes)+":"+e.mode,n}function G(e){for(var r="",n=Object.keys(e).sort(),t=0,a=n.length;t<a;t++)r+=n[t]+":"+e[n[t]]+";";return r}function R(e,r,n){this.json=e||{},this.extensions=r||{},this.options=n||{},this.cache=new g,this.associations=new Map,this.primitiveCache={},this.textureLoader=new l.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new l.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}R.prototype.parse=function(e,r){var n=this,t=this.json,a=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(i){var s={scene:i[0][t.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:t.asset,parser:n,userData:{}};oe(a,s,t),q(s,t),e(s)}).catch(r)},R.prototype.markDefs=function(){for(var e=this.json.nodes||[],r=this.json.skins||[],n=this.json.meshes||[],t={},a={},i=0,s=r.length;i<s;i++)for(var o=r[i].joints,f=0,c=o.length;f<c;f++)e[o[f]].isBone=!0;for(var v=0,d=e.length;v<d;v++){var h=e[v];h.mesh!==void 0&&(t[h.mesh]===void 0&&(t[h.mesh]=a[h.mesh]=0),t[h.mesh]++,h.skin!==void 0&&(n[h.mesh].isSkinnedMesh=!0))}this.json.meshReferences=t,this.json.meshUses=a},R.prototype.getDependency=function(e,r){var n=e+":"+r,t=this.cache.get(n);if(!t){switch(e){case"scene":t=this.loadScene(r);break;case"node":t=this.loadNode(r);break;case"mesh":t=this.loadMesh(r);break;case"accessor":t=this.loadAccessor(r);break;case"bufferView":t=this.loadBufferView(r);break;case"buffer":t=this.loadBuffer(r);break;case"material":t=this.loadMaterial(r);break;case"texture":t=this.loadTexture(r);break;case"skin":t=this.loadSkin(r);break;case"animation":t=this.loadAnimation(r);break;case"camera":t=this.loadCamera(r);break;case"light":t=this.extensions[u.KHR_LIGHTS_PUNCTUAL].loadLight(r);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,t)}return t},R.prototype.getDependencies=function(e){var r=this.cache.get(e);if(!r){var n=this,t=this.json[e+(e==="mesh"?"es":"s")]||[];r=Promise.all(t.map(function(a,i){return n.getDependency(e,i)})),this.cache.add(e,r)}return r},R.prototype.loadBuffer=function(e){var r=this.json.buffers[e],n=this.fileLoader;if(r.type&&r.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+r.type+" buffer type is not supported.");if(r.uri===void 0&&e===0)return Promise.resolve(this.extensions[u.KHR_BINARY_GLTF].body);var t=this.options;return new Promise(function(a,i){n.load(he(r.uri,t.path),a,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+r.uri+'".'))})})},R.prototype.loadBufferView=function(e){var r=this.json.bufferViews[e];return this.getDependency("buffer",r.buffer).then(function(n){var t=r.byteLength||0,a=r.byteOffset||0;return n.slice(a,a+t)})},R.prototype.loadAccessor=function(e){var r=this,n=this.json,t=this.json.accessors[e];if(t.bufferView===void 0&&t.sparse===void 0)return Promise.resolve(null);var a=[];return t.bufferView!==void 0?a.push(this.getDependency("bufferView",t.bufferView)):a.push(null),t.sparse!==void 0&&(a.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(a).then(function(i){var s=i[0],o=Y[t.type],f=re[t.componentType],c=f.BYTES_PER_ELEMENT,v=c*o,d=t.byteOffset||0,h=t.bufferView!==void 0?n.bufferViews[t.bufferView].byteStride:void 0,T=t.normalized===!0,M,y;if(h&&h!==v){var w=Math.floor(d/h),L="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+w+":"+t.count,D=r.cache.get(L);D||(M=new f(s,w*h,t.count*h/c),D=new l.InterleavedBuffer(M,h/c),r.cache.add(L,D)),y=new l.InterleavedBufferAttribute(D,o,d%h/c,T)}else s===null?M=new f(t.count*o):M=new f(s,d,t.count*o),y=new l.BufferAttribute(M,o,T);if(t.sparse!==void 0){var N=Y.SCALAR,ne=re[t.sparse.indices.componentType],ae=t.sparse.indices.byteOffset||0,Z=t.sparse.values.byteOffset||0,j=new ne(i[1],ae,t.sparse.count*N),ie=new f(i[2],Z,t.sparse.count*o);s!==null&&(y=new l.BufferAttribute(y.array.slice(),y.itemSize,y.normalized));for(var B=0,be=j.length;B<be;B++){var se=j[B];if(y.setX(se,ie[B*o]),o>=2&&y.setY(se,ie[B*o+1]),o>=3&&y.setZ(se,ie[B*o+2]),o>=4&&y.setW(se,ie[B*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return y})},R.prototype.loadTexture=function(e){var r=this,n=this.json,t=this.options,a=this.textureLoader,i=self.URL||self.webkitURL,s=n.textures[e],o=s.extensions||{},f;o[u.MSFT_TEXTURE_DDS]?f=n.images[o[u.MSFT_TEXTURE_DDS].source]:f=n.images[s.source];var c=f.uri,v=!1;return f.bufferView!==void 0&&(c=r.getDependency("bufferView",f.bufferView).then(function(d){v=!0;var h=new Blob([d],{type:f.mimeType});return c=i.createObjectURL(h),c})),Promise.resolve(c).then(function(d){var h=t.manager.getHandler(d);return h||(h=o[u.MSFT_TEXTURE_DDS]?r.extensions[u.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(T,M){h.load(he(d,t.path),T,void 0,M)})}).then(function(d){v===!0&&i.revokeObjectURL(c),d.flipY=!1,s.name&&(d.name=s.name),f.mimeType in pe&&(d.format=pe[f.mimeType]);var h=n.samplers||{},T=h[s.sampler]||{};return d.magFilter=te[T.magFilter]||l.LinearFilter,d.minFilter=te[T.minFilter]||l.LinearMipmapLinearFilter,d.wrapS=Q[T.wrapS]||l.RepeatWrapping,d.wrapT=Q[T.wrapT]||l.RepeatWrapping,r.associations.set(d,{type:"textures",index:e}),d})},R.prototype.assignTexture=function(e,r,n){var t=this;return this.getDependency("texture",n.index).then(function(a){if(!a.isCompressedTexture)switch(r){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":a.format=l.RGBFormat;break}if(n.texCoord!==void 0&&n.texCoord!=0&&!(r==="aoMap"&&n.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+r+" not yet supported."),t.extensions[u.KHR_TEXTURE_TRANSFORM]){var i=n.extensions!==void 0?n.extensions[u.KHR_TEXTURE_TRANSFORM]:void 0;if(i){var s=this.associations.get(a);a=t.extensions[u.KHR_TEXTURE_TRANSFORM].extendTexture(a,i),this.associations.set(a,s)}}e[r]=a})},R.prototype.assignFinalMaterial=function(e){var r=e.geometry,n=e.material,t=r.attributes.tangent!==void 0,a=r.attributes.color!==void 0,i=r.attributes.normal===void 0,s=e.isSkinnedMesh===!0,o=Object.keys(r.morphAttributes).length>0,f=o&&r.morphAttributes.normal!==void 0;if(e.isPoints){var c="PointsMaterial:"+n.uuid,v=this.cache.get(c);v||(v=new l.PointsMaterial,l.Material.prototype.copy.call(v,n),v.color.copy(n.color),v.map=n.map,v.sizeAttenuation=!1,this.cache.add(c,v)),n=v}else if(e.isLine){var c="LineBasicMaterial:"+n.uuid,d=this.cache.get(c);d||(d=new l.LineBasicMaterial,l.Material.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(c,d)),n=d}if(t||a||i||s||o){var c="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),s&&(c+="skinning:"),t&&(c+="vertex-tangents:"),a&&(c+="vertex-colors:"),i&&(c+="flat-shading:"),o&&(c+="morph-targets:"),f&&(c+="morph-normals:");var h=this.cache.get(c);h||(h=n.clone(),s&&(h.skinning=!0),t&&(h.vertexTangents=!0),a&&(h.vertexColors=!0),i&&(h.flatShading=!0),o&&(h.morphTargets=!0),f&&(h.morphNormals=!0),this.cache.add(c,h),this.associations.set(h,this.associations.get(n))),n=h}n.aoMap&&r.attributes.uv2===void 0&&r.attributes.uv!==void 0&&r.setAttribute("uv2",r.attributes.uv),n.normalScale&&!t&&(n.normalScale.y=-n.normalScale.y),n.clearcoatNormalScale&&!t&&(n.clearcoatNormalScale.y=-n.clearcoatNormalScale.y),e.material=n},R.prototype.loadMaterial=function(e){var r=this,n=this.json,t=this.extensions,a=n.materials[e],i,s={},o=a.extensions||{},f=[];if(o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];i=c.getMaterialType(),f.push(c.extendParams(s,a,r))}else if(o[u.KHR_MATERIALS_UNLIT]){var v=t[u.KHR_MATERIALS_UNLIT];i=v.getMaterialType(),f.push(v.extendParams(s,a,r))}else{i=l.MeshStandardMaterial;var d=a.pbrMetallicRoughness||{};if(s.color=new l.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var h=d.baseColorFactor;s.color.fromArray(h),s.opacity=h[3]}d.baseColorTexture!==void 0&&f.push(r.assignTexture(s,"map",d.baseColorTexture)),s.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,s.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(f.push(r.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),f.push(r.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=l.DoubleSide);var T=a.alphaMode||ue.OPAQUE;if(T===ue.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,T===ue.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new l.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&i!==l.MeshBasicMaterial&&(s.emissive=new l.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&i!==l.MeshBasicMaterial&&f.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture)),o[u.KHR_MATERIALS_CLEARCOAT]){var M=t[u.KHR_MATERIALS_CLEARCOAT];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}if(o[u.KHR_MATERIALS_TRANSMISSION]){var M=t[u.KHR_MATERIALS_TRANSMISSION];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}return Promise.all(f).then(function(){var y;return i===I?y=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):y=new i(s),a.name&&(y.name=a.name),y.map&&(y.map.encoding=l.sRGBEncoding),y.emissiveMap&&(y.emissiveMap.encoding=l.sRGBEncoding),q(y,a),r.associations.set(y,{type:"materials",index:e}),a.extensions&&oe(t,y,a),y})};function ve(e,r,n){var t=r.attributes,a=new l.Box3;if(t.POSITION!==void 0){var i=n.json.accessors[t.POSITION],s=i.min,o=i.max;if(s!==void 0&&o!==void 0)a.set(new l.Vector3(s[0],s[1],s[2]),new l.Vector3(o[0],o[1],o[2]));else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;var f=r.targets;if(f!==void 0){for(var c=new l.Vector3,v=new l.Vector3,d=0,h=f.length;d<h;d++){var T=f[d];if(T.POSITION!==void 0){var i=n.json.accessors[T.POSITION],s=i.min,o=i.max;s!==void 0&&o!==void 0?(v.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),v.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),v.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),c.max(v)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(c)}e.boundingBox=a;var M=new l.Sphere;a.getCenter(M.center),M.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=M}function le(e,r,n){var t=r.attributes,a=[];function i(c,v){return n.getDependency("accessor",c).then(function(d){e.setAttribute(v,d)})}for(var s in t){var o=z[s]||s.toLowerCase();o in e.attributes||a.push(i(t[s],o))}if(r.indices!==void 0&&!e.index){var f=n.getDependency("accessor",r.indices).then(function(c){e.setIndex(c)});a.push(f)}return q(e,r),ve(e,r,n),Promise.all(a).then(function(){return r.targets!==void 0?_e(e,r.targets,n):e})}function H(e,r){var n=e.getIndex();if(n===null){var t=[],a=e.getAttribute("position");if(a!==void 0){for(var i=0;i<a.count;i++)t.push(i);e.setIndex(t),n=e.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e}var s=n.count-2,o=[];if(r===l.TriangleFanDrawMode)for(var i=1;i<=s;i++)o.push(n.getX(0)),o.push(n.getX(i)),o.push(n.getX(i+1));else for(var i=0;i<s;i++)i%2===0?(o.push(n.getX(i)),o.push(n.getX(i+1)),o.push(n.getX(i+2))):(o.push(n.getX(i+2)),o.push(n.getX(i+1)),o.push(n.getX(i)));o.length/3!==s&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var f=e.clone();return f.setIndex(o),f}return R.prototype.loadGeometries=function(e){var r=this,n=this.extensions,t=this.primitiveCache;function a(h){return n[u.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(h,r).then(function(T){return le(T,h,r)})}for(var i=[],s=0,o=e.length;s<o;s++){var f=e[s],c=we(f),v=t[c];if(v)i.push(v.promise);else{var d;f.extensions&&f.extensions[u.KHR_DRACO_MESH_COMPRESSION]?d=a(f):d=le(new l.BufferGeometry,f,r),t[c]={primitive:f,promise:d},i.push(d)}}return Promise.all(i)},R.prototype.loadMesh=function(e){for(var r=this,n=this.json,t=n.meshes[e],a=t.primitives,i=[],s=0,o=a.length;s<o;s++){var f=a[s].material===void 0?Le(this.cache):this.getDependency("material",a[s].material);i.push(f)}return i.push(r.loadGeometries(a)),Promise.all(i).then(function(c){for(var v=c.slice(0,c.length-1),d=c[c.length-1],h=[],T=0,M=d.length;T<M;T++){var y=d[T],w=a[T],L,D=v[T];if(w.mode===K.TRIANGLES||w.mode===K.TRIANGLE_STRIP||w.mode===K.TRIANGLE_FAN||w.mode===void 0)L=t.isSkinnedMesh===!0?new l.SkinnedMesh(y,D):new l.Mesh(y,D),L.isSkinnedMesh===!0&&!L.geometry.attributes.skinWeight.normalized&&L.normalizeSkinWeights(),w.mode===K.TRIANGLE_STRIP?L.geometry=H(L.geometry,l.TriangleStripDrawMode):w.mode===K.TRIANGLE_FAN&&(L.geometry=H(L.geometry,l.TriangleFanDrawMode));else if(w.mode===K.LINES)L=new l.LineSegments(y,D);else if(w.mode===K.LINE_STRIP)L=new l.Line(y,D);else if(w.mode===K.LINE_LOOP)L=new l.LineLoop(y,D);else if(w.mode===K.POINTS)L=new l.Points(y,D);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+w.mode);Object.keys(L.geometry.morphAttributes).length>0&&Me(L,t),L.name=t.name||"mesh_"+e,d.length>1&&(L.name+="_"+T),q(L,t),r.assignFinalMaterial(L),h.push(L)}if(h.length===1)return h[0];for(var N=new l.Group,T=0,M=h.length;T<M;T++)N.add(h[T]);return N})},R.prototype.loadCamera=function(e){var r,n=this.json.cameras[e],t=n[n.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?r=new l.PerspectiveCamera(l.MathUtils.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):n.type==="orthographic"&&(r=new l.OrthographicCamera(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),n.name&&(r.name=n.name),q(r,n),Promise.resolve(r)},R.prototype.loadSkin=function(e){var r=this.json.skins[e],n={joints:r.joints};return r.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency("accessor",r.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},R.prototype.loadAnimation=function(e){for(var r=this.json,n=r.animations[e],t=[],a=[],i=[],s=[],o=[],f=0,c=n.channels.length;f<c;f++){var v=n.channels[f],d=n.samplers[v.sampler],h=v.target,T=h.node!==void 0?h.node:h.id,M=n.parameters!==void 0?n.parameters[d.input]:d.input,y=n.parameters!==void 0?n.parameters[d.output]:d.output;t.push(this.getDependency("node",T)),a.push(this.getDependency("accessor",M)),i.push(this.getDependency("accessor",y)),s.push(d),o.push(h)}return Promise.all([Promise.all(t),Promise.all(a),Promise.all(i),Promise.all(s),Promise.all(o)]).then(function(w){for(var L=w[0],D=w[1],N=w[2],ne=w[3],ae=w[4],Z=[],j=0,ie=L.length;j<ie;j++){var B=L[j],be=D[j],se=N[j],Ce=ne[j],Ie=ae[j];if(B!==void 0){B.updateMatrix(),B.matrixAutoUpdate=!0;var ge;switch(W[Ie.path]){case W.weights:ge=l.NumberKeyframeTrack;break;case W.rotation:ge=l.QuaternionKeyframeTrack;break;case W.position:case W.scale:default:ge=l.VectorKeyframeTrack;break}var Ne=B.name?B.name:B.uuid,ke=Ce.interpolation!==void 0?Te[Ce.interpolation]:l.InterpolateLinear,me=[];W[Ie.path]===W.weights?B.traverse(function(fe){fe.isMesh===!0&&fe.morphTargetInfluences&&me.push(fe.name?fe.name:fe.uuid)}):me.push(Ne);var J=se.array;if(se.normalized){var ce;if(J.constructor===Int8Array)ce=1/127;else if(J.constructor===Uint8Array)ce=1/255;else if(J.constructor==Int16Array)ce=1/32767;else if(J.constructor===Uint16Array)ce=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var De=new Float32Array(J.length),$=0,xe=J.length;$<xe;$++)De[$]=J[$]*ce;J=De}for(var $=0,xe=me.length;$<xe;$++){var Re=new ge(me[$]+"."+W[Ie.path],be.array,J,ke);Ce.interpolation==="CUBICSPLINE"&&(Re.createInterpolant=function(Ee){return new U(this.times,this.values,this.getValueSize()/3,Ee)},Re.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),Z.push(Re)}}}var Be=n.name?n.name:"animation_"+e;return new l.AnimationClip(Be,void 0,Z)})},R.prototype.loadNode=function(e){var r=this.json,n=this.extensions,t=this,a=r.meshReferences,i=r.meshUses,s=r.nodes[e];return function(){var o=[];return s.mesh!==void 0&&o.push(t.getDependency("mesh",s.mesh).then(function(f){var c;if(a[s.mesh]>1){var v=i[s.mesh]++;c=f.clone(),c.name+="_instance_"+v}else c=f;return s.weights!==void 0&&c.traverse(function(d){if(d.isMesh)for(var h=0,T=s.weights.length;h<T;h++)d.morphTargetInfluences[h]=s.weights[h]}),c})),s.camera!==void 0&&o.push(t.getDependency("camera",s.camera)),s.extensions&&s.extensions[u.KHR_LIGHTS_PUNCTUAL]&&s.extensions[u.KHR_LIGHTS_PUNCTUAL].light!==void 0&&o.push(t.getDependency("light",s.extensions[u.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(o)}().then(function(o){var f;if(s.isBone===!0?f=new l.Bone:o.length>1?f=new l.Group:o.length===1?f=o[0]:f=new l.Object3D,f!==o[0])for(var c=0,v=o.length;c<v;c++)f.add(o[c]);if(s.name&&(f.userData.name=s.name,f.name=l.PropertyBinding.sanitizeNodeName(s.name)),q(f,s),s.extensions&&oe(n,f,s),s.matrix!==void 0){var d=new l.Matrix4;d.fromArray(s.matrix),f.applyMatrix4(d)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);return t.associations.set(f,{type:"nodes",index:e}),f})},R.prototype.loadScene=function(){function e(r,n,t,a){var i=t.nodes[r];return a.getDependency("node",r).then(function(s){if(i.skin===void 0)return s;var o;return a.getDependency("skin",i.skin).then(function(f){o=f;for(var c=[],v=0,d=o.joints.length;v<d;v++)c.push(a.getDependency("node",o.joints[v]));return Promise.all(c)}).then(function(f){return s.traverse(function(c){if(c.isMesh){for(var v=[],d=[],h=0,T=f.length;h<T;h++){var M=f[h];if(M){v.push(M);var y=new l.Matrix4;o.inverseBindMatrices!==void 0&&y.fromArray(o.inverseBindMatrices.array,h*16),d.push(y)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}c.bind(new l.Skeleton(v,d),c.matrixWorld)}}),s})}).then(function(s){n.add(s);var o=[];if(i.children)for(var f=i.children,c=0,v=f.length;c<v;c++){var d=f[c];o.push(e(d,s,t,a))}return Promise.all(o)})}return function(n){var t=this.json,a=this.extensions,i=this.json.scenes[n],s=this,o=new l.Group;i.name&&(o.name=i.name),q(o,i),i.extensions&&oe(a,o,i);for(var f=i.nodes||[],c=[],v=0,d=f.length;v<d;v++)c.push(e(f[v],o,t,s));return Promise.all(c).then(function(){return o})}}(),p}(),E=function(p){l.Loader.call(this,p),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}};E.prototype=Object.assign(Object.create(l.Loader.prototype),{constructor:E,setDecoderPath:function(p){return this.decoderPath=p,this},setDecoderConfig:function(p){return this.decoderConfig=p,this},setWorkerLimit:function(p){return this.workerLimit=p,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(p,g,u,A){var m=new l.FileLoader(this.manager);m.setPath(this.path),m.setResponseType("arraybuffer"),this.crossOrigin==="use-credentials"&&m.setWithCredentials(!0),m.load(p,S=>{var _={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(S,_).then(g).catch(A)},u,A)},decodeDracoFile:function(p,g,u,A){var m={attributeIDs:u||this.defaultAttributeIDs,attributeTypes:A||this.defaultAttributeTypes,useUniqueIDs:!!u};this.decodeGeometry(p,m).then(g)},decodeGeometry:function(p,g){for(var u in g.attributeTypes){var A=g.attributeTypes[u];A.BYTES_PER_ELEMENT!==void 0&&(g.attributeTypes[u]=A.name)}var m=JSON.stringify(g);if(E.taskCache.has(p)){var S=E.taskCache.get(p);if(S.key===m)return S.promise;if(p.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var _,F=this.workerNextTaskID++,P=p.byteLength,b=this._getWorker(F,P).then(x=>(_=x,new Promise((k,O)=>{_._callbacks[F]={resolve:k,reject:O},_.postMessage({type:"decode",id:F,taskConfig:g,buffer:p},[p])}))).then(x=>this._createGeometry(x.geometry));return b.catch(()=>!0).then(()=>{_&&F&&this._releaseTask(_,F)}),E.taskCache.set(p,{key:m,promise:b}),b},_createGeometry:function(p){var g=new l.BufferGeometry;p.index&&g.setIndex(new l.BufferAttribute(p.index.array,1));for(var u=0;u<p.attributes.length;u++){var A=p.attributes[u],m=A.name,S=A.array,_=A.itemSize;g.setAttribute(m,new l.BufferAttribute(S,_))}return g},_loadLibrary:function(p,g){var u=new l.FileLoader(this.manager);return u.setPath(this.decoderPath),u.setResponseType(g),new Promise((A,m)=>{u.load(p,A,void 0,m)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var p=typeof WebAssembly!="object"||this.decoderConfig.type==="js",g=[];return p?g.push(this._loadLibrary("draco_decoder.js","text")):(g.push(this._loadLibrary("draco_wasm_wrapper.js","text")),g.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(g).then(u=>{var A=u[0];p||(this.decoderConfig.wasmBinary=u[1]);var m=E.DRACOWorker.toString(),S=["/* draco decoder */",A,"","/* worker */",m.substring(m.indexOf("{")+1,m.lastIndexOf("}"))].join(`
261
- `);this.workerSourceURL=URL.createObjectURL(new Blob([S]))}),this.decoderPending},_getWorker:function(p,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var u=new Worker(this.workerSourceURL);u._callbacks={},u._taskCosts={},u._taskLoad=0,u.postMessage({type:"init",decoderConfig:this.decoderConfig}),u.onmessage=function(m){var S=m.data;switch(S.type){case"decode":u._callbacks[S.id].resolve(S);break;case"error":u._callbacks[S.id].reject(S);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+S.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(A,m){return A._taskLoad>m._taskLoad?-1:1});var u=this.workerPool[this.workerPool.length-1];return u._taskCosts[p]=g,u._taskLoad+=g,u})},_releaseTask:function(p,g){p._taskLoad-=p._taskCosts[g],delete p._callbacks[g],delete p._taskCosts[g]},debug:function(){console.log("Task load: ",this.workerPool.map(p=>p._taskLoad))},dispose:function(){for(var p=0;p<this.workerPool.length;++p)this.workerPool[p].terminate();return this.workerPool.length=0,this}}),E.DRACOWorker=function(){var p,g;onmessage=function(m){var S=m.data;switch(S.type){case"init":p=S.decoderConfig,g=new Promise(function(P){p.onModuleLoaded=function(b){P({draco:b})},DracoDecoderModule(p)});break;case"decode":var _=S.buffer,F=S.taskConfig;g.then(P=>{var b=P.draco,x=new b.Decoder,k=new b.DecoderBuffer;k.Init(new Int8Array(_),_.byteLength);try{var O=u(b,x,k,F),C=O.attributes.map(I=>I.array.buffer);O.index&&C.push(O.index.array.buffer),self.postMessage({type:"decode",id:S.id,geometry:O},C)}catch(I){console.error(I),self.postMessage({type:"error",id:S.id,error:I.message})}finally{b.destroy(k),b.destroy(x)}});break}};function u(m,S,_,F){var P=F.attributeIDs,b=F.attributeTypes,x,k,O=S.GetEncodedGeometryType(_);if(O===m.TRIANGULAR_MESH)x=new m.Mesh,k=S.DecodeBufferToMesh(_,x);else if(O===m.POINT_CLOUD)x=new m.PointCloud,k=S.DecodeBufferToPointCloud(_,x);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!k.ok()||x.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+k.error_msg());var C={index:null,attributes:[]};for(var I in P){var X=self[b[I]],ee,U;if(F.useUniqueIDs)U=P[I],ee=S.GetAttributeByUniqueId(x,U);else{if(U=S.GetAttributeId(x,m[P[I]]),U===-1)continue;ee=S.GetAttribute(x,U)}C.attributes.push(A(m,S,x,I,X,ee))}if(O===m.TRIANGULAR_MESH){for(var K=x.num_faces(),re=K*3,te=new Uint32Array(re),Q=new m.DracoInt32Array,Y=0;Y<K;++Y){S.GetFaceFromMesh(x,Y,Q);for(var z=0;z<3;++z)te[Y*3+z]=Q.GetValue(z)}C.index={array:te,itemSize:1},m.destroy(Q)}return m.destroy(x),C}function A(m,S,_,F,P,b){var x=b.num_components(),k=_.num_points(),O=k*x,C,I;switch(P){case Float32Array:C=new m.DracoFloat32Array,S.GetAttributeFloatForAllPoints(_,b,C),I=new Float32Array(O);break;case Int8Array:C=new m.DracoInt8Array,S.GetAttributeInt8ForAllPoints(_,b,C),I=new Int8Array(O);break;case Int16Array:C=new m.DracoInt16Array,S.GetAttributeInt16ForAllPoints(_,b,C),I=new Int16Array(O);break;case Int32Array:C=new m.DracoInt32Array,S.GetAttributeInt32ForAllPoints(_,b,C),I=new Int32Array(O);break;case Uint8Array:C=new m.DracoUInt8Array,S.GetAttributeUInt8ForAllPoints(_,b,C),I=new Uint8Array(O);break;case Uint16Array:C=new m.DracoUInt16Array,S.GetAttributeUInt16ForAllPoints(_,b,C),I=new Uint16Array(O);break;case Uint32Array:C=new m.DracoUInt32Array,S.GetAttributeUInt32ForAllPoints(_,b,C),I=new Uint32Array(O);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var X=0;X<O;X++)I[X]=C.GetValue(X);return m.destroy(C),{name:F,array:I,itemSize:x}}},E.taskCache=new WeakMap,E.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},E.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},E.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},E.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var de=function(p){l.CompressedTextureLoader.call(this,p)};de.prototype=Object.assign(Object.create(l.CompressedTextureLoader.prototype),{constructor:de,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},A=542327876,m=131072,S=512,_=1024,F=2048,P=4096,b=8192,x=16384,k=32768,O=4;function C(c){return c.charCodeAt(0)+(c.charCodeAt(1)<<8)+(c.charCodeAt(2)<<16)+(c.charCodeAt(3)<<24)}function I(c){return String.fromCharCode(c&255,c>>8&255,c>>16&255,c>>24&255)}function X(c,v,d,h){for(var T=d*h*4,M=new Uint8Array(c,v,T),y=new Uint8Array(T),w=0,L=0,D=0;D<h;D++)for(var N=0;N<d;N++){var ne=M[L];L++;var ae=M[L];L++;var Z=M[L];L++;var j=M[L];L++,y[w]=Z,w++,y[w]=ae,w++,y[w]=ne,w++,y[w]=j,w++}return y}var ee=C("DXT1"),U=C("DXT3"),K=C("DXT5"),re=C("ETC1"),te=31,Q=0,Y=1,z=2,W=3,Te=4,ue=7,pe=20,he=21,Le=22,oe=23,q=24,_e=25,Me=26,we=28,G=new Int32Array(p,0,te);if(G[Q]!==A)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!G[pe]&O)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var R,ve=G[he],le=!1;switch(ve){case ee:R=8,u.format=l.RGB_S3TC_DXT1_Format;break;case U:R=16,u.format=l.RGBA_S3TC_DXT3_Format;break;case K:R=16,u.format=l.RGBA_S3TC_DXT5_Format;break;case re:R=8,u.format=l.RGB_ETC1_Format;break;default:if(G[Le]===32&&G[oe]&16711680&&G[q]&65280&&G[_e]&255&&G[Me]&4278190080)le=!0,R=64,u.format=l.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",I(ve)),u}u.mipmapCount=1,G[z]&m&&g!==!1&&(u.mipmapCount=Math.max(1,G[ue]));var H=G[we];if(u.isCubemap=!!(H&S),u.isCubemap&&(!(H&_)||!(H&F)||!(H&P)||!(H&b)||!(H&x)||!(H&k)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=G[Te],u.height=G[W];for(var e=G[Y]+4,r=u.isCubemap?6:1,n=0;n<r;n++)for(var t=u.width,a=u.height,i=0;i<u.mipmapCount;i++){if(le)var s=X(p,e,t,a),o=s.length;else var o=Math.max(4,t)/4*Math.max(4,a)/4*R,s=new Uint8Array(p,e,o);var f={data:s,width:t,height:a};u.mipmaps.push(f),e+=o,t=Math.max(t>>1,1),a=Math.max(a>>1,1)}return u}});var ye=function(p){Oe(g,p);function g(u){var A=p.call(this)||this;return A.needsRender=!0,u&&u.children.length&&A.add.apply(A,u.children),A.mixer=new Ae.AnimationMixer(A),A}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),A=new Ae.AnimationMixer(u);return u.mixer=A,u.needsRender=!0,u},g}(Ae.Group),Ue="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",Ge=function(p){Oe(g,p);function g(u){var A=p.call(this,u)||this;return A.ddsLoader=new de(u),A.dracoLoader=new E(u),A.dracoLoader.setDecoderPath(Ue),A}return Object.defineProperty(g,"version",{get:function(){return"6.1.0"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,A,m,S){return p.prototype.load.call(this,u,A,m,S)},g.prototype.parse=function(u,A,m,S){return p.prototype.parse.call(this,u,A,function(_){var F=new ye(_.scene),P=_.scenes.map(function(b){return b===_.scene?F:new ye(b)});m(Object.assign(_,{scene:F,scenes:P}))},S)},g}(Fe);V.DDSLoader=de,V.DRACOLoader=E,V.GLTFLoader=Ge,V.GLTFObject=ye,V.THREEGLTFLoader=Fe,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
261
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([S]))}),this.decoderPending},_getWorker:function(p,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var u=new Worker(this.workerSourceURL);u._callbacks={},u._taskCosts={},u._taskLoad=0,u.postMessage({type:"init",decoderConfig:this.decoderConfig}),u.onmessage=function(m){var S=m.data;switch(S.type){case"decode":u._callbacks[S.id].resolve(S);break;case"error":u._callbacks[S.id].reject(S);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+S.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(A,m){return A._taskLoad>m._taskLoad?-1:1});var u=this.workerPool[this.workerPool.length-1];return u._taskCosts[p]=g,u._taskLoad+=g,u})},_releaseTask:function(p,g){p._taskLoad-=p._taskCosts[g],delete p._callbacks[g],delete p._taskCosts[g]},debug:function(){console.log("Task load: ",this.workerPool.map(p=>p._taskLoad))},dispose:function(){for(var p=0;p<this.workerPool.length;++p)this.workerPool[p].terminate();return this.workerPool.length=0,this}}),E.DRACOWorker=function(){var p,g;onmessage=function(m){var S=m.data;switch(S.type){case"init":p=S.decoderConfig,g=new Promise(function(P){p.onModuleLoaded=function(b){P({draco:b})},DracoDecoderModule(p)});break;case"decode":var _=S.buffer,F=S.taskConfig;g.then(P=>{var b=P.draco,x=new b.Decoder,k=new b.DecoderBuffer;k.Init(new Int8Array(_),_.byteLength);try{var O=u(b,x,k,F),C=O.attributes.map(I=>I.array.buffer);O.index&&C.push(O.index.array.buffer),self.postMessage({type:"decode",id:S.id,geometry:O},C)}catch(I){console.error(I),self.postMessage({type:"error",id:S.id,error:I.message})}finally{b.destroy(k),b.destroy(x)}});break}};function u(m,S,_,F){var P=F.attributeIDs,b=F.attributeTypes,x,k,O=S.GetEncodedGeometryType(_);if(O===m.TRIANGULAR_MESH)x=new m.Mesh,k=S.DecodeBufferToMesh(_,x);else if(O===m.POINT_CLOUD)x=new m.PointCloud,k=S.DecodeBufferToPointCloud(_,x);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!k.ok()||x.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+k.error_msg());var C={index:null,attributes:[]};for(var I in P){var X=self[b[I]],ee,U;if(F.useUniqueIDs)U=P[I],ee=S.GetAttributeByUniqueId(x,U);else{if(U=S.GetAttributeId(x,m[P[I]]),U===-1)continue;ee=S.GetAttribute(x,U)}C.attributes.push(A(m,S,x,I,X,ee))}if(O===m.TRIANGULAR_MESH){for(var K=x.num_faces(),re=K*3,te=new Uint32Array(re),Q=new m.DracoInt32Array,Y=0;Y<K;++Y){S.GetFaceFromMesh(x,Y,Q);for(var z=0;z<3;++z)te[Y*3+z]=Q.GetValue(z)}C.index={array:te,itemSize:1},m.destroy(Q)}return m.destroy(x),C}function A(m,S,_,F,P,b){var x=b.num_components(),k=_.num_points(),O=k*x,C,I;switch(P){case Float32Array:C=new m.DracoFloat32Array,S.GetAttributeFloatForAllPoints(_,b,C),I=new Float32Array(O);break;case Int8Array:C=new m.DracoInt8Array,S.GetAttributeInt8ForAllPoints(_,b,C),I=new Int8Array(O);break;case Int16Array:C=new m.DracoInt16Array,S.GetAttributeInt16ForAllPoints(_,b,C),I=new Int16Array(O);break;case Int32Array:C=new m.DracoInt32Array,S.GetAttributeInt32ForAllPoints(_,b,C),I=new Int32Array(O);break;case Uint8Array:C=new m.DracoUInt8Array,S.GetAttributeUInt8ForAllPoints(_,b,C),I=new Uint8Array(O);break;case Uint16Array:C=new m.DracoUInt16Array,S.GetAttributeUInt16ForAllPoints(_,b,C),I=new Uint16Array(O);break;case Uint32Array:C=new m.DracoUInt32Array,S.GetAttributeUInt32ForAllPoints(_,b,C),I=new Uint32Array(O);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var X=0;X<O;X++)I[X]=C.GetValue(X);return m.destroy(C),{name:F,array:I,itemSize:x}}},E.taskCache=new WeakMap,E.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},E.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},E.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},E.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var de=function(p){l.CompressedTextureLoader.call(this,p)};de.prototype=Object.assign(Object.create(l.CompressedTextureLoader.prototype),{constructor:de,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},A=542327876,m=131072,S=512,_=1024,F=2048,P=4096,b=8192,x=16384,k=32768,O=4;function C(c){return c.charCodeAt(0)+(c.charCodeAt(1)<<8)+(c.charCodeAt(2)<<16)+(c.charCodeAt(3)<<24)}function I(c){return String.fromCharCode(c&255,c>>8&255,c>>16&255,c>>24&255)}function X(c,v,d,h){for(var T=d*h*4,M=new Uint8Array(c,v,T),y=new Uint8Array(T),w=0,L=0,D=0;D<h;D++)for(var N=0;N<d;N++){var ne=M[L];L++;var ae=M[L];L++;var Z=M[L];L++;var j=M[L];L++,y[w]=Z,w++,y[w]=ae,w++,y[w]=ne,w++,y[w]=j,w++}return y}var ee=C("DXT1"),U=C("DXT3"),K=C("DXT5"),re=C("ETC1"),te=31,Q=0,Y=1,z=2,W=3,Te=4,ue=7,pe=20,he=21,Le=22,oe=23,q=24,_e=25,Me=26,we=28,G=new Int32Array(p,0,te);if(G[Q]!==A)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!G[pe]&O)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var R,ve=G[he],le=!1;switch(ve){case ee:R=8,u.format=l.RGB_S3TC_DXT1_Format;break;case U:R=16,u.format=l.RGBA_S3TC_DXT3_Format;break;case K:R=16,u.format=l.RGBA_S3TC_DXT5_Format;break;case re:R=8,u.format=l.RGB_ETC1_Format;break;default:if(G[Le]===32&&G[oe]&16711680&&G[q]&65280&&G[_e]&255&&G[Me]&4278190080)le=!0,R=64,u.format=l.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",I(ve)),u}u.mipmapCount=1,G[z]&m&&g!==!1&&(u.mipmapCount=Math.max(1,G[ue]));var H=G[we];if(u.isCubemap=!!(H&S),u.isCubemap&&(!(H&_)||!(H&F)||!(H&P)||!(H&b)||!(H&x)||!(H&k)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=G[Te],u.height=G[W];for(var e=G[Y]+4,r=u.isCubemap?6:1,n=0;n<r;n++)for(var t=u.width,a=u.height,i=0;i<u.mipmapCount;i++){if(le)var s=X(p,e,t,a),o=s.length;else var o=Math.max(4,t)/4*Math.max(4,a)/4*R,s=new Uint8Array(p,e,o);var f={data:s,width:t,height:a};u.mipmaps.push(f),e+=o,t=Math.max(t>>1,1),a=Math.max(a>>1,1)}return u}});var ye=function(p){Oe(g,p);function g(u){var A=p.call(this)||this;return A.needsRender=!0,u&&u.children.length&&A.add.apply(A,u.children),A.mixer=new Ae.AnimationMixer(A),A}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),A=new Ae.AnimationMixer(u);return u.mixer=A,u.needsRender=!0,u},g}(Ae.Group),Ue="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",Ge=function(p){Oe(g,p);function g(u){var A=p.call(this,u)||this;return A.ddsLoader=new de(u),A.dracoLoader=new E(u),A.dracoLoader.setDecoderPath(Ue),A}return Object.defineProperty(g,"version",{get:function(){return"6.1.2"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,A,m,S){return p.prototype.load.call(this,u,A,m,S)},g.prototype.parse=function(u,A,m,S){return p.prototype.parse.call(this,u,A,function(_){var F=new ye(_.scene),P=_.scenes.map(function(b){return b===_.scene?F:new ye(b)});m(Object.assign(_,{scene:F,scenes:P}))},S)},g}(Fe);V.DDSLoader=de,V.DRACOLoader=E,V.GLTFLoader=Ge,V.GLTFObject=ye,V.THREEGLTFLoader=Fe,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
package/umd/five-line.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
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.0"},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.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"})});
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
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: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
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),y=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 g=function(){return g=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},g.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");if(b===null)throw new Error("error occurred when getting webgl2 canvas context");p=new y.WebGLRenderer({preserveDrawingBuffer:s,antialias:!1,alpha:!0,canvas:S,context:b})}else p=new y.WebGLRenderer({preserveDrawingBuffer:s,antialias:!1,alpha:!0});p.outputEncoding=y.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 _=o.createContext(null);function h(){var e=o.useContext(_);if(!e)throw new Error("FiveProvider never found.");return e.five}function W(){var e=o.useContext(_);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(g(g({},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(_.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=g({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 g({},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 y.Vector3),t=new y.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 y.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 g({},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 y.Vector3)},[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("cameraRaycaster",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t){var s=e.camera.getWorldDirection(new y.Vector3),c=new y.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 Le(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 Ie(e,n){if(l("toggleHelperVisible",n))return function(t){e.helperVisible=t}}function qe(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],I=_e(a,e),nr=I[0],ar=I[1],q=Le(a,e),or=q[0],ur=q[1],G=Pe(a,e),ir=G[0],sr=G[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:Ie(a,e)}),C},[a,u]),lr=o.useMemo(function(){var C=g({},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,g({ref:r,$five:lr},t))})}}function Ge(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e}function L(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 L(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=g({},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=L(u,p),P=L(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=Ge,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=qe,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,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"})});
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
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.0"},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.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"})});
package/umd/five-vfx.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
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: 2024/8/21
5
- * Version: 6.1.0
4
+ * Generated: 8/28/2024
5
+ * Version: 6.1.2
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,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@realsee/five"),require("three")):typeof define=="function"&&define.amd?define(["exports","vue","@realsee/five","three"],t):(f=typeof globalThis!="undefined"?globalThis:f||self,t(f.FiveSDK_Vue={},f.Vue,f.FiveSDK,f.THREE))})(this,function(f,t,m,b){"use strict";function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const h=R(b);var d=function(){return d=Object.assign||function(n){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}return n},d.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var w=!1;function k(e){w=e}var F=Symbol();function s(){var e=t.inject(F);if(!e)throw new Error("Inject five error!");return e}var j={display:"inline-block",overflow:"hidden"},E=t.defineComponent({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup:function(e){var n=t.toRef(e,"width"),r=t.toRef(e,"height"),o=s(),a=t.ref(null);return t.watch([n,r,a],function(){if(o.renderer&&a.value){if(o.renderer.domElement.parentNode!==null&&o.renderer.domElement.parentNode!==a.value)throw new Error("There are more than 2 fiveCanvas in this context.");o.renderer.domElement.parentNode!==a.value&&a.value.appendChild(o.renderer.domElement),o.camera.aspect=n.value/r.value,o.camera.updateProjectionMatrix(),o.renderer.setSize(n.value,r.value),o.needsRender=!0}}),function(){return t.h("div",{id:"five",style:d({width:"".concat(n.value,"px"),height:"".concat(r.value,"px")},j),ref:a})}}}),g=[];function O(e){var n=e===void 0?{}:e,r=n.backgroundColor,o=r===void 0?1579548:r,a=n.backgroundAlpha,l=a===void 0?1:a,u=n.pixelRatio,c=u===void 0?1:u;if(typeof window!="undefined"){var i=g.shift();return i||(i=new h.WebGLRenderer({antialias:!1,alpha:!0}),i.outputEncoding=h.sRGBEncoding),i.setPixelRatio(c),i.setClearColor(o,l),i.autoClear=!0,i}}function P(e){e&&g.indexOf(e)===-1&&g.push(e)}function B(e,n){var r=Array.isArray(e)?e:[e],o=Array.isArray(n)?n:[n];if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==o[a])return!1;return!0}var U=t.defineComponent({props:{works:Object,initialWorks:Object,initialState:Object,initialUserAction:Boolean,onWorksChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:function(){return{}}},style:Object},setup:function(e){var n,r=t.toRefs(e).works,o=m.getViewportScale(),a=o===1?window.devicePixelRatio:1,l=O({pixelRatio:a}),u=new m.Five(d({renderer:l},e.fiveInitArgs)),c=e.works||e.initialWorks;return c&&u.load(c,e.initialState,void 0,(n=e.initialUserAction)!==null&&n!==void 0?n:!0),k(!!e.works),r&&t.watch(r,function(i,v){i&&!B(i,u.works)&&u.load(i,e.initialState)}),t.onBeforeUnmount(function(){u&&(u.dispose(),P(u.renderer))}),u.on("load",function(){e.onWorksChange&&u.works&&e.onWorksChange(u==null?void 0:u.works)}),u.on("stateChange",function(i,v){e.onStateChange&&e.onStateChange(i,v)}),u.on("currentStateChange",function(i,v){e.onCurrentStateChange&&e.onCurrentStateChange(i,v)}),u.on("error",function(i){e.onError?e.onError(i):console.warn(i.message)}),t.provide(F,u),{five:t.shallowReadonly(u)}},render:function(){return t.h("div",{style:this.$props.style},this.$slots)}});function W(){var e=s(),n=t.ref(e.works),r=t.readonly(n),o=function(l,u,c,i){if(w)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return e.load(l,u,c,i)},a=e.on("load",function(){n.value=e.works});return t.onBeforeUnmount(function(){a()}),[r,o]}function _(){var e=s(),n=t.ref(d({},e.state)),r=e.on("stateChange",function(a){Object.assign(n.value,d({},a))});t.onBeforeUnmount(function(){r()});var o=function(a,l,u){l===void 0&&(l=!1),u===void 0&&(u=!0);var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,l,u)};return[n,o]}function A(){var e=s(),n=t.ref(e.getCurrentState()),r=e.on("currentStateChange",function(){Object.assign(n.value,e.getCurrentState())});t.onBeforeUnmount(function(){r()});var o=function(a,l,u){var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,l,u)};return[n,o]}function I(){var e=s(),n=t.reactive(e.getCurrentState()),r=t.ref(e.works.getResolvedObserver(e.pano)),o=e.on("currentStateChange",function(){Object.assign(n,e.getCurrentState()),r.value=e.works.getResolvedObserver({workCode:n.workCode,panoIndex:n.panoIndex})});return t.onBeforeUnmount(function(){o()}),r}function V(e,n){var r=s(),o=r.on(e,n);t.onBeforeUnmount(function(){o()})}function D(){var e=s(),n=function(c,i){return e.updateCamera(c,i)},r=function(c,i,v,X,Y){return e.getPixels(c,i,v,X,Y)},o=function(c){return e.render(c)},a=function(){return e.needsRender=!0},l=function(c,i){return e.preloadPano(c,i)},u=function(c,i){return i===void 0&&(i=!1),e.project2d(c,i)};return{updateCamera:n,getPixels:r,render:o,needsRender:a,preloadPano:l,project2d:u}}function L(e,n){n===void 0&&(n=!1);var r=s(),o=t.ref(Symbol()),a=t.shallowRef(e?r.project2d(t.isRef(e)?e.value:e,n):null),l=r.on("cameraUpdate",function(){o.value=Symbol()});return t.onBeforeUnmount(function(){l()}),t.watch([o,e],function(){a.value=r.project2d(t.isRef(e)?e.value:e,n)}),a}function H(){return L}function p(e){var n=e.camera.getWorldDirection(new h.Vector3),r=new h.Raycaster(e.camera.position,n);return r}function M(){var e=s(),n=t.shallowRef(p(e)),r=e.on("cameraUpdate",function(){n.value=p(e)});return t.onBeforeUnmount(function(){r()}),n}function C(e){return e.camera.getWorldDirection(new h.Vector3)}function T(){var e=s(),n=t.shallowRef(C(e)),r=e.on("cameraUpdate",function(){n.value=C(e)});return t.onBeforeUnmount(function(){r()}),n}function q(e){var n=s(),r=t.shallowRef([]);return t.watch(e,function(){r.value=n.model.intersectRaycaster(t.isRef(e)?e.value:e)}),r}function N(){return q}function y(e){return e.model.empty?"Empty":"Loaded"}function K(){var e=s(),n=t.ref(y(e)),r=e.on("modelLoaded",function(){n.value=y(e)});return t.onBeforeUnmount(function(){r()}),n}function $(){var e=s(),n=t.ref(e.model.shownFloor),r=t.ref(e.model.floorLength),o=function(l){typeof l=="number"?e.model.show(l):e.model.show()},a=[];return a.push(e.on("modelShownFloorChange",function(){n.value=e.model.shownFloor})),a.push(e.on("modelLoaded",function(){r.value=e.model.floorLength})),t.onBeforeUnmount(function(){for(var l;l=a.shift();)l()}),[n,r,o]}function x(){var e=s(),n=t.ref(e.helperVisible),r=function(a){e.helperVisible=a},o=e.on("helpersVisibleChange",function(a){n.value=a});return t.onBeforeUnmount(function(){o()}),[n,r]}function z(){return s()}function S(e){return e.model.bounding.clone()}function G(){var e=s(),n=t.shallowRef(S(e)),r=e.on("modelLoaded",function(){n.value=S(e)});return t.onBeforeUnmount(function(){r()}),n}function J(){var e=s();return e.scene}function Q(){var e=s(),n=t.shallowRef(e.model),r=e.on("modelLoaded",function(){n.value=e.model});return t.onBeforeUnmount(function(){r()}),n}f.FiveCanvas=E,f.FiveProvider=U,f.unsafe__useFiveInject=z,f.useFiveAction=D,f.useFiveCameraDirection=T,f.useFiveCameraRaycaster=M,f.useFiveCurrentObserver=I,f.useFiveCurrentState=A,f.useFiveEventCallback=V,f.useFiveFloor=$,f.useFiveHelper=x,f.useFiveModel=Q,f.useFiveModelBounding=G,f.useFiveModelIntersectRaycaster=N,f.useFiveModelReadyState=K,f.useFiveProject2d=H,f.useFiveScene=J,f.useFiveState=_,f.useFiveWorks=W,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
255
+ */(function(u,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@realsee/five"),require("three")):typeof define=="function"&&define.amd?define(["exports","vue","@realsee/five","three"],t):(u=typeof globalThis!="undefined"?globalThis:u||self,t(u.FiveSDK_Vue={},u.Vue,u.FiveSDK,u.THREE))})(this,function(u,t,F,O){"use strict";function P(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const g=P(O);var h=function(){return h=Object.assign||function(n){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var f in r)Object.prototype.hasOwnProperty.call(r,f)&&(n[f]=r[f])}return n},h.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var C=!1;function U(e){C=e}var y=Symbol();function s(){var e=t.inject(y);if(!e)throw new Error("Inject five error!");return e}var W={display:"inline-block",overflow:"hidden"},_=t.defineComponent({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup:function(e){var n=t.toRef(e,"width"),r=t.toRef(e,"height"),o=s(),a=t.ref(null);return t.watch([n,r,a],function(){if(o.renderer&&a.value){if(o.renderer.domElement.parentNode!==null&&o.renderer.domElement.parentNode!==a.value)throw new Error("There are more than 2 fiveCanvas in this context.");o.renderer.domElement.parentNode!==a.value&&a.value.appendChild(o.renderer.domElement),o.camera.aspect=n.value/r.value,o.camera.updateProjectionMatrix(),o.renderer.setSize(n.value,r.value),o.refresh({width:n.value,height:r.value}),o.needsRender=!0}}),function(){return t.h("div",{id:"five",style:h({width:"".concat(n.value,"px"),height:"".concat(r.value,"px")},W),ref:a})}}}),p=[],b=[];function D(e){var n=e===void 0?{}:e,r=n.backgroundColor,o=r===void 0?1579548:r,a=n.backgroundAlpha,f=a===void 0?1:a,i=n.preserveDrawingBuffer,c=i===void 0?!0:i,l=n.pixelRatio,d=l===void 0?1:l,m=n.webgl2,w=m===void 0?!1:m;if(typeof window!="undefined"){var v=null;if(w?v=p.shift():v=b.shift(),!v){if(w){var E=document.createElement("canvas"),B=E.getContext("webgl2");B?v=new g.WebGLRenderer({preserveDrawingBuffer:c,antialias:!0,alpha:!0,stencil:!0,canvas:E,context:B}):(console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."),v=new g.WebGLRenderer({preserveDrawingBuffer:c,antialias:!1,alpha:!0,stencil:!0}))}else v=new g.WebGLRenderer({preserveDrawingBuffer:c,antialias:!1,alpha:!0,stencil:!0});v.outputEncoding=g.sRGBEncoding}return v.setPixelRatio(d),v.setClearColor(o,f),v.autoClear=!0,v}}function A(e){if(e){var n=e.capabilities.isWebGL2;n?b.indexOf(e)===-1&&b.push(e):p.indexOf(e)===-1&&p.push(e)}}function L(e,n){var r=Array.isArray(e)?e:[e],o=Array.isArray(n)?n:[n];if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==o[a])return!1;return!0}var I=t.defineComponent({props:{works:Object,initialWorks:Object,initialState:Object,initialUserAction:Boolean,onWorksChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:function(){return{}}},style:Object},setup:function(e){var n,r=t.toRefs(e).works,o=F.getViewportScale(),a=o===1?window.devicePixelRatio:1,f=D({pixelRatio:a}),i=new F.Five(h({renderer:f},e.fiveInitArgs)),c=e.works||e.initialWorks;return c&&i.load(c,e.initialState,void 0,(n=e.initialUserAction)!==null&&n!==void 0?n:!0),U(!!e.works),r&&t.watch(r,function(l,d){l&&!L(l,i.works)&&i.load(l,e.initialState)}),t.onBeforeUnmount(function(){i&&(i.dispose(),A(i.renderer))}),i.on("load",function(){e.onWorksChange&&i.works&&e.onWorksChange(i==null?void 0:i.works)}),i.on("stateChange",function(l,d){e.onStateChange&&e.onStateChange(l,d)}),i.on("currentStateChange",function(l,d){e.onCurrentStateChange&&e.onCurrentStateChange(l,d)}),i.on("error",function(l){e.onError?e.onError(l):console.warn(l.message)}),t.provide(y,i),{five:t.shallowReadonly(i)}},render:function(){return t.h("div",{style:this.$props.style},this.$slots)}});function V(){var e=s(),n=t.ref(e.works),r=t.readonly(n),o=function(f,i,c,l){if(C)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return e.load(f,i,c,l)},a=e.on("load",function(){n.value=e.works});return t.onBeforeUnmount(function(){a()}),[r,o]}function H(){var e=s(),n=t.ref(h({},e.state)),r=e.on("stateChange",function(a){Object.assign(n.value,h({},a))});t.onBeforeUnmount(function(){r()});var o=function(a,f,i){f===void 0&&(f=!1),i===void 0&&(i=!0);var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,f,i)};return[n,o]}function M(){var e=s(),n=t.ref(e.getCurrentState()),r=e.on("currentStateChange",function(){Object.assign(n.value,e.getCurrentState())});t.onBeforeUnmount(function(){r()});var o=function(a,f,i){var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,f,i)};return[n,o]}function T(){var e=s(),n=t.reactive(e.getCurrentState()),r=t.ref(e.works.getResolvedObserver(e.pano)),o=e.on("currentStateChange",function(){Object.assign(n,e.getCurrentState()),r.value=e.works.getResolvedObserver({workCode:n.workCode,panoIndex:n.panoIndex})});return t.onBeforeUnmount(function(){o()}),r}function q(e,n){var r=s(),o=r.on(e,n);t.onBeforeUnmount(function(){o()})}function N(){var e=s(),n=function(c,l){return e.updateCamera(c,l)},r=function(c,l,d,m,w){return e.getPixels(c,l,d,m,w)},o=function(c){return e.render(c)},a=function(){return e.needsRender=!0},f=function(c,l){return e.preloadPano(c,l)},i=function(c,l){return l===void 0&&(l=!1),e.project2d(c,l)};return{updateCamera:n,getPixels:r,render:o,needsRender:a,preloadPano:f,project2d:i}}function x(e,n){n===void 0&&(n=!1);var r=s(),o=t.ref(Symbol()),a=t.shallowRef(e?r.project2d(t.isRef(e)?e.value:e,n):null),f=r.on("cameraUpdate",function(){o.value=Symbol()});return t.onBeforeUnmount(function(){f()}),t.watch([o,e],function(){a.value=r.project2d(t.isRef(e)?e.value:e,n)}),a}function G(){return x}function S(e){var n=e.camera.getWorldDirection(new g.Vector3),r=new g.Raycaster(e.camera.position,n);return r}function K(){var e=s(),n=t.shallowRef(S(e)),r=e.on("cameraUpdate",function(){n.value=S(e)});return t.onBeforeUnmount(function(){r()}),n}function R(e){return e.camera.getWorldDirection(new g.Vector3)}function $(){var e=s(),n=t.shallowRef(R(e)),r=e.on("cameraUpdate",function(){n.value=R(e)});return t.onBeforeUnmount(function(){r()}),n}function z(e){var n=s(),r=t.shallowRef([]);return t.watch(e,function(){r.value=n.model.intersectRaycaster(t.isRef(e)?e.value:e)}),r}function J(){return z}function k(e){return e.model.empty?"Empty":"Loaded"}function Q(){var e=s(),n=t.ref(k(e)),r=e.on("modelLoaded",function(){n.value=k(e)});return t.onBeforeUnmount(function(){r()}),n}function X(){var e=s(),n=t.ref(e.model.shownFloor),r=t.ref(e.model.floorLength),o=function(f){typeof f=="number"?e.model.show(f):e.model.show()},a=[];return a.push(e.on("modelShownFloorChange",function(){n.value=e.model.shownFloor})),a.push(e.on("modelLoaded",function(){r.value=e.model.floorLength})),t.onBeforeUnmount(function(){for(var f;f=a.shift();)f()}),[n,r,o]}function Y(){var e=s(),n=t.ref(e.helperVisible),r=function(a){e.helperVisible=a},o=e.on("helpersVisibleChange",function(a){n.value=a});return t.onBeforeUnmount(function(){o()}),[n,r]}function Z(){return s()}function j(e){return e.model.bounding.clone()}function ee(){var e=s(),n=t.shallowRef(j(e)),r=e.on("modelLoaded",function(){n.value=j(e)});return t.onBeforeUnmount(function(){r()}),n}function ne(){var e=s();return e.scene}function re(){var e=s(),n=t.shallowRef(e.model),r=e.on("modelLoaded",function(){n.value=e.model});return t.onBeforeUnmount(function(){r()}),n}u.FiveCanvas=_,u.FiveProvider=I,u.unsafe__useFiveInject=Z,u.useFiveAction=N,u.useFiveCameraDirection=$,u.useFiveCameraRaycaster=K,u.useFiveCurrentObserver=T,u.useFiveCurrentState=M,u.useFiveEventCallback=q,u.useFiveFloor=X,u.useFiveHelper=Y,u.useFiveModel=re,u.useFiveModelBounding=ee,u.useFiveModelIntersectRaycaster=J,u.useFiveModelReadyState=Q,u.useFiveProject2d=G,u.useFiveScene=ne,u.useFiveState=H,u.useFiveWorks=V,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});