@realsee/five 6.6.0-alpha.2 → 6.6.0-alpha.21
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/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.Fetcher.html +2 -2
- package/docs/classes/five.Five.html +60 -58
- package/docs/classes/five.Model.html +33 -33
- package/docs/classes/five.ModelScene.html +17 -18
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +2 -2
- package/docs/classes/five.PBMMeshMaterial.html +6 -6
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -5
- package/docs/classes/five.PBMSkinnedMesh.html +2 -2
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.Parameter.html +52 -52
- package/docs/classes/five.Tile3DModel.html +26 -26
- package/docs/classes/five.TileNode.html +2 -2
- package/docs/classes/five.TileRequestScheduler.html +1 -1
- package/docs/classes/five.Tileset.html +2 -2
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +17 -17
- package/docs/classes/five.WorkResolvedObserver.html +18 -14
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +5 -5
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.ParticleGPU.html +19 -0
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/functions/five.createDebugBoundingMesh.html +1 -1
- package/docs/functions/five.defaultImageURLTransform.html +1 -1
- package/docs/functions/five.isBoundingVolume.html +1 -1
- package/docs/functions/five.makeBoundingVolume.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/five.AddableObject.html +3 -3
- package/docs/interfaces/five.AjaxOptions.html +5 -5
- package/docs/interfaces/five.BaseEvent.html +1 -1
- package/docs/interfaces/five.BoundingVolume.html +2 -2
- package/docs/interfaces/five.BoxBoundingVolume.html +2 -2
- package/docs/interfaces/five.EventCallback.html +1 -1
- package/docs/interfaces/five.FiveInitArgs.html +2 -2
- package/docs/interfaces/five.FiveLoadOptions.html +1 -1
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +1 -1
- package/docs/interfaces/five.ImageOptions.html +17 -12
- package/docs/interfaces/five.ImageURLOptions.html +7 -5
- package/docs/interfaces/five.IntersectEvent.html +1 -1
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +6 -3
- package/docs/interfaces/five.KTX2.html +2 -2
- package/docs/interfaces/five.LoosePanoWork.html +2 -2
- package/docs/interfaces/five.LooseWork.html +2 -2
- package/docs/interfaces/five.LooseWorkInitial.html +2 -2
- package/docs/interfaces/five.LooseWorkModel.html +2 -2
- package/docs/interfaces/five.LooseWorkObserver.html +2 -2
- package/docs/interfaces/five.LooseWorkPanorama.html +4 -2
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModeChangeEvent.html +1 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +1 -1
- package/docs/interfaces/five.ModelLike.html +2 -2
- package/docs/interfaces/five.ModelSceneEvent.html +1 -1
- package/docs/interfaces/five.MovePanoOptions.html +1 -1
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +4 -4
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
- package/docs/interfaces/five.NetworkResponseError.html +2 -2
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +1 -1
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -2
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -2
- package/docs/interfaces/five.PanoCircleMeshInterface.html +3 -3
- package/docs/interfaces/five.PanoEvent.html +1 -1
- package/docs/interfaces/five.PanoTextureEvent.html +1 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +37 -37
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +51 -51
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RegionBoundingVolume.html +2 -2
- package/docs/interfaces/five.RenderEvent.html +1 -1
- package/docs/interfaces/five.ResolvedParameterValue.html +51 -51
- package/docs/interfaces/five.SphereBoundingVolume.html +2 -2
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +1 -1
- package/docs/interfaces/five.TextureOptions.html +13 -8
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +2 -2
- package/docs/interfaces/five.TilesetHeader.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +5 -5
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +26 -26
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkModel.html +6 -6
- package/docs/interfaces/five.WorkModelLayer.html +2 -2
- package/docs/interfaces/five.WorkObserver.html +20 -15
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorksEvent.html +1 -1
- package/docs/interfaces/five.XRControllerEvent.html +1 -1
- package/docs/interfaces/five.XRGestureEvent.html +1 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginController.html +4 -4
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +4 -4
- package/docs/interfaces/plugins.ItemMaskController.html +4 -4
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +3 -3
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +14 -10
- package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.ConfigChangeEvent.html +7 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +6 -4
- package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +2 -2
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +3 -3
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +5 -5
- package/docs/interfaces/react.FiveInjectionTypes.html +14 -14
- package/docs/interfaces/vfx.ParticleGPUArgs.html +60 -0
- package/docs/interfaces/vfx.ParticleGPUTweenKeyframe.html +3 -0
- package/docs/modules/plugins.PanoAnimePluginType.html +1 -1
- package/docs/modules/vfx.html +1 -1
- package/docs/types/five.AjaxResponseType.html +1 -1
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
- package/docs/types/five.EventTypes.html +1 -1
- package/docs/types/five.Mode.html +1 -1
- package/docs/types/five.Models.html +5 -5
- package/docs/types/five.NetWorkMeta.html +2 -2
- package/docs/types/five.NetworkError.html +1 -1
- package/docs/types/five.NetworkErrorCallback.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.NetworkResponse.html +2 -2
- package/docs/types/five.NetworkState.html +1 -1
- package/docs/types/five.NetworkSuccessCallback.html +1 -1
- package/docs/types/five.NetworkType.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/five.SubscribeEventMap.html +1 -1
- package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -1
- package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -1
- package/docs/types/react.StoreActionMapType.html +1 -1
- package/docs/types/vfx.ParticleGPUType.html +1 -0
- package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
- package/docs/types/vue.Project2d.html +1 -1
- package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
- package/docs/variables/five.ktx2.html +1 -1
- package/docs/variables/react.useFiveScene.html +1 -1
- package/five/declare.d.ts +34 -0
- package/five/index.d.ts +55 -26
- package/five/index.js +77 -77
- package/five/index.mjs +5279 -4977
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +2 -2
- package/plugins/index.d.ts +26 -1
- package/plugins/index.js +10 -10
- package/plugins/index.mjs +53 -48
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +9 -9
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +126 -19
- package/umd/five-vue.js +2 -2
- package/umd/five.js +77 -77
- package/vfx/index.d.ts +99 -0
- package/vfx/index.js +126 -19
- package/vfx/index.mjs +325 -119
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +108 -94
package/umd/five-line.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated:
|
|
5
|
-
* Version: 6.6.0-alpha.
|
|
4
|
+
* Generated: 9/23/2025
|
|
5
|
+
* Version: 6.6.0-alpha.21
|
|
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.6.0-alpha.
|
|
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.6.0-alpha.21"},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"})}));
|
package/umd/five-plugins.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated:
|
|
5
|
-
* Version: 6.6.0-alpha.
|
|
4
|
+
* Generated: 9/23/2025
|
|
5
|
+
* Version: 6.6.0-alpha.21
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -252,7 +252,7 @@
|
|
|
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(q,de){typeof exports=="object"&&typeof module!="undefined"?de(exports,require("@realsee/five"),require("three"),require("@realsee/five/plugins")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","@realsee/five/plugins"],de):(q=typeof globalThis!="undefined"?globalThis:q||self,de(q.FiveSDK_Plugins={},q.FiveSDK,q.THREE,q.FiveSDK_Plugins))})(this,(function(q,de,_,At){"use strict";function Wt(f){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const e in f)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(f,e);Object.defineProperty(o,e,a.get?a:{enumerable:!0,get:()=>f[e]})}}return o.default=f,Object.freeze(o)}const T=Wt(_);function Ht(f){return/^https?:\/\/|^\/\//.test(f)||/^data:/.test(f)}function qt(f,o){return Ht(o)?o:"".concat(f).concat(o)}q.BasePlugin=void 0,(function(f){var o=(function(){function e(a,t){this.hooks=new de.Subscribe,this.staticPrefix="//vr-image-4.realsee-cdn.cn",this.five=a,t!=null&&t.staticPrefix&&(this.staticPrefix=t.staticPrefix)}return e.prototype.getCurrentState=function(){return this.state},e.prototype.absoluteUrl=function(a){return qt(this.staticPrefix,a)},e})();f.Controller=o})(q.BasePlugin||(q.BasePlugin={}));var lt=function(f,o){return lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t])},lt(f,o)};function Ne(f,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");lt(f,o);function e(){this.constructor=f}f.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}var
|
|
255
|
+
*/(function(q,de){typeof exports=="object"&&typeof module!="undefined"?de(exports,require("@realsee/five"),require("three"),require("@realsee/five/plugins")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","@realsee/five/plugins"],de):(q=typeof globalThis!="undefined"?globalThis:q||self,de(q.FiveSDK_Plugins={},q.FiveSDK,q.THREE,q.FiveSDK_Plugins))})(this,(function(q,de,_,At){"use strict";function Wt(f){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const e in f)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(f,e);Object.defineProperty(o,e,a.get?a:{enumerable:!0,get:()=>f[e]})}}return o.default=f,Object.freeze(o)}const T=Wt(_);function Ht(f){return/^https?:\/\/|^\/\//.test(f)||/^data:/.test(f)}function qt(f,o){return Ht(o)?o:"".concat(f).concat(o)}q.BasePlugin=void 0,(function(f){var o=(function(){function e(a,t){this.hooks=new de.Subscribe,this.staticPrefix="//vr-image-4.realsee-cdn.cn",this.five=a,t!=null&&t.staticPrefix&&(this.staticPrefix=t.staticPrefix)}return e.prototype.getCurrentState=function(){return this.state},e.prototype.absoluteUrl=function(a){return qt(this.staticPrefix,a)},e})();f.Controller=o})(q.BasePlugin||(q.BasePlugin={}));var lt=function(f,o){return lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t])},lt(f,o)};function Ne(f,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");lt(f,o);function e(){this.constructor=f}f.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}var j=function(){return j=Object.assign||function(o){for(var e,a=1,t=arguments.length;a<t;a++){e=arguments[a];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=e[s])}return o},j.apply(this,arguments)};function ke(f,o,e,a){function t(s){return s instanceof e?s:new e(function(c){c(s)})}return new(e||(e=Promise))(function(s,c){function l(v){try{d(a.next(v))}catch(w){c(w)}}function g(v){try{d(a.throw(v))}catch(w){c(w)}}function d(v){v.done?s(v.value):t(v.value).then(l,g)}d((a=a.apply(f,o||[])).next())})}function Le(f,o){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,t,s,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=l(0),c.throw=l(1),c.return=l(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return g([d,v])}}function g(d){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(e=0)),e;)try{if(a=1,t&&(s=d[0]&2?t.return:d[0]?t.throw||((s=t.return)&&s.call(t),0):t.next)&&!(s=s.call(t,d[1])).done)return s;switch(t=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return e.label++,{value:d[1],done:!1};case 5:e.label++,t=d[1],d=[0];continue;case 7:d=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){e=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){e.label=d[1];break}if(d[0]===6&&e.label<s[1]){e.label=s[1],s=d;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(d);break}s[2]&&e.ops.pop(),e.trys.pop();continue}d=o.call(f,e)}catch(v){d=[6,v],t=0}finally{a=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Mt(f,o,e){if(e||arguments.length===2)for(var a=0,t=o.length,s;a<t;a++)(s||!(a in o))&&(s||(s=Array.prototype.slice.call(o,0,a)),s[a]=o[a]);return f.concat(s||Array.prototype.slice.call(o))}typeof SuppressedError=="function"&&SuppressedError;function Kt(f){return new Promise(function(o,e){var a=new Image;a.onload=function(){a.onload=a.onerror=function(){},o(a)},a.onerror=function(t){a.onload=a.onerror=function(){},e(t)},a.crossOrigin="",a.src=f})}var Zt=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),ct=typeof performance!="undefined"?(function(){return Zt+performance.now()}):(function(){return Date.now()});function He(f,o,e){return f+(o-f)*e}function Qt(f,o,e,a){var t=(o*e+2*f)/Math.pow(e,3),s=-(2*o*e+3*f)/Math.pow(e,2),c=o,l=f;return t*Math.pow(a,3)+s*Math.pow(a,2)+c*a+l}function Jt(f,o,e,a){var t=(o*e+2*f)/Math.pow(e,3),s=-(2*o*e+3*f)/Math.pow(e,2),c=o;return 3*t*Math.pow(a,2)+2*s*a+c}function $t(f,o,e,a){var t=a[1]-a[0];return f=qe(f,a),o=qe(o,a),o-f>t/2?He(f+t,o,e):f-o>t/2?He(f-t,o,e):He(f,o,e)}function qe(f,o){var e=o[1]-o[0];return f<o[0]?qe(f+e,o):f>=o[1]?qe(f-e,o):f}function en(f,o,e,a){return a?$t(f,o,e,a):He(f,o,e)}var Ct=(function(){function f(o){this.config={},this.progress=1,this.ended=!0,this.value={},this.startTime=ct(),this.startVelocity=0,this.duration=0,this.keyframes=[];for(var e in o){var a=o[e];typeof a=="number"?(this.value[e]=a,this.config[e]={circle:!1}):(this.value[e]=a.value,this.config[e]={circle:a.circle})}this.keyframes=[{progress:0,value:j({},this.value)},{progress:1,value:j({},this.value)}]}return f.prototype.getProgress=function(o){var e=o-this.startTime;return e<0?0:e>=this.duration?1:1-Qt(1,this.startVelocity,this.duration,e)},f.prototype.getValue=function(o){for(var e=1;e<this.keyframes.length;e++)if(this.keyframes[e].progress>o){var a=this.keyframes[e-1],t=this.keyframes[e],s={};for(var c in this.config){var l=(o-a.progress)/(t.progress-a.progress);s[c]=en(a.value[c],t.value[c],l,this.config[c].circle)}return s}return j({},this.keyframes[this.keyframes.length-1].value)},f.prototype.getProgressVelocity=function(o){var e=o-this.startTime;return e>=this.duration?0:Jt(1,this.startVelocity,this.duration,e)},f.prototype.update=function(o){return this.ended?!0:(this.progress=Math.min(1,Math.max(0,this.progress,this.getProgress(o))),this.value=this.getValue(this.progress),this.ended=this.progress>=1,this.ended&&this.callbacks&&(this.callbacks[0](),this.callbacks=void 0),this.ended)},f.prototype.getKeyFrameSegment=function(o){for(var e=this.getProgress(o),a=1;a<this.keyframes.length;a++)if(this.keyframes[a].progress>e)return[this.keyframes[a-1],this.keyframes[a]];return[this.keyframes[this.keyframes.length-2],this.keyframes[this.keyframes.length-1]]},f.prototype.getTargetKeyframe=function(){return this.keyframes[this.keyframes.length-1]},f.prototype.set=function(o,e,a,t){var s;a===void 0&&(a=0),isNaN(e)&&(e=0),isNaN(a)&&(a=0),t=t!=null?t:ct();var c=this.getProgress(t),l=this.getValue(c),g={};for(var d in this.config)g[d]=(s=o[d])!==null&&s!==void 0?s:l[d];var v=[{progress:0,value:l},{progress:1,value:g}];return this.setKeyframes(v,e,a,t)},f.prototype.setKeyframes=function(o,e,a,t){var s=this;if(a===void 0&&(a=0),o.length<2)throw new Error("keyframes invalid.");return isNaN(e)&&(e=0),isNaN(a)&&(a=0),this.callbacks&&(this.callbacks[1](new Error("motion aborted.")),this.callbacks=void 0),new Promise(function(c,l){t=t!=null?t:ct(),s.progress=0,s.ended=!1,s.startTime=t,s.startVelocity=a,s.keyframes=o,s.duration=e,e===0?(s.progress=1,s.value=j({},o[o.length-1].value)):s.value=j({},o[0].value),s.callbacks=[c,l]})},f.prototype.dispose=function(){this.callbacks&&(this.callbacks[1](new Error("motion dispose.")),this.callbacks=void 0)},f})(),tn=[{progress:0,value:{scale:0,opacity:0,shadow:2}},{progress:.2,value:{scale:.5,opacity:1,shadow:1}},{progress:.8,value:{scale:2,opacity:0,shadow:.5}},{progress:1,value:{scale:2,opacity:0,shadow:.5}}],nn=[{progress:0,value:{scale:0,opacity:0,shadow:2}},{progress:.2,value:{scale:.4,opacity:1,shadow:2}},{progress:.8,value:{scale:1.6,opacity:.4,shadow:.5}},{progress:1,value:{scale:2,opacity:0,shadow:.5}}],rn=`
|
|
256
256
|
varying vec2 vUv;
|
|
257
257
|
void main() {
|
|
258
258
|
vUv = uv;
|
|
@@ -304,7 +304,7 @@ void main() {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
`,on=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.canvas=document.createElement("canvas"),t.group=new T.Group,t.wrapper=document.createElement("div"),t.style=document.createElement("style"),t.itemMaskMesh=(function(){var l=new T.Mesh(new T.SphereBufferGeometry(1,60,40),new T.ShaderMaterial({vertexShader:rn,fragmentShader:an,uniforms:{map:{value:new T.Texture},color:{value:new T.Vector4}},depthWrite:!1,depthTest:!1,transparent:!0}));return l.renderOrder=-3,l.geometry.rotateY(-Math.PI/2),l.geometry.scale(-1,1,1),l})(),t.onFivePanoArrived=function(l){t.state.mode==="mask"&&t.loadPanoMask(l)},t.onFiveWantsMoveToPano=function(l){t.state.mode==="box"&&t.select()},t.loadPanoMask=function(l){return ke(t,void 0,void 0,function(){var g,d,v,w,A,E,C,
|
|
307
|
+
`,on=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.canvas=document.createElement("canvas"),t.group=new T.Group,t.wrapper=document.createElement("div"),t.style=document.createElement("style"),t.itemMaskMesh=(function(){var l=new T.Mesh(new T.SphereBufferGeometry(1,60,40),new T.ShaderMaterial({vertexShader:rn,fragmentShader:an,uniforms:{map:{value:new T.Texture},color:{value:new T.Vector4}},depthWrite:!1,depthTest:!1,transparent:!0}));return l.renderOrder=-3,l.geometry.rotateY(-Math.PI/2),l.geometry.scale(-1,1,1),l})(),t.onFivePanoArrived=function(l){t.state.mode==="mask"&&t.loadPanoMask(l)},t.onFiveWantsMoveToPano=function(l){t.state.mode==="box"&&t.select()},t.loadPanoMask=function(l){return ke(t,void 0,void 0,function(){var g,d,v,w,A,E,O,C,D,b;return Le(this,function(y){switch(y.label){case 0:return g=this,d=g.five,v=g.canvas,w=g.itemMaskMesh,A=g.data,E=v.getContext("2d"),O=d.observers[l],C=(b=A==null?void 0:A.object_mask_list.find(function(x){return x.derived_id===String(O.derivedId)}))===null||b===void 0?void 0:b.object_mask_url,C?[4,Kt(C)]:[2];case 1:return D=y.sent(),v.width=D.width,v.height=D.height,E==null||E.drawImage(D,0,0,D.width,D.height),w.material.uniforms.map.value.image=D,w.material.uniforms.map.value.minFilter=T.LinearFilter,w.material.uniforms.map.value.needsUpdate=!0,w.position.copy(O.position),w.quaternion.copy(O.quaternion),d.scene.add(w),d.needsRender=!0,[2]}})})},t.onFiveMouseMove=function(l){var g;if(t.state.mode==="mask"&&t.five.state.mode==="Panorama"){var d=t,v=d.five,w=d.itemMaskMesh,A=v.observers[v.state.panoIndex],E=(g=l.pointers[0])===null||g===void 0?void 0:g.raycaster;if(E){var O=E.intersectObjects(t.group.children.filter(function(C){return C.userData.visible_viewpoint.includes(String(A.derivedId))}),!0)[0];O?w.material.uniforms.color.value=O.object.userData.color:w.material.uniforms.color.value=new T.Vector4(0,0,0,1)}}},t.onFiveTapGesture=function(l){var g=t.five,d=g.observers[g.state.panoIndex];if(l){var v=l.intersectObjects(t.group.children.filter(function(E){return E.userData.visible_viewpoint.includes(String(d.derivedId))}),!0)[0];if(v){t.select(v.object.name),t.stopAnimation&&t.stopAnimation(),t.tapPosition=v.point,t.changeTapScreenPosition();var w=new Ct({opacity:0,scale:0,shadow:2}),A=new Ct({opacity:0,scale:0,shadow:2});return w.setKeyframes(tn,1e3),A.setKeyframes(nn,1e3),t.stopAnimation=de.AnimationFrameLoop.shared.add(function(E,O){var C,D=w.update(E),b=A.update(E);t.wrapper.firstChild.style.opacity="".concat(w.value.opacity),t.wrapper.firstChild.style.transform="scale(".concat(w.value.scale,")"),t.wrapper.firstChild.style.boxShadow="0 0 0 ".concat(w.value.shadow,"px #fff"),t.wrapper.lastChild.style.opacity="".concat(A.value.opacity),t.wrapper.lastChild.style.transform="scale(".concat(A.value.scale,")"),t.wrapper.lastChild.style.boxShadow="0 0 0 ".concat(A.value.shadow,"px #fff"),D&&b&&((C=t.stopAnimation)===null||C===void 0||C.call(t),t.stopAnimation=void 0,g.getElement().parentElement.removeChild(t.wrapper))},!1,0,10),g.getElement().parentElement.appendChild(t.wrapper),!1}}},t.changeTapScreenPosition=function(){if(t.tapPosition){var l=t.tapPosition.clone().project(t.five.camera),g=(l.x+1)/2,d=-(l.y-1)/2;t.wrapper.style.opacity=l.z>0&&l.z<1?"1":"0",t.wrapper.style.transform="translate(".concat(g*100,"%, ").concat(d*100,"%)")}},t.onFiveCameraUpdate=function(l){t.changeTapScreenPosition()},t.dispose=function(){t.disable()},t.five=e;var s={enabled:!0,visible:!0,mode:"box",selectedId:null,selectAll:!1};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=j({},a==null?void 0:a.config);return t._config=c,t.group.rotateX(Math.PI),t.wrapper.className="ItemMaskPlugin",t.wrapper.innerHTML='<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>',t.style.innerHTML=`
|
|
308
308
|
.ItemMaskPlugin {
|
|
309
309
|
position: absolute;
|
|
310
310
|
top: 0;
|
|
@@ -322,7 +322,7 @@ void main() {
|
|
|
322
322
|
border-radius: 50%;
|
|
323
323
|
box-shadow: 0px 0px 0px 2px #fff;
|
|
324
324
|
}
|
|
325
|
-
`,t.state.enabled&&t._enable({userAction:!1}),t}return Object.defineProperty(o.prototype,"config",{get:function(){return
|
|
325
|
+
`,t.state.enabled&&t._enable({userAction:!1}),t}return Object.defineProperty(o.prototype,"config",{get:function(){return j({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=j(j({},this.state),e),this.hooks.emit("stateChange",{state:this.state,prevState:t,userAction:a})},o.prototype.load=function(e){return ke(this,void 0,void 0,function(){var a,t,s=this;return Le(this,function(c){return this.data=e,a=e.data_list.map(function(l){var g,d=l.position.end.map(function(I){return Number(I)}),v=l.position.start.map(function(I){return Number(I)}),w=Math.abs(d[0]-v[0]),A=Math.abs(d[1]-v[1]),E=Math.abs(d[2]-v[2]),O=d[0]/2+v[0]/2,C=d[1]/2+v[1]/2,D=d[2]/2+v[2]/2,b=new T.Vector3(O,C,D),y=new T.BoxBufferGeometry(w,A,E),x=new T.ShaderMaterial({vertexShader:`
|
|
326
326
|
varying vec2 vUv;
|
|
327
327
|
void main() {
|
|
328
328
|
vUv = uv;
|
|
@@ -353,7 +353,7 @@ void main() {
|
|
|
353
353
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
354
354
|
* Licensed under the MIT license */var ut=(function(f,o,e,a){var t=["","webkit","Moz","MS","ms","o"],s=o.createElement?o.createElement("div"):a,c="function",l=Math.round,g=Math.abs,d=Date.now;function v(n,r,i){return setTimeout(y(n,i),r)}function w(n,r,i){return Array.isArray(n)?(A(n,i[r],i),!0):!1}function A(n,r,i){var h;if(n)if(n.forEach)n.forEach(r,i);else if(n.length!==a)for(h=0;h<n.length;)r.call(i,n[h],h,n),h++;else for(h in n)n.hasOwnProperty(h)&&r.call(i,n[h],h,n)}function E(n,r,i){var h="DEPRECATED METHOD: "+r+`
|
|
355
355
|
`+i+` AT
|
|
356
|
-
`;return function(){var m=new Error("get-stack-trace"),P=m&&m.stack?m.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",k=f.console&&(f.console.warn||f.console.log);return k&&k.call(f.console,h,P),n.apply(this,arguments)}}var C;typeof Object.assign!="function"?C=function(r){if(r===a||r===null)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(r),h=1;h<arguments.length;h++){var m=arguments[h];if(m!==a&&m!==null)for(var P in m)m.hasOwnProperty(P)&&(i[P]=m[P])}return i}:C=Object.assign;var O=E(function(r,i,h){for(var m=Object.keys(i),P=0;P<m.length;)(!h||h&&r[m[P]]===a)&&(r[m[P]]=i[m[P]]),P++;return r},"extend","Use `assign`."),D=E(function(r,i){return O(r,i,!0)},"merge","Use `assign`.");function b(n,r,i){var h=r.prototype,m;m=n.prototype=Object.create(h),m.constructor=n,m._super=h,i&&C(m,i)}function y(n,r){return function(){return n.apply(r,arguments)}}function x(n,r){return typeof n==c?n.apply(r&&r[0]||a,r):n}function p(n,r){return n===a?r:n}function I(n,r,i){A(re(r),function(h){n.addEventListener(h,i,!1)})}function M(n,r,i){A(re(r),function(h){n.removeEventListener(h,i,!1)})}function ne(n,r){for(;n;){if(n==r)return!0;n=n.parentNode}return!1}function J(n,r){return n.indexOf(r)>-1}function re(n){return n.trim().split(/\s+/g)}function ue(n,r,i){if(n.indexOf&&!i)return n.indexOf(r);for(var h=0;h<n.length;){if(i&&n[h][i]==r||!i&&n[h]===r)return h;h++}return-1}function be(n){return Array.prototype.slice.call(n,0)}function Me(n,r,i){for(var h=[],m=[],P=0;P<n.length;){var k=n[P][r];ue(m,k)<0&&h.push(n[P]),m[P]=k,P++}return h=h.sort(function(ce,K){return ce[r]>K[r]}),h}function ie(n,r){for(var i,h,m=r[0].toUpperCase()+r.slice(1),P=0;P<t.length;){if(i=t[P],h=i?i+m:r,h in n)return h;P++}return a}var se=1;function U(){return se++}function N(n){var r=n.ownerDocument||n;return r.defaultView||r.parentWindow||f}var S=/mobile|tablet|ip(ad|hone|od)|android/i,V="ontouchstart"in f,j=ie(f,"PointerEvent")!==a,ae=V&&S.test(navigator.userAgent),X="touch",B="pen",Z="mouse",Y="kinect",R=25,L=1,te=2,G=4,W=8,Oe=1,Ee=2,Ce=4,_e=8,xe=16,le=Ee|Ce,fe=_e|xe,Ye=le|fe,je=["x","y"],Se=["clientX","clientY"];function oe(n,r){var i=this;this.manager=n,this.callback=r,this.element=n.element,this.target=n.options.inputTarget,this.domHandler=function(h){x(n.options.enable,[n])&&i.handler(h)},this.init()}oe.prototype={handler:function(){},init:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(N(this.element),this.evWin,this.domHandler)}};function Je(n){var r,i=n.options.inputClass;return i?r=i:j?r=mt:ae?r=nt:V?r=gt:r=tt,new r(n,$e)}function $e(n,r,i){var h=i.pointers.length,m=i.changedPointers.length,P=r&L&&h-m===0,k=r&(G|W)&&h-m===0;i.isFirst=!!P,i.isFinal=!!k,P&&(n.session={}),i.eventType=r,u(n,i),n.emit("hammer.input",i),n.recognize(i),n.session.prevInput=i}function u(n,r){var i=n.session,h=r.pointers,m=h.length;i.firstInput||(i.firstInput=Q(r)),m>1&&!i.firstMultiple?i.firstMultiple=Q(r):m===1&&(i.firstMultiple=!1);var P=i.firstInput,k=i.firstMultiple,$=k?k.center:P.center,ce=r.center=ve(h);r.timeStamp=d(),r.deltaTime=r.timeStamp-P.timeStamp,r.angle=vt($,ce),r.distance=et($,ce),F(i,r),r.offsetDirection=we(r.deltaX,r.deltaY);var K=ze(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=K.x,r.overallVelocityY=K.y,r.overallVelocity=g(K.x)>g(K.y)?K.x:K.y,r.scale=k?Tn(k.pointers,h):1,r.rotation=k?wn(k.pointers,h):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,H(i,r);var ge=n.element;ne(r.srcEvent.target,ge)&&(ge=r.srcEvent.target),r.target=ge}function F(n,r){var i=r.center,h=n.offsetDelta||{},m=n.prevDelta||{},P=n.prevInput||{};(r.eventType===L||P.eventType===G)&&(m=n.prevDelta={x:P.deltaX||0,y:P.deltaY||0},h=n.offsetDelta={x:i.x,y:i.y}),r.deltaX=m.x+(i.x-h.x),r.deltaY=m.y+(i.y-h.y)}function H(n,r){var i=n.lastInterval||r,h=r.timeStamp-i.timeStamp,m,P,k,$;if(r.eventType!=W&&(h>R||i.velocity===a)){var ce=r.deltaX-i.deltaX,K=r.deltaY-i.deltaY,ge=ze(h,ce,K);P=ge.x,k=ge.y,m=g(ge.x)>g(ge.y)?ge.x:ge.y,$=we(ce,K),n.lastInterval=r}else m=i.velocity,P=i.velocityX,k=i.velocityY,$=i.direction;r.velocity=m,r.velocityX=P,r.velocityY=k,r.direction=$}function Q(n){for(var r=[],i=0;i<n.pointers.length;)r[i]={clientX:l(n.pointers[i].clientX),clientY:l(n.pointers[i].clientY)},i++;return{timeStamp:d(),pointers:r,center:ve(r),deltaX:n.deltaX,deltaY:n.deltaY}}function ve(n){var r=n.length;if(r===1)return{x:l(n[0].clientX),y:l(n[0].clientY)};for(var i=0,h=0,m=0;m<r;)i+=n[m].clientX,h+=n[m].clientY,m++;return{x:l(i/r),y:l(h/r)}}function ze(n,r,i){return{x:r/n||0,y:i/n||0}}function we(n,r){return n===r?Oe:g(n)>=g(r)?n<0?Ee:Ce:r<0?_e:xe}function et(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.sqrt(h*h+m*m)}function vt(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.atan2(m,h)*180/Math.PI}function wn(n,r){return vt(r[1],r[0],Se)+vt(n[1],n[0],Se)}function Tn(n,r){return et(r[0],r[1],Se)/et(n[0],n[1],Se)}var Pn={mousedown:L,mousemove:te,mouseup:G},En="mousedown",xn="mousemove mouseup";function tt(){this.evEl=En,this.evWin=xn,this.pressed=!1,oe.apply(this,arguments)}b(tt,oe,{handler:function(r){var i=Pn[r.type];i&L&&(r.button===0||r.button===2)&&(this.pressed=!0),i&te&&r.which!==1&&(i=G),this.pressed&&(i&G&&(this.pressed=!1),this.callback(this.manager,i,{pointers:[r],changedPointers:[r],pointerType:Z,srcEvent:r}))}});var Nt={pointerdown:L,pointermove:te,pointerup:G,pointercancel:W,pointerout:W},An={2:X,3:B,4:Z,5:Y},kt="pointerdown",Lt="pointermove pointerup pointercancel";f.MSPointerEvent&&!f.PointerEvent&&(kt="MSPointerDown",Lt="MSPointerMove MSPointerUp MSPointerCancel");function mt(){this.evEl=kt,this.evWin=Lt,oe.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(mt,oe,{handler:function(r){var i=this.store,h=!1,m=!1,P=r.type.toLowerCase().replace("ms",""),k=Nt[P],$=An[r.pointerType]||r.pointerType,ce=$==X,K=ue(i,r.pointerId,"pointerId");k&L&&(r.button===0||r.button===2||ce)?K<0&&(i.push(r),K=i.length-1):k&(G|W)?h=!0:!ce&&r.buttons===0&&(h=!0,m=!0,k=Nt.pointerup),!(K<0)&&(m||(i[K]=r),this.callback(this.manager,k,{pointers:i,changedPointers:[r],pointerType:$,srcEvent:i[K]}),h&&i.splice(K,1))}});var Mn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},On="touchstart",Cn="touchstart touchmove touchend touchcancel";function Dt(){this.evTarget=On,this.evWin=Cn,this.started=!1,oe.apply(this,arguments)}b(Dt,oe,{handler:function(r){var i=Mn[r.type];if(i===L&&(this.started=!0),!!this.started){var h=_n.call(this,r,i);i&(G|W)&&h[0].length-h[1].length===0&&(this.started=!1),this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}}});function _n(n,r){var i=be(n.touches),h=be(n.changedTouches);return r&(G|W)&&(i=Me(i.concat(h),"identifier")),[i,h]}var Sn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},In="touchstart touchmove touchend touchcancel";function nt(){this.evTarget=In,this.targetIds={},oe.apply(this,arguments)}b(nt,oe,{handler:function(r){var i=Sn[r.type],h=Nn.call(this,r,i);h&&this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}});function Nn(n,r){var i=be(n.touches),h=this.targetIds;if(r&(L|te)&&i.length===1)return h[i[0].identifier]=!0,[i,i];var m,P,k=be(n.changedTouches),$=[],ce=this.target;if(P=i.filter(function(K){return ne(K.target,ce)}),r===L)for(m=0;m<P.length;)h[P[m].identifier]=!0,m++;for(m=0;m<k.length;)h[k[m].identifier]&&$.push(k[m]),r&(G|W)&&delete h[k[m].identifier],m++;if($.length)return[Me(P.concat($),"identifier"),$]}var kn=2500,Ft=25;function gt(){oe.apply(this,arguments);var n=y(this.handler,this);this.touch=new nt(this.manager,n),this.mouse=new tt(this.manager,n),this.primaryTouch=null,this.lastTouches=[]}b(gt,oe,{handler:function(r,i,h){var m=h.pointerType==X,P=h.pointerType==Z;if(!(P&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(m)Ln.call(this,i,h);else if(P&&Dn.call(this,h))return;this.callback(r,i,h)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ln(n,r){n&L?(this.primaryTouch=r.changedPointers[0].identifier,Ut.call(this,r)):n&(G|W)&&Ut.call(this,r)}function Ut(n){var r=n.changedPointers[0];if(r.identifier===this.primaryTouch){var i={x:r.clientX,y:r.clientY};this.lastTouches.push(i);var h=this.lastTouches,m=function(){var P=h.indexOf(i);P>-1&&h.splice(P,1)};setTimeout(m,kn)}}function Dn(n){for(var r=n.srcEvent.clientX,i=n.srcEvent.clientY,h=0;h<this.lastTouches.length;h++){var m=this.lastTouches[h],P=Math.abs(r-m.x),k=Math.abs(i-m.y);if(P<=Ft&&k<=Ft)return!0}return!1}var Vt=s?ie(s.style,"touchAction"):a,Bt=Vt!==a,Rt="compute",Yt="auto",yt="manipulation",Ie="none",Ge="pan-x",Xe="pan-y",rt=Un();function bt(n,r){this.manager=n,this.set(r)}bt.prototype={set:function(n){n==Rt&&(n=this.compute()),Bt&&this.manager.element.style&&rt[n]&&(this.manager.element.style[Vt]=n),this.actions=n.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var n=[];return A(this.manager.recognizers,function(r){x(r.options.enable,[r])&&(n=n.concat(r.getTouchAction()))}),Fn(n.join(" "))},preventDefaults:function(n){var r=n.srcEvent,i=n.offsetDirection;if(this.manager.session.prevented){r.preventDefault();return}var h=this.actions,m=J(h,Ie)&&!rt[Ie],P=J(h,Xe)&&!rt[Xe],k=J(h,Ge)&&!rt[Ge];if(m){var $=n.pointers.length===1,ce=n.distance<2,K=n.deltaTime<250;if($&&ce&&K)return}if(!(k&&P)&&(m||P&&i&le||k&&i&fe))return this.preventSrc(r)},preventSrc:function(n){this.manager.session.prevented=!0,n.preventDefault()}};function Fn(n){if(J(n,Ie))return Ie;var r=J(n,Ge),i=J(n,Xe);return r&&i?Ie:r||i?r?Ge:Xe:J(n,yt)?yt:Yt}function Un(){if(!Bt)return!1;var n={},r=f.CSS&&f.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){n[i]=r?f.CSS.supports("touch-action",i):!0}),n}var at=1,he=2,Fe=4,Ae=8,Te=Ae,We=16,me=32;function Pe(n){this.options=C({},this.defaults,n||{}),this.id=U(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=at,this.simultaneous={},this.requireFail=[]}Pe.prototype={defaults:{},set:function(n){return C(this.options,n),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(n){if(w(n,"recognizeWith",this))return this;var r=this.simultaneous;return n=it(n,this),r[n.id]||(r[n.id]=n,n.recognizeWith(this)),this},dropRecognizeWith:function(n){return w(n,"dropRecognizeWith",this)?this:(n=it(n,this),delete this.simultaneous[n.id],this)},requireFailure:function(n){if(w(n,"requireFailure",this))return this;var r=this.requireFail;return n=it(n,this),ue(r,n)===-1&&(r.push(n),n.requireFailure(this)),this},dropRequireFailure:function(n){if(w(n,"dropRequireFailure",this))return this;n=it(n,this);var r=ue(this.requireFail,n);return r>-1&&this.requireFail.splice(r,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(n){return!!this.simultaneous[n.id]},emit:function(n){var r=this,i=this.state;function h(m){r.manager.emit(m,n)}i<Ae&&h(r.options.event+jt(i)),h(r.options.event),n.additionalEvent&&h(n.additionalEvent),i>=Ae&&h(r.options.event+jt(i))},tryEmit:function(n){if(this.canEmit())return this.emit(n);this.state=me},canEmit:function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(me|at)))return!1;n++}return!0},recognize:function(n){var r=C({},n);if(!x(this.options.enable,[this,r])){this.reset(),this.state=me;return}this.state&(Te|We|me)&&(this.state=at),this.state=this.process(r),this.state&(he|Fe|Ae|We)&&this.tryEmit(r)},process:function(n){},getTouchAction:function(){},reset:function(){}};function jt(n){return n&We?"cancel":n&Ae?"end":n&Fe?"move":n&he?"start":""}function zt(n){return n==xe?"down":n==_e?"up":n==Ee?"left":n==Ce?"right":""}function it(n,r){var i=r.manager;return i?i.get(n):n}function pe(){Pe.apply(this,arguments)}b(pe,Pe,{defaults:{pointers:1},attrTest:function(n){var r=this.options.pointers;return r===0||n.pointers.length===r},process:function(n){var r=this.state,i=n.eventType,h=r&(he|Fe),m=this.attrTest(n);return h&&(i&W||!m)?r|We:h||m?i&G?r|Ae:r&he?r|Fe:he:me}});function ot(){pe.apply(this,arguments),this.pX=null,this.pY=null}b(ot,pe,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ye},getTouchAction:function(){var n=this.options.direction,r=[];return n&le&&r.push(Xe),n&fe&&r.push(Ge),r},directionTest:function(n){var r=this.options,i=!0,h=n.distance,m=n.direction,P=n.deltaX,k=n.deltaY;return m&r.direction||(r.direction&le?(m=P===0?Oe:P<0?Ee:Ce,i=P!=this.pX,h=Math.abs(n.deltaX)):(m=k===0?Oe:k<0?_e:xe,i=k!=this.pY,h=Math.abs(n.deltaY))),n.direction=m,i&&h>r.threshold&&m&r.direction},attrTest:function(n){return pe.prototype.attrTest.call(this,n)&&(this.state&he||!(this.state&he)&&this.directionTest(n))},emit:function(n){this.pX=n.deltaX,this.pY=n.deltaY;var r=zt(n.direction);r&&(n.additionalEvent=this.options.event+r),this._super.emit.call(this,n)}});function wt(){pe.apply(this,arguments)}b(wt,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&he)},emit:function(n){if(n.scale!==1){var r=n.scale<1?"in":"out";n.additionalEvent=this.options.event+r}this._super.emit.call(this,n)}});function Tt(){Pe.apply(this,arguments),this._timer=null,this._input=null}b(Tt,Pe,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime>r.time;if(this._input=n,!h||!i||n.eventType&(G|W)&&!m)this.reset();else if(n.eventType&L)this.reset(),this._timer=v(function(){this.state=Te,this.tryEmit()},r.time,this);else if(n.eventType&G)return Te;return me},reset:function(){clearTimeout(this._timer)},emit:function(n){this.state===Te&&(n&&n.eventType&G?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function Pt(){pe.apply(this,arguments)}b(Pt,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&he)}});function Et(){pe.apply(this,arguments)}b(Et,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:le|fe,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(n){var r=this.options.direction,i;return r&(le|fe)?i=n.overallVelocity:r&le?i=n.overallVelocityX:r&fe&&(i=n.overallVelocityY),this._super.attrTest.call(this,n)&&r&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers==this.options.pointers&&g(i)>this.options.velocity&&n.eventType&G},emit:function(n){var r=zt(n.offsetDirection);r&&this.manager.emit(this.options.event+r,n),this.manager.emit(this.options.event,n)}});function st(){Pe.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(st,Pe,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime<r.time;if(this.reset(),n.eventType&L&&this.count===0)return this.failTimeout();if(h&&m&&i){if(n.eventType!=G)return this.failTimeout();var P=this.pTime?n.timeStamp-this.pTime<r.interval:!0,k=!this.pCenter||et(this.pCenter,n.center)<r.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!k||!P?this.count=1:this.count+=1,this._input=n;var $=this.count%r.taps;if($===0)return this.hasRequireFailures()?(this._timer=v(function(){this.state=Te,this.tryEmit()},r.interval,this),he):Te}return me},failTimeout:function(){return this._timer=v(function(){this.state=me},this.options.interval,this),me},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Te&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ue(n,r){return r=r||{},r.recognizers=p(r.recognizers,Ue.defaults.preset),new xt(n,r)}Ue.VERSION="2.0.7",Ue.defaults={domEvents:!1,touchAction:Rt,enable:!0,inputTarget:null,inputClass:null,preset:[[Pt,{enable:!1}],[wt,{enable:!1},["rotate"]],[Et,{direction:le}],[ot,{direction:le},["swipe"]],[st],[st,{event:"doubletap",taps:2},["tap"]],[Tt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Vn=1,Gt=2;function xt(n,r){this.options=C({},Ue.defaults,r||{}),this.options.inputTarget=this.options.inputTarget||n,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=n,this.input=Je(this),this.touchAction=new bt(this,this.options.touchAction),Xt(this,!0),A(this.options.recognizers,function(i){var h=this.add(new i[0](i[1]));i[2]&&h.recognizeWith(i[2]),i[3]&&h.requireFailure(i[3])},this)}xt.prototype={set:function(n){return C(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},stop:function(n){this.session.stopped=n?Gt:Vn},recognize:function(n){var r=this.session;if(!r.stopped){this.touchAction.preventDefaults(n);var i,h=this.recognizers,m=r.curRecognizer;(!m||m&&m.state&Te)&&(m=r.curRecognizer=null);for(var P=0;P<h.length;)i=h[P],r.stopped!==Gt&&(!m||i==m||i.canRecognizeWith(m))?i.recognize(n):i.reset(),!m&&i.state&(he|Fe|Ae)&&(m=r.curRecognizer=i),P++}},get:function(n){if(n instanceof Pe)return n;for(var r=this.recognizers,i=0;i<r.length;i++)if(r[i].options.event==n)return r[i];return null},add:function(n){if(w(n,"add",this))return this;var r=this.get(n.options.event);return r&&this.remove(r),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},remove:function(n){if(w(n,"remove",this))return this;if(n=this.get(n),n){var r=this.recognizers,i=ue(r,n);i!==-1&&(r.splice(i,1),this.touchAction.update())}return this},on:function(n,r){if(n!==a&&r!==a){var i=this.handlers;return A(re(n),function(h){i[h]=i[h]||[],i[h].push(r)}),this}},off:function(n,r){if(n!==a){var i=this.handlers;return A(re(n),function(h){r?i[h]&&i[h].splice(ue(i[h],r),1):delete i[h]}),this}},emit:function(n,r){this.options.domEvents&&Bn(n,r);var i=this.handlers[n]&&this.handlers[n].slice();if(!(!i||!i.length)){r.type=n,r.preventDefault=function(){r.srcEvent.preventDefault()};for(var h=0;h<i.length;)i[h](r),h++}},destroy:function(){this.element&&Xt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Xt(n,r){var i=n.element;if(i.style){var h;A(n.options.cssProps,function(m,P){h=ie(i.style,P),r?(n.oldCssProps[h]=i.style[h],i.style[h]=m):i.style[h]=n.oldCssProps[h]||""}),r||(n.oldCssProps={})}}function Bn(n,r){var i=o.createEvent("Event");i.initEvent(n,!0,!0),i.gesture=r,r.target.dispatchEvent(i)}return C(Ue,{INPUT_START:L,INPUT_MOVE:te,INPUT_END:G,INPUT_CANCEL:W,STATE_POSSIBLE:at,STATE_BEGAN:he,STATE_CHANGED:Fe,STATE_ENDED:Ae,STATE_RECOGNIZED:Te,STATE_CANCELLED:We,STATE_FAILED:me,DIRECTION_NONE:Oe,DIRECTION_LEFT:Ee,DIRECTION_RIGHT:Ce,DIRECTION_UP:_e,DIRECTION_DOWN:xe,DIRECTION_HORIZONTAL:le,DIRECTION_VERTICAL:fe,DIRECTION_ALL:Ye,Manager:xt,Input:oe,TouchAction:bt,TouchInput:nt,MouseInput:tt,PointerEventInput:mt,TouchMouseInput:gt,SingleTouchInput:Dt,Recognizer:Pe,AttrRecognizer:pe,Tap:st,Pan:ot,Swipe:Et,Pinch:wt,Rotate:Pt,Press:Tt,on:I,off:M,each:A,merge:D,extend:O,assign:C,inherit:b,bindFn:y,prefixed:ie}),Ue})(typeof window!="undefined"?window:{},typeof document!="undefined"?document:{}),De=function(f,o){o===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),o===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=f,this.domElement=o,this.enabled=!0,this.target=new _.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:_.MOUSE.ROTATE,MIDDLE:_.MOUSE.DOLLY,RIGHT:_.MOUSE.PAN},this.touches={ONE:_.TOUCH.ROTATE,TWO:_.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return d.phi},this.getAzimuthalAngle=function(){return d.theta},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(a),e.update(),l=c.NONE},this.update=(function(){var u=new _.Vector3,F=new _.Quaternion().setFromUnitVectors(f.up,new _.Vector3(0,1,0)),H=F.clone().inverse(),Q=new _.Vector3,ve=new _.Quaternion;return function(){var we=e.object.position;return u.copy(we).sub(e.target),u.applyQuaternion(F),d.setFromVector3(u),e.autoRotate&&l===c.NONE&&re(ne()),e.enableDamping?(d.theta+=v.theta*e.dampingFactor,d.phi+=v.phi*e.dampingFactor):(d.theta+=v.theta,d.phi+=v.phi),d.theta=Math.max(e.minAzimuthAngle,Math.min(e.maxAzimuthAngle,d.theta)),d.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,d.phi)),d.makeSafe(),d.radius*=w,d.radius=Math.max(e.minDistance,Math.min(e.maxDistance,d.radius)),e.enableDamping===!0?e.target.addScaledVector(A,e.dampingFactor):e.target.add(A),u.setFromSpherical(d),u.applyQuaternion(H),we.copy(e.target).add(u),e.object.lookAt(e.target),e.enableDamping===!0?(v.theta*=1-e.dampingFactor,v.phi*=1-e.dampingFactor,A.multiplyScalar(1-e.dampingFactor)):(v.set(0,0,0),A.set(0,0,0)),w=1,E||Q.distanceToSquared(e.object.position)>g||8*(1-ve.dot(e.object.quaternion))>g?(e.dispatchEvent(a),Q.copy(e.object.position),ve.copy(e.object.quaternion),E=!1,!0):!1}})(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$e,!1),e.domElement.removeEventListener("mousedown",xe,!1),e.domElement.removeEventListener("wheel",Ye,!1),e.domElement.removeEventListener("touchstart",Se,!1),e.domElement.removeEventListener("touchend",Je,!1),e.domElement.removeEventListener("touchmove",oe,!1),document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.domElement.removeEventListener("keydown",je,!1)};var e=this,a={type:"change"},t={type:"start"},s={type:"end"},c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},l=c.NONE,g=1e-6,d=new _.Spherical,v=new _.Spherical,w=1,A=new _.Vector3,E=!1,C=new _.Vector2,O=new _.Vector2,D=new _.Vector2,b=new _.Vector2,y=new _.Vector2,x=new _.Vector2,p=new _.Vector2,I=new _.Vector2,M=new _.Vector2;function ne(){return 2*Math.PI/60/60*e.autoRotateSpeed}function J(){return Math.pow(.95,e.zoomSpeed)}function re(u){v.theta-=u}function ue(u){v.phi-=u}var be=(function(){var u=new _.Vector3;return function(H,Q){u.setFromMatrixColumn(Q,0),u.multiplyScalar(-H),A.add(u)}})(),Me=(function(){var u=new _.Vector3;return function(H,Q){e.screenSpacePanning===!0?u.setFromMatrixColumn(Q,1):(u.setFromMatrixColumn(Q,0),u.crossVectors(e.object.up,u)),u.multiplyScalar(H),A.add(u)}})(),ie=(function(){var u=new _.Vector3;return function(H,Q){var ve=e.domElement;if(e.object.isPerspectiveCamera){var ze=e.object.position;u.copy(ze).sub(e.target);var we=u.length();we*=Math.tan(e.object.fov/2*Math.PI/180),be(2*H*we/ve.clientHeight,e.object.matrix),Me(2*Q*we/ve.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(be(H*(e.object.right-e.object.left)/e.object.zoom/ve.clientWidth,e.object.matrix),Me(Q*(e.object.top-e.object.bottom)/e.object.zoom/ve.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function se(u){e.object.isPerspectiveCamera?w/=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom*u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function U(u){e.object.isPerspectiveCamera?w*=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function N(u){C.set(u.clientX,u.clientY)}function S(u){p.set(u.clientX,u.clientY)}function V(u){b.set(u.clientX,u.clientY)}function j(u){O.set(u.clientX,u.clientY),D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var F=e.domElement;re(2*Math.PI*D.x/F.clientHeight),ue(2*Math.PI*D.y/F.clientHeight),C.copy(O),e.update()}function ae(u){I.set(u.clientX,u.clientY),M.subVectors(I,p),M.y>0?se(J()):M.y<0&&U(J()),p.copy(I),e.update()}function X(u){y.set(u.clientX,u.clientY),x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y),e.update()}function B(u){u.deltaY<0?U(J()):u.deltaY>0&&se(J()),e.update()}function Z(u){var F=!1;switch(u.keyCode){case e.keys.UP:ie(0,e.keyPanSpeed),F=!0;break;case e.keys.BOTTOM:ie(0,-e.keyPanSpeed),F=!0;break;case e.keys.LEFT:ie(e.keyPanSpeed,0),F=!0;break;case e.keys.RIGHT:ie(-e.keyPanSpeed,0),F=!0;break}F&&(u.preventDefault(),e.update())}function Y(u){if(u.touches.length==1)C.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);C.set(F,H)}}function R(u){if(u.touches.length==1)b.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);b.set(F,H)}}function L(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);p.set(0,Q)}function te(u){e.enableZoom&&L(u),e.enablePan&&R(u)}function G(u){e.enableZoom&&L(u),e.enableRotate&&Y(u)}function W(u){if(u.touches.length==1)O.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);O.set(F,H)}D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var Q=e.domElement;re(2*Math.PI*D.x/Q.clientHeight),ue(2*Math.PI*D.y/Q.clientHeight),C.copy(O)}function Oe(u){if(u.touches.length==1)y.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);y.set(F,H)}x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y)}function Ee(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);I.set(0,Q),M.set(0,Math.pow(I.y/p.y,e.zoomSpeed)),se(M.y),p.copy(I)}function Ce(u){e.enableZoom&&Ee(u),e.enablePan&&Oe(u)}function _e(u){e.enableZoom&&Ee(u),e.enableRotate&&W(u)}function xe(u){if(e.enabled!==!1){u.preventDefault(),e.domElement.focus?e.domElement.focus():window.focus();var F;switch(u.button){case 0:F=e.mouseButtons.LEFT;break;case 1:F=e.mouseButtons.MIDDLE;break;case 2:F=e.mouseButtons.RIGHT;break;default:F=-1}switch(F){case _.MOUSE.DOLLY:if(e.enableZoom===!1)return;S(u),l=c.DOLLY;break;case _.MOUSE.ROTATE:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enablePan===!1)return;V(u),l=c.PAN}else{if(e.enableRotate===!1)return;N(u),l=c.ROTATE}break;case _.MOUSE.PAN:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enableRotate===!1)return;N(u),l=c.ROTATE}else{if(e.enablePan===!1)return;V(u),l=c.PAN}break;default:l=c.NONE}l!==c.NONE&&(document.addEventListener("mousemove",le,!1),document.addEventListener("mouseup",fe,!1),e.dispatchEvent(t))}}function le(u){if(e.enabled!==!1)switch(u.preventDefault(),l){case c.ROTATE:if(e.enableRotate===!1)return;j(u);break;case c.DOLLY:if(e.enableZoom===!1)return;ae(u);break;case c.PAN:if(e.enablePan===!1)return;X(u);break}}function fe(u){e.enabled!==!1&&(document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.dispatchEvent(s),l=c.NONE)}function Ye(u){e.enabled===!1||e.enableZoom===!1||l!==c.NONE&&l!==c.ROTATE||(u.preventDefault(),u.stopPropagation(),e.dispatchEvent(t),B(u),e.dispatchEvent(s))}function je(u){e.enabled===!1||e.enableKeys===!1||e.enablePan===!1||Z(u)}function Se(u){if(e.enabled!==!1){switch(u.preventDefault(),u.touches.length){case 1:switch(e.touches.ONE){case _.TOUCH.ROTATE:if(e.enableRotate===!1)return;Y(u),l=c.TOUCH_ROTATE;break;case _.TOUCH.PAN:if(e.enablePan===!1)return;R(u),l=c.TOUCH_PAN;break;default:l=c.NONE}break;case 2:switch(e.touches.TWO){case _.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;te(u),l=c.TOUCH_DOLLY_PAN;break;case _.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;G(u),l=c.TOUCH_DOLLY_ROTATE;break;default:l=c.NONE}break;default:l=c.NONE}l!==c.NONE&&e.dispatchEvent(t)}}function oe(u){if(e.enabled!==!1)switch(u.preventDefault(),u.stopPropagation(),l){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;W(u),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;Oe(u),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Ce(u),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;_e(u),e.update();break;default:l=c.NONE}}function Je(u){e.enabled!==!1&&(e.dispatchEvent(s),l=c.NONE)}function $e(u){e.enabled!==!1&&u.preventDefault()}e.domElement.addEventListener("contextmenu",$e,!1),e.domElement.addEventListener("mousedown",xe,!1),e.domElement.addEventListener("wheel",Ye,!1),e.domElement.addEventListener("touchstart",Se,!1),e.domElement.addEventListener("touchend",Je,!1),e.domElement.addEventListener("touchmove",oe,!1),e.domElement.addEventListener("keydown",je,!1),e.domElement.tabIndex===-1&&(e.domElement.tabIndex=0),this.update()};De.prototype=Object.create(_.EventDispatcher.prototype),De.prototype.constructor=De;var ht=function(f,o){De.call(this,f,o),this.mouseButtons.LEFT=_.MOUSE.PAN,this.mouseButtons.RIGHT=_.MOUSE.ROTATE,this.touches.ONE=_.TOUCH.PAN,this.touches.TWO=_.TOUCH.DOLLY_ROTATE};ht.prototype=Object.create(_.EventDispatcher.prototype),ht.prototype.constructor=ht;var ye=function(f){_.Object3D.call(this),this.element=f,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.addEventListener("removed",function(){this.traverse(function(o){o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)})})};ye.prototype=Object.create(_.Object3D.prototype),ye.prototype.constructor=ye;var Ke=function(f){ye.call(this,f)};Ke.prototype=Object.create(ye.prototype),Ke.prototype.constructor=Ke;var Ct=function(){var f=this,o,e,a,t,s=new _.Matrix4,c={camera:{fov:0,style:""},objects:new WeakMap},l=document.createElement("div");l.style.overflow="hidden",this.domElement=l;var g=document.createElement("div");g.style.WebkitTransformStyle="preserve-3d",g.style.transformStyle="preserve-3d",g.style.pointerEvents="none",l.appendChild(g);var d=/Trident/i.test(navigator.userAgent);this.getSize=function(){return{width:o,height:e}},this.setSize=function(b,y){o=b,e=y,a=o/2,t=e/2,l.style.width=b+"px",l.style.height=y+"px",g.style.width=b+"px",g.style.height=y+"px"};function v(b){return Math.abs(b)<1e-10?0:b}function w(b){var y=b.elements;return"matrix3d("+v(y[0])+","+v(-y[1])+","+v(y[2])+","+v(y[3])+","+v(y[4])+","+v(-y[5])+","+v(y[6])+","+v(y[7])+","+v(y[8])+","+v(-y[9])+","+v(y[10])+","+v(y[11])+","+v(y[12])+","+v(-y[13])+","+v(y[14])+","+v(y[15])+")"}function A(b,y){var x=b.elements,p="matrix3d("+v(x[0])+","+v(x[1])+","+v(x[2])+","+v(x[3])+","+v(-x[4])+","+v(-x[5])+","+v(-x[6])+","+v(-x[7])+","+v(x[8])+","+v(x[9])+","+v(x[10])+","+v(x[11])+","+v(x[12])+","+v(x[13])+","+v(x[14])+","+v(x[15])+")";return d?"translate(-50%,-50%)translate("+a+"px,"+t+"px)"+y+p:"translate(-50%,-50%)"+p}function E(b,y,x,p){if(b instanceof ye){b.onBeforeRender(f,y,x);var I;b instanceof Ke?(s.copy(x.matrixWorldInverse),s.transpose(),s.copyPosition(b.matrixWorld),s.scale(b.scale),s.elements[3]=0,s.elements[7]=0,s.elements[11]=0,s.elements[15]=1,I=A(s,p)):I=A(b.matrixWorld,p);var M=b.element,ne=c.objects.get(b);if(ne===void 0||ne.style!==I){M.style.WebkitTransform=I,M.style.transform=I;var J={style:I};d&&(J.distanceToCameraSquared=C(x,b)),c.objects.set(b,J)}M.style.display=b.visible?"":"none",M.parentNode!==g&&g.appendChild(M),b.onAfterRender(f,y,x)}for(var re=0,ue=b.children.length;re<ue;re++)E(b.children[re],y,x,p)}var C=(function(){var b=new _.Vector3,y=new _.Vector3;return function(x,p){return b.setFromMatrixPosition(x.matrixWorld),y.setFromMatrixPosition(p.matrixWorld),b.distanceToSquared(y)}})();function O(b){var y=[];return b.traverse(function(x){x instanceof ye&&y.push(x)}),y}function D(b){for(var y=O(b).sort(function(M,ne){var J=c.objects.get(M).distanceToCameraSquared,re=c.objects.get(ne).distanceToCameraSquared;return J-re}),x=y.length,p=0,I=y.length;p<I;p++)y[p].element.style.zIndex=x-p}this.render=function(b,y){var x=y.projectionMatrix.elements[5]*t;if(c.camera.fov!==x&&(y.isPerspectiveCamera?(l.style.WebkitPerspective=x+"px",l.style.perspective=x+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),c.camera.fov=x),b.autoUpdate===!0&&b.updateMatrixWorld(),y.parent===null&&y.updateMatrixWorld(),y.isOrthographicCamera)var p=-(y.right+y.left)/2,I=(y.top+y.bottom)/2;var M=y.isOrthographicCamera?"scale("+x+")translate("+v(p)+"px,"+v(I)+"px)"+w(y.matrixWorldInverse):"translateZ("+x+"px)"+w(y.matrixWorldInverse),ne=M+"translate("+a+"px,"+t+"px)";c.camera.style!==ne&&!d&&(g.style.WebkitTransform=ne,g.style.transform=ne,c.camera.style=ne),E(b,b,y,M),d&&D(b)}};function _t(f,o,e){var a=o.getBoundingClientRect(),t=a.top,s=a.left,c=a.width,l=a.height;return new T.Vector2((f.x-s)/c*2-1,-(f.y-t)/l*2+1)}var St=(function(f){Ne(o,f);function o(e,a,t,s,c){var l=f.call(this)||this;l.type="RoundedBoxGeometry",c=isNaN(c)?1:Math.max(1,Math.floor(c)),e=isNaN(e)?1:e,a=isNaN(a)?1:a,t=isNaN(t)?1:t,s=isNaN(s)?.15:s,s=Math.min(s,Math.min(e,Math.min(a,Math.min(t)))/2);var g=e/2-s,d=a/2-s,v=t/2-s;l.parameters={width:e,height:a,depth:t,radius:s,radiusSegments:c};var w=c+1,A=w*c+1<<3,E=new T.BufferAttribute(new Float32Array(A*3),3),C=new T.BufferAttribute(new Float32Array(A*3),3),O=[],D=[];new T.Vector3;var b=new T.Vector3,y=[],x=[],p=[],I=w*c,M=w*c+1;ne(),re(),J(),ue(),Me(),be();function ne(){for(var U=[new T.Vector3(1,1,1),new T.Vector3(1,1,-1),new T.Vector3(-1,1,-1),new T.Vector3(-1,1,1),new T.Vector3(1,-1,1),new T.Vector3(1,-1,-1),new T.Vector3(-1,-1,-1),new T.Vector3(-1,-1,1)],N=0;N<8;N++)O.push([]),D.push([]);for(var S=Math.PI/2,V=new T.Vector3(g,d,v),j=0;j<=c;j++){var ae=j/c,X=ae*S,B=Math.cos(X),Z=Math.sin(X);if(j==c){b.set(0,1,0);var Y=b.clone().multiplyScalar(s).add(V);O[0].push(Y),y.push(Y);var R=b.clone();D[0].push(R),x.push(R);continue}for(var L=0;L<=c;L++){var te=L/c,G=te*S;b.x=B*Math.cos(G),b.y=Z,b.z=B*Math.sin(G);var Y=b.clone().multiplyScalar(s).add(V);O[0].push(Y),y.push(Y);var R=b.clone().normalize();D[0].push(R),x.push(R)}}for(var W=1;W<8;W++)for(var N=0;N<O[0].length;N++){var Y=O[0][N].clone().multiply(U[W]);O[W].push(Y),y.push(Y);var R=D[0][N].clone().multiply(U[W]);D[W].push(R),x.push(R)}}function J(){for(var U=[!0,!1,!0,!1,!1,!0,!1,!0],N=w*(c-1),S=0;S<8;S++){for(var V=M*S,j=0;j<c-1;j++)for(var ae=j*w,X=(j+1)*w,B=0;B<c;B++){var Z=B+1,Y=V+ae+B,R=V+ae+Z,L=V+X+B,te=V+X+Z;U[S]?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}for(var B=0;B<c;B++){var Y=V+N+B,R=V+N+B+1,L=V+I;U[S]?(p.push(Y),p.push(L),p.push(R)):(p.push(Y),p.push(R),p.push(L))}}}function re(){var U=I,N=I+M,S=I+M*2,V=I+M*3;p.push(U),p.push(N),p.push(S),p.push(U),p.push(S),p.push(V),U=I+M*4,N=I+M*5,S=I+M*6,V=I+M*7,p.push(U),p.push(S),p.push(N),p.push(U),p.push(V),p.push(S),U=0,N=M,S=M*4,V=M*5,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=M*2,N=M*3,S=M*6,V=M*7,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=c,N=c+M*3,S=c+M*4,V=c+M*7,p.push(U),p.push(N),p.push(S),p.push(N),p.push(V),p.push(S),U=c+M,N=c+M*2,S=c+M*5,V=c+M*6,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V)}function ue(){for(var U=0;U<4;U++)for(var N=U*M,S=4*M+N,V=(U&1)===1,j=0;j<c;j++){var ae=j+1,X=N+j,B=N+ae,Z=S+j,Y=S+ae;V?(p.push(X),p.push(Z),p.push(B),p.push(B),p.push(Z),p.push(Y)):(p.push(X),p.push(B),p.push(Z),p.push(B),p.push(Y),p.push(Z))}}function be(){for(var U=[0,2,4,6],N=[1,3,5,7],S=0;S<4;S++)for(var V=M*U[S],j=M*N[S],ae=1>=S,X=0;X<c;X++){var B=X*w,Z=(X+1)*w,Y=V+B,R=V+Z,L=j+B,te=j+Z;ae?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}}function Me(){for(var U=c-1,N=[0,1,4,5],S=[3,2,7,6],V=[0,1,1,0],j=0;j<4;j++)for(var ae=N[j]*M,X=S[j]*M,B=0;B<=U;B++){var Z=ae+c+B*w,Y=ae+(B!=U?c+(B+1)*w:M-1),R=X+c+B*w,L=X+(B!=U?c+(B+1)*w:M-1);V[j]?(p.push(Z),p.push(R),p.push(Y),p.push(Y),p.push(R),p.push(L)):(p.push(Z),p.push(Y),p.push(R),p.push(Y),p.push(L),p.push(R))}}for(var ie=0,se=0;se<y.length;se++)E.setXYZ(ie,y[se].x,y[se].y,y[se].z),C.setXYZ(ie,x[se].x,x[se].y,x[se].z),ie++;return l.setIndex(new T.BufferAttribute(new Uint16Array(p),1)),l.setAttribute("position",E),l.setAttribute("normal",C),l}return o})(T.BufferGeometry);function Ve(f,o){return typeof f!="number"||typeof o!="number"?!1:Math.abs(f-o)<.001}function Be(f,o,e,a){a===void 0&&(a=function(s){return s});var t=a(e);return f*(1-t)+o*t}var ee=Number((Math.PI/2).toFixed(5));function ln(f,o,e){var a=new T.Shape;return a.moveTo(e,0),a.lineTo(f-e,0),a.absarc(f-e,e,e,-ee,0,!1),a.lineTo(f,o-e),a.absarc(f-e,o-e,e,0,ee,!1),a.lineTo(e,o),a.absarc(e,o-e,e,ee,Math.PI,!1),a.lineTo(0,e),a.absarc(e,e,e,Math.PI,Math.PI*1.5,!1),a}var Re=function(f){var o=document.createElement("div");o.innerText=f;var e=new ye(o);return e.name=f,e.scale.set(.3,.3,.3),o.style.pointerEvents="none",o.style.backfaceVisibility="hidden",e},Ze=function(f){var o=new T.PlaneGeometry(5,5),e=new T.MeshBasicMaterial({transparent:!0,opacity:0}),a=new T.Mesh(o,e),t=document.createElement("div");t.innerText=f;var s=new ye(t);return s.name=f,s.scale.set(.3,.3,.3),t.style.color="#ffffff",t.style.opacity="0.5",t.style.pointerEvents="none",t.style.backfaceVisibility="hidden",a.rotateX(-ee),a.add(s),a},cn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.camera=new de.Camera(90),t.scene=new T.Scene,t.renderer=new T.WebGLRenderer({antialias:!0,alpha:!0}),t.css3drenderer=new Ct,t.ambientLight=new T.AmbientLight(16777215,.7),t.wrapper=document.createElement("div"),t.arrows=document.createElement("div"),t.arrowLeft=document.createElement("div"),t.arrowRight=document.createElement("div"),t.arrowFront=document.createElement("div"),t.arrowBack=document.createElement("div"),t.arrowTop=document.createElement("div"),t.arrowBottom=document.createElement("div"),t.spherical=null,t.dragging=!1,t.style=document.createElement("style"),t.directionalLight=new T.DirectionalLight(16777215,.2),t.box=new T.Mesh(new St(8,8,8,.5,20),new T.MeshPhongMaterial({color:16777215})),t.faces=new T.Group,t.orient=function(l){var g=l.longitude,d=l.latitude;t.dragging=!1,t.spherical=null,t.controls.enableDamping=!1,t.five.setState(Object.assign({latitude:d},g!==void 0?{longitude:g+t.config.fixedLongitude}:{})),t.five.ready().then(function(){t.controls.enableDamping=!0,t.setState({arrowsVisible:!0})})},t.onRenderFrame=function(){var l,g,d,v,w;if(t.renderer.render(t.scene,t.camera),t.css3drenderer.render(t.scene,t.camera),t.directionalLight.position.copy(t.camera.position),(l=t.controls)===null||l===void 0||l.update(),t.dragging){t.camera.computePose(),t.updateByCamera();var A=t.camera.pose,E=A.longitude,C=A.latitude;t.five.setState({longitude:E,latitude:C},!0),t.updateArrows({longitude:E,latitude:C})}else if(t.spherical&&(!Ve(t.spherical.pi,(g=t.controls)===null||g===void 0?void 0:g.getPolarAngle())||!Ve(t.spherical.theta,(d=t.controls)===null||d===void 0?void 0:d.getAzimuthalAngle()))){t.spherical={pi:(v=t.controls)===null||v===void 0?void 0:v.getPolarAngle(),theta:(w=t.controls)===null||w===void 0?void 0:w.getAzimuthalAngle()},t.camera.computePose(),t.updateByCamera();var O=t.camera.pose,E=O.longitude,C=O.latitude;t.five.setState({longitude:E,latitude:C},!0),t.updateArrows({longitude:E,latitude:C})}else t.spherical=null},t.onTapGesture=function(l){var g=l.pointers[0].clientX,d=l.pointers[0].clientY,v=_t({x:g,y:d},t.wrapper),w=new T.Raycaster;w.setFromCamera(v,t.camera);var A=w.intersectObjects(t.faces.children,!1)[0];if(A){var E=A.object.userData,C=E.longitude,O=E.latitude;t.orient({longitude:C,latitude:O})}},t.onFiveWantsGesture=function(){if(t.spherical)return!1},t.onFiveModeChange=function(l){t.controls&&(t.controls.maxPolarAngle=l==="Topview"?0:ee)},t.onCameraUpdate=function(l){var g=l.state;if(!t.dragging&&!t.spherical){var d=g.longitude,v=g.latitude;t.camera.pose.longitude===d&&t.camera.pose.latitude===v||(t.camera.setFromPose({longitude:d,latitude:v,distance:20,offset:new T.Vector3(0,0,0)}),t.updateByCamera(),t.updateArrows({longitude:d,latitude:v}))}},t.onPanStart=function(l){t.dragging=!0,t.spherical={}},t.onMouseMove=function(l){if(!t.dragging){var g=_t({x:l.clientX,y:l.clientY},t.wrapper),d=new T.Raycaster;d.setFromCamera(g,t.camera);var v=d.intersectObjects(t.faces.children,!1)[0];t.faces.children.forEach(function(w){w.material.opacity=0,w.children[0].element.style.color=""}),v&&(v.object.material.opacity=.3,v.object.children[0].element.style.color="#336dff")}},t.onPanEnd=function(l){t.dragging=!1,t.spherical={pi:t.controls.getPolarAngle(),theta:t.controls.getAzimuthalAngle()}},t.dispose=function(){t.disable()},t.five=e;var s={enabled:!1,visible:!0,arrowsVisible:!1};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=z({fixedLongitude:0,orthoView:!0},a==null?void 0:a.config);return t._config=c,t.state.enabled&&t._enable({userAction:!1}),t.mc=new ut.Manager(t.wrapper),t.mc.add(new ut.Tap({interval:410})),t.mc.add(new ut.Pan({threshold:10,pointers:0})),t.camera.setFromPose({distance:20,offset:new T.Vector3(0,0,0),longitude:e.camera.pose.latitude,latitude:e.camera.pose.latitude}),t.cylinder=new T.Mesh(new T.CylinderGeometry(13.2,14,.01,50,1,!0),new T.ShaderMaterial({uniforms:{radiusTop:{value:13.2},radiusBottom:{value:14},opacity:{value:1}},vertexShader:`
|
|
356
|
+
`;return function(){var m=new Error("get-stack-trace"),P=m&&m.stack?m.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",k=f.console&&(f.console.warn||f.console.log);return k&&k.call(f.console,h,P),n.apply(this,arguments)}}var O;typeof Object.assign!="function"?O=function(r){if(r===a||r===null)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(r),h=1;h<arguments.length;h++){var m=arguments[h];if(m!==a&&m!==null)for(var P in m)m.hasOwnProperty(P)&&(i[P]=m[P])}return i}:O=Object.assign;var C=E(function(r,i,h){for(var m=Object.keys(i),P=0;P<m.length;)(!h||h&&r[m[P]]===a)&&(r[m[P]]=i[m[P]]),P++;return r},"extend","Use `assign`."),D=E(function(r,i){return C(r,i,!0)},"merge","Use `assign`.");function b(n,r,i){var h=r.prototype,m;m=n.prototype=Object.create(h),m.constructor=n,m._super=h,i&&O(m,i)}function y(n,r){return function(){return n.apply(r,arguments)}}function x(n,r){return typeof n==c?n.apply(r&&r[0]||a,r):n}function p(n,r){return n===a?r:n}function I(n,r,i){A(re(r),function(h){n.addEventListener(h,i,!1)})}function M(n,r,i){A(re(r),function(h){n.removeEventListener(h,i,!1)})}function ne(n,r){for(;n;){if(n==r)return!0;n=n.parentNode}return!1}function J(n,r){return n.indexOf(r)>-1}function re(n){return n.trim().split(/\s+/g)}function ue(n,r,i){if(n.indexOf&&!i)return n.indexOf(r);for(var h=0;h<n.length;){if(i&&n[h][i]==r||!i&&n[h]===r)return h;h++}return-1}function be(n){return Array.prototype.slice.call(n,0)}function Me(n,r,i){for(var h=[],m=[],P=0;P<n.length;){var k=n[P][r];ue(m,k)<0&&h.push(n[P]),m[P]=k,P++}return h=h.sort(function(ce,K){return ce[r]>K[r]}),h}function ie(n,r){for(var i,h,m=r[0].toUpperCase()+r.slice(1),P=0;P<t.length;){if(i=t[P],h=i?i+m:r,h in n)return h;P++}return a}var se=1;function U(){return se++}function N(n){var r=n.ownerDocument||n;return r.defaultView||r.parentWindow||f}var S=/mobile|tablet|ip(ad|hone|od)|android/i,V="ontouchstart"in f,z=ie(f,"PointerEvent")!==a,ae=V&&S.test(navigator.userAgent),X="touch",B="pen",Z="mouse",Y="kinect",R=25,L=1,te=2,G=4,W=8,Ce=1,Ee=2,Oe=4,_e=8,xe=16,le=Ee|Oe,fe=_e|xe,Ye=le|fe,je=["x","y"],Se=["clientX","clientY"];function oe(n,r){var i=this;this.manager=n,this.callback=r,this.element=n.element,this.target=n.options.inputTarget,this.domHandler=function(h){x(n.options.enable,[n])&&i.handler(h)},this.init()}oe.prototype={handler:function(){},init:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(N(this.element),this.evWin,this.domHandler)}};function Je(n){var r,i=n.options.inputClass;return i?r=i:z?r=mt:ae?r=nt:V?r=gt:r=tt,new r(n,$e)}function $e(n,r,i){var h=i.pointers.length,m=i.changedPointers.length,P=r&L&&h-m===0,k=r&(G|W)&&h-m===0;i.isFirst=!!P,i.isFinal=!!k,P&&(n.session={}),i.eventType=r,u(n,i),n.emit("hammer.input",i),n.recognize(i),n.session.prevInput=i}function u(n,r){var i=n.session,h=r.pointers,m=h.length;i.firstInput||(i.firstInput=Q(r)),m>1&&!i.firstMultiple?i.firstMultiple=Q(r):m===1&&(i.firstMultiple=!1);var P=i.firstInput,k=i.firstMultiple,$=k?k.center:P.center,ce=r.center=ve(h);r.timeStamp=d(),r.deltaTime=r.timeStamp-P.timeStamp,r.angle=vt($,ce),r.distance=et($,ce),F(i,r),r.offsetDirection=we(r.deltaX,r.deltaY);var K=ze(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=K.x,r.overallVelocityY=K.y,r.overallVelocity=g(K.x)>g(K.y)?K.x:K.y,r.scale=k?Tn(k.pointers,h):1,r.rotation=k?wn(k.pointers,h):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,H(i,r);var ge=n.element;ne(r.srcEvent.target,ge)&&(ge=r.srcEvent.target),r.target=ge}function F(n,r){var i=r.center,h=n.offsetDelta||{},m=n.prevDelta||{},P=n.prevInput||{};(r.eventType===L||P.eventType===G)&&(m=n.prevDelta={x:P.deltaX||0,y:P.deltaY||0},h=n.offsetDelta={x:i.x,y:i.y}),r.deltaX=m.x+(i.x-h.x),r.deltaY=m.y+(i.y-h.y)}function H(n,r){var i=n.lastInterval||r,h=r.timeStamp-i.timeStamp,m,P,k,$;if(r.eventType!=W&&(h>R||i.velocity===a)){var ce=r.deltaX-i.deltaX,K=r.deltaY-i.deltaY,ge=ze(h,ce,K);P=ge.x,k=ge.y,m=g(ge.x)>g(ge.y)?ge.x:ge.y,$=we(ce,K),n.lastInterval=r}else m=i.velocity,P=i.velocityX,k=i.velocityY,$=i.direction;r.velocity=m,r.velocityX=P,r.velocityY=k,r.direction=$}function Q(n){for(var r=[],i=0;i<n.pointers.length;)r[i]={clientX:l(n.pointers[i].clientX),clientY:l(n.pointers[i].clientY)},i++;return{timeStamp:d(),pointers:r,center:ve(r),deltaX:n.deltaX,deltaY:n.deltaY}}function ve(n){var r=n.length;if(r===1)return{x:l(n[0].clientX),y:l(n[0].clientY)};for(var i=0,h=0,m=0;m<r;)i+=n[m].clientX,h+=n[m].clientY,m++;return{x:l(i/r),y:l(h/r)}}function ze(n,r,i){return{x:r/n||0,y:i/n||0}}function we(n,r){return n===r?Ce:g(n)>=g(r)?n<0?Ee:Oe:r<0?_e:xe}function et(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.sqrt(h*h+m*m)}function vt(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.atan2(m,h)*180/Math.PI}function wn(n,r){return vt(r[1],r[0],Se)+vt(n[1],n[0],Se)}function Tn(n,r){return et(r[0],r[1],Se)/et(n[0],n[1],Se)}var Pn={mousedown:L,mousemove:te,mouseup:G},En="mousedown",xn="mousemove mouseup";function tt(){this.evEl=En,this.evWin=xn,this.pressed=!1,oe.apply(this,arguments)}b(tt,oe,{handler:function(r){var i=Pn[r.type];i&L&&(r.button===0||r.button===2)&&(this.pressed=!0),i&te&&r.which!==1&&(i=G),this.pressed&&(i&G&&(this.pressed=!1),this.callback(this.manager,i,{pointers:[r],changedPointers:[r],pointerType:Z,srcEvent:r}))}});var Nt={pointerdown:L,pointermove:te,pointerup:G,pointercancel:W,pointerout:W},An={2:X,3:B,4:Z,5:Y},kt="pointerdown",Lt="pointermove pointerup pointercancel";f.MSPointerEvent&&!f.PointerEvent&&(kt="MSPointerDown",Lt="MSPointerMove MSPointerUp MSPointerCancel");function mt(){this.evEl=kt,this.evWin=Lt,oe.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(mt,oe,{handler:function(r){var i=this.store,h=!1,m=!1,P=r.type.toLowerCase().replace("ms",""),k=Nt[P],$=An[r.pointerType]||r.pointerType,ce=$==X,K=ue(i,r.pointerId,"pointerId");k&L&&(r.button===0||r.button===2||ce)?K<0&&(i.push(r),K=i.length-1):k&(G|W)?h=!0:!ce&&r.buttons===0&&(h=!0,m=!0,k=Nt.pointerup),!(K<0)&&(m||(i[K]=r),this.callback(this.manager,k,{pointers:i,changedPointers:[r],pointerType:$,srcEvent:i[K]}),h&&i.splice(K,1))}});var Mn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},Cn="touchstart",On="touchstart touchmove touchend touchcancel";function Dt(){this.evTarget=Cn,this.evWin=On,this.started=!1,oe.apply(this,arguments)}b(Dt,oe,{handler:function(r){var i=Mn[r.type];if(i===L&&(this.started=!0),!!this.started){var h=_n.call(this,r,i);i&(G|W)&&h[0].length-h[1].length===0&&(this.started=!1),this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}}});function _n(n,r){var i=be(n.touches),h=be(n.changedTouches);return r&(G|W)&&(i=Me(i.concat(h),"identifier")),[i,h]}var Sn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},In="touchstart touchmove touchend touchcancel";function nt(){this.evTarget=In,this.targetIds={},oe.apply(this,arguments)}b(nt,oe,{handler:function(r){var i=Sn[r.type],h=Nn.call(this,r,i);h&&this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}});function Nn(n,r){var i=be(n.touches),h=this.targetIds;if(r&(L|te)&&i.length===1)return h[i[0].identifier]=!0,[i,i];var m,P,k=be(n.changedTouches),$=[],ce=this.target;if(P=i.filter(function(K){return ne(K.target,ce)}),r===L)for(m=0;m<P.length;)h[P[m].identifier]=!0,m++;for(m=0;m<k.length;)h[k[m].identifier]&&$.push(k[m]),r&(G|W)&&delete h[k[m].identifier],m++;if($.length)return[Me(P.concat($),"identifier"),$]}var kn=2500,Ft=25;function gt(){oe.apply(this,arguments);var n=y(this.handler,this);this.touch=new nt(this.manager,n),this.mouse=new tt(this.manager,n),this.primaryTouch=null,this.lastTouches=[]}b(gt,oe,{handler:function(r,i,h){var m=h.pointerType==X,P=h.pointerType==Z;if(!(P&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(m)Ln.call(this,i,h);else if(P&&Dn.call(this,h))return;this.callback(r,i,h)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ln(n,r){n&L?(this.primaryTouch=r.changedPointers[0].identifier,Ut.call(this,r)):n&(G|W)&&Ut.call(this,r)}function Ut(n){var r=n.changedPointers[0];if(r.identifier===this.primaryTouch){var i={x:r.clientX,y:r.clientY};this.lastTouches.push(i);var h=this.lastTouches,m=function(){var P=h.indexOf(i);P>-1&&h.splice(P,1)};setTimeout(m,kn)}}function Dn(n){for(var r=n.srcEvent.clientX,i=n.srcEvent.clientY,h=0;h<this.lastTouches.length;h++){var m=this.lastTouches[h],P=Math.abs(r-m.x),k=Math.abs(i-m.y);if(P<=Ft&&k<=Ft)return!0}return!1}var Vt=s?ie(s.style,"touchAction"):a,Bt=Vt!==a,Rt="compute",Yt="auto",yt="manipulation",Ie="none",Ge="pan-x",Xe="pan-y",rt=Un();function bt(n,r){this.manager=n,this.set(r)}bt.prototype={set:function(n){n==Rt&&(n=this.compute()),Bt&&this.manager.element.style&&rt[n]&&(this.manager.element.style[Vt]=n),this.actions=n.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var n=[];return A(this.manager.recognizers,function(r){x(r.options.enable,[r])&&(n=n.concat(r.getTouchAction()))}),Fn(n.join(" "))},preventDefaults:function(n){var r=n.srcEvent,i=n.offsetDirection;if(this.manager.session.prevented){r.preventDefault();return}var h=this.actions,m=J(h,Ie)&&!rt[Ie],P=J(h,Xe)&&!rt[Xe],k=J(h,Ge)&&!rt[Ge];if(m){var $=n.pointers.length===1,ce=n.distance<2,K=n.deltaTime<250;if($&&ce&&K)return}if(!(k&&P)&&(m||P&&i&le||k&&i&fe))return this.preventSrc(r)},preventSrc:function(n){this.manager.session.prevented=!0,n.preventDefault()}};function Fn(n){if(J(n,Ie))return Ie;var r=J(n,Ge),i=J(n,Xe);return r&&i?Ie:r||i?r?Ge:Xe:J(n,yt)?yt:Yt}function Un(){if(!Bt)return!1;var n={},r=f.CSS&&f.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){n[i]=r?f.CSS.supports("touch-action",i):!0}),n}var at=1,he=2,Fe=4,Ae=8,Te=Ae,We=16,me=32;function Pe(n){this.options=O({},this.defaults,n||{}),this.id=U(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=at,this.simultaneous={},this.requireFail=[]}Pe.prototype={defaults:{},set:function(n){return O(this.options,n),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(n){if(w(n,"recognizeWith",this))return this;var r=this.simultaneous;return n=it(n,this),r[n.id]||(r[n.id]=n,n.recognizeWith(this)),this},dropRecognizeWith:function(n){return w(n,"dropRecognizeWith",this)?this:(n=it(n,this),delete this.simultaneous[n.id],this)},requireFailure:function(n){if(w(n,"requireFailure",this))return this;var r=this.requireFail;return n=it(n,this),ue(r,n)===-1&&(r.push(n),n.requireFailure(this)),this},dropRequireFailure:function(n){if(w(n,"dropRequireFailure",this))return this;n=it(n,this);var r=ue(this.requireFail,n);return r>-1&&this.requireFail.splice(r,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(n){return!!this.simultaneous[n.id]},emit:function(n){var r=this,i=this.state;function h(m){r.manager.emit(m,n)}i<Ae&&h(r.options.event+jt(i)),h(r.options.event),n.additionalEvent&&h(n.additionalEvent),i>=Ae&&h(r.options.event+jt(i))},tryEmit:function(n){if(this.canEmit())return this.emit(n);this.state=me},canEmit:function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(me|at)))return!1;n++}return!0},recognize:function(n){var r=O({},n);if(!x(this.options.enable,[this,r])){this.reset(),this.state=me;return}this.state&(Te|We|me)&&(this.state=at),this.state=this.process(r),this.state&(he|Fe|Ae|We)&&this.tryEmit(r)},process:function(n){},getTouchAction:function(){},reset:function(){}};function jt(n){return n&We?"cancel":n&Ae?"end":n&Fe?"move":n&he?"start":""}function zt(n){return n==xe?"down":n==_e?"up":n==Ee?"left":n==Oe?"right":""}function it(n,r){var i=r.manager;return i?i.get(n):n}function pe(){Pe.apply(this,arguments)}b(pe,Pe,{defaults:{pointers:1},attrTest:function(n){var r=this.options.pointers;return r===0||n.pointers.length===r},process:function(n){var r=this.state,i=n.eventType,h=r&(he|Fe),m=this.attrTest(n);return h&&(i&W||!m)?r|We:h||m?i&G?r|Ae:r&he?r|Fe:he:me}});function ot(){pe.apply(this,arguments),this.pX=null,this.pY=null}b(ot,pe,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ye},getTouchAction:function(){var n=this.options.direction,r=[];return n&le&&r.push(Xe),n&fe&&r.push(Ge),r},directionTest:function(n){var r=this.options,i=!0,h=n.distance,m=n.direction,P=n.deltaX,k=n.deltaY;return m&r.direction||(r.direction&le?(m=P===0?Ce:P<0?Ee:Oe,i=P!=this.pX,h=Math.abs(n.deltaX)):(m=k===0?Ce:k<0?_e:xe,i=k!=this.pY,h=Math.abs(n.deltaY))),n.direction=m,i&&h>r.threshold&&m&r.direction},attrTest:function(n){return pe.prototype.attrTest.call(this,n)&&(this.state&he||!(this.state&he)&&this.directionTest(n))},emit:function(n){this.pX=n.deltaX,this.pY=n.deltaY;var r=zt(n.direction);r&&(n.additionalEvent=this.options.event+r),this._super.emit.call(this,n)}});function wt(){pe.apply(this,arguments)}b(wt,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&he)},emit:function(n){if(n.scale!==1){var r=n.scale<1?"in":"out";n.additionalEvent=this.options.event+r}this._super.emit.call(this,n)}});function Tt(){Pe.apply(this,arguments),this._timer=null,this._input=null}b(Tt,Pe,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime>r.time;if(this._input=n,!h||!i||n.eventType&(G|W)&&!m)this.reset();else if(n.eventType&L)this.reset(),this._timer=v(function(){this.state=Te,this.tryEmit()},r.time,this);else if(n.eventType&G)return Te;return me},reset:function(){clearTimeout(this._timer)},emit:function(n){this.state===Te&&(n&&n.eventType&G?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function Pt(){pe.apply(this,arguments)}b(Pt,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&he)}});function Et(){pe.apply(this,arguments)}b(Et,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:le|fe,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(n){var r=this.options.direction,i;return r&(le|fe)?i=n.overallVelocity:r&le?i=n.overallVelocityX:r&fe&&(i=n.overallVelocityY),this._super.attrTest.call(this,n)&&r&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers==this.options.pointers&&g(i)>this.options.velocity&&n.eventType&G},emit:function(n){var r=zt(n.offsetDirection);r&&this.manager.emit(this.options.event+r,n),this.manager.emit(this.options.event,n)}});function st(){Pe.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(st,Pe,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime<r.time;if(this.reset(),n.eventType&L&&this.count===0)return this.failTimeout();if(h&&m&&i){if(n.eventType!=G)return this.failTimeout();var P=this.pTime?n.timeStamp-this.pTime<r.interval:!0,k=!this.pCenter||et(this.pCenter,n.center)<r.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!k||!P?this.count=1:this.count+=1,this._input=n;var $=this.count%r.taps;if($===0)return this.hasRequireFailures()?(this._timer=v(function(){this.state=Te,this.tryEmit()},r.interval,this),he):Te}return me},failTimeout:function(){return this._timer=v(function(){this.state=me},this.options.interval,this),me},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Te&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ue(n,r){return r=r||{},r.recognizers=p(r.recognizers,Ue.defaults.preset),new xt(n,r)}Ue.VERSION="2.0.7",Ue.defaults={domEvents:!1,touchAction:Rt,enable:!0,inputTarget:null,inputClass:null,preset:[[Pt,{enable:!1}],[wt,{enable:!1},["rotate"]],[Et,{direction:le}],[ot,{direction:le},["swipe"]],[st],[st,{event:"doubletap",taps:2},["tap"]],[Tt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Vn=1,Gt=2;function xt(n,r){this.options=O({},Ue.defaults,r||{}),this.options.inputTarget=this.options.inputTarget||n,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=n,this.input=Je(this),this.touchAction=new bt(this,this.options.touchAction),Xt(this,!0),A(this.options.recognizers,function(i){var h=this.add(new i[0](i[1]));i[2]&&h.recognizeWith(i[2]),i[3]&&h.requireFailure(i[3])},this)}xt.prototype={set:function(n){return O(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},stop:function(n){this.session.stopped=n?Gt:Vn},recognize:function(n){var r=this.session;if(!r.stopped){this.touchAction.preventDefaults(n);var i,h=this.recognizers,m=r.curRecognizer;(!m||m&&m.state&Te)&&(m=r.curRecognizer=null);for(var P=0;P<h.length;)i=h[P],r.stopped!==Gt&&(!m||i==m||i.canRecognizeWith(m))?i.recognize(n):i.reset(),!m&&i.state&(he|Fe|Ae)&&(m=r.curRecognizer=i),P++}},get:function(n){if(n instanceof Pe)return n;for(var r=this.recognizers,i=0;i<r.length;i++)if(r[i].options.event==n)return r[i];return null},add:function(n){if(w(n,"add",this))return this;var r=this.get(n.options.event);return r&&this.remove(r),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},remove:function(n){if(w(n,"remove",this))return this;if(n=this.get(n),n){var r=this.recognizers,i=ue(r,n);i!==-1&&(r.splice(i,1),this.touchAction.update())}return this},on:function(n,r){if(n!==a&&r!==a){var i=this.handlers;return A(re(n),function(h){i[h]=i[h]||[],i[h].push(r)}),this}},off:function(n,r){if(n!==a){var i=this.handlers;return A(re(n),function(h){r?i[h]&&i[h].splice(ue(i[h],r),1):delete i[h]}),this}},emit:function(n,r){this.options.domEvents&&Bn(n,r);var i=this.handlers[n]&&this.handlers[n].slice();if(!(!i||!i.length)){r.type=n,r.preventDefault=function(){r.srcEvent.preventDefault()};for(var h=0;h<i.length;)i[h](r),h++}},destroy:function(){this.element&&Xt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Xt(n,r){var i=n.element;if(i.style){var h;A(n.options.cssProps,function(m,P){h=ie(i.style,P),r?(n.oldCssProps[h]=i.style[h],i.style[h]=m):i.style[h]=n.oldCssProps[h]||""}),r||(n.oldCssProps={})}}function Bn(n,r){var i=o.createEvent("Event");i.initEvent(n,!0,!0),i.gesture=r,r.target.dispatchEvent(i)}return O(Ue,{INPUT_START:L,INPUT_MOVE:te,INPUT_END:G,INPUT_CANCEL:W,STATE_POSSIBLE:at,STATE_BEGAN:he,STATE_CHANGED:Fe,STATE_ENDED:Ae,STATE_RECOGNIZED:Te,STATE_CANCELLED:We,STATE_FAILED:me,DIRECTION_NONE:Ce,DIRECTION_LEFT:Ee,DIRECTION_RIGHT:Oe,DIRECTION_UP:_e,DIRECTION_DOWN:xe,DIRECTION_HORIZONTAL:le,DIRECTION_VERTICAL:fe,DIRECTION_ALL:Ye,Manager:xt,Input:oe,TouchAction:bt,TouchInput:nt,MouseInput:tt,PointerEventInput:mt,TouchMouseInput:gt,SingleTouchInput:Dt,Recognizer:Pe,AttrRecognizer:pe,Tap:st,Pan:ot,Swipe:Et,Pinch:wt,Rotate:Pt,Press:Tt,on:I,off:M,each:A,merge:D,extend:C,assign:O,inherit:b,bindFn:y,prefixed:ie}),Ue})(typeof window!="undefined"?window:{},typeof document!="undefined"?document:{}),De=function(f,o){o===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),o===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=f,this.domElement=o,this.enabled=!0,this.target=new _.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:_.MOUSE.ROTATE,MIDDLE:_.MOUSE.DOLLY,RIGHT:_.MOUSE.PAN},this.touches={ONE:_.TOUCH.ROTATE,TWO:_.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return d.phi},this.getAzimuthalAngle=function(){return d.theta},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(a),e.update(),l=c.NONE},this.update=(function(){var u=new _.Vector3,F=new _.Quaternion().setFromUnitVectors(f.up,new _.Vector3(0,1,0)),H=F.clone().inverse(),Q=new _.Vector3,ve=new _.Quaternion;return function(){var we=e.object.position;return u.copy(we).sub(e.target),u.applyQuaternion(F),d.setFromVector3(u),e.autoRotate&&l===c.NONE&&re(ne()),e.enableDamping?(d.theta+=v.theta*e.dampingFactor,d.phi+=v.phi*e.dampingFactor):(d.theta+=v.theta,d.phi+=v.phi),d.theta=Math.max(e.minAzimuthAngle,Math.min(e.maxAzimuthAngle,d.theta)),d.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,d.phi)),d.makeSafe(),d.radius*=w,d.radius=Math.max(e.minDistance,Math.min(e.maxDistance,d.radius)),e.enableDamping===!0?e.target.addScaledVector(A,e.dampingFactor):e.target.add(A),u.setFromSpherical(d),u.applyQuaternion(H),we.copy(e.target).add(u),e.object.lookAt(e.target),e.enableDamping===!0?(v.theta*=1-e.dampingFactor,v.phi*=1-e.dampingFactor,A.multiplyScalar(1-e.dampingFactor)):(v.set(0,0,0),A.set(0,0,0)),w=1,E||Q.distanceToSquared(e.object.position)>g||8*(1-ve.dot(e.object.quaternion))>g?(e.dispatchEvent(a),Q.copy(e.object.position),ve.copy(e.object.quaternion),E=!1,!0):!1}})(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$e,!1),e.domElement.removeEventListener("mousedown",xe,!1),e.domElement.removeEventListener("wheel",Ye,!1),e.domElement.removeEventListener("touchstart",Se,!1),e.domElement.removeEventListener("touchend",Je,!1),e.domElement.removeEventListener("touchmove",oe,!1),document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.domElement.removeEventListener("keydown",je,!1)};var e=this,a={type:"change"},t={type:"start"},s={type:"end"},c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},l=c.NONE,g=1e-6,d=new _.Spherical,v=new _.Spherical,w=1,A=new _.Vector3,E=!1,O=new _.Vector2,C=new _.Vector2,D=new _.Vector2,b=new _.Vector2,y=new _.Vector2,x=new _.Vector2,p=new _.Vector2,I=new _.Vector2,M=new _.Vector2;function ne(){return 2*Math.PI/60/60*e.autoRotateSpeed}function J(){return Math.pow(.95,e.zoomSpeed)}function re(u){v.theta-=u}function ue(u){v.phi-=u}var be=(function(){var u=new _.Vector3;return function(H,Q){u.setFromMatrixColumn(Q,0),u.multiplyScalar(-H),A.add(u)}})(),Me=(function(){var u=new _.Vector3;return function(H,Q){e.screenSpacePanning===!0?u.setFromMatrixColumn(Q,1):(u.setFromMatrixColumn(Q,0),u.crossVectors(e.object.up,u)),u.multiplyScalar(H),A.add(u)}})(),ie=(function(){var u=new _.Vector3;return function(H,Q){var ve=e.domElement;if(e.object.isPerspectiveCamera){var ze=e.object.position;u.copy(ze).sub(e.target);var we=u.length();we*=Math.tan(e.object.fov/2*Math.PI/180),be(2*H*we/ve.clientHeight,e.object.matrix),Me(2*Q*we/ve.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(be(H*(e.object.right-e.object.left)/e.object.zoom/ve.clientWidth,e.object.matrix),Me(Q*(e.object.top-e.object.bottom)/e.object.zoom/ve.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function se(u){e.object.isPerspectiveCamera?w/=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom*u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function U(u){e.object.isPerspectiveCamera?w*=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function N(u){O.set(u.clientX,u.clientY)}function S(u){p.set(u.clientX,u.clientY)}function V(u){b.set(u.clientX,u.clientY)}function z(u){C.set(u.clientX,u.clientY),D.subVectors(C,O).multiplyScalar(e.rotateSpeed);var F=e.domElement;re(2*Math.PI*D.x/F.clientHeight),ue(2*Math.PI*D.y/F.clientHeight),O.copy(C),e.update()}function ae(u){I.set(u.clientX,u.clientY),M.subVectors(I,p),M.y>0?se(J()):M.y<0&&U(J()),p.copy(I),e.update()}function X(u){y.set(u.clientX,u.clientY),x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y),e.update()}function B(u){u.deltaY<0?U(J()):u.deltaY>0&&se(J()),e.update()}function Z(u){var F=!1;switch(u.keyCode){case e.keys.UP:ie(0,e.keyPanSpeed),F=!0;break;case e.keys.BOTTOM:ie(0,-e.keyPanSpeed),F=!0;break;case e.keys.LEFT:ie(e.keyPanSpeed,0),F=!0;break;case e.keys.RIGHT:ie(-e.keyPanSpeed,0),F=!0;break}F&&(u.preventDefault(),e.update())}function Y(u){if(u.touches.length==1)O.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);O.set(F,H)}}function R(u){if(u.touches.length==1)b.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);b.set(F,H)}}function L(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);p.set(0,Q)}function te(u){e.enableZoom&&L(u),e.enablePan&&R(u)}function G(u){e.enableZoom&&L(u),e.enableRotate&&Y(u)}function W(u){if(u.touches.length==1)C.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);C.set(F,H)}D.subVectors(C,O).multiplyScalar(e.rotateSpeed);var Q=e.domElement;re(2*Math.PI*D.x/Q.clientHeight),ue(2*Math.PI*D.y/Q.clientHeight),O.copy(C)}function Ce(u){if(u.touches.length==1)y.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);y.set(F,H)}x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y)}function Ee(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);I.set(0,Q),M.set(0,Math.pow(I.y/p.y,e.zoomSpeed)),se(M.y),p.copy(I)}function Oe(u){e.enableZoom&&Ee(u),e.enablePan&&Ce(u)}function _e(u){e.enableZoom&&Ee(u),e.enableRotate&&W(u)}function xe(u){if(e.enabled!==!1){u.preventDefault(),e.domElement.focus?e.domElement.focus():window.focus();var F;switch(u.button){case 0:F=e.mouseButtons.LEFT;break;case 1:F=e.mouseButtons.MIDDLE;break;case 2:F=e.mouseButtons.RIGHT;break;default:F=-1}switch(F){case _.MOUSE.DOLLY:if(e.enableZoom===!1)return;S(u),l=c.DOLLY;break;case _.MOUSE.ROTATE:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enablePan===!1)return;V(u),l=c.PAN}else{if(e.enableRotate===!1)return;N(u),l=c.ROTATE}break;case _.MOUSE.PAN:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enableRotate===!1)return;N(u),l=c.ROTATE}else{if(e.enablePan===!1)return;V(u),l=c.PAN}break;default:l=c.NONE}l!==c.NONE&&(document.addEventListener("mousemove",le,!1),document.addEventListener("mouseup",fe,!1),e.dispatchEvent(t))}}function le(u){if(e.enabled!==!1)switch(u.preventDefault(),l){case c.ROTATE:if(e.enableRotate===!1)return;z(u);break;case c.DOLLY:if(e.enableZoom===!1)return;ae(u);break;case c.PAN:if(e.enablePan===!1)return;X(u);break}}function fe(u){e.enabled!==!1&&(document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.dispatchEvent(s),l=c.NONE)}function Ye(u){e.enabled===!1||e.enableZoom===!1||l!==c.NONE&&l!==c.ROTATE||(u.preventDefault(),u.stopPropagation(),e.dispatchEvent(t),B(u),e.dispatchEvent(s))}function je(u){e.enabled===!1||e.enableKeys===!1||e.enablePan===!1||Z(u)}function Se(u){if(e.enabled!==!1){switch(u.preventDefault(),u.touches.length){case 1:switch(e.touches.ONE){case _.TOUCH.ROTATE:if(e.enableRotate===!1)return;Y(u),l=c.TOUCH_ROTATE;break;case _.TOUCH.PAN:if(e.enablePan===!1)return;R(u),l=c.TOUCH_PAN;break;default:l=c.NONE}break;case 2:switch(e.touches.TWO){case _.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;te(u),l=c.TOUCH_DOLLY_PAN;break;case _.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;G(u),l=c.TOUCH_DOLLY_ROTATE;break;default:l=c.NONE}break;default:l=c.NONE}l!==c.NONE&&e.dispatchEvent(t)}}function oe(u){if(e.enabled!==!1)switch(u.preventDefault(),u.stopPropagation(),l){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;W(u),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;Ce(u),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Oe(u),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;_e(u),e.update();break;default:l=c.NONE}}function Je(u){e.enabled!==!1&&(e.dispatchEvent(s),l=c.NONE)}function $e(u){e.enabled!==!1&&u.preventDefault()}e.domElement.addEventListener("contextmenu",$e,!1),e.domElement.addEventListener("mousedown",xe,!1),e.domElement.addEventListener("wheel",Ye,!1),e.domElement.addEventListener("touchstart",Se,!1),e.domElement.addEventListener("touchend",Je,!1),e.domElement.addEventListener("touchmove",oe,!1),e.domElement.addEventListener("keydown",je,!1),e.domElement.tabIndex===-1&&(e.domElement.tabIndex=0),this.update()};De.prototype=Object.create(_.EventDispatcher.prototype),De.prototype.constructor=De;var ht=function(f,o){De.call(this,f,o),this.mouseButtons.LEFT=_.MOUSE.PAN,this.mouseButtons.RIGHT=_.MOUSE.ROTATE,this.touches.ONE=_.TOUCH.PAN,this.touches.TWO=_.TOUCH.DOLLY_ROTATE};ht.prototype=Object.create(_.EventDispatcher.prototype),ht.prototype.constructor=ht;var ye=function(f){_.Object3D.call(this),this.element=f,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.addEventListener("removed",function(){this.traverse(function(o){o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)})})};ye.prototype=Object.create(_.Object3D.prototype),ye.prototype.constructor=ye;var Ke=function(f){ye.call(this,f)};Ke.prototype=Object.create(ye.prototype),Ke.prototype.constructor=Ke;var Ot=function(){var f=this,o,e,a,t,s=new _.Matrix4,c={camera:{fov:0,style:""},objects:new WeakMap},l=document.createElement("div");l.style.overflow="hidden",this.domElement=l;var g=document.createElement("div");g.style.WebkitTransformStyle="preserve-3d",g.style.transformStyle="preserve-3d",g.style.pointerEvents="none",l.appendChild(g);var d=/Trident/i.test(navigator.userAgent);this.getSize=function(){return{width:o,height:e}},this.setSize=function(b,y){o=b,e=y,a=o/2,t=e/2,l.style.width=b+"px",l.style.height=y+"px",g.style.width=b+"px",g.style.height=y+"px"};function v(b){return Math.abs(b)<1e-10?0:b}function w(b){var y=b.elements;return"matrix3d("+v(y[0])+","+v(-y[1])+","+v(y[2])+","+v(y[3])+","+v(y[4])+","+v(-y[5])+","+v(y[6])+","+v(y[7])+","+v(y[8])+","+v(-y[9])+","+v(y[10])+","+v(y[11])+","+v(y[12])+","+v(-y[13])+","+v(y[14])+","+v(y[15])+")"}function A(b,y){var x=b.elements,p="matrix3d("+v(x[0])+","+v(x[1])+","+v(x[2])+","+v(x[3])+","+v(-x[4])+","+v(-x[5])+","+v(-x[6])+","+v(-x[7])+","+v(x[8])+","+v(x[9])+","+v(x[10])+","+v(x[11])+","+v(x[12])+","+v(x[13])+","+v(x[14])+","+v(x[15])+")";return d?"translate(-50%,-50%)translate("+a+"px,"+t+"px)"+y+p:"translate(-50%,-50%)"+p}function E(b,y,x,p){if(b instanceof ye){b.onBeforeRender(f,y,x);var I;b instanceof Ke?(s.copy(x.matrixWorldInverse),s.transpose(),s.copyPosition(b.matrixWorld),s.scale(b.scale),s.elements[3]=0,s.elements[7]=0,s.elements[11]=0,s.elements[15]=1,I=A(s,p)):I=A(b.matrixWorld,p);var M=b.element,ne=c.objects.get(b);if(ne===void 0||ne.style!==I){M.style.WebkitTransform=I,M.style.transform=I;var J={style:I};d&&(J.distanceToCameraSquared=O(x,b)),c.objects.set(b,J)}M.style.display=b.visible?"":"none",M.parentNode!==g&&g.appendChild(M),b.onAfterRender(f,y,x)}for(var re=0,ue=b.children.length;re<ue;re++)E(b.children[re],y,x,p)}var O=(function(){var b=new _.Vector3,y=new _.Vector3;return function(x,p){return b.setFromMatrixPosition(x.matrixWorld),y.setFromMatrixPosition(p.matrixWorld),b.distanceToSquared(y)}})();function C(b){var y=[];return b.traverse(function(x){x instanceof ye&&y.push(x)}),y}function D(b){for(var y=C(b).sort(function(M,ne){var J=c.objects.get(M).distanceToCameraSquared,re=c.objects.get(ne).distanceToCameraSquared;return J-re}),x=y.length,p=0,I=y.length;p<I;p++)y[p].element.style.zIndex=x-p}this.render=function(b,y){var x=y.projectionMatrix.elements[5]*t;if(c.camera.fov!==x&&(y.isPerspectiveCamera?(l.style.WebkitPerspective=x+"px",l.style.perspective=x+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),c.camera.fov=x),b.autoUpdate===!0&&b.updateMatrixWorld(),y.parent===null&&y.updateMatrixWorld(),y.isOrthographicCamera)var p=-(y.right+y.left)/2,I=(y.top+y.bottom)/2;var M=y.isOrthographicCamera?"scale("+x+")translate("+v(p)+"px,"+v(I)+"px)"+w(y.matrixWorldInverse):"translateZ("+x+"px)"+w(y.matrixWorldInverse),ne=M+"translate("+a+"px,"+t+"px)";c.camera.style!==ne&&!d&&(g.style.WebkitTransform=ne,g.style.transform=ne,c.camera.style=ne),E(b,b,y,M),d&&D(b)}};function _t(f,o,e){var a=o.getBoundingClientRect(),t=a.top,s=a.left,c=a.width,l=a.height;return new T.Vector2((f.x-s)/c*2-1,-(f.y-t)/l*2+1)}var St=(function(f){Ne(o,f);function o(e,a,t,s,c){var l=f.call(this)||this;l.type="RoundedBoxGeometry",c=isNaN(c)?1:Math.max(1,Math.floor(c)),e=isNaN(e)?1:e,a=isNaN(a)?1:a,t=isNaN(t)?1:t,s=isNaN(s)?.15:s,s=Math.min(s,Math.min(e,Math.min(a,Math.min(t)))/2);var g=e/2-s,d=a/2-s,v=t/2-s;l.parameters={width:e,height:a,depth:t,radius:s,radiusSegments:c};var w=c+1,A=w*c+1<<3,E=new T.BufferAttribute(new Float32Array(A*3),3),O=new T.BufferAttribute(new Float32Array(A*3),3),C=[],D=[];new T.Vector3;var b=new T.Vector3,y=[],x=[],p=[],I=w*c,M=w*c+1;ne(),re(),J(),ue(),Me(),be();function ne(){for(var U=[new T.Vector3(1,1,1),new T.Vector3(1,1,-1),new T.Vector3(-1,1,-1),new T.Vector3(-1,1,1),new T.Vector3(1,-1,1),new T.Vector3(1,-1,-1),new T.Vector3(-1,-1,-1),new T.Vector3(-1,-1,1)],N=0;N<8;N++)C.push([]),D.push([]);for(var S=Math.PI/2,V=new T.Vector3(g,d,v),z=0;z<=c;z++){var ae=z/c,X=ae*S,B=Math.cos(X),Z=Math.sin(X);if(z==c){b.set(0,1,0);var Y=b.clone().multiplyScalar(s).add(V);C[0].push(Y),y.push(Y);var R=b.clone();D[0].push(R),x.push(R);continue}for(var L=0;L<=c;L++){var te=L/c,G=te*S;b.x=B*Math.cos(G),b.y=Z,b.z=B*Math.sin(G);var Y=b.clone().multiplyScalar(s).add(V);C[0].push(Y),y.push(Y);var R=b.clone().normalize();D[0].push(R),x.push(R)}}for(var W=1;W<8;W++)for(var N=0;N<C[0].length;N++){var Y=C[0][N].clone().multiply(U[W]);C[W].push(Y),y.push(Y);var R=D[0][N].clone().multiply(U[W]);D[W].push(R),x.push(R)}}function J(){for(var U=[!0,!1,!0,!1,!1,!0,!1,!0],N=w*(c-1),S=0;S<8;S++){for(var V=M*S,z=0;z<c-1;z++)for(var ae=z*w,X=(z+1)*w,B=0;B<c;B++){var Z=B+1,Y=V+ae+B,R=V+ae+Z,L=V+X+B,te=V+X+Z;U[S]?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}for(var B=0;B<c;B++){var Y=V+N+B,R=V+N+B+1,L=V+I;U[S]?(p.push(Y),p.push(L),p.push(R)):(p.push(Y),p.push(R),p.push(L))}}}function re(){var U=I,N=I+M,S=I+M*2,V=I+M*3;p.push(U),p.push(N),p.push(S),p.push(U),p.push(S),p.push(V),U=I+M*4,N=I+M*5,S=I+M*6,V=I+M*7,p.push(U),p.push(S),p.push(N),p.push(U),p.push(V),p.push(S),U=0,N=M,S=M*4,V=M*5,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=M*2,N=M*3,S=M*6,V=M*7,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=c,N=c+M*3,S=c+M*4,V=c+M*7,p.push(U),p.push(N),p.push(S),p.push(N),p.push(V),p.push(S),U=c+M,N=c+M*2,S=c+M*5,V=c+M*6,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V)}function ue(){for(var U=0;U<4;U++)for(var N=U*M,S=4*M+N,V=(U&1)===1,z=0;z<c;z++){var ae=z+1,X=N+z,B=N+ae,Z=S+z,Y=S+ae;V?(p.push(X),p.push(Z),p.push(B),p.push(B),p.push(Z),p.push(Y)):(p.push(X),p.push(B),p.push(Z),p.push(B),p.push(Y),p.push(Z))}}function be(){for(var U=[0,2,4,6],N=[1,3,5,7],S=0;S<4;S++)for(var V=M*U[S],z=M*N[S],ae=1>=S,X=0;X<c;X++){var B=X*w,Z=(X+1)*w,Y=V+B,R=V+Z,L=z+B,te=z+Z;ae?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}}function Me(){for(var U=c-1,N=[0,1,4,5],S=[3,2,7,6],V=[0,1,1,0],z=0;z<4;z++)for(var ae=N[z]*M,X=S[z]*M,B=0;B<=U;B++){var Z=ae+c+B*w,Y=ae+(B!=U?c+(B+1)*w:M-1),R=X+c+B*w,L=X+(B!=U?c+(B+1)*w:M-1);V[z]?(p.push(Z),p.push(R),p.push(Y),p.push(Y),p.push(R),p.push(L)):(p.push(Z),p.push(Y),p.push(R),p.push(Y),p.push(L),p.push(R))}}for(var ie=0,se=0;se<y.length;se++)E.setXYZ(ie,y[se].x,y[se].y,y[se].z),O.setXYZ(ie,x[se].x,x[se].y,x[se].z),ie++;return l.setIndex(new T.BufferAttribute(new Uint16Array(p),1)),l.setAttribute("position",E),l.setAttribute("normal",O),l}return o})(T.BufferGeometry);function Ve(f,o){return typeof f!="number"||typeof o!="number"?!1:Math.abs(f-o)<.001}function Be(f,o,e,a){a===void 0&&(a=function(s){return s});var t=a(e);return f*(1-t)+o*t}var ee=Number((Math.PI/2).toFixed(5));function ln(f,o,e){var a=new T.Shape;return a.moveTo(e,0),a.lineTo(f-e,0),a.absarc(f-e,e,e,-ee,0,!1),a.lineTo(f,o-e),a.absarc(f-e,o-e,e,0,ee,!1),a.lineTo(e,o),a.absarc(e,o-e,e,ee,Math.PI,!1),a.lineTo(0,e),a.absarc(e,e,e,Math.PI,Math.PI*1.5,!1),a}var Re=function(f){var o=document.createElement("div");o.innerText=f;var e=new ye(o);return e.name=f,e.scale.set(.3,.3,.3),o.style.pointerEvents="none",o.style.backfaceVisibility="hidden",e},Ze=function(f){var o=new T.PlaneGeometry(5,5),e=new T.MeshBasicMaterial({transparent:!0,opacity:0}),a=new T.Mesh(o,e),t=document.createElement("div");t.innerText=f;var s=new ye(t);return s.name=f,s.scale.set(.3,.3,.3),t.style.color="#ffffff",t.style.opacity="0.5",t.style.pointerEvents="none",t.style.backfaceVisibility="hidden",a.rotateX(-ee),a.add(s),a},cn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.camera=new de.Camera(90),t.scene=new T.Scene,t.renderer=new T.WebGLRenderer({antialias:!0,alpha:!0}),t.css3drenderer=new Ot,t.ambientLight=new T.AmbientLight(16777215,.7),t.wrapper=document.createElement("div"),t.arrows=document.createElement("div"),t.arrowLeft=document.createElement("div"),t.arrowRight=document.createElement("div"),t.arrowFront=document.createElement("div"),t.arrowBack=document.createElement("div"),t.arrowTop=document.createElement("div"),t.arrowBottom=document.createElement("div"),t.spherical=null,t.dragging=!1,t.style=document.createElement("style"),t.directionalLight=new T.DirectionalLight(16777215,.2),t.box=new T.Mesh(new St(8,8,8,.5,20),new T.MeshPhongMaterial({color:16777215})),t.faces=new T.Group,t.orient=function(l){var g=l.longitude,d=l.latitude;t.dragging=!1,t.spherical=null,t.controls.enableDamping=!1,t.five.setState(Object.assign({latitude:d},g!==void 0?{longitude:g+t.config.fixedLongitude}:{})),t.five.ready().then(function(){t.controls.enableDamping=!0,t.setState({arrowsVisible:!0})})},t.onRenderFrame=function(){var l,g,d,v,w;if(t.renderer.render(t.scene,t.camera),t.css3drenderer.render(t.scene,t.camera),t.directionalLight.position.copy(t.camera.position),(l=t.controls)===null||l===void 0||l.update(),t.dragging){t.camera.computePose(),t.updateByCamera();var A=t.camera.pose,E=A.longitude,O=A.latitude;t.five.setState({longitude:E,latitude:O},!0),t.updateArrows({longitude:E,latitude:O})}else if(t.spherical&&(!Ve(t.spherical.pi,(g=t.controls)===null||g===void 0?void 0:g.getPolarAngle())||!Ve(t.spherical.theta,(d=t.controls)===null||d===void 0?void 0:d.getAzimuthalAngle()))){t.spherical={pi:(v=t.controls)===null||v===void 0?void 0:v.getPolarAngle(),theta:(w=t.controls)===null||w===void 0?void 0:w.getAzimuthalAngle()},t.camera.computePose(),t.updateByCamera();var C=t.camera.pose,E=C.longitude,O=C.latitude;t.five.setState({longitude:E,latitude:O},!0),t.updateArrows({longitude:E,latitude:O})}else t.spherical=null},t.onTapGesture=function(l){var g=l.pointers[0].clientX,d=l.pointers[0].clientY,v=_t({x:g,y:d},t.wrapper),w=new T.Raycaster;w.setFromCamera(v,t.camera);var A=w.intersectObjects(t.faces.children,!1)[0];if(A){var E=A.object.userData,O=E.longitude,C=E.latitude;t.orient({longitude:O,latitude:C})}},t.onFiveWantsGesture=function(){if(t.spherical)return!1},t.onFiveModeChange=function(l){t.controls&&(t.controls.maxPolarAngle=l==="Topview"?0:ee)},t.onCameraUpdate=function(l){var g=l.state;if(!t.dragging&&!t.spherical){var d=g.longitude,v=g.latitude;t.camera.pose.longitude===d&&t.camera.pose.latitude===v||(t.camera.setFromPose({longitude:d,latitude:v,distance:20,offset:new T.Vector3(0,0,0)}),t.updateByCamera(),t.updateArrows({longitude:d,latitude:v}))}},t.onPanStart=function(l){t.dragging=!0,t.spherical={}},t.onMouseMove=function(l){if(!t.dragging){var g=_t({x:l.clientX,y:l.clientY},t.wrapper),d=new T.Raycaster;d.setFromCamera(g,t.camera);var v=d.intersectObjects(t.faces.children,!1)[0];t.faces.children.forEach(function(w){w.material.opacity=0,w.children[0].element.style.color=""}),v&&(v.object.material.opacity=.3,v.object.children[0].element.style.color="#336dff")}},t.onPanEnd=function(l){t.dragging=!1,t.spherical={pi:t.controls.getPolarAngle(),theta:t.controls.getAzimuthalAngle()}},t.dispose=function(){t.disable()},t.five=e;var s={enabled:!1,visible:!0,arrowsVisible:!1};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=j({fixedLongitude:0,orthoView:!0},a==null?void 0:a.config);return t._config=c,t.state.enabled&&t._enable({userAction:!1}),t.mc=new ut.Manager(t.wrapper),t.mc.add(new ut.Tap({interval:410})),t.mc.add(new ut.Pan({threshold:10,pointers:0})),t.camera.setFromPose({distance:20,offset:new T.Vector3(0,0,0),longitude:e.camera.pose.latitude,latitude:e.camera.pose.latitude}),t.cylinder=new T.Mesh(new T.CylinderGeometry(13.2,14,.01,50,1,!0),new T.ShaderMaterial({uniforms:{radiusTop:{value:13.2},radiusBottom:{value:14},opacity:{value:1}},vertexShader:`
|
|
357
357
|
varying vec3 pos;
|
|
358
358
|
varying mat4 vViewMatrix;
|
|
359
359
|
void main() {
|
|
@@ -383,7 +383,7 @@ void main() {
|
|
|
383
383
|
vec4 color = mix(color1, color2, z);
|
|
384
384
|
gl_FragColor = color;
|
|
385
385
|
}
|
|
386
|
-
`,transparent:!0})),t.init(),t}return Object.defineProperty(o.prototype,"config",{get:function(){return
|
|
386
|
+
`,transparent:!0})),t.init(),t}return Object.defineProperty(o.prototype,"config",{get:function(){return j({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=j(j({},this.state),e),typeof e.arrowsVisible=="boolean"&&this.handleArrowsVisible(e.arrowsVisible),this.hooks.emit("stateChange",{state:this.state,prevState:t,userAction:a})},o.prototype.appendTo=function(e){if(e){e.appendChild(this.wrapper);var a=this.wrapper.getBoundingClientRect(),t=a.width,s=a.height;this.renderer.setSize(t,s),this.css3drenderer.setSize(t,s)}},o.prototype.init=function(){this.renderer.setClearAlpha(0),this.renderer.domElement.style.outline="none",this.initDom(),this.initFaces(),this.initControls(),this.initLights();var e=this.cylinder;e.position.y=-3;var a=Ze("西");a.position.set(-19,0,0),e.add(a);var t=Ze("东");t.position.set(19,0,0),e.add(t);var s=Ze("北");s.position.set(0,0,-19),e.add(s);var c=Ze("南");c.position.set(0,0,19),e.add(c),this.updateByCamera(),this.scene.add(e,this.box,this.faces),this.scene.rotation.y=this.config.fixedLongitude},o.prototype.initDom=function(){this.style.innerHTML=`
|
|
387
387
|
.OrientationPlugin .OrientationArrows {
|
|
388
388
|
position: absolute;
|
|
389
389
|
top: 0;
|
|
@@ -504,7 +504,7 @@ void main() {
|
|
|
504
504
|
z-index: -1;
|
|
505
505
|
pointerEvents: none;
|
|
506
506
|
}
|
|
507
|
-
`,t.enable()),t}return o})(At.BasePlugin.Controller),fn=function(f,o){return new hn(f,o)};new T.Matrix4().fromArray([1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1]);var ft=(function(){function f(o,e,a,t,s){this.R=o,this.Q=e,this.A=a,this.B=t,this.C=s,this.cov=NaN,this.x=NaN}return f.prototype.filter=function(o,e){if(e===void 0&&(e=0),isNaN(this.x))this.x=1/this.C*o,this.cov=1/this.C*this.Q*(1/this.C);else{var a=this.A*this.x+this.B*e,t=this.A*this.cov*this.A+this.R,s=t*this.C*(1/(this.C*t*this.C+this.Q));this.x=a+s*(o-this.C*a),this.cov=t-s*this.C*t}return this.x},f})(),pn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.dispose=function(){t.disable()},t.five=e;var s={enabled:!0,visible:!0};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=
|
|
507
|
+
`,t.enable()),t}return o})(At.BasePlugin.Controller),fn=function(f,o){return new hn(f,o)};new T.Matrix4().fromArray([1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1]);var ft=(function(){function f(o,e,a,t,s){this.R=o,this.Q=e,this.A=a,this.B=t,this.C=s,this.cov=NaN,this.x=NaN}return f.prototype.filter=function(o,e){if(e===void 0&&(e=0),isNaN(this.x))this.x=1/this.C*o,this.cov=1/this.C*this.Q*(1/this.C);else{var a=this.A*this.x+this.B*e,t=this.A*this.cov*this.A+this.R,s=t*this.C*(1/(this.C*t*this.C+this.Q));this.x=a+s*(o-this.C*a),this.cov=t-s*this.C*t}return this.x},f})(),pn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.dispose=function(){t.disable()},t.five=e;var s={enabled:!0,visible:!0};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=j({},a==null?void 0:a.config);return t._config=c,t.state.enabled&&t._enable({userAction:!1}),t.cancelAnimation=null,t.skipStart=0,t.skipEnd=0,t.location=0,t.totalDistance=0,t.trajectory=null,t.currentKeyFrame=null,t.nextKeyframe=null,t.nextButOneKeyframe=null,t.keyframes=[],t.rate=t.config.rate||1,t.virualCamera=t.five.camera.clone(),t.playingState={keyframeIndex:null,progress:null},Object.defineProperties(t,{currentDistance:{get:function(){return this._currentDistance},set:function(l){this._currentDistance=l}}}),t}return Object.defineProperty(o.prototype,"config",{get:function(){return j({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=j(j({},this.state),e),this.hooks.emit("stateChange",{state:this.state,prevState:t,userAction:a})},o.prototype.load=function(e){return ke(this,void 0,void 0,function(){return Le(this,function(a){return[2]})})},o.prototype.loadTrajectory=function(e){this.trajectory=e,this.cancelAnimation&&this.cancelAnimation(),this.playingState.keyframeIndex=null,this.playingState.progress=null;var a=.01,t=.1,s=1,c=0,l=1,g=new ft(a,t,s,c,l),d=new ft(a,t,s,c,l),v=new ft(a,t,s,c,l);if(this.trajectory&&this.trajectory.content.loadState==="READY"){for(var w=this.trajectory.content.data.positionArray,A=new Float32Array(w.length/3),E=0;E<A.length;E++)if(E===0)A[E]=0;else{var O=new T.Vector3(w[E-3],w[E-2],w[E-1]),C=new T.Vector3(w[E],w[E+1],w[E+2]);A[E]=C.distanceTo(O)+A[E-1]}this.totalDistance=A[A.length-1];for(var E=0;E<A.length;E++){for(var D=new T.Vector3(0,0,0),b=0,y=E-5;y<E+6;y++)y>=0&&y<A.length&&(D.add(new T.Vector3(w[y*3],w[y*3+1],w[y*3+2])),b++);D.divideScalar(b).applyMatrix4(e.transform);var x=g.filter(D.x),p=d.filter(D.y),I=v.filter(D.z),M={position:new T.Vector3(x,p,I),location:A[E]};this.keyframes.push(M)}}else throw new Error("trajectory content is not ready")},o.prototype.setPlayingState=function(e){(e.keyframeIndex!==null||e.progress!==null)&&(this.cancelAnimation&&this.cancelAnimation(),this.playingState.keyframeIndex=e.keyframeIndex?e.keyframeIndex:this.playingState.keyframeIndex,this.playingState.progress=e.progress?e.progress:this.playingState.progress,this.play())},o.prototype._enable=function(e){},o.prototype.play=function(){var e=this,a=this.keyframes.length;if(a<2)throw new Error("keyframes length must be greater than 2");var t={keyframeIndex:null,progress:null};this.playingState.keyframeIndex!==null&&this.playingState.progress!==null?(t.keyframeIndex=this.playingState.keyframeIndex,t.progress=this.playingState.progress):this.playingState.keyframeIndex===null&&this.playingState.progress===null&&(this.playingState.keyframeIndex=this.skipStart,this.playingState.progress=0,this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()),this.virualCamera.lookAt(this.keyframes[1].position.clone()),this.virualCamera.computePose(),this.five.setState(j({},this.virualCamera.pose)));var s=this.playingState.keyframeIndex,c=0;this.cancelAnimation=de.AnimationFrameLoop.shared.add(function(l,g){if(s===a-1-e.skipEnd&&e.cancelAnimation){e.cancelAnimation();return}e.currentKeyFrame=e.keyframes[s],e.nextKeyframe=e.keyframes[s+1],s+2<=a-1?e.nextButOneKeyframe=e.keyframes[s+2]:e.nextButOneKeyframe=null;var d=e.currentKeyFrame.position.clone(),v=e.nextKeyframe.position.clone(),w=e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(),A=d.clone().add(w.clone().multiplyScalar(.01)),E=new T.Vector3;e.nextButOneKeyframe!==null?E=e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize():E.copy(w);var O=v.clone().add(E.clone().multiplyScalar(.01));c+=g/1e3*e.rate;var C=c/d.distanceTo(v);C=C>=1?1:C,t.keyframeIndex!==null&&t.progress!==null&&(C=t.progress,t.keyframeIndex=null,t.progress=null);var D=d.clone().lerp(v,C),b=A.clone().lerp(O,C);e.virualCamera.position.copy(D),e.virualCamera.lookAt(b),e.virualCamera.updateMatrixWorld(),e.virualCamera.updateMatrix(),e.virualCamera.computePose(),e.five.setState(j({},e.virualCamera.pose)),e.location=e.keyframes[s].location+d.clone().distanceTo(D),C===1?(c=0,s++,e.playingState.keyframeIndex=s,e.playingState.progress=0):(e.playingState.keyframeIndex=s,e.playingState.progress=C)})},o.prototype.pause=function(){this.cancelAnimation&&this.cancelAnimation()},o.prototype.findKeyFrameByLocation=function(e){if(this.keyframes.length!==0){for(var a=0,t=this.keyframes.length-1;a<=t;){var s=Math.floor((a+t)/2);if(this.keyframes[s].location===e)return s;this.keyframes[s].location<e?a=s+1:t=s-1}return{keyframeIndex:a-1,progress:0}}},o.prototype.resetPlayingState=function(){this.playingState.keyframeIndex=null,this.playingState.progress=null},o.prototype._disable=function(e){},o.prototype.enable=function(e){var a;if(!this.state.enabled){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!0},t),this._enable({userAction:t})}},o.prototype.disable=function(e){var a;if(this.state.enabled!==!1){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!1},t),this._disable({userAction:t})}},o})(q.BasePlugin.Controller),dn=function(f,o){return new pn(f,o)};function It(f,o,e){return f<o?o:f>e?e:f}var vn=`
|
|
508
508
|
varying vec2 vUv;
|
|
509
509
|
varying vec3 vPosition;
|
|
510
510
|
void main() {
|
|
@@ -531,4 +531,4 @@ void main() {
|
|
|
531
531
|
}
|
|
532
532
|
gl_FragColor.a = gl_FragColor.a * opacity;
|
|
533
533
|
}
|
|
534
|
-
`,gn=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],pt=512,dt=512,Qe=128,yn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.group=new T.Group,t.mesh=(function(){var l=new T.CylinderGeometry(.12,.12,1,32,1,!0);l.translate(0,.5,0);var g=new T.ShaderMaterial({vertexShader:vn,fragmentShader:mn,uniforms:{map:{value:new T.Texture},progress:{value:0},opacity:{value:0}},transparent:!0,depthTest:!1}),d=new T.Mesh(l,g);return d})(),t.panoMesh=new de.PanoCircleMesh({scale:1.5}),t.stop=function(){},t.drawLine=function(l,g){if(t.ctx){var d=(function(){var A,E=pt/16|0;return E*((A=gn[l])!==null&&A!==void 0?A:0)})(),v=(1-(g+l*150)%1200/1200)*(dt+Qe),w=t.ctx.createLinearGradient(0,v-Qe,0,v);w.addColorStop(0,"rgba(255,255,255,0)"),w.addColorStop(.5,"rgba(255,255,255,1)"),w.addColorStop(1,"rgba(255,255,255,0)"),t.ctx.fillStyle=w,t.ctx.fillRect(d,v-Qe,3,Qe)}},t.anime=function(l){if(t.ctx&&t.startTime){t.ctx.clearRect(0,0,pt,dt);for(var g=0;g<16;g++)t.drawLine(g,l-t.startTime);var d=It((l-t.startTime)/1e3,0,1),v=It((l-t.startTime)/300,0,
|
|
534
|
+
`,gn=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],pt=512,dt=512,Qe=128,yn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.group=new T.Group,t.mesh=(function(){var l=new T.CylinderGeometry(.12,.12,1,32,1,!0);l.translate(0,.5,0);var g=new T.ShaderMaterial({vertexShader:vn,fragmentShader:mn,uniforms:{map:{value:new T.Texture},progress:{value:0},opacity:{value:0}},transparent:!0,depthTest:!1}),d=new T.Mesh(l,g);return d})(),t.panoMesh=new de.PanoCircleMesh({scale:1.5}),t.stop=function(){},t.drawLine=function(l,g){if(t.ctx){var d=(function(){var A,E=pt/16|0;return E*((A=gn[l])!==null&&A!==void 0?A:0)})(),v=(1-(g+l*150)%1200/1200)*(dt+Qe),w=t.ctx.createLinearGradient(0,v-Qe,0,v);w.addColorStop(0,"rgba(255,255,255,0)"),w.addColorStop(.5,"rgba(255,255,255,1)"),w.addColorStop(1,"rgba(255,255,255,0)"),t.ctx.fillStyle=w,t.ctx.fillRect(d,v-Qe,3,Qe)}},t.anime=function(l){if(t.ctx&&t.startTime){t.ctx.clearRect(0,0,pt,dt);for(var g=0;g<16;g++)t.drawLine(g,l-t.startTime);var d=It((l-t.startTime)/1e3,0,1),v=It((l-t.startTime)/300,0,t.config.maxOpacity);t.panoMesh.setOpacity(v),t.mesh.material.uniforms.progress.value=d,t.mesh.material.uniforms.opacity.value=v,t.mesh.material.uniforms.map.value.needsUpdate=!0,t.five.needsRender=!0}},t.dispose=function(){t.disable()},t.five=e;var s={enabled:!1,visible:!0};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=j(j({},a==null?void 0:a.config),{maxOpacity:1});return t._config=c,typeof document=="undefined"||(t.canvas=document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),t.canvas.width=pt,t.canvas.height=dt,t.ctx.shadowColor="rgba(255,255,255,0.5)",t.ctx.shadowBlur=6,t.ctx.shadowOffsetX=0,t.ctx.shadowOffsetY=0,t.mesh.material.uniforms.map.value=new T.CanvasTexture(t.canvas),t.group.add(t.mesh),t.panoMesh.setProgress(1),t.panoMesh.setOpacity(0),t.group.add(t.panoMesh),t.state.enabled&&t._enable({userAction:!1})),t}return Object.defineProperty(o.prototype,"config",{get:function(){return j({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=j(j({},this.state),e),this.hooks.emit("stateChange",{state:this.state,prevState:t,userAction:a})},o.prototype.updateConfig=function(e,a){var t;a===void 0&&(a={});var s=this.config,c=j(j({},s),e);this._config=c,this.hooks.emit("configChange",{prevConfig:s,config:c,userAction:(t=a.userAction)!==null&&t!==void 0?t:!0})},o.prototype.load=function(e){return ke(this,void 0,void 0,function(){return Le(this,function(a){return[2]})})},o.prototype._enable=function(e){var a=this;this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.five.ready().then(function(){a.five.scene.add(a.group),a.stop=de.AnimationFrameLoop.shared.add(function(t,s){a.startTime||(a.startTime=t),a.panoMesh.updateTime(t,s),a.anime(t)})})},o.prototype._disable=function(e){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0},o.prototype.enable=function(e){var a;if(this.ctx&&!this.state.enabled&&this.five.observers[this.five.state.panoIndex]){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!0},t),this._enable({userAction:t})}},o.prototype.disable=function(e){var a;if(this.state.enabled!==!1){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!1},t),this._disable({userAction:t})}},o.prototype.setState=function(e,a){a===void 0&&(a={});var t=this.state,s=a.userAction!==void 0?a.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&t.enabled!==e.enabled){var c={userAction:s};e.enabled?this._enable(c):this._disable(c)}},o})(At.BasePlugin.Controller),bn=function(f,o){return new yn(f,o)};q.BackgroundPlugin=fn,q.CSS3DRenderer=Ot,q.ItemMaskPlugin=sn,q.OrbitControls=De,q.OrientationPlugin=un,q.PanoAnimePlugin=bn,q.RoundedBoxGeometry=St,q.TrajectoryPlugin=dn,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
|
package/umd/five-react.js
CHANGED
package/umd/five-shader-lib.js
CHANGED
package/umd/five-sticker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated:
|
|
5
|
-
* Version: 6.6.0-alpha.
|
|
4
|
+
* Generated: 9/23/2025
|
|
5
|
+
* Version: 6.6.0-alpha.21
|
|
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.6.0-alpha.
|
|
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.6.0-alpha.21"},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"})}));
|