@realsee/five 6.6.0-alpha.0 → 6.6.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +5 -5
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +1440 -1255
- package/docs/classes/five.AnimationFrameLoop.html +16 -16
- package/docs/classes/five.Camera.html +41 -41
- package/docs/classes/five.Fetcher.html +5 -5
- package/docs/classes/five.Five.html +211 -211
- package/docs/classes/five.InternalWebGLRenderer.html +2 -2
- package/docs/classes/five.Model.html +72 -72
- package/docs/classes/five.ModelScene.html +34 -34
- package/docs/classes/five.Motion.html +17 -17
- package/docs/classes/five.NetworkSubscribe.html +35 -35
- package/docs/classes/five.PBMContainer.html +17 -17
- package/docs/classes/five.PBMCustomShader.html +11 -11
- package/docs/classes/five.PBMGroup.html +4 -4
- package/docs/classes/five.PBMMesh.html +2 -2
- package/docs/classes/five.PBMMeshMaterial.html +84 -84
- package/docs/classes/five.PBMPointCloud.html +3 -3
- package/docs/classes/five.PBMPointCloudMaterial.html +40 -40
- package/docs/classes/five.PBMSkinnedMesh.html +4 -4
- package/docs/classes/five.PanoCircleMesh.html +20 -20
- package/docs/classes/five.PanoCircleMeshCustom.html +20 -20
- package/docs/classes/five.PanoCircleMeshSolid.html +20 -20
- package/docs/classes/five.Parameter.html +114 -114
- package/docs/classes/five.Scene.html +9 -9
- package/docs/classes/five.Subscribe.html +37 -37
- package/docs/classes/five.TextureLoader.html +4 -4
- package/docs/classes/five.Tile.html +34 -34
- package/docs/classes/five.Tile3DModel.html +91 -91
- package/docs/classes/five.TileCache.html +8 -8
- package/docs/classes/five.TileNode.html +9 -9
- package/docs/classes/five.TileRequestScheduler.html +4 -4
- package/docs/classes/five.Tileset.html +37 -37
- package/docs/classes/five.Trajectory.html +8 -8
- package/docs/classes/five.TrajectoryNode.html +7 -7
- package/docs/classes/five.Work.html +42 -42
- package/docs/classes/five.WorkResolvedObserver.html +40 -40
- package/docs/classes/five.XRButton.html +3 -3
- package/docs/classes/gltf-loader.DDSLoader.html +3 -0
- package/docs/classes/gltf-loader.DRACOLoader.html +8 -0
- package/docs/classes/gltf-loader.GLTFLoader.html +19 -0
- package/docs/classes/gltf-loader.GLTFObject.html +9 -0
- package/docs/classes/gltf-loader.GLTFParser.html +6 -0
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +8 -0
- package/docs/classes/line.Line.html +10 -10
- package/docs/classes/line.LineGeometry.html +17 -17
- package/docs/classes/line.LineMaterial.html +8 -8
- package/docs/classes/line.LineSegmentsGeometry.html +15 -15
- package/docs/classes/line.THREE_Line2.html +4 -4
- package/docs/classes/line.THREE_LineSegments2.html +4 -4
- package/docs/classes/plugins.BasePlugin.Controller.html +39 -0
- package/docs/classes/plugins.CSS3DRenderer.html +6 -0
- package/docs/classes/plugins.OrbitControls.html +41 -0
- package/docs/classes/plugins.RoundedBoxGeometry.html +3 -0
- package/docs/classes/react.Store.html +20 -20
- package/docs/classes/sticker.Sticker.html +17 -17
- package/docs/classes/vfx.Airflow.html +8 -8
- package/docs/classes/vfx.Flame.html +10 -10
- package/docs/classes/vfx.Particle.html +78 -78
- package/docs/classes/vfx.SpotLight.html +7 -7
- package/docs/documents/coordinate.html +4 -4
- package/docs/documents/five.FivePlugin.plugins.html +15 -15
- package/docs/documents/five.Pose.coordinate.html +4 -4
- package/docs/documents/plugins.html +15 -15
- package/docs/documents/react-component.html +32 -0
- package/docs/enums/five.VolumePlaneIntersect.html +4 -4
- package/docs/enums/plugins.BackgroundPluginType.WarningCodeType.html +2 -0
- package/docs/functions/five.coordinatesToVector.html +2 -0
- package/docs/functions/five.createDebugBoundingMesh.html +1 -1
- package/docs/functions/five.createWorks.html +1 -1
- package/docs/functions/five.defaultImageURLTransform.html +2 -2
- package/docs/functions/five.getViewportScale.html +1 -1
- package/docs/functions/five.headingToLongitude.html +4 -0
- package/docs/functions/five.imageSupport.html +1 -1
- package/docs/functions/five.isBoundingVolume.html +1 -1
- package/docs/functions/five.isPanoId.html +1 -1
- package/docs/functions/five.loadAt3d.html +1 -1
- package/docs/functions/five.loadB3dm.html +1 -1
- package/docs/functions/five.loadDome.html +1 -1
- package/docs/functions/five.loadDomez.html +1 -1
- package/docs/functions/five.loadFbx.html +1 -1
- package/docs/functions/five.loadGltf.html +1 -1
- package/docs/functions/five.loadPbm.html +1 -1
- package/docs/functions/five.loadPly.html +1 -1
- package/docs/functions/five.loadPnts.html +1 -1
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.longitudeToHeading.html +4 -0
- package/docs/functions/five.makeBoundingVolume.html +1 -1
- package/docs/functions/five.panoEqual.html +1 -1
- package/docs/functions/five.panoParse.html +1 -1
- package/docs/functions/five.panoStringify.html +1 -1
- package/docs/functions/five.parseWork.html +2 -2
- package/docs/functions/five.vectorToCoordinates.html +2 -0
- package/docs/functions/five.workToJson.html +1 -1
- package/docs/functions/plugins.BackgroundPlugin.html +1 -0
- package/docs/functions/plugins.ItemMaskPlugin.html +1 -0
- package/docs/functions/plugins.OrientationPlugin.html +1 -0
- package/docs/functions/plugins.PanoAnimePlugin.html +1 -0
- package/docs/functions/plugins.TrajectoryPlugin.html +1 -0
- package/docs/functions/react.createFiveFeature.html +1 -1
- package/docs/functions/react.createFiveProvider.html +5 -5
- package/docs/functions/react.createStore.html +12 -12
- package/docs/functions/react.unsafe__useFiveInstance.html +4 -4
- package/docs/functions/react.useFiveAction.html +8 -8
- package/docs/functions/react.useFiveCameraDirection.html +3 -3
- package/docs/functions/react.useFiveCameraRaycaster.html +3 -3
- package/docs/functions/react.useFiveCurrentObserver.html +4 -4
- package/docs/functions/react.useFiveCurrentState.html +4 -4
- package/docs/functions/react.useFiveEventCallback.html +3 -3
- package/docs/functions/react.useFiveFloor.html +4 -4
- package/docs/functions/react.useFiveHelper.html +4 -4
- package/docs/functions/react.useFiveModelIntersectRaycaster.html +4 -4
- package/docs/functions/react.useFiveModelReadyState.html +3 -3
- package/docs/functions/react.useFiveProject2d.html +4 -4
- package/docs/functions/react.useFiveSceneEffect.html +4 -4
- package/docs/functions/react.useFiveState.html +1 -1
- package/docs/functions/react.useFiveWork.html +5 -5
- package/docs/functions/react.withFive.html +1 -1
- package/docs/functions/vue.unsafe__useFiveInject.html +4 -4
- package/docs/functions/vue.useFiveAction.html +10 -10
- package/docs/functions/vue.useFiveCameraDirection.html +3 -3
- package/docs/functions/vue.useFiveCameraRaycaster.html +3 -3
- package/docs/functions/vue.useFiveCurrentObserver.html +4 -4
- package/docs/functions/vue.useFiveCurrentState.html +4 -4
- package/docs/functions/vue.useFiveEventCallback.html +3 -3
- package/docs/functions/vue.useFiveFloor.html +4 -4
- package/docs/functions/vue.useFiveHelper.html +4 -4
- package/docs/functions/vue.useFiveModel.html +2 -2
- package/docs/functions/vue.useFiveModelBounding.html +2 -2
- package/docs/functions/vue.useFiveModelIntersectRaycaster.html +4 -4
- package/docs/functions/vue.useFiveModelReadyState.html +3 -3
- package/docs/functions/vue.useFiveProject2d.html +4 -4
- package/docs/functions/vue.useFiveScene.html +2 -2
- package/docs/functions/vue.useFiveState.html +4 -4
- package/docs/functions/vue.useFiveWorks.html +5 -5
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +17 -17
- package/docs/interfaces/five.AddableObject.html +9 -9
- package/docs/interfaces/five.AjaxOptions.html +9 -9
- package/docs/interfaces/five.AnimationFrame.html +5 -5
- package/docs/interfaces/five.AnimationFrameContext.html +3 -3
- package/docs/interfaces/five.BaseEvent.html +5 -5
- package/docs/interfaces/five.BoundingVolume.html +15 -15
- package/docs/interfaces/five.BoxBoundingVolume.html +18 -0
- package/docs/interfaces/five.CameraPose.html +6 -6
- package/docs/interfaces/five.CullingVolume.html +9 -0
- package/docs/interfaces/five.Draco.html +12 -0
- package/docs/interfaces/five.EventCallback.html +255 -255
- package/docs/interfaces/five.FiveInitArgs.html +85 -85
- package/docs/interfaces/five.FiveLoadOptions.html +13 -13
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -17
- package/docs/interfaces/five.GestureEvent.html +19 -19
- package/docs/interfaces/five.ImageOptions.html +14 -14
- package/docs/interfaces/five.ImageURLMappings.html +1 -1
- package/docs/interfaces/five.ImageURLOptions.html +15 -15
- package/docs/interfaces/five.IntersectEvent.html +8 -8
- package/docs/interfaces/five.IntersectMesh.html +2 -0
- package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
- package/docs/interfaces/five.Intersection.html +5 -5
- package/docs/interfaces/five.KTX2.html +9 -0
- package/docs/interfaces/five.LoosePanoWork.html +10 -10
- package/docs/interfaces/five.LooseWork.html +15 -0
- package/docs/interfaces/five.LooseWorkInitial.html +11 -0
- package/docs/interfaces/five.LooseWorkModel.html +6 -0
- package/docs/interfaces/five.LooseWorkObserver.html +16 -0
- package/docs/interfaces/five.LooseWorkPanorama.html +13 -0
- package/docs/interfaces/five.LooseWorkVideo.html +4 -0
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +13 -0
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +17 -17
- package/docs/interfaces/five.ModeChangeEvent.html +9 -9
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.ModelEvent.html +8 -8
- package/docs/interfaces/five.ModelLike.html +3 -3
- package/docs/interfaces/five.ModelSceneEvent.html +6 -6
- package/docs/interfaces/five.MotionKeyframe.html +4 -4
- package/docs/interfaces/five.MovePanoOptions.html +24 -24
- package/docs/interfaces/five.NetworkAbortError.html +1 -0
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -0
- package/docs/interfaces/five.NetworkOptions.html +7 -7
- package/docs/interfaces/five.NetworkProxyError.html +1 -0
- package/docs/interfaces/five.NetworkResourceEvent.html +9 -9
- package/docs/interfaces/five.NetworkResponseError.html +2 -0
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -0
- package/docs/interfaces/five.ObjectEvent.html +6 -6
- package/docs/interfaces/five.PBMClipperParameter.html +3 -3
- package/docs/interfaces/five.PBMCustomShaderInitArgs.html +6 -6
- package/docs/interfaces/five.PBMCustomShaderSlots.html +3 -3
- package/docs/interfaces/five.PBMMaterial.html +1 -0
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +28 -28
- package/docs/interfaces/five.PBMPanoDepth.html +9 -9
- package/docs/interfaces/five.PBMPanoPicture.html +11 -11
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +28 -28
- package/docs/interfaces/five.PBMRefinedScreen.html +6 -6
- package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -9
- package/docs/interfaces/five.PanoCircleMeshInterface.html +20 -20
- package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -3
- package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -3
- package/docs/interfaces/five.PanoEvent.html +11 -11
- package/docs/interfaces/five.PanoTextureEvent.html +9 -9
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +38 -38
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
- package/docs/interfaces/five.ParameterMaterialValue.html +73 -73
- package/docs/interfaces/five.ParameterTilesetValue.html +31 -31
- package/docs/interfaces/five.ParameterValue.html +103 -103
- package/docs/interfaces/five.Pose.html +13 -13
- package/docs/interfaces/five.RegionBoundingVolume.html +21 -0
- package/docs/interfaces/five.RenderEvent.html +6 -6
- package/docs/interfaces/five.ResolvedParameterValue.html +105 -105
- package/docs/interfaces/five.SphereBoundingVolume.html +17 -0
- package/docs/interfaces/five.State.html +19 -19
- package/docs/interfaces/five.StateEvent.html +7 -7
- package/docs/interfaces/five.TextureOptions.html +16 -16
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +12 -12
- package/docs/interfaces/five.TileHeader.html +9 -9
- package/docs/interfaces/five.TilesetHeader.html +20 -20
- package/docs/interfaces/five.TilesetOptions.html +12 -12
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.TrajectoryHeader.html +5 -5
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +34 -34
- package/docs/interfaces/five.ViewLayer.html +90 -90
- package/docs/interfaces/five.Viewport.html +11 -11
- package/docs/interfaces/five.WebXRAxesParams.html +4 -4
- package/docs/interfaces/five.WebXRControllerParams.html +2 -2
- package/docs/interfaces/five.WorkCubeImage.html +8 -14
- package/docs/interfaces/five.WorkImage.html +13 -19
- package/docs/interfaces/five.WorkInitial.html +17 -17
- package/docs/interfaces/five.WorkInitialJson.html +8 -8
- package/docs/interfaces/five.WorkJson.html +12 -12
- package/docs/interfaces/five.WorkModel.html +12 -12
- package/docs/interfaces/five.WorkModelJson.html +5 -5
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkModelLayerJson.html +5 -5
- package/docs/interfaces/five.WorkObserver.html +34 -34
- package/docs/interfaces/five.WorkObserverJson.html +8 -8
- package/docs/interfaces/five.WorkPanoramaJson.html +14 -14
- package/docs/interfaces/five.WorkPanoramasJson.html +3 -3
- package/docs/interfaces/five.WorkTile.html +14 -20
- package/docs/interfaces/five.WorkVideo.html +9 -9
- package/docs/interfaces/five.WorksEvent.html +9 -9
- package/docs/interfaces/five.XRControllerEvent.html +8 -8
- package/docs/interfaces/five.XRGestureEvent.html +11 -11
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +34 -34
- package/docs/interfaces/five.XRSessionEvent.html +7 -7
- package/docs/interfaces/gltf-loader.DDS.html +7 -0
- package/docs/interfaces/gltf-loader.GLTF.html +13 -0
- package/docs/interfaces/gltf-loader.GLTFReference.html +3 -0
- package/docs/interfaces/gltf-loader.THREEGLTF.html +8 -0
- package/docs/interfaces/plugins.BackgroundPluginController.html +37 -0
- package/docs/interfaces/plugins.BackgroundPluginType.Config.html +1 -0
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +20 -0
- package/docs/interfaces/plugins.BackgroundPluginType.Params.html +3 -0
- package/docs/interfaces/plugins.BackgroundPluginType.PluginDataItem.html +1 -0
- package/docs/interfaces/plugins.BasePlugin.BaseOptions.html +3 -0
- package/docs/interfaces/plugins.BasePlugin.Config.html +5 -0
- package/docs/interfaces/plugins.BasePlugin.State.html +8 -0
- package/docs/interfaces/plugins.BasePlugin.StateChangeParams.html +7 -0
- package/docs/interfaces/plugins.ItemMaskController.html +35 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.Config.html +2 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.ItemType.html +13 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.MaskType.html +4 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +14 -0
- package/docs/interfaces/plugins.Keyframe.html +3 -0
- package/docs/interfaces/plugins.OrientationPluginController.html +46 -0
- package/docs/interfaces/plugins.OrientationPluginType.Config.html +4 -0
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.OrientationPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.OrientationPluginType.State.html +10 -0
- package/docs/interfaces/plugins.PanoAnimeController.html +32 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +11 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +4 -0
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +8 -0
- package/docs/interfaces/plugins.PlayingState.html +3 -0
- package/docs/interfaces/plugins.PluginTemplateType.Config.html +3 -0
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +10 -0
- package/docs/interfaces/plugins.PluginTemplateType.Params.html +4 -0
- package/docs/interfaces/plugins.PluginTemplateType.State.html +8 -0
- package/docs/interfaces/plugins.TrajectoryController.html +50 -0
- package/docs/interfaces/react.FiveActionReactCallbacks.html +27 -27
- package/docs/interfaces/react.FiveCanvasProps.html +5 -5
- package/docs/interfaces/react.FiveInjectionTypes.html +152 -144
- package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -2
- package/docs/interfaces/sticker.IntersectionLike.html +7 -7
- package/docs/interfaces/vfx.ParticleArgs.html +67 -67
- package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -3
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +30 -30
- package/docs/modules/five.html +1 -231
- package/docs/modules/gltf-loader.html +1 -0
- package/docs/modules/line.html +1 -8
- package/docs/modules/plugins.BackgroundPluginType.html +1 -0
- package/docs/modules/plugins.BasePlugin.html +1 -0
- package/docs/modules/plugins.ItemMaskPluginType.html +1 -0
- package/docs/modules/plugins.OrientationPluginType.html +1 -0
- package/docs/modules/plugins.PanoAnimePluginType.html +1 -0
- package/docs/modules/plugins.PluginTemplateType.html +1 -0
- package/docs/modules/plugins.html +1 -0
- package/docs/modules/react.html +1 -37
- package/docs/modules/sticker.html +1 -3
- package/docs/modules/vfx.html +1 -8
- package/docs/modules/vue.html +1 -24
- package/docs/modules.html +1 -0
- package/docs/types/five.AjaxResponseType.html +1 -1
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
- package/docs/types/five.AnimationFrameLoopType.html +1 -1
- package/docs/types/five.BoundingVolumeJson.html +1 -1
- package/docs/types/five.BoxBoundingVolumeJson.html +2 -1
- package/docs/types/five.ControllerCustomInitTypes.html +8 -1
- package/docs/types/five.ControllerEventTypes.html +66 -33
- package/docs/types/five.CubeFace.html +1 -0
- package/docs/types/five.EventTypes.html +26 -26
- package/docs/types/five.FivePlugin.html +4 -4
- package/docs/types/five.FivePluginInit.html +3 -3
- package/docs/types/five.FivePluginInstance.html +3 -3
- package/docs/types/five.GestureTypes.html +1 -1
- package/docs/types/five.LegacyEventType.html +149 -86
- package/docs/types/five.LoadResultType.html +12 -1
- package/docs/types/five.Mode.html +9 -9
- package/docs/types/five.Models.html +11 -11
- package/docs/types/five.MotionCircle.html +2 -2
- package/docs/types/five.MotionConfig.html +1 -1
- package/docs/types/five.MotionInitalValue.html +1 -1
- package/docs/types/five.MotionValue.html +1 -1
- package/docs/types/five.MovePanoEffect.html +3 -3
- package/docs/types/five.NetWorkMeta.html +8 -1
- 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 +3 -1
- 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.PBMAlphaMode.html +1 -1
- package/docs/types/five.PBMColorStyle.html +1 -1
- package/docs/types/five.PBMFloorStyle.html +1 -1
- package/docs/types/five.PBMMeshShaderType.html +1 -1
- package/docs/types/five.PBMPointBack.html +1 -1
- package/docs/types/five.PBMPointCloudShaderType.html +1 -1
- package/docs/types/five.PBMPointShape.html +1 -1
- package/docs/types/five.PBMPointSize.html +1 -1
- package/docs/types/five.PBMTransition.html +1 -1
- package/docs/types/five.Pano.html +3 -1
- package/docs/types/five.PanoId.html +1 -1
- package/docs/types/five.ParseOptions.html +11 -6
- package/docs/types/five.PostProcessingType.html +1 -1
- package/docs/types/five.RegionBoundingVolumeJson.html +2 -1
- package/docs/types/five.Scissor.html +2 -2
- package/docs/types/five.SphereBoundingVolumeJson.html +2 -1
- package/docs/types/five.SubscribeEventMap.html +1 -1
- package/docs/types/five.Tile3dOptions.html +1 -1
- package/docs/types/five.TileCacheOptions.html +3 -1
- package/docs/types/five.TileContentData.html +6 -1
- package/docs/types/five.TileRequestOrder.html +1 -1
- package/docs/types/five.TileRequestSchedulerOptions.html +4 -1
- package/docs/types/five.TilesetFrameState.html +22 -1
- package/docs/types/five.TrajectoryContentData.html +7 -1
- package/docs/types/five.WebXRControllerKey.html +1 -1
- package/docs/types/five.WebXRControllerType.html +1 -1
- package/docs/types/five.Works.html +1 -1
- package/docs/types/line.LineMaterialParameters.html +8 -1
- package/docs/types/plugins.BackgroundPluginType.Mirror.html +1 -0
- package/docs/types/plugins.BackgroundPluginType.Mode.html +1 -0
- package/docs/types/plugins.BackgroundPluginType.PluginData.html +1 -0
- package/docs/types/plugins.BackgroundPluginType.State.html +2 -0
- package/docs/types/plugins.BasePlugin.EventMap.html +10 -0
- package/docs/types/plugins.ItemMaskPluginType.PluginData.html +3 -0
- package/docs/types/plugins.ItemMaskPluginType.ServerData.html +3 -0
- package/docs/types/plugins.OrientationPluginType.PluginData.html +1 -0
- package/docs/types/plugins.OrientationPluginType.ServerData.html +1 -0
- package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -0
- package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -0
- package/docs/types/plugins.PluginTemplateType.PluginData.html +1 -0
- package/docs/types/plugins.PluginTemplateType.ServerData.html +2 -0
- package/docs/types/react.FiveInjectionActionFeature.html +1 -1
- package/docs/types/react.FiveInjectionDataFeature.html +1 -1
- package/docs/types/react.FiveInjectionFeature.html +1 -1
- package/docs/types/react.FiveProviderPropTypes.html +11 -1
- package/docs/types/react.FiveProviderType.html +1 -1
- package/docs/types/react.StoreActionMapHanlder.html +1 -1
- package/docs/types/react.StoreActionMapType.html +1 -1
- package/docs/types/react.StoreProviderType.html +1 -1
- package/docs/types/react.StoreValueMapType.html +1 -1
- package/docs/types/vfx.ParticleType.html +1 -1
- package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
- package/docs/types/vue.FiveProviderComponent.html +1 -1
- package/docs/types/vue.Project2d.html +1 -1
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
- package/docs/variables/five.draco.html +1 -0
- package/docs/variables/five.ktx2.html +1 -0
- package/docs/variables/react.FiveCanvas.html +6 -0
- package/docs/variables/react.INJECTION_PROPNAME.html +1 -1
- package/docs/variables/react.useFiveScene.html +7 -0
- package/docs/variables/vue.FiveCanvas.html +7 -7
- package/docs/variables/vue.FiveProvider.html +5 -5
- package/five/index.d.ts +53 -57
- package/five/index.js +93 -91
- package/five/index.mjs +4247 -4193
- package/gltf-loader/index.js +5 -5
- package/gltf-loader/index.mjs +160 -172
- package/line/index.js +4 -4
- package/line/index.mjs +15 -15
- package/package.json +4 -7
- package/plugins/index.js +10 -10
- package/plugins/index.mjs +42 -42
- package/react/index.d.ts +46 -37
- package/react/index.js +3 -3
- package/react/index.mjs +8 -8
- package/shader-lib/index.js +7 -7
- package/shader-lib/index.mjs +14 -14
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +9 -9
- package/umd/five-gltf-loader.js +5 -5
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +10 -10
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +8 -8
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +7 -7
- package/umd/five-vue.js +3 -3
- package/umd/five.js +94 -92
- package/vfx/index.js +6 -6
- package/vfx/index.mjs +12 -12
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +4 -4
- package/docs/classes/five.BoxBoundingVolume.html +0 -19
- package/docs/classes/five.CullingVolume.html +0 -13
- package/docs/classes/five.Draco.html +0 -13
- package/docs/classes/five.IntersectMesh.html +0 -4
- package/docs/classes/five.KTX2.html +0 -10
- package/docs/classes/five.NetworkAbortError.html +0 -2
- package/docs/classes/five.NetworkFirbiddenError.html +0 -2
- package/docs/classes/five.NetworkProxyError.html +0 -2
- package/docs/classes/five.NetworkResponseError.html +0 -3
- package/docs/classes/five.NetworkTimeoutError.html +0 -2
- package/docs/classes/five.PBMMaterial.html +0 -2
- package/docs/classes/five.RegionBoundingVolume.html +0 -22
- package/docs/classes/five.SphereBoundingVolume.html +0 -18
- package/docs/classes/gltf_loader.DDSLoader.html +0 -3
- package/docs/classes/gltf_loader.DRACOLoader.html +0 -8
- package/docs/classes/gltf_loader.GLTFLoader.html +0 -19
- package/docs/classes/gltf_loader.GLTFObject.html +0 -9
- package/docs/classes/gltf_loader.GLTFParser.html +0 -6
- package/docs/classes/gltf_loader.THREEGLTFLoader.html +0 -8
- package/docs/classes/plugins-1.BackgroundPluginController.html +0 -38
- package/docs/classes/plugins-1.BasePlugin.Controller.html +0 -39
- package/docs/classes/plugins-1.CSS3DRenderer.html +0 -6
- package/docs/classes/plugins-1.ItemMaskController.html +0 -36
- package/docs/classes/plugins-1.OrbitControls.html +0 -41
- package/docs/classes/plugins-1.OrientationPluginController.html +0 -47
- package/docs/classes/plugins-1.PanoAnimeController.html +0 -33
- package/docs/classes/plugins-1.RoundedBoxGeometry.html +0 -3
- package/docs/classes/plugins-1.TrajectoryController.html +0 -51
- package/docs/documents/react_component.html +0 -32
- package/docs/enums/plugins-1.BackgroundPluginType.WarningCodeType.html +0 -2
- package/docs/functions/plugins-1.BackgroundPlugin.html +0 -1
- package/docs/functions/plugins-1.ItemMaskPlugin.html +0 -1
- package/docs/functions/plugins-1.OrientationPlugin.html +0 -1
- package/docs/functions/plugins-1.PanoAnimePlugin.html +0 -1
- package/docs/functions/plugins-1.TrajectoryPlugin.html +0 -1
- package/docs/functions/react.FiveCanvas.html +0 -6
- package/docs/functions/react.useFiveScene.html +0 -7
- package/docs/interfaces/gltf_loader.DDS.html +0 -7
- package/docs/interfaces/gltf_loader.GLTF.html +0 -13
- package/docs/interfaces/gltf_loader.GLTFReference.html +0 -3
- package/docs/interfaces/gltf_loader.THREEGLTF.html +0 -8
- package/docs/interfaces/plugins-1.BackgroundPluginType.Config.html +0 -1
- package/docs/interfaces/plugins-1.BackgroundPluginType.EventMap.html +0 -20
- package/docs/interfaces/plugins-1.BackgroundPluginType.Params.html +0 -3
- package/docs/interfaces/plugins-1.BackgroundPluginType.PluginDataItem.html +0 -1
- package/docs/interfaces/plugins-1.BasePlugin.BaseOptions.html +0 -3
- package/docs/interfaces/plugins-1.BasePlugin.Config.html +0 -5
- package/docs/interfaces/plugins-1.BasePlugin.State.html +0 -8
- package/docs/interfaces/plugins-1.BasePlugin.StateChangeParams.html +0 -7
- package/docs/interfaces/plugins-1.ItemMaskPluginType.Config.html +0 -2
- package/docs/interfaces/plugins-1.ItemMaskPluginType.EventMap.html +0 -10
- package/docs/interfaces/plugins-1.ItemMaskPluginType.ItemType.html +0 -13
- package/docs/interfaces/plugins-1.ItemMaskPluginType.MaskType.html +0 -4
- package/docs/interfaces/plugins-1.ItemMaskPluginType.Params.html +0 -4
- package/docs/interfaces/plugins-1.ItemMaskPluginType.State.html +0 -14
- package/docs/interfaces/plugins-1.Keyframe.html +0 -3
- package/docs/interfaces/plugins-1.OrientationPluginType.Config.html +0 -4
- package/docs/interfaces/plugins-1.OrientationPluginType.EventMap.html +0 -10
- package/docs/interfaces/plugins-1.OrientationPluginType.Params.html +0 -4
- package/docs/interfaces/plugins-1.OrientationPluginType.State.html +0 -10
- package/docs/interfaces/plugins-1.PanoAnimePluginType.Config.html +0 -2
- package/docs/interfaces/plugins-1.PanoAnimePluginType.EventMap.html +0 -11
- package/docs/interfaces/plugins-1.PanoAnimePluginType.Params.html +0 -4
- package/docs/interfaces/plugins-1.PanoAnimePluginType.State.html +0 -8
- package/docs/interfaces/plugins-1.PlayingState.html +0 -3
- package/docs/interfaces/plugins-1.PluginTemplateType.Config.html +0 -3
- package/docs/interfaces/plugins-1.PluginTemplateType.EventMap.html +0 -10
- package/docs/interfaces/plugins-1.PluginTemplateType.Params.html +0 -4
- package/docs/interfaces/plugins-1.PluginTemplateType.State.html +0 -8
- package/docs/modules/gltf_loader.html +0 -11
- package/docs/modules/plugins-1.BackgroundPluginType.html +0 -10
- package/docs/modules/plugins-1.BasePlugin.html +0 -7
- package/docs/modules/plugins-1.ItemMaskPluginType.html +0 -9
- package/docs/modules/plugins-1.OrientationPluginType.html +0 -7
- package/docs/modules/plugins-1.PanoAnimePluginType.html +0 -7
- package/docs/modules/plugins-1.PluginTemplateType.html +0 -7
- package/docs/modules/plugins-1.html +0 -22
- package/docs/types/five.LooseWork.html +0 -1
- package/docs/types/five.LooseWorkInitial.html +0 -1
- package/docs/types/five.LooseWorkModel.html +0 -1
- package/docs/types/five.LooseWorkObserver.html +0 -1
- package/docs/types/five.LooseWorkPanorama.html +0 -1
- package/docs/types/five.LooseWorkVideo.html +0 -1
- package/docs/types/five.LooseWorkWithExtrinsics.html +0 -2
- package/docs/types/plugins-1.BackgroundPluginType.Mirror.html +0 -1
- package/docs/types/plugins-1.BackgroundPluginType.Mode.html +0 -1
- package/docs/types/plugins-1.BackgroundPluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.BackgroundPluginType.State.html +0 -1
- package/docs/types/plugins-1.BasePlugin.EventMap.html +0 -6
- package/docs/types/plugins-1.ItemMaskPluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.ItemMaskPluginType.ServerData.html +0 -1
- package/docs/types/plugins-1.OrientationPluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.OrientationPluginType.ServerData.html +0 -1
- package/docs/types/plugins-1.PanoAnimePluginType.PluginData.html +0 -1
- package/docs/types/plugins-1.PanoAnimePluginType.ServerData.html +0 -1
- package/docs/types/plugins-1.PluginTemplateType.PluginData.html +0 -1
- package/docs/types/plugins-1.PluginTemplateType.ServerData.html +0 -1
- package/docs/variables/five.draco-1.html +0 -1
- package/docs/variables/five.ktx2-1.html +0 -1
package/plugins/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 8/
|
|
5
|
-
* Version: 6.6.0-alpha.
|
|
4
|
+
* Generated: 2025/8/15
|
|
5
|
+
* Version: 6.6.0-alpha.2
|
|
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
|
-
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ne=require("@realsee/five"),_=require("three"),Ht=require("@realsee/five/plugins");function fn(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 w=fn(_);function pn(f){return/^https?:\/\/|^\/\//.test(f)||/^data:/.test(f)}function dn(f,o){return pn(o)?o:"".concat(f).concat(o)}exports.BasePlugin=void 0;(function(f){var o=function(){function e(a,t){this.hooks=new Ne.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 dn(this.staticPrefix,a)},e}();f.Controller=o})(exports.BasePlugin||(exports.BasePlugin={}));var Et=function(f,o){return Et=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])},Et(f,o)};function Re(f,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");Et(f,o);function e(){this.constructor=f}f.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}var z=function(){return z=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},z.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(T){c(T)}}function g(v){try{d(a.throw(v))}catch(T){c(T)}}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 Ft(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))}function vn(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 mn=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),gt=typeof performance!="undefined"?function(){return mn+performance.now()}:function(){return Date.now()};function at(f,o,e){return f+(o-f)*e}function gn(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 yn(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 bn(f,o,e,a){var t=a[1]-a[0];return f=it(f,a),o=it(o,a),o-f>t/2?at(f+t,o,e):f-o>t/2?at(f-t,o,e):at(f,o,e)}function it(f,o){var e=o[1]-o[0];return f<o[0]?it(f+e,o):f>=o[1]?it(f-e,o):f}function Tn(f,o,e,a){return a?bn(f,o,e,a):at(f,o,e)}var Vt=function(){function f(o){this.config={},this.progress=1,this.ended=!0,this.value={},this.startTime=gt(),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:z({},this.value)},{progress:1,value:z({},this.value)}]}return f.prototype.getProgress=function(o){var e=o-this.startTime;return e<0?0:e>=this.duration?1:1-gn(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]=Tn(a.value[c],t.value[c],l,this.config[c].circle)}return s}return z({},this.keyframes[this.keyframes.length-1].value)},f.prototype.getProgressVelocity=function(o){var e=o-this.startTime;return e>=this.duration?0:yn(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:gt();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:gt(),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=z({},o[o.length-1].value)):s.value=z({},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}(),wn=[{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}}],En=[{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}}],Pn=`
|
|
255
|
+
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ne=require("@realsee/five"),_=require("three"),Ht=require("@realsee/five/plugins");function fn(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 w=fn(_);function pn(f){return/^https?:\/\/|^\/\//.test(f)||/^data:/.test(f)}function dn(f,o){return pn(o)?o:"".concat(f).concat(o)}exports.BasePlugin=void 0;(function(f){var o=(function(){function e(a,t){this.hooks=new Ne.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 dn(this.staticPrefix,a)},e})();f.Controller=o})(exports.BasePlugin||(exports.BasePlugin={}));var Et=function(f,o){return Et=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])},Et(f,o)};function Re(f,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");Et(f,o);function e(){this.constructor=f}f.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}var z=function(){return z=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},z.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(T){c(T)}}function g(v){try{d(a.throw(v))}catch(T){c(T)}}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 Ft(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))}function vn(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 mn=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),gt=typeof performance!="undefined"?(function(){return mn+performance.now()}):(function(){return Date.now()});function at(f,o,e){return f+(o-f)*e}function gn(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 yn(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 bn(f,o,e,a){var t=a[1]-a[0];return f=it(f,a),o=it(o,a),o-f>t/2?at(f+t,o,e):f-o>t/2?at(f-t,o,e):at(f,o,e)}function it(f,o){var e=o[1]-o[0];return f<o[0]?it(f+e,o):f>=o[1]?it(f-e,o):f}function Tn(f,o,e,a){return a?bn(f,o,e,a):at(f,o,e)}var Vt=(function(){function f(o){this.config={},this.progress=1,this.ended=!0,this.value={},this.startTime=gt(),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:z({},this.value)},{progress:1,value:z({},this.value)}]}return f.prototype.getProgress=function(o){var e=o-this.startTime;return e<0?0:e>=this.duration?1:1-gn(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]=Tn(a.value[c],t.value[c],l,this.config[c].circle)}return s}return z({},this.keyframes[this.keyframes.length-1].value)},f.prototype.getProgressVelocity=function(o){var e=o-this.startTime;return e>=this.duration?0:yn(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:gt();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:gt(),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=z({},o[o.length-1].value)):s.value=z({},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})(),wn=[{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}}],En=[{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}}],Pn=`
|
|
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
|
-
`,An=function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;t.canvas=document.createElement("canvas"),t.group=new w.Group,t.wrapper=document.createElement("div"),t.style=document.createElement("style"),t.itemMaskMesh=function(){var l=new w.Mesh(new w.SphereBufferGeometry(1,60,40),new w.ShaderMaterial({vertexShader:Pn,fragmentShader:xn,uniforms:{map:{value:new w.Texture},color:{value:new w.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,T,A,P,C,O,D,b;return Le(this,function(y){switch(y.label){case 0:return g=this,d=g.five,v=g.canvas,T=g.itemMaskMesh,A=g.data,P=v.getContext("2d"),C=d.observers[l],O=(b=A==null?void 0:A.object_mask_list.find(function(x){return x.derived_id===String(C.derivedId)}))===null||b===void 0?void 0:b.object_mask_url,O?[4,vn(O)]:[2];case 1:return D=y.sent(),v.width=D.width,v.height=D.height,P==null||P.drawImage(D,0,0,D.width,D.height),T.material.uniforms.map.value.image=D,T.material.uniforms.map.value.minFilter=w.LinearFilter,T.material.uniforms.map.value.needsUpdate=!0,T.position.copy(C.position),T.quaternion.copy(C.quaternion),d.scene.add(T),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,T=d.itemMaskMesh,A=v.observers[v.state.panoIndex],P=(g=l.pointers[0])===null||g===void 0?void 0:g.raycaster;if(P){var C=P.intersectObjects(t.group.children.filter(function(O){return O.userData.visible_viewpoint.includes(String(A.derivedId))}),!0)[0];C?T.material.uniforms.color.value=C.object.userData.color:T.material.uniforms.color.value=new w.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(P){return P.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 T=new Vt({opacity:0,scale:0,shadow:2}),A=new Vt({opacity:0,scale:0,shadow:2});return T.setKeyframes(wn,1e3),A.setKeyframes(En,1e3),t.stopAnimation=Ne.AnimationFrameLoop.shared.add(function(P,C){var O,D=T.update(P),b=A.update(P);t.wrapper.firstChild.style.opacity="".concat(T.value.opacity),t.wrapper.firstChild.style.transform="scale(".concat(T.value.scale,")"),t.wrapper.firstChild.style.boxShadow="0 0 0 ".concat(T.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&&((O=t.stopAnimation)===null||O===void 0||O.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=z({},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=`
|
|
307
|
+
`,An=(function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;t.canvas=document.createElement("canvas"),t.group=new w.Group,t.wrapper=document.createElement("div"),t.style=document.createElement("style"),t.itemMaskMesh=(function(){var l=new w.Mesh(new w.SphereBufferGeometry(1,60,40),new w.ShaderMaterial({vertexShader:Pn,fragmentShader:xn,uniforms:{map:{value:new w.Texture},color:{value:new w.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,T,A,P,C,O,D,b;return Le(this,function(y){switch(y.label){case 0:return g=this,d=g.five,v=g.canvas,T=g.itemMaskMesh,A=g.data,P=v.getContext("2d"),C=d.observers[l],O=(b=A==null?void 0:A.object_mask_list.find(function(x){return x.derived_id===String(C.derivedId)}))===null||b===void 0?void 0:b.object_mask_url,O?[4,vn(O)]:[2];case 1:return D=y.sent(),v.width=D.width,v.height=D.height,P==null||P.drawImage(D,0,0,D.width,D.height),T.material.uniforms.map.value.image=D,T.material.uniforms.map.value.minFilter=w.LinearFilter,T.material.uniforms.map.value.needsUpdate=!0,T.position.copy(C.position),T.quaternion.copy(C.quaternion),d.scene.add(T),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,T=d.itemMaskMesh,A=v.observers[v.state.panoIndex],P=(g=l.pointers[0])===null||g===void 0?void 0:g.raycaster;if(P){var C=P.intersectObjects(t.group.children.filter(function(O){return O.userData.visible_viewpoint.includes(String(A.derivedId))}),!0)[0];C?T.material.uniforms.color.value=C.object.userData.color:T.material.uniforms.color.value=new w.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(P){return P.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 T=new Vt({opacity:0,scale:0,shadow:2}),A=new Vt({opacity:0,scale:0,shadow:2});return T.setKeyframes(wn,1e3),A.setKeyframes(En,1e3),t.stopAnimation=Ne.AnimationFrameLoop.shared.add(function(P,C){var O,D=T.update(P),b=A.update(P);t.wrapper.firstChild.style.opacity="".concat(T.value.opacity),t.wrapper.firstChild.style.transform="scale(".concat(T.value.scale,")"),t.wrapper.firstChild.style.boxShadow="0 0 0 ".concat(T.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&&((O=t.stopAnimation)===null||O===void 0||O.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=z({},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;
|
|
@@ -347,13 +347,13 @@ void main() {
|
|
|
347
347
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha / 4.0 * opacity);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
`,side:w.DoubleSide,visible:s.state.selectedId==="".concat(l.category_name).concat(l.index),uniforms:{opacity:{value:s.state.mode==="box"?1:0}},depthWrite:!1,depthTest:!1,transparent:!0}),p=new w.Mesh(y,x);return p.position.copy(b),p.name="".concat(l.category_name).concat(l.index),p.userData.color=new((g=w.Vector4).bind.apply(g,Ft(Ft([void 0],l.mask_color.map(function(I){return I/255}).reverse(),!1),[1],!1))),p.userData.visible_viewpoint=Object.keys(l.visible_viewpoint),p}),(t=this.group).add.apply(t,a),[2]})})},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.prototype.setMode=function(e){this.updateState({mode:e},!1),e==="mask"?(this.group.children.forEach(function(a){a.material.uniforms.opacity.value=0}),this.loadPanoMask(this.five.state.panoIndex)):e==="box"&&(this.itemMaskMesh.material.uniforms.color.value=new w.Vector4(0,0,0,1),this.group.children.forEach(function(a){a.material.uniforms.opacity.value=1}),this.five.needsRender=!0)},o.prototype.select=function(e,a){var t=this,s;this.updateState({selectedId:e!=null?e:null},(s=a==null?void 0:a.userAction)!==null&&s!==void 0?s:!1),this.group.children.forEach(function(c){c.material.visible=t.state.selectAll||c.name===e}),this.five.needsRender=!0},o.prototype.selectAll=function(e){e===void 0&&(e=!0),this.updateState({selectAll:!!e},!1),this.select()},o.prototype._enable=function(e){this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.on("gesture.mousemove",this.onFiveMouseMove),this.five.on("wantsTapGesture",this.onFiveTapGesture),this.five.on("cameraUpdate",this.onFiveCameraUpdate),this.five.scene.add(this.group),document.head.appendChild(this.style)},o.prototype._disable=function(e){this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.off("gesture.mousemove",this.onFiveMouseMove),this.five.off("wantsTapGesture",this.onFiveTapGesture),this.five.off("cameraUpdate",this.onFiveCameraUpdate),this.five.scene.remove(this.group),document.head.removeChild(this.style)},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}(exports.BasePlugin.Controller),Mn=function(f,o){return new An(f,o)};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
350
|
+
`,side:w.DoubleSide,visible:s.state.selectedId==="".concat(l.category_name).concat(l.index),uniforms:{opacity:{value:s.state.mode==="box"?1:0}},depthWrite:!1,depthTest:!1,transparent:!0}),p=new w.Mesh(y,x);return p.position.copy(b),p.name="".concat(l.category_name).concat(l.index),p.userData.color=new((g=w.Vector4).bind.apply(g,Ft(Ft([void 0],l.mask_color.map(function(I){return I/255}).reverse(),!1),[1],!1))),p.userData.visible_viewpoint=Object.keys(l.visible_viewpoint),p}),(t=this.group).add.apply(t,a),[2]})})},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.prototype.setMode=function(e){this.updateState({mode:e},!1),e==="mask"?(this.group.children.forEach(function(a){a.material.uniforms.opacity.value=0}),this.loadPanoMask(this.five.state.panoIndex)):e==="box"&&(this.itemMaskMesh.material.uniforms.color.value=new w.Vector4(0,0,0,1),this.group.children.forEach(function(a){a.material.uniforms.opacity.value=1}),this.five.needsRender=!0)},o.prototype.select=function(e,a){var t=this,s;this.updateState({selectedId:e!=null?e:null},(s=a==null?void 0:a.userAction)!==null&&s!==void 0?s:!1),this.group.children.forEach(function(c){c.material.visible=t.state.selectAll||c.name===e}),this.five.needsRender=!0},o.prototype.selectAll=function(e){e===void 0&&(e=!0),this.updateState({selectAll:!!e},!1),this.select()},o.prototype._enable=function(e){this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.on("gesture.mousemove",this.onFiveMouseMove),this.five.on("wantsTapGesture",this.onFiveTapGesture),this.five.on("cameraUpdate",this.onFiveCameraUpdate),this.five.scene.add(this.group),document.head.appendChild(this.style)},o.prototype._disable=function(e){this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.off("gesture.mousemove",this.onFiveMouseMove),this.five.off("wantsTapGesture",this.onFiveTapGesture),this.five.off("cameraUpdate",this.onFiveCameraUpdate),this.five.scene.remove(this.group),document.head.removeChild(this.style)},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})(exports.BasePlugin.Controller),Mn=function(f,o){return new An(f,o)};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
351
351
|
* http://hammerjs.github.io/
|
|
352
352
|
*
|
|
353
353
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
354
|
-
* Licensed under the MIT license */var yt=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 T(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 P(n,r,i){var h="DEPRECATED METHOD: "+r+`
|
|
354
|
+
* Licensed under the MIT license */var yt=(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 T(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 P(n,r,i){var h="DEPRECATED METHOD: "+r+`
|
|
355
355
|
`+i+` AT
|
|
356
|
-
`;return function(){var m=new Error("get-stack-trace"),E=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,E),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 E in m)m.hasOwnProperty(E)&&(i[E]=m[E])}return i}:C=Object.assign;var O=P(function(r,i,h){for(var m=Object.keys(i),E=0;E<m.length;)(!h||h&&r[m[E]]===a)&&(r[m[E]]=i[m[E]]),E++;return r},"extend","Use `assign`."),D=P(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(ne(r),function(h){n.addEventListener(h,i,!1)})}function M(n,r,i){A(ne(r),function(h){n.removeEventListener(h,i,!1)})}function te(n,r){for(;n;){if(n==r)return!0;n=n.parentNode}return!1}function Q(n,r){return n.indexOf(r)>-1}function ne(n){return n.trim().split(/\s+/g)}function ce(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 me(n){return Array.prototype.slice.call(n,0)}function xe(n,r,i){for(var h=[],m=[],E=0;E<n.length;){var k=n[E][r];ce(m,k)<0&&h.push(n[E]),m[E]=k,E++}return h=h.sort(function(le,q){return le[r]>q[r]}),h}function ae(n,r){for(var i,h,m=r[0].toUpperCase()+r.slice(1),E=0;E<t.length;){if(i=t[E],h=i?i+m:r,h in n)return h;E++}return a}var oe=1;function U(){return oe++}function N(n){var r=n.ownerDocument||n;return r.defaultView||r.parentWindow||f}var S=/mobile|tablet|ip(ad|hone|od)|android/i,F="ontouchstart"in f,H=ae(f,"PointerEvent")!==a,re=F&&S.test(navigator.userAgent),G="touch",V="pen",K="mouse",Y="kinect",B=25,L=1,ee=2,j=4,X=8,Ae=1,we=2,Me=4,Oe=8,Ee=16,se=we|Me,he=Oe|Ee,Ue=se|he,Fe=["x","y"],Ce=["clientX","clientY"];function ie(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()}ie.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 Xe(n){var r,i=n.options.inputClass;return i?r=i:H?r=lt:re?r=Ze:F?r=ct:r=Ke,new r(n,We)}function We(n,r,i){var h=i.pointers.length,m=i.changedPointers.length,E=r&L&&h-m===0,k=r&(j|X)&&h-m===0;i.isFirst=!!E,i.isFinal=!!k,E&&(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=Z(r)),m>1&&!i.firstMultiple?i.firstMultiple=Z(r):m===1&&(i.firstMultiple=!1);var E=i.firstInput,k=i.firstMultiple,J=k?k.center:E.center,le=r.center=pe(h);r.timeStamp=d(),r.deltaTime=r.timeStamp-E.timeStamp,r.angle=st(J,le),r.distance=qe(J,le),R(i,r),r.offsetDirection=ge(r.deltaX,r.deltaY);var q=Ve(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=q.x,r.overallVelocityY=q.y,r.overallVelocity=g(q.x)>g(q.y)?q.x:q.y,r.scale=k?Xt(k.pointers,h):1,r.rotation=k?Gt(k.pointers,h):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,W(i,r);var ve=n.element;te(r.srcEvent.target,ve)&&(ve=r.srcEvent.target),r.target=ve}function R(n,r){var i=r.center,h=n.offsetDelta||{},m=n.prevDelta||{},E=n.prevInput||{};(r.eventType===L||E.eventType===j)&&(m=n.prevDelta={x:E.deltaX||0,y:E.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 W(n,r){var i=n.lastInterval||r,h=r.timeStamp-i.timeStamp,m,E,k,J;if(r.eventType!=X&&(h>B||i.velocity===a)){var le=r.deltaX-i.deltaX,q=r.deltaY-i.deltaY,ve=Ve(h,le,q);E=ve.x,k=ve.y,m=g(ve.x)>g(ve.y)?ve.x:ve.y,J=ge(le,q),n.lastInterval=r}else m=i.velocity,E=i.velocityX,k=i.velocityY,J=i.direction;r.velocity=m,r.velocityX=E,r.velocityY=k,r.direction=J}function Z(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:pe(r),deltaX:n.deltaX,deltaY:n.deltaY}}function pe(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 Ve(n,r,i){return{x:r/n||0,y:i/n||0}}function ge(n,r){return n===r?Ae:g(n)>=g(r)?n<0?we:Me:r<0?Oe:Ee}function qe(n,r,i){i||(i=Fe);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.sqrt(h*h+m*m)}function st(n,r,i){i||(i=Fe);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.atan2(m,h)*180/Math.PI}function Gt(n,r){return st(r[1],r[0],Ce)+st(n[1],n[0],Ce)}function Xt(n,r){return qe(r[0],r[1],Ce)/qe(n[0],n[1],Ce)}var Wt={mousedown:L,mousemove:ee,mouseup:j},qt="mousedown",Kt="mousemove mouseup";function Ke(){this.evEl=qt,this.evWin=Kt,this.pressed=!1,ie.apply(this,arguments)}b(Ke,ie,{handler:function(r){var i=Wt[r.type];i&L&&(r.button===0||r.button===2)&&(this.pressed=!0),i&ee&&r.which!==1&&(i=j),this.pressed&&(i&j&&(this.pressed=!1),this.callback(this.manager,i,{pointers:[r],changedPointers:[r],pointerType:K,srcEvent:r}))}});var xt={pointerdown:L,pointermove:ee,pointerup:j,pointercancel:X,pointerout:X},Zt={2:G,3:V,4:K,5:Y},At="pointerdown",Mt="pointermove pointerup pointercancel";f.MSPointerEvent&&!f.PointerEvent&&(At="MSPointerDown",Mt="MSPointerMove MSPointerUp MSPointerCancel");function lt(){this.evEl=At,this.evWin=Mt,ie.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(lt,ie,{handler:function(r){var i=this.store,h=!1,m=!1,E=r.type.toLowerCase().replace("ms",""),k=xt[E],J=Zt[r.pointerType]||r.pointerType,le=J==G,q=ce(i,r.pointerId,"pointerId");k&L&&(r.button===0||r.button===2||le)?q<0&&(i.push(r),q=i.length-1):k&(j|X)?h=!0:!le&&r.buttons===0&&(h=!0,m=!0,k=xt.pointerup),!(q<0)&&(m||(i[q]=r),this.callback(this.manager,k,{pointers:i,changedPointers:[r],pointerType:J,srcEvent:i[q]}),h&&i.splice(q,1))}});var Qt={touchstart:L,touchmove:ee,touchend:j,touchcancel:X},Jt="touchstart",$t="touchstart touchmove touchend touchcancel";function Ot(){this.evTarget=Jt,this.evWin=$t,this.started=!1,ie.apply(this,arguments)}b(Ot,ie,{handler:function(r){var i=Qt[r.type];if(i===L&&(this.started=!0),!!this.started){var h=en.call(this,r,i);i&(j|X)&&h[0].length-h[1].length===0&&(this.started=!1),this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:G,srcEvent:r})}}});function en(n,r){var i=me(n.touches),h=me(n.changedTouches);return r&(j|X)&&(i=xe(i.concat(h),"identifier")),[i,h]}var tn={touchstart:L,touchmove:ee,touchend:j,touchcancel:X},nn="touchstart touchmove touchend touchcancel";function Ze(){this.evTarget=nn,this.targetIds={},ie.apply(this,arguments)}b(Ze,ie,{handler:function(r){var i=tn[r.type],h=rn.call(this,r,i);h&&this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:G,srcEvent:r})}});function rn(n,r){var i=me(n.touches),h=this.targetIds;if(r&(L|ee)&&i.length===1)return h[i[0].identifier]=!0,[i,i];var m,E,k=me(n.changedTouches),J=[],le=this.target;if(E=i.filter(function(q){return te(q.target,le)}),r===L)for(m=0;m<E.length;)h[E[m].identifier]=!0,m++;for(m=0;m<k.length;)h[k[m].identifier]&&J.push(k[m]),r&(j|X)&&delete h[k[m].identifier],m++;if(J.length)return[xe(E.concat(J),"identifier"),J]}var an=2500,Ct=25;function ct(){ie.apply(this,arguments);var n=y(this.handler,this);this.touch=new Ze(this.manager,n),this.mouse=new Ke(this.manager,n),this.primaryTouch=null,this.lastTouches=[]}b(ct,ie,{handler:function(r,i,h){var m=h.pointerType==G,E=h.pointerType==K;if(!(E&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(m)on.call(this,i,h);else if(E&&sn.call(this,h))return;this.callback(r,i,h)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function on(n,r){n&L?(this.primaryTouch=r.changedPointers[0].identifier,_t.call(this,r)):n&(j|X)&&_t.call(this,r)}function _t(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 E=h.indexOf(i);E>-1&&h.splice(E,1)};setTimeout(m,an)}}function sn(n){for(var r=n.srcEvent.clientX,i=n.srcEvent.clientY,h=0;h<this.lastTouches.length;h++){var m=this.lastTouches[h],E=Math.abs(r-m.x),k=Math.abs(i-m.y);if(E<=Ct&&k<=Ct)return!0}return!1}var St=s?ae(s.style,"touchAction"):a,It=St!==a,Nt="compute",kt="auto",ut="manipulation",_e="none",Be="pan-x",Ye="pan-y",Qe=cn();function ht(n,r){this.manager=n,this.set(r)}ht.prototype={set:function(n){n==Nt&&(n=this.compute()),It&&this.manager.element.style&&Qe[n]&&(this.manager.element.style[St]=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()))}),ln(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=Q(h,_e)&&!Qe[_e],E=Q(h,Ye)&&!Qe[Ye],k=Q(h,Be)&&!Qe[Be];if(m){var J=n.pointers.length===1,le=n.distance<2,q=n.deltaTime<250;if(J&&le&&q)return}if(!(k&&E)&&(m||E&&i&se||k&&i&he))return this.preventSrc(r)},preventSrc:function(n){this.manager.session.prevented=!0,n.preventDefault()}};function ln(n){if(Q(n,_e))return _e;var r=Q(n,Be),i=Q(n,Ye);return r&&i?_e:r||i?r?Be:Ye:Q(n,ut)?ut:kt}function cn(){if(!It)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 Je=1,ue=2,Se=4,Pe=8,ye=Pe,He=16,de=32;function be(n){this.options=C({},this.defaults,n||{}),this.id=U(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=Je,this.simultaneous={},this.requireFail=[]}be.prototype={defaults:{},set:function(n){return C(this.options,n),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(n){if(T(n,"recognizeWith",this))return this;var r=this.simultaneous;return n=$e(n,this),r[n.id]||(r[n.id]=n,n.recognizeWith(this)),this},dropRecognizeWith:function(n){return T(n,"dropRecognizeWith",this)?this:(n=$e(n,this),delete this.simultaneous[n.id],this)},requireFailure:function(n){if(T(n,"requireFailure",this))return this;var r=this.requireFail;return n=$e(n,this),ce(r,n)===-1&&(r.push(n),n.requireFailure(this)),this},dropRequireFailure:function(n){if(T(n,"dropRequireFailure",this))return this;n=$e(n,this);var r=ce(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<Pe&&h(r.options.event+Lt(i)),h(r.options.event),n.additionalEvent&&h(n.additionalEvent),i>=Pe&&h(r.options.event+Lt(i))},tryEmit:function(n){if(this.canEmit())return this.emit(n);this.state=de},canEmit:function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(de|Je)))return!1;n++}return!0},recognize:function(n){var r=C({},n);if(!x(this.options.enable,[this,r])){this.reset(),this.state=de;return}this.state&(ye|He|de)&&(this.state=Je),this.state=this.process(r),this.state&(ue|Se|Pe|He)&&this.tryEmit(r)},process:function(n){},getTouchAction:function(){},reset:function(){}};function Lt(n){return n&He?"cancel":n&Pe?"end":n&Se?"move":n&ue?"start":""}function Dt(n){return n==Ee?"down":n==Oe?"up":n==we?"left":n==Me?"right":""}function $e(n,r){var i=r.manager;return i?i.get(n):n}function fe(){be.apply(this,arguments)}b(fe,be,{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&(ue|Se),m=this.attrTest(n);return h&&(i&X||!m)?r|He:h||m?i&j?r|Pe:r&ue?r|Se:ue:de}});function et(){fe.apply(this,arguments),this.pX=null,this.pY=null}b(et,fe,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ue},getTouchAction:function(){var n=this.options.direction,r=[];return n&se&&r.push(Ye),n&he&&r.push(Be),r},directionTest:function(n){var r=this.options,i=!0,h=n.distance,m=n.direction,E=n.deltaX,k=n.deltaY;return m&r.direction||(r.direction&se?(m=E===0?Ae:E<0?we:Me,i=E!=this.pX,h=Math.abs(n.deltaX)):(m=k===0?Ae:k<0?Oe:Ee,i=k!=this.pY,h=Math.abs(n.deltaY))),n.direction=m,i&&h>r.threshold&&m&r.direction},attrTest:function(n){return fe.prototype.attrTest.call(this,n)&&(this.state&ue||!(this.state&ue)&&this.directionTest(n))},emit:function(n){this.pX=n.deltaX,this.pY=n.deltaY;var r=Dt(n.direction);r&&(n.additionalEvent=this.options.event+r),this._super.emit.call(this,n)}});function ft(){fe.apply(this,arguments)}b(ft,fe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&ue)},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 pt(){be.apply(this,arguments),this._timer=null,this._input=null}b(pt,be,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[kt]},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&(j|X)&&!m)this.reset();else if(n.eventType&L)this.reset(),this._timer=v(function(){this.state=ye,this.tryEmit()},r.time,this);else if(n.eventType&j)return ye;return de},reset:function(){clearTimeout(this._timer)},emit:function(n){this.state===ye&&(n&&n.eventType&j?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function dt(){fe.apply(this,arguments)}b(dt,fe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&ue)}});function vt(){fe.apply(this,arguments)}b(vt,fe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:se|he,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(n){var r=this.options.direction,i;return r&(se|he)?i=n.overallVelocity:r&se?i=n.overallVelocityX:r&he&&(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&j},emit:function(n){var r=Dt(n.offsetDirection);r&&this.manager.emit(this.options.event+r,n),this.manager.emit(this.options.event,n)}});function tt(){be.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(tt,be,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ut]},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!=j)return this.failTimeout();var E=this.pTime?n.timeStamp-this.pTime<r.interval:!0,k=!this.pCenter||qe(this.pCenter,n.center)<r.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!k||!E?this.count=1:this.count+=1,this._input=n;var J=this.count%r.taps;if(J===0)return this.hasRequireFailures()?(this._timer=v(function(){this.state=ye,this.tryEmit()},r.interval,this),ue):ye}return de},failTimeout:function(){return this._timer=v(function(){this.state=de},this.options.interval,this),de},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ye&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ie(n,r){return r=r||{},r.recognizers=p(r.recognizers,Ie.defaults.preset),new mt(n,r)}Ie.VERSION="2.0.7",Ie.defaults={domEvents:!1,touchAction:Nt,enable:!0,inputTarget:null,inputClass:null,preset:[[dt,{enable:!1}],[ft,{enable:!1},["rotate"]],[vt,{direction:se}],[et,{direction:se},["swipe"]],[tt],[tt,{event:"doubletap",taps:2},["tap"]],[pt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var un=1,Rt=2;function mt(n,r){this.options=C({},Ie.defaults,r||{}),this.options.inputTarget=this.options.inputTarget||n,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=n,this.input=Xe(this),this.touchAction=new ht(this,this.options.touchAction),Ut(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)}mt.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?Rt:un},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&ye)&&(m=r.curRecognizer=null);for(var E=0;E<h.length;)i=h[E],r.stopped!==Rt&&(!m||i==m||i.canRecognizeWith(m))?i.recognize(n):i.reset(),!m&&i.state&(ue|Se|Pe)&&(m=r.curRecognizer=i),E++}},get:function(n){if(n instanceof be)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(T(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(T(n,"remove",this))return this;if(n=this.get(n),n){var r=this.recognizers,i=ce(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(ne(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(ne(n),function(h){r?i[h]&&i[h].splice(ce(i[h],r),1):delete i[h]}),this}},emit:function(n,r){this.options.domEvents&&hn(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&&Ut(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Ut(n,r){var i=n.element;if(i.style){var h;A(n.options.cssProps,function(m,E){h=ae(i.style,E),r?(n.oldCssProps[h]=i.style[h],i.style[h]=m):i.style[h]=n.oldCssProps[h]||""}),r||(n.oldCssProps={})}}function hn(n,r){var i=o.createEvent("Event");i.initEvent(n,!0,!0),i.gesture=r,r.target.dispatchEvent(i)}return C(Ie,{INPUT_START:L,INPUT_MOVE:ee,INPUT_END:j,INPUT_CANCEL:X,STATE_POSSIBLE:Je,STATE_BEGAN:ue,STATE_CHANGED:Se,STATE_ENDED:Pe,STATE_RECOGNIZED:ye,STATE_CANCELLED:He,STATE_FAILED:de,DIRECTION_NONE:Ae,DIRECTION_LEFT:we,DIRECTION_RIGHT:Me,DIRECTION_UP:Oe,DIRECTION_DOWN:Ee,DIRECTION_HORIZONTAL:se,DIRECTION_VERTICAL:he,DIRECTION_ALL:Ue,Manager:mt,Input:ie,TouchAction:ht,TouchInput:Ze,MouseInput:Ke,PointerEventInput:lt,TouchMouseInput:ct,SingleTouchInput:Ot,Recognizer:be,AttrRecognizer:fe,Tap:tt,Pan:et,Swipe:vt,Pinch:ft,Rotate:dt,Press:pt,on:I,off:M,each:A,merge:D,extend:O,assign:C,inherit:b,bindFn:y,prefixed:ae}),Ie}(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,R=new _.Quaternion().setFromUnitVectors(f.up,new _.Vector3(0,1,0)),W=R.clone().inverse(),Z=new _.Vector3,pe=new _.Quaternion;return function(){var ge=e.object.position;return u.copy(ge).sub(e.target),u.applyQuaternion(R),d.setFromVector3(u),e.autoRotate&&l===c.NONE&&ne(te()),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*=T,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(W),ge.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)),T=1,P||Z.distanceToSquared(e.object.position)>g||8*(1-pe.dot(e.object.quaternion))>g?(e.dispatchEvent(a),Z.copy(e.object.position),pe.copy(e.object.quaternion),P=!1,!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",We,!1),e.domElement.removeEventListener("mousedown",Ee,!1),e.domElement.removeEventListener("wheel",Ue,!1),e.domElement.removeEventListener("touchstart",Ce,!1),e.domElement.removeEventListener("touchend",Xe,!1),e.domElement.removeEventListener("touchmove",ie,!1),document.removeEventListener("mousemove",se,!1),document.removeEventListener("mouseup",he,!1),e.domElement.removeEventListener("keydown",Fe,!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,T=1,A=new _.Vector3,P=!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 te(){return 2*Math.PI/60/60*e.autoRotateSpeed}function Q(){return Math.pow(.95,e.zoomSpeed)}function ne(u){v.theta-=u}function ce(u){v.phi-=u}var me=function(){var u=new _.Vector3;return function(W,Z){u.setFromMatrixColumn(Z,0),u.multiplyScalar(-W),A.add(u)}}(),xe=function(){var u=new _.Vector3;return function(W,Z){e.screenSpacePanning===!0?u.setFromMatrixColumn(Z,1):(u.setFromMatrixColumn(Z,0),u.crossVectors(e.object.up,u)),u.multiplyScalar(W),A.add(u)}}(),ae=function(){var u=new _.Vector3;return function(W,Z){var pe=e.domElement;if(e.object.isPerspectiveCamera){var Ve=e.object.position;u.copy(Ve).sub(e.target);var ge=u.length();ge*=Math.tan(e.object.fov/2*Math.PI/180),me(2*W*ge/pe.clientHeight,e.object.matrix),xe(2*Z*ge/pe.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(me(W*(e.object.right-e.object.left)/e.object.zoom/pe.clientWidth,e.object.matrix),xe(Z*(e.object.top-e.object.bottom)/e.object.zoom/pe.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function oe(u){e.object.isPerspectiveCamera?T/=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom*u)),e.object.updateProjectionMatrix(),P=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function U(u){e.object.isPerspectiveCamera?T*=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),P=!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 F(u){b.set(u.clientX,u.clientY)}function H(u){O.set(u.clientX,u.clientY),D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var R=e.domElement;ne(2*Math.PI*D.x/R.clientHeight),ce(2*Math.PI*D.y/R.clientHeight),C.copy(O),e.update()}function re(u){I.set(u.clientX,u.clientY),M.subVectors(I,p),M.y>0?oe(Q()):M.y<0&&U(Q()),p.copy(I),e.update()}function G(u){y.set(u.clientX,u.clientY),x.subVectors(y,b).multiplyScalar(e.panSpeed),ae(x.x,x.y),b.copy(y),e.update()}function V(u){u.deltaY<0?U(Q()):u.deltaY>0&&oe(Q()),e.update()}function K(u){var R=!1;switch(u.keyCode){case e.keys.UP:ae(0,e.keyPanSpeed),R=!0;break;case e.keys.BOTTOM:ae(0,-e.keyPanSpeed),R=!0;break;case e.keys.LEFT:ae(e.keyPanSpeed,0),R=!0;break;case e.keys.RIGHT:ae(-e.keyPanSpeed,0),R=!0;break}R&&(u.preventDefault(),e.update())}function Y(u){if(u.touches.length==1)C.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);C.set(R,W)}}function B(u){if(u.touches.length==1)b.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);b.set(R,W)}}function L(u){var R=u.touches[0].pageX-u.touches[1].pageX,W=u.touches[0].pageY-u.touches[1].pageY,Z=Math.sqrt(R*R+W*W);p.set(0,Z)}function ee(u){e.enableZoom&&L(u),e.enablePan&&B(u)}function j(u){e.enableZoom&&L(u),e.enableRotate&&Y(u)}function X(u){if(u.touches.length==1)O.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);O.set(R,W)}D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var Z=e.domElement;ne(2*Math.PI*D.x/Z.clientHeight),ce(2*Math.PI*D.y/Z.clientHeight),C.copy(O)}function Ae(u){if(u.touches.length==1)y.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);y.set(R,W)}x.subVectors(y,b).multiplyScalar(e.panSpeed),ae(x.x,x.y),b.copy(y)}function we(u){var R=u.touches[0].pageX-u.touches[1].pageX,W=u.touches[0].pageY-u.touches[1].pageY,Z=Math.sqrt(R*R+W*W);I.set(0,Z),M.set(0,Math.pow(I.y/p.y,e.zoomSpeed)),oe(M.y),p.copy(I)}function Me(u){e.enableZoom&&we(u),e.enablePan&&Ae(u)}function Oe(u){e.enableZoom&&we(u),e.enableRotate&&X(u)}function Ee(u){if(e.enabled!==!1){u.preventDefault(),e.domElement.focus?e.domElement.focus():window.focus();var R;switch(u.button){case 0:R=e.mouseButtons.LEFT;break;case 1:R=e.mouseButtons.MIDDLE;break;case 2:R=e.mouseButtons.RIGHT;break;default:R=-1}switch(R){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;F(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;F(u),l=c.PAN}break;default:l=c.NONE}l!==c.NONE&&(document.addEventListener("mousemove",se,!1),document.addEventListener("mouseup",he,!1),e.dispatchEvent(t))}}function se(u){if(e.enabled!==!1)switch(u.preventDefault(),l){case c.ROTATE:if(e.enableRotate===!1)return;H(u);break;case c.DOLLY:if(e.enableZoom===!1)return;re(u);break;case c.PAN:if(e.enablePan===!1)return;G(u);break}}function he(u){e.enabled!==!1&&(document.removeEventListener("mousemove",se,!1),document.removeEventListener("mouseup",he,!1),e.dispatchEvent(s),l=c.NONE)}function Ue(u){e.enabled===!1||e.enableZoom===!1||l!==c.NONE&&l!==c.ROTATE||(u.preventDefault(),u.stopPropagation(),e.dispatchEvent(t),V(u),e.dispatchEvent(s))}function Fe(u){e.enabled===!1||e.enableKeys===!1||e.enablePan===!1||K(u)}function Ce(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;B(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;ee(u),l=c.TOUCH_DOLLY_PAN;break;case _.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;j(u),l=c.TOUCH_DOLLY_ROTATE;break;default:l=c.NONE}break;default:l=c.NONE}l!==c.NONE&&e.dispatchEvent(t)}}function ie(u){if(e.enabled!==!1)switch(u.preventDefault(),u.stopPropagation(),l){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;X(u),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;Ae(u),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Me(u),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Oe(u),e.update();break;default:l=c.NONE}}function Xe(u){e.enabled!==!1&&(e.dispatchEvent(s),l=c.NONE)}function We(u){e.enabled!==!1&&u.preventDefault()}e.domElement.addEventListener("contextmenu",We,!1),e.domElement.addEventListener("mousedown",Ee,!1),e.domElement.addEventListener("wheel",Ue,!1),e.domElement.addEventListener("touchstart",Ce,!1),e.domElement.addEventListener("touchend",Xe,!1),e.domElement.addEventListener("touchmove",ie,!1),e.domElement.addEventListener("keydown",Fe,!1),e.domElement.tabIndex===-1&&(e.domElement.tabIndex=0),this.update()};De.prototype=Object.create(_.EventDispatcher.prototype);De.prototype.constructor=De;var Pt=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};Pt.prototype=Object.create(_.EventDispatcher.prototype);Pt.prototype.constructor=Pt;var Te=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)})})};Te.prototype=Object.create(_.Object3D.prototype);Te.prototype.constructor=Te;var ot=function(f){Te.call(this,f)};ot.prototype=Object.create(Te.prototype);ot.prototype.constructor=ot;var jt=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 T(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 P(b,y,x,p){if(b instanceof Te){b.onBeforeRender(f,y,x);var I;b instanceof ot?(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,te=c.objects.get(b);if(te===void 0||te.style!==I){M.style.WebkitTransform=I,M.style.transform=I;var Q={style:I};d&&(Q.distanceToCameraSquared=C(x,b)),c.objects.set(b,Q)}M.style.display=b.visible?"":"none",M.parentNode!==g&&g.appendChild(M),b.onAfterRender(f,y,x)}for(var ne=0,ce=b.children.length;ne<ce;ne++)P(b.children[ne],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 Te&&y.push(x)}),y}function D(b){for(var y=O(b).sort(function(M,te){var Q=c.objects.get(M).distanceToCameraSquared,ne=c.objects.get(te).distanceToCameraSquared;return Q-ne}),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)"+T(y.matrixWorldInverse):"translateZ("+x+"px)"+T(y.matrixWorldInverse),te=M+"translate("+a+"px,"+t+"px)";c.camera.style!==te&&!d&&(g.style.WebkitTransform=te,g.style.transform=te,c.camera.style=te),P(b,b,y,M),d&&D(b)}};function Bt(f,o,e){var a=o.getBoundingClientRect(),t=a.top,s=a.left,c=a.width,l=a.height;return new w.Vector2((f.x-s)/c*2-1,-(f.y-t)/l*2+1)}var zt=function(f){Re(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 T=c+1,A=T*c+1<<3,P=new w.BufferAttribute(new Float32Array(A*3),3),C=new w.BufferAttribute(new Float32Array(A*3),3),O=[],D=[];new w.Vector3;var b=new w.Vector3,y=[],x=[],p=[],I=T*c,M=T*c+1;te(),ne(),Q(),ce(),xe(),me();function te(){for(var U=[new w.Vector3(1,1,1),new w.Vector3(1,1,-1),new w.Vector3(-1,1,-1),new w.Vector3(-1,1,1),new w.Vector3(1,-1,1),new w.Vector3(1,-1,-1),new w.Vector3(-1,-1,-1),new w.Vector3(-1,-1,1)],N=0;N<8;N++)O.push([]),D.push([]);for(var S=Math.PI/2,F=new w.Vector3(g,d,v),H=0;H<=c;H++){var re=H/c,G=re*S,V=Math.cos(G),K=Math.sin(G);if(H==c){b.set(0,1,0);var Y=b.clone().multiplyScalar(s).add(F);O[0].push(Y),y.push(Y);var B=b.clone();D[0].push(B),x.push(B);continue}for(var L=0;L<=c;L++){var ee=L/c,j=ee*S;b.x=V*Math.cos(j),b.y=K,b.z=V*Math.sin(j);var Y=b.clone().multiplyScalar(s).add(F);O[0].push(Y),y.push(Y);var B=b.clone().normalize();D[0].push(B),x.push(B)}}for(var X=1;X<8;X++)for(var N=0;N<O[0].length;N++){var Y=O[0][N].clone().multiply(U[X]);O[X].push(Y),y.push(Y);var B=D[0][N].clone().multiply(U[X]);D[X].push(B),x.push(B)}}function Q(){for(var U=[!0,!1,!0,!1,!1,!0,!1,!0],N=T*(c-1),S=0;S<8;S++){for(var F=M*S,H=0;H<c-1;H++)for(var re=H*T,G=(H+1)*T,V=0;V<c;V++){var K=V+1,Y=F+re+V,B=F+re+K,L=F+G+V,ee=F+G+K;U[S]?(p.push(Y),p.push(L),p.push(B),p.push(B),p.push(L),p.push(ee)):(p.push(Y),p.push(B),p.push(L),p.push(B),p.push(ee),p.push(L))}for(var V=0;V<c;V++){var Y=F+N+V,B=F+N+V+1,L=F+I;U[S]?(p.push(Y),p.push(L),p.push(B)):(p.push(Y),p.push(B),p.push(L))}}}function ne(){var U=I,N=I+M,S=I+M*2,F=I+M*3;p.push(U),p.push(N),p.push(S),p.push(U),p.push(S),p.push(F),U=I+M*4,N=I+M*5,S=I+M*6,F=I+M*7,p.push(U),p.push(S),p.push(N),p.push(U),p.push(F),p.push(S),U=0,N=M,S=M*4,F=M*5,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(F),U=M*2,N=M*3,S=M*6,F=M*7,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(F),U=c,N=c+M*3,S=c+M*4,F=c+M*7,p.push(U),p.push(N),p.push(S),p.push(N),p.push(F),p.push(S),U=c+M,N=c+M*2,S=c+M*5,F=c+M*6,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(F)}function ce(){for(var U=0;U<4;U++)for(var N=U*M,S=4*M+N,F=(U&1)===1,H=0;H<c;H++){var re=H+1,G=N+H,V=N+re,K=S+H,Y=S+re;F?(p.push(G),p.push(K),p.push(V),p.push(V),p.push(K),p.push(Y)):(p.push(G),p.push(V),p.push(K),p.push(V),p.push(Y),p.push(K))}}function me(){for(var U=[0,2,4,6],N=[1,3,5,7],S=0;S<4;S++)for(var F=M*U[S],H=M*N[S],re=1>=S,G=0;G<c;G++){var V=G*T,K=(G+1)*T,Y=F+V,B=F+K,L=H+V,ee=H+K;re?(p.push(Y),p.push(L),p.push(B),p.push(B),p.push(L),p.push(ee)):(p.push(Y),p.push(B),p.push(L),p.push(B),p.push(ee),p.push(L))}}function xe(){for(var U=c-1,N=[0,1,4,5],S=[3,2,7,6],F=[0,1,1,0],H=0;H<4;H++)for(var re=N[H]*M,G=S[H]*M,V=0;V<=U;V++){var K=re+c+V*T,Y=re+(V!=U?c+(V+1)*T:M-1),B=G+c+V*T,L=G+(V!=U?c+(V+1)*T:M-1);F[H]?(p.push(K),p.push(B),p.push(Y),p.push(Y),p.push(B),p.push(L)):(p.push(K),p.push(Y),p.push(B),p.push(Y),p.push(L),p.push(B))}}for(var ae=0,oe=0;oe<y.length;oe++)P.setXYZ(ae,y[oe].x,y[oe].y,y[oe].z),C.setXYZ(ae,x[oe].x,x[oe].y,x[oe].z),ae++;return l.setIndex(new w.BufferAttribute(new Uint16Array(p),1)),l.setAttribute("position",P),l.setAttribute("normal",C),l}return o}(w.BufferGeometry);function je(f,o){return typeof f!="number"||typeof o!="number"?!1:Math.abs(f-o)<.001}function ze(f,o,e,a){a===void 0&&(a=function(s){return s});var t=a(e);return f*(1-t)+o*t}var $=Number((Math.PI/2).toFixed(5));function On(f,o,e){var a=new w.Shape;return a.moveTo(e,0),a.lineTo(f-e,0),a.absarc(f-e,e,e,-$,0,!1),a.lineTo(f,o-e),a.absarc(f-e,o-e,e,0,$,!1),a.lineTo(e,o),a.absarc(e,o-e,e,$,Math.PI,!1),a.lineTo(0,e),a.absarc(e,e,e,Math.PI,Math.PI*1.5,!1),a}var Ge=function(f){var o=document.createElement("div");o.innerText=f;var e=new Te(o);return e.name=f,e.scale.set(.3,.3,.3),o.style.pointerEvents="none",o.style.backfaceVisibility="hidden",e},nt=function(f){var o=new w.PlaneGeometry(5,5),e=new w.MeshBasicMaterial({transparent:!0,opacity:0}),a=new w.Mesh(o,e),t=document.createElement("div");t.innerText=f;var s=new Te(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(-$),a.add(s),a},Cn=function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;t.camera=new Ne.Camera(90),t.scene=new w.Scene,t.renderer=new w.WebGLRenderer({antialias:!0,alpha:!0}),t.css3drenderer=new jt,t.ambientLight=new w.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 w.DirectionalLight(16777215,.2),t.box=new w.Mesh(new zt(8,8,8,.5,20),new w.MeshPhongMaterial({color:16777215})),t.faces=new w.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,T;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,P=A.longitude,C=A.latitude;t.five.setState({longitude:P,latitude:C},!0),t.updateArrows({longitude:P,latitude:C})}else if(t.spherical&&(!je(t.spherical.pi,(g=t.controls)===null||g===void 0?void 0:g.getPolarAngle())||!je(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:(T=t.controls)===null||T===void 0?void 0:T.getAzimuthalAngle()},t.camera.computePose(),t.updateByCamera();var O=t.camera.pose,P=O.longitude,C=O.latitude;t.five.setState({longitude:P,latitude:C},!0),t.updateArrows({longitude:P,latitude:C})}else t.spherical=null},t.onTapGesture=function(l){var g=l.pointers[0].clientX,d=l.pointers[0].clientY,v=Bt({x:g,y:d},t.wrapper),T=new w.Raycaster;T.setFromCamera(v,t.camera);var A=T.intersectObjects(t.faces.children,!1)[0];if(A){var P=A.object.userData,C=P.longitude,O=P.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:$)},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 w.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=Bt({x:l.clientX,y:l.clientY},t.wrapper),d=new w.Raycaster;d.setFromCamera(g,t.camera);var v=d.intersectObjects(t.faces.children,!1)[0];t.faces.children.forEach(function(T){T.material.opacity=0,T.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 yt.Manager(t.wrapper),t.mc.add(new yt.Tap({interval:410})),t.mc.add(new yt.Pan({threshold:10,pointers:0})),t.camera.setFromPose({distance:20,offset:new w.Vector3(0,0,0),longitude:e.camera.pose.latitude,latitude:e.camera.pose.latitude}),t.cylinder=new w.Mesh(new w.CylinderGeometry(13.2,14,.01,50,1,!0),new w.ShaderMaterial({uniforms:{radiusTop:{value:13.2},radiusBottom:{value:14},opacity:{value:1}},vertexShader:`
|
|
356
|
+
`;return function(){var m=new Error("get-stack-trace"),E=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,E),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 E in m)m.hasOwnProperty(E)&&(i[E]=m[E])}return i}:C=Object.assign;var O=P(function(r,i,h){for(var m=Object.keys(i),E=0;E<m.length;)(!h||h&&r[m[E]]===a)&&(r[m[E]]=i[m[E]]),E++;return r},"extend","Use `assign`."),D=P(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(ne(r),function(h){n.addEventListener(h,i,!1)})}function M(n,r,i){A(ne(r),function(h){n.removeEventListener(h,i,!1)})}function te(n,r){for(;n;){if(n==r)return!0;n=n.parentNode}return!1}function Q(n,r){return n.indexOf(r)>-1}function ne(n){return n.trim().split(/\s+/g)}function ce(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 me(n){return Array.prototype.slice.call(n,0)}function xe(n,r,i){for(var h=[],m=[],E=0;E<n.length;){var k=n[E][r];ce(m,k)<0&&h.push(n[E]),m[E]=k,E++}return h=h.sort(function(le,q){return le[r]>q[r]}),h}function ae(n,r){for(var i,h,m=r[0].toUpperCase()+r.slice(1),E=0;E<t.length;){if(i=t[E],h=i?i+m:r,h in n)return h;E++}return a}var oe=1;function U(){return oe++}function N(n){var r=n.ownerDocument||n;return r.defaultView||r.parentWindow||f}var S=/mobile|tablet|ip(ad|hone|od)|android/i,F="ontouchstart"in f,H=ae(f,"PointerEvent")!==a,re=F&&S.test(navigator.userAgent),G="touch",V="pen",K="mouse",Y="kinect",B=25,L=1,ee=2,j=4,X=8,Ae=1,we=2,Me=4,Oe=8,Ee=16,se=we|Me,he=Oe|Ee,Ue=se|he,Fe=["x","y"],Ce=["clientX","clientY"];function ie(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()}ie.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 Xe(n){var r,i=n.options.inputClass;return i?r=i:H?r=lt:re?r=Ze:F?r=ct:r=Ke,new r(n,We)}function We(n,r,i){var h=i.pointers.length,m=i.changedPointers.length,E=r&L&&h-m===0,k=r&(j|X)&&h-m===0;i.isFirst=!!E,i.isFinal=!!k,E&&(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=Z(r)),m>1&&!i.firstMultiple?i.firstMultiple=Z(r):m===1&&(i.firstMultiple=!1);var E=i.firstInput,k=i.firstMultiple,J=k?k.center:E.center,le=r.center=pe(h);r.timeStamp=d(),r.deltaTime=r.timeStamp-E.timeStamp,r.angle=st(J,le),r.distance=qe(J,le),R(i,r),r.offsetDirection=ge(r.deltaX,r.deltaY);var q=Ve(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=q.x,r.overallVelocityY=q.y,r.overallVelocity=g(q.x)>g(q.y)?q.x:q.y,r.scale=k?Xt(k.pointers,h):1,r.rotation=k?Gt(k.pointers,h):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,W(i,r);var ve=n.element;te(r.srcEvent.target,ve)&&(ve=r.srcEvent.target),r.target=ve}function R(n,r){var i=r.center,h=n.offsetDelta||{},m=n.prevDelta||{},E=n.prevInput||{};(r.eventType===L||E.eventType===j)&&(m=n.prevDelta={x:E.deltaX||0,y:E.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 W(n,r){var i=n.lastInterval||r,h=r.timeStamp-i.timeStamp,m,E,k,J;if(r.eventType!=X&&(h>B||i.velocity===a)){var le=r.deltaX-i.deltaX,q=r.deltaY-i.deltaY,ve=Ve(h,le,q);E=ve.x,k=ve.y,m=g(ve.x)>g(ve.y)?ve.x:ve.y,J=ge(le,q),n.lastInterval=r}else m=i.velocity,E=i.velocityX,k=i.velocityY,J=i.direction;r.velocity=m,r.velocityX=E,r.velocityY=k,r.direction=J}function Z(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:pe(r),deltaX:n.deltaX,deltaY:n.deltaY}}function pe(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 Ve(n,r,i){return{x:r/n||0,y:i/n||0}}function ge(n,r){return n===r?Ae:g(n)>=g(r)?n<0?we:Me:r<0?Oe:Ee}function qe(n,r,i){i||(i=Fe);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.sqrt(h*h+m*m)}function st(n,r,i){i||(i=Fe);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.atan2(m,h)*180/Math.PI}function Gt(n,r){return st(r[1],r[0],Ce)+st(n[1],n[0],Ce)}function Xt(n,r){return qe(r[0],r[1],Ce)/qe(n[0],n[1],Ce)}var Wt={mousedown:L,mousemove:ee,mouseup:j},qt="mousedown",Kt="mousemove mouseup";function Ke(){this.evEl=qt,this.evWin=Kt,this.pressed=!1,ie.apply(this,arguments)}b(Ke,ie,{handler:function(r){var i=Wt[r.type];i&L&&(r.button===0||r.button===2)&&(this.pressed=!0),i&ee&&r.which!==1&&(i=j),this.pressed&&(i&j&&(this.pressed=!1),this.callback(this.manager,i,{pointers:[r],changedPointers:[r],pointerType:K,srcEvent:r}))}});var xt={pointerdown:L,pointermove:ee,pointerup:j,pointercancel:X,pointerout:X},Zt={2:G,3:V,4:K,5:Y},At="pointerdown",Mt="pointermove pointerup pointercancel";f.MSPointerEvent&&!f.PointerEvent&&(At="MSPointerDown",Mt="MSPointerMove MSPointerUp MSPointerCancel");function lt(){this.evEl=At,this.evWin=Mt,ie.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(lt,ie,{handler:function(r){var i=this.store,h=!1,m=!1,E=r.type.toLowerCase().replace("ms",""),k=xt[E],J=Zt[r.pointerType]||r.pointerType,le=J==G,q=ce(i,r.pointerId,"pointerId");k&L&&(r.button===0||r.button===2||le)?q<0&&(i.push(r),q=i.length-1):k&(j|X)?h=!0:!le&&r.buttons===0&&(h=!0,m=!0,k=xt.pointerup),!(q<0)&&(m||(i[q]=r),this.callback(this.manager,k,{pointers:i,changedPointers:[r],pointerType:J,srcEvent:i[q]}),h&&i.splice(q,1))}});var Qt={touchstart:L,touchmove:ee,touchend:j,touchcancel:X},Jt="touchstart",$t="touchstart touchmove touchend touchcancel";function Ot(){this.evTarget=Jt,this.evWin=$t,this.started=!1,ie.apply(this,arguments)}b(Ot,ie,{handler:function(r){var i=Qt[r.type];if(i===L&&(this.started=!0),!!this.started){var h=en.call(this,r,i);i&(j|X)&&h[0].length-h[1].length===0&&(this.started=!1),this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:G,srcEvent:r})}}});function en(n,r){var i=me(n.touches),h=me(n.changedTouches);return r&(j|X)&&(i=xe(i.concat(h),"identifier")),[i,h]}var tn={touchstart:L,touchmove:ee,touchend:j,touchcancel:X},nn="touchstart touchmove touchend touchcancel";function Ze(){this.evTarget=nn,this.targetIds={},ie.apply(this,arguments)}b(Ze,ie,{handler:function(r){var i=tn[r.type],h=rn.call(this,r,i);h&&this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:G,srcEvent:r})}});function rn(n,r){var i=me(n.touches),h=this.targetIds;if(r&(L|ee)&&i.length===1)return h[i[0].identifier]=!0,[i,i];var m,E,k=me(n.changedTouches),J=[],le=this.target;if(E=i.filter(function(q){return te(q.target,le)}),r===L)for(m=0;m<E.length;)h[E[m].identifier]=!0,m++;for(m=0;m<k.length;)h[k[m].identifier]&&J.push(k[m]),r&(j|X)&&delete h[k[m].identifier],m++;if(J.length)return[xe(E.concat(J),"identifier"),J]}var an=2500,Ct=25;function ct(){ie.apply(this,arguments);var n=y(this.handler,this);this.touch=new Ze(this.manager,n),this.mouse=new Ke(this.manager,n),this.primaryTouch=null,this.lastTouches=[]}b(ct,ie,{handler:function(r,i,h){var m=h.pointerType==G,E=h.pointerType==K;if(!(E&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(m)on.call(this,i,h);else if(E&&sn.call(this,h))return;this.callback(r,i,h)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function on(n,r){n&L?(this.primaryTouch=r.changedPointers[0].identifier,_t.call(this,r)):n&(j|X)&&_t.call(this,r)}function _t(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 E=h.indexOf(i);E>-1&&h.splice(E,1)};setTimeout(m,an)}}function sn(n){for(var r=n.srcEvent.clientX,i=n.srcEvent.clientY,h=0;h<this.lastTouches.length;h++){var m=this.lastTouches[h],E=Math.abs(r-m.x),k=Math.abs(i-m.y);if(E<=Ct&&k<=Ct)return!0}return!1}var St=s?ae(s.style,"touchAction"):a,It=St!==a,Nt="compute",kt="auto",ut="manipulation",_e="none",Be="pan-x",Ye="pan-y",Qe=cn();function ht(n,r){this.manager=n,this.set(r)}ht.prototype={set:function(n){n==Nt&&(n=this.compute()),It&&this.manager.element.style&&Qe[n]&&(this.manager.element.style[St]=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()))}),ln(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=Q(h,_e)&&!Qe[_e],E=Q(h,Ye)&&!Qe[Ye],k=Q(h,Be)&&!Qe[Be];if(m){var J=n.pointers.length===1,le=n.distance<2,q=n.deltaTime<250;if(J&&le&&q)return}if(!(k&&E)&&(m||E&&i&se||k&&i&he))return this.preventSrc(r)},preventSrc:function(n){this.manager.session.prevented=!0,n.preventDefault()}};function ln(n){if(Q(n,_e))return _e;var r=Q(n,Be),i=Q(n,Ye);return r&&i?_e:r||i?r?Be:Ye:Q(n,ut)?ut:kt}function cn(){if(!It)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 Je=1,ue=2,Se=4,Pe=8,ye=Pe,He=16,de=32;function be(n){this.options=C({},this.defaults,n||{}),this.id=U(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=Je,this.simultaneous={},this.requireFail=[]}be.prototype={defaults:{},set:function(n){return C(this.options,n),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(n){if(T(n,"recognizeWith",this))return this;var r=this.simultaneous;return n=$e(n,this),r[n.id]||(r[n.id]=n,n.recognizeWith(this)),this},dropRecognizeWith:function(n){return T(n,"dropRecognizeWith",this)?this:(n=$e(n,this),delete this.simultaneous[n.id],this)},requireFailure:function(n){if(T(n,"requireFailure",this))return this;var r=this.requireFail;return n=$e(n,this),ce(r,n)===-1&&(r.push(n),n.requireFailure(this)),this},dropRequireFailure:function(n){if(T(n,"dropRequireFailure",this))return this;n=$e(n,this);var r=ce(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<Pe&&h(r.options.event+Lt(i)),h(r.options.event),n.additionalEvent&&h(n.additionalEvent),i>=Pe&&h(r.options.event+Lt(i))},tryEmit:function(n){if(this.canEmit())return this.emit(n);this.state=de},canEmit:function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(de|Je)))return!1;n++}return!0},recognize:function(n){var r=C({},n);if(!x(this.options.enable,[this,r])){this.reset(),this.state=de;return}this.state&(ye|He|de)&&(this.state=Je),this.state=this.process(r),this.state&(ue|Se|Pe|He)&&this.tryEmit(r)},process:function(n){},getTouchAction:function(){},reset:function(){}};function Lt(n){return n&He?"cancel":n&Pe?"end":n&Se?"move":n&ue?"start":""}function Dt(n){return n==Ee?"down":n==Oe?"up":n==we?"left":n==Me?"right":""}function $e(n,r){var i=r.manager;return i?i.get(n):n}function fe(){be.apply(this,arguments)}b(fe,be,{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&(ue|Se),m=this.attrTest(n);return h&&(i&X||!m)?r|He:h||m?i&j?r|Pe:r&ue?r|Se:ue:de}});function et(){fe.apply(this,arguments),this.pX=null,this.pY=null}b(et,fe,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ue},getTouchAction:function(){var n=this.options.direction,r=[];return n&se&&r.push(Ye),n&he&&r.push(Be),r},directionTest:function(n){var r=this.options,i=!0,h=n.distance,m=n.direction,E=n.deltaX,k=n.deltaY;return m&r.direction||(r.direction&se?(m=E===0?Ae:E<0?we:Me,i=E!=this.pX,h=Math.abs(n.deltaX)):(m=k===0?Ae:k<0?Oe:Ee,i=k!=this.pY,h=Math.abs(n.deltaY))),n.direction=m,i&&h>r.threshold&&m&r.direction},attrTest:function(n){return fe.prototype.attrTest.call(this,n)&&(this.state&ue||!(this.state&ue)&&this.directionTest(n))},emit:function(n){this.pX=n.deltaX,this.pY=n.deltaY;var r=Dt(n.direction);r&&(n.additionalEvent=this.options.event+r),this._super.emit.call(this,n)}});function ft(){fe.apply(this,arguments)}b(ft,fe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&ue)},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 pt(){be.apply(this,arguments),this._timer=null,this._input=null}b(pt,be,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[kt]},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&(j|X)&&!m)this.reset();else if(n.eventType&L)this.reset(),this._timer=v(function(){this.state=ye,this.tryEmit()},r.time,this);else if(n.eventType&j)return ye;return de},reset:function(){clearTimeout(this._timer)},emit:function(n){this.state===ye&&(n&&n.eventType&j?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function dt(){fe.apply(this,arguments)}b(dt,fe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&ue)}});function vt(){fe.apply(this,arguments)}b(vt,fe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:se|he,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(n){var r=this.options.direction,i;return r&(se|he)?i=n.overallVelocity:r&se?i=n.overallVelocityX:r&he&&(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&j},emit:function(n){var r=Dt(n.offsetDirection);r&&this.manager.emit(this.options.event+r,n),this.manager.emit(this.options.event,n)}});function tt(){be.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(tt,be,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ut]},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!=j)return this.failTimeout();var E=this.pTime?n.timeStamp-this.pTime<r.interval:!0,k=!this.pCenter||qe(this.pCenter,n.center)<r.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!k||!E?this.count=1:this.count+=1,this._input=n;var J=this.count%r.taps;if(J===0)return this.hasRequireFailures()?(this._timer=v(function(){this.state=ye,this.tryEmit()},r.interval,this),ue):ye}return de},failTimeout:function(){return this._timer=v(function(){this.state=de},this.options.interval,this),de},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ye&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ie(n,r){return r=r||{},r.recognizers=p(r.recognizers,Ie.defaults.preset),new mt(n,r)}Ie.VERSION="2.0.7",Ie.defaults={domEvents:!1,touchAction:Nt,enable:!0,inputTarget:null,inputClass:null,preset:[[dt,{enable:!1}],[ft,{enable:!1},["rotate"]],[vt,{direction:se}],[et,{direction:se},["swipe"]],[tt],[tt,{event:"doubletap",taps:2},["tap"]],[pt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var un=1,Rt=2;function mt(n,r){this.options=C({},Ie.defaults,r||{}),this.options.inputTarget=this.options.inputTarget||n,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=n,this.input=Xe(this),this.touchAction=new ht(this,this.options.touchAction),Ut(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)}mt.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?Rt:un},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&ye)&&(m=r.curRecognizer=null);for(var E=0;E<h.length;)i=h[E],r.stopped!==Rt&&(!m||i==m||i.canRecognizeWith(m))?i.recognize(n):i.reset(),!m&&i.state&(ue|Se|Pe)&&(m=r.curRecognizer=i),E++}},get:function(n){if(n instanceof be)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(T(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(T(n,"remove",this))return this;if(n=this.get(n),n){var r=this.recognizers,i=ce(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(ne(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(ne(n),function(h){r?i[h]&&i[h].splice(ce(i[h],r),1):delete i[h]}),this}},emit:function(n,r){this.options.domEvents&&hn(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&&Ut(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Ut(n,r){var i=n.element;if(i.style){var h;A(n.options.cssProps,function(m,E){h=ae(i.style,E),r?(n.oldCssProps[h]=i.style[h],i.style[h]=m):i.style[h]=n.oldCssProps[h]||""}),r||(n.oldCssProps={})}}function hn(n,r){var i=o.createEvent("Event");i.initEvent(n,!0,!0),i.gesture=r,r.target.dispatchEvent(i)}return C(Ie,{INPUT_START:L,INPUT_MOVE:ee,INPUT_END:j,INPUT_CANCEL:X,STATE_POSSIBLE:Je,STATE_BEGAN:ue,STATE_CHANGED:Se,STATE_ENDED:Pe,STATE_RECOGNIZED:ye,STATE_CANCELLED:He,STATE_FAILED:de,DIRECTION_NONE:Ae,DIRECTION_LEFT:we,DIRECTION_RIGHT:Me,DIRECTION_UP:Oe,DIRECTION_DOWN:Ee,DIRECTION_HORIZONTAL:se,DIRECTION_VERTICAL:he,DIRECTION_ALL:Ue,Manager:mt,Input:ie,TouchAction:ht,TouchInput:Ze,MouseInput:Ke,PointerEventInput:lt,TouchMouseInput:ct,SingleTouchInput:Ot,Recognizer:be,AttrRecognizer:fe,Tap:tt,Pan:et,Swipe:vt,Pinch:ft,Rotate:dt,Press:pt,on:I,off:M,each:A,merge:D,extend:O,assign:C,inherit:b,bindFn:y,prefixed:ae}),Ie})(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,R=new _.Quaternion().setFromUnitVectors(f.up,new _.Vector3(0,1,0)),W=R.clone().inverse(),Z=new _.Vector3,pe=new _.Quaternion;return function(){var ge=e.object.position;return u.copy(ge).sub(e.target),u.applyQuaternion(R),d.setFromVector3(u),e.autoRotate&&l===c.NONE&&ne(te()),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*=T,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(W),ge.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)),T=1,P||Z.distanceToSquared(e.object.position)>g||8*(1-pe.dot(e.object.quaternion))>g?(e.dispatchEvent(a),Z.copy(e.object.position),pe.copy(e.object.quaternion),P=!1,!0):!1}})(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",We,!1),e.domElement.removeEventListener("mousedown",Ee,!1),e.domElement.removeEventListener("wheel",Ue,!1),e.domElement.removeEventListener("touchstart",Ce,!1),e.domElement.removeEventListener("touchend",Xe,!1),e.domElement.removeEventListener("touchmove",ie,!1),document.removeEventListener("mousemove",se,!1),document.removeEventListener("mouseup",he,!1),e.domElement.removeEventListener("keydown",Fe,!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,T=1,A=new _.Vector3,P=!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 te(){return 2*Math.PI/60/60*e.autoRotateSpeed}function Q(){return Math.pow(.95,e.zoomSpeed)}function ne(u){v.theta-=u}function ce(u){v.phi-=u}var me=(function(){var u=new _.Vector3;return function(W,Z){u.setFromMatrixColumn(Z,0),u.multiplyScalar(-W),A.add(u)}})(),xe=(function(){var u=new _.Vector3;return function(W,Z){e.screenSpacePanning===!0?u.setFromMatrixColumn(Z,1):(u.setFromMatrixColumn(Z,0),u.crossVectors(e.object.up,u)),u.multiplyScalar(W),A.add(u)}})(),ae=(function(){var u=new _.Vector3;return function(W,Z){var pe=e.domElement;if(e.object.isPerspectiveCamera){var Ve=e.object.position;u.copy(Ve).sub(e.target);var ge=u.length();ge*=Math.tan(e.object.fov/2*Math.PI/180),me(2*W*ge/pe.clientHeight,e.object.matrix),xe(2*Z*ge/pe.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(me(W*(e.object.right-e.object.left)/e.object.zoom/pe.clientWidth,e.object.matrix),xe(Z*(e.object.top-e.object.bottom)/e.object.zoom/pe.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function oe(u){e.object.isPerspectiveCamera?T/=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom*u)),e.object.updateProjectionMatrix(),P=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function U(u){e.object.isPerspectiveCamera?T*=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),P=!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 F(u){b.set(u.clientX,u.clientY)}function H(u){O.set(u.clientX,u.clientY),D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var R=e.domElement;ne(2*Math.PI*D.x/R.clientHeight),ce(2*Math.PI*D.y/R.clientHeight),C.copy(O),e.update()}function re(u){I.set(u.clientX,u.clientY),M.subVectors(I,p),M.y>0?oe(Q()):M.y<0&&U(Q()),p.copy(I),e.update()}function G(u){y.set(u.clientX,u.clientY),x.subVectors(y,b).multiplyScalar(e.panSpeed),ae(x.x,x.y),b.copy(y),e.update()}function V(u){u.deltaY<0?U(Q()):u.deltaY>0&&oe(Q()),e.update()}function K(u){var R=!1;switch(u.keyCode){case e.keys.UP:ae(0,e.keyPanSpeed),R=!0;break;case e.keys.BOTTOM:ae(0,-e.keyPanSpeed),R=!0;break;case e.keys.LEFT:ae(e.keyPanSpeed,0),R=!0;break;case e.keys.RIGHT:ae(-e.keyPanSpeed,0),R=!0;break}R&&(u.preventDefault(),e.update())}function Y(u){if(u.touches.length==1)C.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);C.set(R,W)}}function B(u){if(u.touches.length==1)b.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);b.set(R,W)}}function L(u){var R=u.touches[0].pageX-u.touches[1].pageX,W=u.touches[0].pageY-u.touches[1].pageY,Z=Math.sqrt(R*R+W*W);p.set(0,Z)}function ee(u){e.enableZoom&&L(u),e.enablePan&&B(u)}function j(u){e.enableZoom&&L(u),e.enableRotate&&Y(u)}function X(u){if(u.touches.length==1)O.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);O.set(R,W)}D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var Z=e.domElement;ne(2*Math.PI*D.x/Z.clientHeight),ce(2*Math.PI*D.y/Z.clientHeight),C.copy(O)}function Ae(u){if(u.touches.length==1)y.set(u.touches[0].pageX,u.touches[0].pageY);else{var R=.5*(u.touches[0].pageX+u.touches[1].pageX),W=.5*(u.touches[0].pageY+u.touches[1].pageY);y.set(R,W)}x.subVectors(y,b).multiplyScalar(e.panSpeed),ae(x.x,x.y),b.copy(y)}function we(u){var R=u.touches[0].pageX-u.touches[1].pageX,W=u.touches[0].pageY-u.touches[1].pageY,Z=Math.sqrt(R*R+W*W);I.set(0,Z),M.set(0,Math.pow(I.y/p.y,e.zoomSpeed)),oe(M.y),p.copy(I)}function Me(u){e.enableZoom&&we(u),e.enablePan&&Ae(u)}function Oe(u){e.enableZoom&&we(u),e.enableRotate&&X(u)}function Ee(u){if(e.enabled!==!1){u.preventDefault(),e.domElement.focus?e.domElement.focus():window.focus();var R;switch(u.button){case 0:R=e.mouseButtons.LEFT;break;case 1:R=e.mouseButtons.MIDDLE;break;case 2:R=e.mouseButtons.RIGHT;break;default:R=-1}switch(R){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;F(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;F(u),l=c.PAN}break;default:l=c.NONE}l!==c.NONE&&(document.addEventListener("mousemove",se,!1),document.addEventListener("mouseup",he,!1),e.dispatchEvent(t))}}function se(u){if(e.enabled!==!1)switch(u.preventDefault(),l){case c.ROTATE:if(e.enableRotate===!1)return;H(u);break;case c.DOLLY:if(e.enableZoom===!1)return;re(u);break;case c.PAN:if(e.enablePan===!1)return;G(u);break}}function he(u){e.enabled!==!1&&(document.removeEventListener("mousemove",se,!1),document.removeEventListener("mouseup",he,!1),e.dispatchEvent(s),l=c.NONE)}function Ue(u){e.enabled===!1||e.enableZoom===!1||l!==c.NONE&&l!==c.ROTATE||(u.preventDefault(),u.stopPropagation(),e.dispatchEvent(t),V(u),e.dispatchEvent(s))}function Fe(u){e.enabled===!1||e.enableKeys===!1||e.enablePan===!1||K(u)}function Ce(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;B(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;ee(u),l=c.TOUCH_DOLLY_PAN;break;case _.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;j(u),l=c.TOUCH_DOLLY_ROTATE;break;default:l=c.NONE}break;default:l=c.NONE}l!==c.NONE&&e.dispatchEvent(t)}}function ie(u){if(e.enabled!==!1)switch(u.preventDefault(),u.stopPropagation(),l){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;X(u),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;Ae(u),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Me(u),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Oe(u),e.update();break;default:l=c.NONE}}function Xe(u){e.enabled!==!1&&(e.dispatchEvent(s),l=c.NONE)}function We(u){e.enabled!==!1&&u.preventDefault()}e.domElement.addEventListener("contextmenu",We,!1),e.domElement.addEventListener("mousedown",Ee,!1),e.domElement.addEventListener("wheel",Ue,!1),e.domElement.addEventListener("touchstart",Ce,!1),e.domElement.addEventListener("touchend",Xe,!1),e.domElement.addEventListener("touchmove",ie,!1),e.domElement.addEventListener("keydown",Fe,!1),e.domElement.tabIndex===-1&&(e.domElement.tabIndex=0),this.update()};De.prototype=Object.create(_.EventDispatcher.prototype);De.prototype.constructor=De;var Pt=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};Pt.prototype=Object.create(_.EventDispatcher.prototype);Pt.prototype.constructor=Pt;var Te=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)})})};Te.prototype=Object.create(_.Object3D.prototype);Te.prototype.constructor=Te;var ot=function(f){Te.call(this,f)};ot.prototype=Object.create(Te.prototype);ot.prototype.constructor=ot;var jt=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 T(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 P(b,y,x,p){if(b instanceof Te){b.onBeforeRender(f,y,x);var I;b instanceof ot?(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,te=c.objects.get(b);if(te===void 0||te.style!==I){M.style.WebkitTransform=I,M.style.transform=I;var Q={style:I};d&&(Q.distanceToCameraSquared=C(x,b)),c.objects.set(b,Q)}M.style.display=b.visible?"":"none",M.parentNode!==g&&g.appendChild(M),b.onAfterRender(f,y,x)}for(var ne=0,ce=b.children.length;ne<ce;ne++)P(b.children[ne],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 Te&&y.push(x)}),y}function D(b){for(var y=O(b).sort(function(M,te){var Q=c.objects.get(M).distanceToCameraSquared,ne=c.objects.get(te).distanceToCameraSquared;return Q-ne}),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)"+T(y.matrixWorldInverse):"translateZ("+x+"px)"+T(y.matrixWorldInverse),te=M+"translate("+a+"px,"+t+"px)";c.camera.style!==te&&!d&&(g.style.WebkitTransform=te,g.style.transform=te,c.camera.style=te),P(b,b,y,M),d&&D(b)}};function Bt(f,o,e){var a=o.getBoundingClientRect(),t=a.top,s=a.left,c=a.width,l=a.height;return new w.Vector2((f.x-s)/c*2-1,-(f.y-t)/l*2+1)}var zt=(function(f){Re(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 T=c+1,A=T*c+1<<3,P=new w.BufferAttribute(new Float32Array(A*3),3),C=new w.BufferAttribute(new Float32Array(A*3),3),O=[],D=[];new w.Vector3;var b=new w.Vector3,y=[],x=[],p=[],I=T*c,M=T*c+1;te(),ne(),Q(),ce(),xe(),me();function te(){for(var U=[new w.Vector3(1,1,1),new w.Vector3(1,1,-1),new w.Vector3(-1,1,-1),new w.Vector3(-1,1,1),new w.Vector3(1,-1,1),new w.Vector3(1,-1,-1),new w.Vector3(-1,-1,-1),new w.Vector3(-1,-1,1)],N=0;N<8;N++)O.push([]),D.push([]);for(var S=Math.PI/2,F=new w.Vector3(g,d,v),H=0;H<=c;H++){var re=H/c,G=re*S,V=Math.cos(G),K=Math.sin(G);if(H==c){b.set(0,1,0);var Y=b.clone().multiplyScalar(s).add(F);O[0].push(Y),y.push(Y);var B=b.clone();D[0].push(B),x.push(B);continue}for(var L=0;L<=c;L++){var ee=L/c,j=ee*S;b.x=V*Math.cos(j),b.y=K,b.z=V*Math.sin(j);var Y=b.clone().multiplyScalar(s).add(F);O[0].push(Y),y.push(Y);var B=b.clone().normalize();D[0].push(B),x.push(B)}}for(var X=1;X<8;X++)for(var N=0;N<O[0].length;N++){var Y=O[0][N].clone().multiply(U[X]);O[X].push(Y),y.push(Y);var B=D[0][N].clone().multiply(U[X]);D[X].push(B),x.push(B)}}function Q(){for(var U=[!0,!1,!0,!1,!1,!0,!1,!0],N=T*(c-1),S=0;S<8;S++){for(var F=M*S,H=0;H<c-1;H++)for(var re=H*T,G=(H+1)*T,V=0;V<c;V++){var K=V+1,Y=F+re+V,B=F+re+K,L=F+G+V,ee=F+G+K;U[S]?(p.push(Y),p.push(L),p.push(B),p.push(B),p.push(L),p.push(ee)):(p.push(Y),p.push(B),p.push(L),p.push(B),p.push(ee),p.push(L))}for(var V=0;V<c;V++){var Y=F+N+V,B=F+N+V+1,L=F+I;U[S]?(p.push(Y),p.push(L),p.push(B)):(p.push(Y),p.push(B),p.push(L))}}}function ne(){var U=I,N=I+M,S=I+M*2,F=I+M*3;p.push(U),p.push(N),p.push(S),p.push(U),p.push(S),p.push(F),U=I+M*4,N=I+M*5,S=I+M*6,F=I+M*7,p.push(U),p.push(S),p.push(N),p.push(U),p.push(F),p.push(S),U=0,N=M,S=M*4,F=M*5,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(F),U=M*2,N=M*3,S=M*6,F=M*7,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(F),U=c,N=c+M*3,S=c+M*4,F=c+M*7,p.push(U),p.push(N),p.push(S),p.push(N),p.push(F),p.push(S),U=c+M,N=c+M*2,S=c+M*5,F=c+M*6,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(F)}function ce(){for(var U=0;U<4;U++)for(var N=U*M,S=4*M+N,F=(U&1)===1,H=0;H<c;H++){var re=H+1,G=N+H,V=N+re,K=S+H,Y=S+re;F?(p.push(G),p.push(K),p.push(V),p.push(V),p.push(K),p.push(Y)):(p.push(G),p.push(V),p.push(K),p.push(V),p.push(Y),p.push(K))}}function me(){for(var U=[0,2,4,6],N=[1,3,5,7],S=0;S<4;S++)for(var F=M*U[S],H=M*N[S],re=1>=S,G=0;G<c;G++){var V=G*T,K=(G+1)*T,Y=F+V,B=F+K,L=H+V,ee=H+K;re?(p.push(Y),p.push(L),p.push(B),p.push(B),p.push(L),p.push(ee)):(p.push(Y),p.push(B),p.push(L),p.push(B),p.push(ee),p.push(L))}}function xe(){for(var U=c-1,N=[0,1,4,5],S=[3,2,7,6],F=[0,1,1,0],H=0;H<4;H++)for(var re=N[H]*M,G=S[H]*M,V=0;V<=U;V++){var K=re+c+V*T,Y=re+(V!=U?c+(V+1)*T:M-1),B=G+c+V*T,L=G+(V!=U?c+(V+1)*T:M-1);F[H]?(p.push(K),p.push(B),p.push(Y),p.push(Y),p.push(B),p.push(L)):(p.push(K),p.push(Y),p.push(B),p.push(Y),p.push(L),p.push(B))}}for(var ae=0,oe=0;oe<y.length;oe++)P.setXYZ(ae,y[oe].x,y[oe].y,y[oe].z),C.setXYZ(ae,x[oe].x,x[oe].y,x[oe].z),ae++;return l.setIndex(new w.BufferAttribute(new Uint16Array(p),1)),l.setAttribute("position",P),l.setAttribute("normal",C),l}return o})(w.BufferGeometry);function je(f,o){return typeof f!="number"||typeof o!="number"?!1:Math.abs(f-o)<.001}function ze(f,o,e,a){a===void 0&&(a=function(s){return s});var t=a(e);return f*(1-t)+o*t}var $=Number((Math.PI/2).toFixed(5));function On(f,o,e){var a=new w.Shape;return a.moveTo(e,0),a.lineTo(f-e,0),a.absarc(f-e,e,e,-$,0,!1),a.lineTo(f,o-e),a.absarc(f-e,o-e,e,0,$,!1),a.lineTo(e,o),a.absarc(e,o-e,e,$,Math.PI,!1),a.lineTo(0,e),a.absarc(e,e,e,Math.PI,Math.PI*1.5,!1),a}var Ge=function(f){var o=document.createElement("div");o.innerText=f;var e=new Te(o);return e.name=f,e.scale.set(.3,.3,.3),o.style.pointerEvents="none",o.style.backfaceVisibility="hidden",e},nt=function(f){var o=new w.PlaneGeometry(5,5),e=new w.MeshBasicMaterial({transparent:!0,opacity:0}),a=new w.Mesh(o,e),t=document.createElement("div");t.innerText=f;var s=new Te(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(-$),a.add(s),a},Cn=(function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;t.camera=new Ne.Camera(90),t.scene=new w.Scene,t.renderer=new w.WebGLRenderer({antialias:!0,alpha:!0}),t.css3drenderer=new jt,t.ambientLight=new w.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 w.DirectionalLight(16777215,.2),t.box=new w.Mesh(new zt(8,8,8,.5,20),new w.MeshPhongMaterial({color:16777215})),t.faces=new w.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,T;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,P=A.longitude,C=A.latitude;t.five.setState({longitude:P,latitude:C},!0),t.updateArrows({longitude:P,latitude:C})}else if(t.spherical&&(!je(t.spherical.pi,(g=t.controls)===null||g===void 0?void 0:g.getPolarAngle())||!je(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:(T=t.controls)===null||T===void 0?void 0:T.getAzimuthalAngle()},t.camera.computePose(),t.updateByCamera();var O=t.camera.pose,P=O.longitude,C=O.latitude;t.five.setState({longitude:P,latitude:C},!0),t.updateArrows({longitude:P,latitude:C})}else t.spherical=null},t.onTapGesture=function(l){var g=l.pointers[0].clientX,d=l.pointers[0].clientY,v=Bt({x:g,y:d},t.wrapper),T=new w.Raycaster;T.setFromCamera(v,t.camera);var A=T.intersectObjects(t.faces.children,!1)[0];if(A){var P=A.object.userData,C=P.longitude,O=P.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:$)},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 w.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=Bt({x:l.clientX,y:l.clientY},t.wrapper),d=new w.Raycaster;d.setFromCamera(g,t.camera);var v=d.intersectObjects(t.faces.children,!1)[0];t.faces.children.forEach(function(T){T.material.opacity=0,T.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 yt.Manager(t.wrapper),t.mc.add(new yt.Tap({interval:410})),t.mc.add(new yt.Pan({threshold:10,pointers:0})),t.camera.setFromPose({distance:20,offset:new w.Vector3(0,0,0),longitude:e.camera.pose.latitude,latitude:e.camera.pose.latitude}),t.cylinder=new w.Mesh(new w.CylinderGeometry(13.2,14,.01,50,1,!0),new w.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() {
|
|
@@ -483,7 +483,7 @@ void main() {
|
|
|
483
483
|
border-color: transparent transparent var(--color) transparent;
|
|
484
484
|
transform: translate(0, -15px);
|
|
485
485
|
}
|
|
486
|
-
`,this.wrapper.className="OrientationPlugin",this.arrows.className="OrientationArrows",this.wrapper.style.cssText="position: relative; width: 100%; height: 100%",this.wrapper.appendChild(this.arrows),this.arrowLeft.className=this.arrowRight.className=this.arrowTop.className=this.arrowBack.className=this.arrowFront.className="OrientationArrow",this.arrowBottom.className="OrientationArrow disabled",this.arrowBack.innerText="后",this.arrowFront.innerText="前",this.arrowLeft.innerText="左",this.arrowRight.innerText="右",this.arrowTop.innerText="上",this.arrowBottom.innerText="下",this.css3drenderer.domElement.style.cssText="position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; color: #00000090;"},o.prototype.bindEvents=function(){var e=this;this.five.on("renderFrame",this.onRenderFrame),this.five.on("camera.update",this.onCameraUpdate),this.five.on("wantsGesture",this.onFiveWantsGesture),this.five.on("modeChange",this.onFiveModeChange),this.mc.on("tap",this.onTapGesture),this.mc.on("panstart",this.onPanStart),this.mc.on("panend",this.onPanEnd),this.wrapper.addEventListener("mousemove",this.onMouseMove),this.arrowTop.onclick=function(){return e.orient({longitude:0,latitude:$})},this.arrowLeft.onclick=function(){return e.orient({longitude:-$,latitude:0})},this.arrowRight.onclick=function(){return e.orient({longitude:$,latitude:0})},this.arrowFront.onclick=function(){return e.orient({longitude:0,latitude:0})},this.arrowBack.onclick=function(){return e.orient({longitude:Math.PI,latitude:0})}},o.prototype.unbindEvents=function(){this.five.off("renderFrame",this.onRenderFrame),this.five.off("camera.update",this.onCameraUpdate),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("modeChange",this.onFiveModeChange),this.mc.off("tap",this.onTapGesture),this.mc.off("panstart",this.onPanStart),this.mc.off("panend",this.onPanEnd),this.wrapper.removeEventListener("mousemove",this.onMouseMove),this.arrowTop.onclick=null,this.arrowLeft.onclick=null,this.arrowRight.onclick=null,this.arrowFront.onclick=null,this.arrowBack.onclick=null},o.prototype.updateByCamera=function(){var e=ze(.2,1,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),a=ze(11,13,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),t=ze(12,15,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),s=ze(13,19,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),c=ze(-.2,.5,this.camera.pose.latitude/Math.PI*2,function(l){return l*l});this.cylinder.geometry=new w.CylinderGeometry(a,t,.01,50,1,!0),this.cylinder.material.uniforms.radiusTop.value=a,this.cylinder.material.uniforms.radiusBottom.value=t,this.cylinder.material.needsUpdate=!0,this.cylinder.children.forEach(function(l){l.position.normalize().multiplyScalar(s),l.scale.set(e,e,e);var g=l.children[0];g&&(g.element.style.opacity=c.toString())})},o.prototype.updateArrows=function(e){e.longitude;var a=e.latitude,t=$-a<.02;this.setState({arrowsVisible:t})},o.prototype.handleArrowsVisible=function(e){var a=this;if(this.state.enabled)if(this.cylinder.material.uniforms.opacity.value=e?.4:1,this.cylinder.material.needsUpdate=!0,e){var t=this.five.getCurrentState(),s=t.longitude,c=t.latitude;if($-c<.03)this.five.state.mode==="Topview"||this.five.state.mode==="Mapview"?(this.faces.getObjectByName("上").element.className="active",this.arrows.innerHTML="",this.arrows.appendChild(this.arrowBack),this.arrows.appendChild(this.arrowLeft),this.arrows.appendChild(this.arrowRight),this.arrows.appendChild(this.arrowFront),this.arrows.style.transform="rotate(".concat((s-this.config.fixedLongitude)/Math.PI*180,"deg)")):(this.arrows.innerHTML="",this.faces.getObjectByName("上").element.className="");else{switch(this.arrows.innerHTML="",this.arrows.appendChild(this.arrowTop),this.config.orthoView&&this.five.ready().then(function(){a.five.controller.cameraType="orthographic",a.five.ready().then(function(){return a.five.controller.cameraMotion.ended=!1})}),!0){case je(0,s-this.config.fixedLongitude):this.arrows.appendChild(this.arrowLeft),this.arrows.appendChild(this.arrowRight),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("前").element.className="active";break;case je($,s-this.config.fixedLongitude):this.arrows.appendChild(this.arrowFront),this.arrows.appendChild(this.arrowBack),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("右").element.className="active";break;case je(Math.PI,s-this.config.fixedLongitude):this.arrows.appendChild(this.arrowRight),this.arrows.appendChild(this.arrowLeft),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("后").element.className="active";break;default:this.arrows.appendChild(this.arrowBack),this.arrows.appendChild(this.arrowFront),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("左").element.className="active";break}this.arrows.style.transform=""}this.arrows.style.display="block"}else this.config.orthoView&&(this.five.controller.cameraType="auto",this.five.ready().then(function(){return a.five.controller.cameraMotion.ended=!1})),this.arrows.style.display="none",this.faces.children.forEach(function(l){l.children[0].element.className=""})},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.prototype.initLights=function(){this.directionalLight.target=this.box,this.scene.add(this.ambientLight,this.directionalLight)},o.prototype.initFaces=function(){var e=On(7,7,.5),a=new w.ShapeGeometry(e);a.translate(-3.5,-3.5,0);var t=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));t.userData={longitude:0,latitude:0},t.position.z=4.1,t.add(Ge("前"));var s=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));s.rotateY(Math.PI),s.position.z=-4.1,s.add(Ge("后")),s.userData={longitude:Math.PI,latitude:0};var c=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));c.rotateY($),c.position.x=4.1,c.add(Ge("右")),c.userData={longitude:$,latitude:0};var l=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));l.rotateY(-$),l.position.x=-4.1,l.add(Ge("左")),l.userData={longitude:-$,latitude:0};var g=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));g.rotateX(-$),g.position.y=4.1,g.add(Ge("上")),g.userData={longitude:0,latitude:$},this.faces.add(t,s,l,c,g)},o.prototype.initControls=function(){var e=this.controls=new De(this.camera,this.renderer.domElement);e.enableZoom=!1,e.enableDamping=!0,e.enablePan=!1,e.maxPolarAngle=$,e.dampingFactor=.15,e.rotateSpeed=.25},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.five.getCurrentState(),t=a.longitude,s=a.latitude;this.camera.setFromPose({longitude:t,latitude:s,distance:20,offset:new w.Vector3(0,0,0)}),this.updateByCamera(),this.wrapper.appendChild(this.renderer.domElement),this.wrapper.appendChild(this.css3drenderer.domElement),this.bindEvents()},o.prototype._disable=function(e){this.wrapper.removeChild(this.renderer.domElement),this.wrapper.removeChild(this.css3drenderer.domElement),this.unbindEvents()},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}),document.head.appendChild(this.style)}},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}),document.head.removeChild(this.style)}},o}(exports.BasePlugin.Controller),_n=function(f,o){return new Cn(f,o)},Sn=function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;return t.data={},t.pluginName="BackgroundPlugin",t._onFiveCameraUpdate=function(s){var c=(Math.PI/2-Math.max(s.latitude,0))/(Math.PI/2),l=Math.max(.2-c,0)*10;t.gradientBg&&(t.gradientBg.style.transform="translateY(-".concat((1-c)*50,"%)")),t.groundBg&&(t.groundBg.style.backgroundImage="radial-gradient(circle, #2E303350 ".concat(l*100,"%, transparent ").concat(l*120,"%)"))},t._addEventListener=function(){t.five.on("cameraUpdate",t._onFiveCameraUpdate)},t._removeEventListener=function(){t.five.off("cameraUpdate",t._onFiveCameraUpdate)},t.load=function(){return ke(t,void 0,void 0,function(){return Le(this,function(s){return[2]})})},t.setState=function(s,c){},t.enable=function(){var s,c=(s=t.five.getElement())===null||s===void 0?void 0:s.parentNode;if(!c){t.five.ready().then(function(){return t.enable()});return}t.state.enabled||(t._onFiveCameraUpdate(t.five.getPose(),!1),t.gradientBg&&c.appendChild(t.gradientBg),t.groundBg&&c.appendChild(t.groundBg),t.style&&document.head.appendChild(t.style),t._addEventListener(),t.hooks.emit("enable",{userAction:!0}),t.state.enabled=!0)},t.disable=function(s){var c,l,g,d;t.state.enabled&&((l=(c=t.gradientBg)===null||c===void 0?void 0:c.parentNode)===null||l===void 0||l.removeChild(t.gradientBg),(d=(g=t.groundBg)===null||g===void 0?void 0:g.parentNode)===null||d===void 0||d.removeChild(t.groundBg),t.style&&document.head.removeChild(t.style),t._removeEventListener(),t.hooks.emit("disable",{userAction:!0}),t.state.enabled=!1)},t.dispose=function(){t._removeEventListener(),t.hooks.emit("disable",{userAction:!0}),t.state.enabled=!1},t.state={enabled:!1},typeof document=="undefined"||(t.gradientBg=document.createElement("div"),t.groundBg=document.createElement("div"),t.style=document.createElement("style"),t.gradientBg.className="BackgroundPluginBg",t.groundBg.className="BackgroundPluginGroundBg",t.style.innerHTML=`
|
|
486
|
+
`,this.wrapper.className="OrientationPlugin",this.arrows.className="OrientationArrows",this.wrapper.style.cssText="position: relative; width: 100%; height: 100%",this.wrapper.appendChild(this.arrows),this.arrowLeft.className=this.arrowRight.className=this.arrowTop.className=this.arrowBack.className=this.arrowFront.className="OrientationArrow",this.arrowBottom.className="OrientationArrow disabled",this.arrowBack.innerText="后",this.arrowFront.innerText="前",this.arrowLeft.innerText="左",this.arrowRight.innerText="右",this.arrowTop.innerText="上",this.arrowBottom.innerText="下",this.css3drenderer.domElement.style.cssText="position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; color: #00000090;"},o.prototype.bindEvents=function(){var e=this;this.five.on("renderFrame",this.onRenderFrame),this.five.on("camera.update",this.onCameraUpdate),this.five.on("wantsGesture",this.onFiveWantsGesture),this.five.on("modeChange",this.onFiveModeChange),this.mc.on("tap",this.onTapGesture),this.mc.on("panstart",this.onPanStart),this.mc.on("panend",this.onPanEnd),this.wrapper.addEventListener("mousemove",this.onMouseMove),this.arrowTop.onclick=function(){return e.orient({longitude:0,latitude:$})},this.arrowLeft.onclick=function(){return e.orient({longitude:-$,latitude:0})},this.arrowRight.onclick=function(){return e.orient({longitude:$,latitude:0})},this.arrowFront.onclick=function(){return e.orient({longitude:0,latitude:0})},this.arrowBack.onclick=function(){return e.orient({longitude:Math.PI,latitude:0})}},o.prototype.unbindEvents=function(){this.five.off("renderFrame",this.onRenderFrame),this.five.off("camera.update",this.onCameraUpdate),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("modeChange",this.onFiveModeChange),this.mc.off("tap",this.onTapGesture),this.mc.off("panstart",this.onPanStart),this.mc.off("panend",this.onPanEnd),this.wrapper.removeEventListener("mousemove",this.onMouseMove),this.arrowTop.onclick=null,this.arrowLeft.onclick=null,this.arrowRight.onclick=null,this.arrowFront.onclick=null,this.arrowBack.onclick=null},o.prototype.updateByCamera=function(){var e=ze(.2,1,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),a=ze(11,13,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),t=ze(12,15,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),s=ze(13,19,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),c=ze(-.2,.5,this.camera.pose.latitude/Math.PI*2,function(l){return l*l});this.cylinder.geometry=new w.CylinderGeometry(a,t,.01,50,1,!0),this.cylinder.material.uniforms.radiusTop.value=a,this.cylinder.material.uniforms.radiusBottom.value=t,this.cylinder.material.needsUpdate=!0,this.cylinder.children.forEach(function(l){l.position.normalize().multiplyScalar(s),l.scale.set(e,e,e);var g=l.children[0];g&&(g.element.style.opacity=c.toString())})},o.prototype.updateArrows=function(e){e.longitude;var a=e.latitude,t=$-a<.02;this.setState({arrowsVisible:t})},o.prototype.handleArrowsVisible=function(e){var a=this;if(this.state.enabled)if(this.cylinder.material.uniforms.opacity.value=e?.4:1,this.cylinder.material.needsUpdate=!0,e){var t=this.five.getCurrentState(),s=t.longitude,c=t.latitude;if($-c<.03)this.five.state.mode==="Topview"||this.five.state.mode==="Mapview"?(this.faces.getObjectByName("上").element.className="active",this.arrows.innerHTML="",this.arrows.appendChild(this.arrowBack),this.arrows.appendChild(this.arrowLeft),this.arrows.appendChild(this.arrowRight),this.arrows.appendChild(this.arrowFront),this.arrows.style.transform="rotate(".concat((s-this.config.fixedLongitude)/Math.PI*180,"deg)")):(this.arrows.innerHTML="",this.faces.getObjectByName("上").element.className="");else{switch(this.arrows.innerHTML="",this.arrows.appendChild(this.arrowTop),this.config.orthoView&&this.five.ready().then(function(){a.five.controller.cameraType="orthographic",a.five.ready().then(function(){return a.five.controller.cameraMotion.ended=!1})}),!0){case je(0,s-this.config.fixedLongitude):this.arrows.appendChild(this.arrowLeft),this.arrows.appendChild(this.arrowRight),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("前").element.className="active";break;case je($,s-this.config.fixedLongitude):this.arrows.appendChild(this.arrowFront),this.arrows.appendChild(this.arrowBack),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("右").element.className="active";break;case je(Math.PI,s-this.config.fixedLongitude):this.arrows.appendChild(this.arrowRight),this.arrows.appendChild(this.arrowLeft),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("后").element.className="active";break;default:this.arrows.appendChild(this.arrowBack),this.arrows.appendChild(this.arrowFront),this.arrows.appendChild(this.arrowBottom),this.faces.getObjectByName("左").element.className="active";break}this.arrows.style.transform=""}this.arrows.style.display="block"}else this.config.orthoView&&(this.five.controller.cameraType="auto",this.five.ready().then(function(){return a.five.controller.cameraMotion.ended=!1})),this.arrows.style.display="none",this.faces.children.forEach(function(l){l.children[0].element.className=""})},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.prototype.initLights=function(){this.directionalLight.target=this.box,this.scene.add(this.ambientLight,this.directionalLight)},o.prototype.initFaces=function(){var e=On(7,7,.5),a=new w.ShapeGeometry(e);a.translate(-3.5,-3.5,0);var t=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));t.userData={longitude:0,latitude:0},t.position.z=4.1,t.add(Ge("前"));var s=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));s.rotateY(Math.PI),s.position.z=-4.1,s.add(Ge("后")),s.userData={longitude:Math.PI,latitude:0};var c=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));c.rotateY($),c.position.x=4.1,c.add(Ge("右")),c.userData={longitude:$,latitude:0};var l=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));l.rotateY(-$),l.position.x=-4.1,l.add(Ge("左")),l.userData={longitude:-$,latitude:0};var g=new w.Mesh(a,new w.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));g.rotateX(-$),g.position.y=4.1,g.add(Ge("上")),g.userData={longitude:0,latitude:$},this.faces.add(t,s,l,c,g)},o.prototype.initControls=function(){var e=this.controls=new De(this.camera,this.renderer.domElement);e.enableZoom=!1,e.enableDamping=!0,e.enablePan=!1,e.maxPolarAngle=$,e.dampingFactor=.15,e.rotateSpeed=.25},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.five.getCurrentState(),t=a.longitude,s=a.latitude;this.camera.setFromPose({longitude:t,latitude:s,distance:20,offset:new w.Vector3(0,0,0)}),this.updateByCamera(),this.wrapper.appendChild(this.renderer.domElement),this.wrapper.appendChild(this.css3drenderer.domElement),this.bindEvents()},o.prototype._disable=function(e){this.wrapper.removeChild(this.renderer.domElement),this.wrapper.removeChild(this.css3drenderer.domElement),this.unbindEvents()},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}),document.head.appendChild(this.style)}},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}),document.head.removeChild(this.style)}},o})(exports.BasePlugin.Controller),_n=function(f,o){return new Cn(f,o)},Sn=(function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;return t.data={},t.pluginName="BackgroundPlugin",t._onFiveCameraUpdate=function(s){var c=(Math.PI/2-Math.max(s.latitude,0))/(Math.PI/2),l=Math.max(.2-c,0)*10;t.gradientBg&&(t.gradientBg.style.transform="translateY(-".concat((1-c)*50,"%)")),t.groundBg&&(t.groundBg.style.backgroundImage="radial-gradient(circle, #2E303350 ".concat(l*100,"%, transparent ").concat(l*120,"%)"))},t._addEventListener=function(){t.five.on("cameraUpdate",t._onFiveCameraUpdate)},t._removeEventListener=function(){t.five.off("cameraUpdate",t._onFiveCameraUpdate)},t.load=function(){return ke(t,void 0,void 0,function(){return Le(this,function(s){return[2]})})},t.setState=function(s,c){},t.enable=function(){var s,c=(s=t.five.getElement())===null||s===void 0?void 0:s.parentNode;if(!c){t.five.ready().then(function(){return t.enable()});return}t.state.enabled||(t._onFiveCameraUpdate(t.five.getPose(),!1),t.gradientBg&&c.appendChild(t.gradientBg),t.groundBg&&c.appendChild(t.groundBg),t.style&&document.head.appendChild(t.style),t._addEventListener(),t.hooks.emit("enable",{userAction:!0}),t.state.enabled=!0)},t.disable=function(s){var c,l,g,d;t.state.enabled&&((l=(c=t.gradientBg)===null||c===void 0?void 0:c.parentNode)===null||l===void 0||l.removeChild(t.gradientBg),(d=(g=t.groundBg)===null||g===void 0?void 0:g.parentNode)===null||d===void 0||d.removeChild(t.groundBg),t.style&&document.head.removeChild(t.style),t._removeEventListener(),t.hooks.emit("disable",{userAction:!0}),t.state.enabled=!1)},t.dispose=function(){t._removeEventListener(),t.hooks.emit("disable",{userAction:!0}),t.state.enabled=!1},t.state={enabled:!1},typeof document=="undefined"||(t.gradientBg=document.createElement("div"),t.groundBg=document.createElement("div"),t.style=document.createElement("style"),t.gradientBg.className="BackgroundPluginBg",t.groundBg.className="BackgroundPluginGroundBg",t.style.innerHTML=`
|
|
487
487
|
.BackgroundPluginBg {
|
|
488
488
|
position: absolute;
|
|
489
489
|
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}(Ht.BasePlugin.Controller),In=function(f,o){return new Sn(f,o)};new w.Matrix4().fromArray([1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1]);var bt=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}(),Nn=function(f){Re(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=z({},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 z({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=z(z({},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 bt(a,t,s,c,l),d=new bt(a,t,s,c,l),v=new bt(a,t,s,c,l);if(this.trajectory&&this.trajectory.content.loadState==="READY"){for(var T=this.trajectory.content.data.positionArray,A=new Float32Array(T.length/3),P=0;P<A.length;P++)if(P===0)A[P]=0;else{var C=new w.Vector3(T[P-3],T[P-2],T[P-1]),O=new w.Vector3(T[P],T[P+1],T[P+2]);A[P]=O.distanceTo(C)+A[P-1]}this.totalDistance=A[A.length-1];for(var P=0;P<A.length;P++){for(var D=new w.Vector3(0,0,0),b=0,y=P-5;y<P+6;y++)y>=0&&y<A.length&&(D.add(new w.Vector3(T[y*3],T[y*3+1],T[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 w.Vector3(x,p,I),location:A[P]};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(z({},this.virualCamera.pose)));var s=this.playingState.keyframeIndex,c=0;this.cancelAnimation=Ne.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(),T=e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(),A=d.clone().add(T.clone().multiplyScalar(.01)),P=new w.Vector3;e.nextButOneKeyframe!==null?P=e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize():P.copy(T);var C=v.clone().add(P.clone().multiplyScalar(.01));c+=g/1e3*e.rate;var O=c/d.distanceTo(v);O=O>=1?1:O,t.keyframeIndex!==null&&t.progress!==null&&(O=t.progress,t.keyframeIndex=null,t.progress=null);var D=d.clone().lerp(v,O),b=A.clone().lerp(C,O);e.virualCamera.position.copy(D),e.virualCamera.lookAt(b),e.virualCamera.updateMatrixWorld(),e.virualCamera.updateMatrix(),e.virualCamera.computePose(),e.five.setState(z({},e.virualCamera.pose)),e.location=e.keyframes[s].location+d.clone().distanceTo(D),O===1?(c=0,s++,e.playingState.keyframeIndex=s,e.playingState.progress=0):(e.playingState.keyframeIndex=s,e.playingState.progress=O)})},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}(exports.BasePlugin.Controller),kn=function(f,o){return new Nn(f,o)};function Yt(f,o,e){return f<o?o:f>e?e:f}var Ln=`
|
|
507
|
+
`,t.enable()),t}return o})(Ht.BasePlugin.Controller),In=function(f,o){return new Sn(f,o)};new w.Matrix4().fromArray([1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1]);var bt=(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})(),Nn=(function(f){Re(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=z({},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 z({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=z(z({},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 bt(a,t,s,c,l),d=new bt(a,t,s,c,l),v=new bt(a,t,s,c,l);if(this.trajectory&&this.trajectory.content.loadState==="READY"){for(var T=this.trajectory.content.data.positionArray,A=new Float32Array(T.length/3),P=0;P<A.length;P++)if(P===0)A[P]=0;else{var C=new w.Vector3(T[P-3],T[P-2],T[P-1]),O=new w.Vector3(T[P],T[P+1],T[P+2]);A[P]=O.distanceTo(C)+A[P-1]}this.totalDistance=A[A.length-1];for(var P=0;P<A.length;P++){for(var D=new w.Vector3(0,0,0),b=0,y=P-5;y<P+6;y++)y>=0&&y<A.length&&(D.add(new w.Vector3(T[y*3],T[y*3+1],T[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 w.Vector3(x,p,I),location:A[P]};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(z({},this.virualCamera.pose)));var s=this.playingState.keyframeIndex,c=0;this.cancelAnimation=Ne.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(),T=e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(),A=d.clone().add(T.clone().multiplyScalar(.01)),P=new w.Vector3;e.nextButOneKeyframe!==null?P=e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize():P.copy(T);var C=v.clone().add(P.clone().multiplyScalar(.01));c+=g/1e3*e.rate;var O=c/d.distanceTo(v);O=O>=1?1:O,t.keyframeIndex!==null&&t.progress!==null&&(O=t.progress,t.keyframeIndex=null,t.progress=null);var D=d.clone().lerp(v,O),b=A.clone().lerp(C,O);e.virualCamera.position.copy(D),e.virualCamera.lookAt(b),e.virualCamera.updateMatrixWorld(),e.virualCamera.updateMatrix(),e.virualCamera.computePose(),e.five.setState(z({},e.virualCamera.pose)),e.location=e.keyframes[s].location+d.clone().distanceTo(D),O===1?(c=0,s++,e.playingState.keyframeIndex=s,e.playingState.progress=0):(e.playingState.keyframeIndex=s,e.playingState.progress=O)})},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})(exports.BasePlugin.Controller),kn=function(f,o){return new Nn(f,o)};function Yt(f,o,e){return f<o?o:f>e?e:f}var Ln=`
|
|
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
|
-
`,Rn=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],Tt=512,wt=512,rt=128,Un=function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;t.group=new w.Group,t.mesh=function(){var l=new w.CylinderGeometry(.12,.12,1,32,1,!0);l.translate(0,.5,0);var g=new w.ShaderMaterial({vertexShader:Ln,fragmentShader:Dn,uniforms:{map:{value:new w.Texture},progress:{value:0},opacity:{value:0}},transparent:!0,depthTest:!1}),d=new w.Mesh(l,g);return d}(),t.panoMesh=new Ne.PanoCircleMesh({scale:1.5}),t.stop=function(){},t.drawLine=function(l,g){if(t.ctx){var d=function(){var A,P=Tt/16|0;return P*((A=Rn[l])!==null&&A!==void 0?A:0)}(),v=(1-(g+l*150)%1200/1200)*(wt+rt),T=t.ctx.createLinearGradient(0,v-rt,0,v);T.addColorStop(0,"rgba(255,255,255,0)"),T.addColorStop(.5,"rgba(255,255,255,1)"),T.addColorStop(1,"rgba(255,255,255,0)"),t.ctx.fillStyle=T,t.ctx.fillRect(d,v-rt,3,rt)}},t.anime=function(l){if(t.ctx&&t.startTime){t.ctx.clearRect(0,0,Tt,wt);for(var g=0;g<16;g++)t.drawLine(g,l-t.startTime);var d=Yt((l-t.startTime)/1e3,0,1),v=Yt((l-t.startTime)/300,0,1);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=z({},a==null?void 0:a.config);return t._config=c,typeof document=="undefined"||(t.canvas=document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),t.canvas.width=Tt,t.canvas.height=wt,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 w.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 z({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=z(z({},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._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=Ne.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}(Ht.BasePlugin.Controller),Fn=function(f,o){return new Un(f,o)};exports.BackgroundPlugin=In;exports.CSS3DRenderer=jt;exports.ItemMaskPlugin=Mn;exports.OrbitControls=De;exports.OrientationPlugin=_n;exports.PanoAnimePlugin=Fn;exports.RoundedBoxGeometry=zt;exports.TrajectoryPlugin=kn;
|
|
534
|
+
`,Rn=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],Tt=512,wt=512,rt=128,Un=(function(f){Re(o,f);function o(e,a){var t=f.call(this,e)||this;t.group=new w.Group,t.mesh=(function(){var l=new w.CylinderGeometry(.12,.12,1,32,1,!0);l.translate(0,.5,0);var g=new w.ShaderMaterial({vertexShader:Ln,fragmentShader:Dn,uniforms:{map:{value:new w.Texture},progress:{value:0},opacity:{value:0}},transparent:!0,depthTest:!1}),d=new w.Mesh(l,g);return d})(),t.panoMesh=new Ne.PanoCircleMesh({scale:1.5}),t.stop=function(){},t.drawLine=function(l,g){if(t.ctx){var d=(function(){var A,P=Tt/16|0;return P*((A=Rn[l])!==null&&A!==void 0?A:0)})(),v=(1-(g+l*150)%1200/1200)*(wt+rt),T=t.ctx.createLinearGradient(0,v-rt,0,v);T.addColorStop(0,"rgba(255,255,255,0)"),T.addColorStop(.5,"rgba(255,255,255,1)"),T.addColorStop(1,"rgba(255,255,255,0)"),t.ctx.fillStyle=T,t.ctx.fillRect(d,v-rt,3,rt)}},t.anime=function(l){if(t.ctx&&t.startTime){t.ctx.clearRect(0,0,Tt,wt);for(var g=0;g<16;g++)t.drawLine(g,l-t.startTime);var d=Yt((l-t.startTime)/1e3,0,1),v=Yt((l-t.startTime)/300,0,1);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=z({},a==null?void 0:a.config);return t._config=c,typeof document=="undefined"||(t.canvas=document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),t.canvas.width=Tt,t.canvas.height=wt,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 w.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 z({},this._config)},enumerable:!1,configurable:!0}),o.prototype.updateState=function(e,a){var t=this.state;this.state=z(z({},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._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=Ne.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})(Ht.BasePlugin.Controller),Fn=function(f,o){return new Un(f,o)};exports.BackgroundPlugin=In;exports.CSS3DRenderer=jt;exports.ItemMaskPlugin=Mn;exports.OrbitControls=De;exports.OrientationPlugin=_n;exports.PanoAnimePlugin=Fn;exports.RoundedBoxGeometry=zt;exports.TrajectoryPlugin=kn;
|