@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/umd/five-line.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
|
-
*/(function(c,g){typeof exports=="object"&&typeof module!="undefined"?g(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],g):(c=typeof globalThis!="undefined"?globalThis:c||self,g(c.FiveSDK_Line={},c.THREE))})(this,function(c,g){"use strict";function G(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return r.default=a,Object.freeze(r)}const i=G(g);var w=function(a,r){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},w(a,r)};function y(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");w(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}typeof SuppressedError=="function"&&SuppressedError;var S=function(a){y(r,a);function r(){var t=a.call(this)||this;t.type="LineSegmentsGeometry";var n=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],e=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],o=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];return t.setIndex(o),t.setAttribute("position",new i.Float32BufferAttribute(n,3)),t.setAttribute("uv",new i.Float32BufferAttribute(e,2)),t}return r.prototype.applyMatrix4=function(t){var n=this.attributes.instanceStart,e=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(t),e.applyMatrix4(t),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},r.prototype.setPositions=function(t){var n;t instanceof Float32Array?n=t:Array.isArray(t)?n=new Float32Array(t):n=new Float32Array;var e=new i.InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceStart",new i.InterleavedBufferAttribute(e,3,0)),this.setAttribute("instanceEnd",new i.InterleavedBufferAttribute(e,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this},r.prototype.setColors=function(t){var n;t instanceof Float32Array?n=t:Array.isArray(t)?n=new Float32Array(t):n=new Float32Array;var e=new i.InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceColorStart",new i.InterleavedBufferAttribute(e,3,0)),this.setAttribute("instanceColorEnd",new i.InterleavedBufferAttribute(e,3,3)),this},r.prototype.fromWireframeGeometry=function(t){return this.setPositions(t.attributes.position.array),this},r.prototype.fromEdgesGeometry=function(t){return this.setPositions(t.attributes.position.array),this},r.prototype.fromMesh=function(t){return this.fromWireframeGeometry(new i.WireframeGeometry(t.geometry)),this},r.prototype.fromLineSegments=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.computeBoundingBox=function(){this.boundingBox===null&&(this.boundingBox=new i.Box3);var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(t!==void 0&&n!==void 0){var e=new i.Box3;this.boundingBox.setFromBufferAttribute(t),e.setFromBufferAttribute(n),this.boundingBox.union(e)}},r.prototype.computeBoundingSphere=function(){this.boundingSphere===null&&(this.boundingSphere=new i.Sphere),this.boundingBox===null&&this.computeBoundingBox();var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(t!==void 0&&n!==void 0){var e=this.boundingSphere.center;this.boundingBox.getCenter(e);for(var o=0,s=new i.Vector3,f=0,v=t.count;f<v;f++)s.fromBufferAttribute(t,f),o=Math.max(o,e.distanceToSquared(s)),s.fromBufferAttribute(n,f),o=Math.max(o,e.distanceToSquared(s));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}},r.prototype.toJSON=function(){},r}(i.InstancedBufferGeometry);Object.assign(S.prototype,{isLineSegmentsGeometry:!0});var x={uniforms:i.UniformsUtils.merge([i.UniformsLib.common,i.UniformsLib.fog,{linewidth:{value:1},resolution:{value:new i.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1},opacity:{value:1}}]),vertexShader:`
|
|
255
|
+
*/(function(c,g){typeof exports=="object"&&typeof module!="undefined"?g(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],g):(c=typeof globalThis!="undefined"?globalThis:c||self,g(c.FiveSDK_Line={},c.THREE))})(this,(function(c,g){"use strict";function G(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return r.default=a,Object.freeze(r)}const i=G(g);var w=function(a,r){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},w(a,r)};function y(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");w(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}typeof SuppressedError=="function"&&SuppressedError;var S=(function(a){y(r,a);function r(){var t=a.call(this)||this;t.type="LineSegmentsGeometry";var n=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],e=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],o=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];return t.setIndex(o),t.setAttribute("position",new i.Float32BufferAttribute(n,3)),t.setAttribute("uv",new i.Float32BufferAttribute(e,2)),t}return r.prototype.applyMatrix4=function(t){var n=this.attributes.instanceStart,e=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(t),e.applyMatrix4(t),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},r.prototype.setPositions=function(t){var n;t instanceof Float32Array?n=t:Array.isArray(t)?n=new Float32Array(t):n=new Float32Array;var e=new i.InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceStart",new i.InterleavedBufferAttribute(e,3,0)),this.setAttribute("instanceEnd",new i.InterleavedBufferAttribute(e,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this},r.prototype.setColors=function(t){var n;t instanceof Float32Array?n=t:Array.isArray(t)?n=new Float32Array(t):n=new Float32Array;var e=new i.InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceColorStart",new i.InterleavedBufferAttribute(e,3,0)),this.setAttribute("instanceColorEnd",new i.InterleavedBufferAttribute(e,3,3)),this},r.prototype.fromWireframeGeometry=function(t){return this.setPositions(t.attributes.position.array),this},r.prototype.fromEdgesGeometry=function(t){return this.setPositions(t.attributes.position.array),this},r.prototype.fromMesh=function(t){return this.fromWireframeGeometry(new i.WireframeGeometry(t.geometry)),this},r.prototype.fromLineSegments=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.computeBoundingBox=function(){this.boundingBox===null&&(this.boundingBox=new i.Box3);var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(t!==void 0&&n!==void 0){var e=new i.Box3;this.boundingBox.setFromBufferAttribute(t),e.setFromBufferAttribute(n),this.boundingBox.union(e)}},r.prototype.computeBoundingSphere=function(){this.boundingSphere===null&&(this.boundingSphere=new i.Sphere),this.boundingBox===null&&this.computeBoundingBox();var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(t!==void 0&&n!==void 0){var e=this.boundingSphere.center;this.boundingBox.getCenter(e);for(var o=0,s=new i.Vector3,f=0,v=t.count;f<v;f++)s.fromBufferAttribute(t,f),o=Math.max(o,e.distanceToSquared(s)),s.fromBufferAttribute(n,f),o=Math.max(o,e.distanceToSquared(s));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}},r.prototype.toJSON=function(){},r})(i.InstancedBufferGeometry);Object.assign(S.prototype,{isLineSegmentsGeometry:!0});var x={uniforms:i.UniformsUtils.merge([i.UniformsLib.common,i.UniformsLib.fog,{linewidth:{value:1},resolution:{value:new i.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1},opacity:{value:1}}]),vertexShader:`
|
|
256
256
|
#include <common>
|
|
257
257
|
#include <color_pars_vertex>
|
|
258
258
|
#include <fog_pars_vertex>
|
|
@@ -451,4 +451,4 @@
|
|
|
451
451
|
#include <premultiplied_alpha_fragment>
|
|
452
452
|
|
|
453
453
|
}
|
|
454
|
-
`},b=function(a){y(r,a);function r(t){var n=a.call(this,{uniforms:i.UniformsUtils.clone(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,clipping:!0})||this;return n.type="LineMaterial",n.dashed=!1,Object.defineProperties(n,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),n.setValues(t),n}return r}(i.ShaderMaterial);Object.assign(b.prototype,{isLineMaterial:!0});var E=function(a){y(r,a);function r(t,n){var e=a.call(this)||this;return e.type="LineSegments2",e.geometry=t!==void 0?t:new S,e.material=n!==void 0?n:new b({color:Math.random()*16777215}),e}return r.prototype.computeLineDistances=function(){for(var t=this.geometry,n=t.attributes.instanceStart,e=t.attributes.instanceEnd,o=new Float32Array(2*n.count),s=new i.Vector3,f=new i.Vector3,v=0,u=0,M=n.count;v<M;v++,u+=2)s.fromBufferAttribute(n,v),f.fromBufferAttribute(e,v),o[u]=u===0?0:o[u-1],o[u+1]=o[u]+s.distanceTo(f);var A=new i.InstancedInterleavedBuffer(o,2,1);return t.setAttribute("instanceDistanceStart",new i.InterleavedBufferAttribute(A,1,0)),t.setAttribute("instanceDistanceEnd",new i.InterleavedBufferAttribute(A,1,1)),this},r.prototype.raycast=function(t,n){t.camera===null&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var e=t.ray,o=t.camera,s=o.projectionMatrix,f=this.geometry,v=this.material,u=v.resolution,M=v.linewidth,A=f.attributes.instanceStart,F=f.attributes.instanceEnd,l=new i.Vector4,d=new i.Vector4,m=new i.Vector4,C=new i.Vector3,P=new i.Matrix4,p=new i.Line3,I=new i.Vector3;e.at(1,m),m.w=1,m.applyMatrix4(o.matrixWorldInverse),m.applyMatrix4(s),m.multiplyScalar(1/m.w),m.x*=u.x/2,m.y*=u.y/2,m.z=0,C.copy(m);var U=this.matrixWorld;P.multiplyMatrices(o.matrixWorldInverse,U);for(var h=0,k=A.count;h<k;h++){l.fromBufferAttribute(A,h),d.fromBufferAttribute(F,h),l.w=1,d.w=1,l.applyMatrix4(P),d.applyMatrix4(P),l.applyMatrix4(s),d.applyMatrix4(s),l.multiplyScalar(1/l.w),d.multiplyScalar(1/d.w);var Q=l.z<-1&&d.z<-1,Z=l.z>1&&d.z>1;if(!(Q||Z)){l.x*=u.x/2,l.y*=u.y/2,d.x*=u.x/2,d.y*=u.y/2,p.start.copy(l),p.start.z=0,p.end.copy(d),p.end.z=0;var _=p.closestPointToPointParameter(C,!0);p.at(_,I);var N=i.MathUtils.lerp(l.z,d.z,_),X=N>=-1&&N<=1,J=C.distanceTo(I)<M*.5;if(X&&J){p.start.fromBufferAttribute(A,h),p.end.fromBufferAttribute(F,h),p.start.applyMatrix4(U),p.end.applyMatrix4(U);var j=new i.Vector3,z=new i.Vector3;e.distanceSqToSegment(p.start,p.end,z,j),n.push({point:z,pointOnLine:j,distance:e.origin.distanceTo(z),object:this,faceIndex:h})}}}},r}(i.Mesh);Object.assign(E.prototype,{isLineSegments2:!0});var B=function(a){y(r,a);function r(t,n){var e=a.call(this,t,n)||this;return e.type="Line2",e}return r}(E);Object.assign(B.prototype,{isLine2:!0});var L=function(a){y(r,a);function r(){var t=a.call(this)||this;return t.type="LineGeometry",t}return r.prototype.setPositions=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setPositions.call(this,e),this},r.prototype.setColors=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setColors.call(this,e),this},r.prototype.fromLine=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.copy=function(){return this},r}(S);Object.assign(L.prototype,{isLineGeometry:!0});var W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==",D=14467195,T=8,H=2,R=20,O=null,V=function(a){y(r,a);function r(t,n){t===void 0&&(t=new i.Vector3),n===void 0&&(n=new i.Vector3);var e=a.call(this)||this;e.type="FiveLine",e.needsRender=!0;var o=new L,s=new b({color:D,linewidth:H,dashScale:R,dashed:!1});e.line=new B(o,s);var f=new i.BufferGeometry,v=new i.PointsMaterial({color:D,size:T,map:O||(O=new i.TextureLoader().load(W)),sizeAttenuation:!1,transparent:!0});return e.points=new i.Points(f,v),e.points.renderOrder=11,e.points.frustumCulled=!1,e.setPoints(t,n),e.add(e.line,e.points),e}return Object.defineProperty(r,"version",{get:function(){return"6.6.0-alpha.
|
|
454
|
+
`},b=(function(a){y(r,a);function r(t){var n=a.call(this,{uniforms:i.UniformsUtils.clone(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,clipping:!0})||this;return n.type="LineMaterial",n.dashed=!1,Object.defineProperties(n,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),n.setValues(t),n}return r})(i.ShaderMaterial);Object.assign(b.prototype,{isLineMaterial:!0});var E=(function(a){y(r,a);function r(t,n){var e=a.call(this)||this;return e.type="LineSegments2",e.geometry=t!==void 0?t:new S,e.material=n!==void 0?n:new b({color:Math.random()*16777215}),e}return r.prototype.computeLineDistances=function(){for(var t=this.geometry,n=t.attributes.instanceStart,e=t.attributes.instanceEnd,o=new Float32Array(2*n.count),s=new i.Vector3,f=new i.Vector3,v=0,u=0,M=n.count;v<M;v++,u+=2)s.fromBufferAttribute(n,v),f.fromBufferAttribute(e,v),o[u]=u===0?0:o[u-1],o[u+1]=o[u]+s.distanceTo(f);var A=new i.InstancedInterleavedBuffer(o,2,1);return t.setAttribute("instanceDistanceStart",new i.InterleavedBufferAttribute(A,1,0)),t.setAttribute("instanceDistanceEnd",new i.InterleavedBufferAttribute(A,1,1)),this},r.prototype.raycast=function(t,n){t.camera===null&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var e=t.ray,o=t.camera,s=o.projectionMatrix,f=this.geometry,v=this.material,u=v.resolution,M=v.linewidth,A=f.attributes.instanceStart,F=f.attributes.instanceEnd,l=new i.Vector4,d=new i.Vector4,m=new i.Vector4,C=new i.Vector3,P=new i.Matrix4,p=new i.Line3,I=new i.Vector3;e.at(1,m),m.w=1,m.applyMatrix4(o.matrixWorldInverse),m.applyMatrix4(s),m.multiplyScalar(1/m.w),m.x*=u.x/2,m.y*=u.y/2,m.z=0,C.copy(m);var U=this.matrixWorld;P.multiplyMatrices(o.matrixWorldInverse,U);for(var h=0,k=A.count;h<k;h++){l.fromBufferAttribute(A,h),d.fromBufferAttribute(F,h),l.w=1,d.w=1,l.applyMatrix4(P),d.applyMatrix4(P),l.applyMatrix4(s),d.applyMatrix4(s),l.multiplyScalar(1/l.w),d.multiplyScalar(1/d.w);var Q=l.z<-1&&d.z<-1,Z=l.z>1&&d.z>1;if(!(Q||Z)){l.x*=u.x/2,l.y*=u.y/2,d.x*=u.x/2,d.y*=u.y/2,p.start.copy(l),p.start.z=0,p.end.copy(d),p.end.z=0;var _=p.closestPointToPointParameter(C,!0);p.at(_,I);var N=i.MathUtils.lerp(l.z,d.z,_),X=N>=-1&&N<=1,J=C.distanceTo(I)<M*.5;if(X&&J){p.start.fromBufferAttribute(A,h),p.end.fromBufferAttribute(F,h),p.start.applyMatrix4(U),p.end.applyMatrix4(U);var j=new i.Vector3,z=new i.Vector3;e.distanceSqToSegment(p.start,p.end,z,j),n.push({point:z,pointOnLine:j,distance:e.origin.distanceTo(z),object:this,faceIndex:h})}}}},r})(i.Mesh);Object.assign(E.prototype,{isLineSegments2:!0});var B=(function(a){y(r,a);function r(t,n){var e=a.call(this,t,n)||this;return e.type="Line2",e}return r})(E);Object.assign(B.prototype,{isLine2:!0});var L=(function(a){y(r,a);function r(){var t=a.call(this)||this;return t.type="LineGeometry",t}return r.prototype.setPositions=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setPositions.call(this,e),this},r.prototype.setColors=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setColors.call(this,e),this},r.prototype.fromLine=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.copy=function(){return this},r})(S);Object.assign(L.prototype,{isLineGeometry:!0});var W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==",D=14467195,T=8,H=2,R=20,O=null,V=(function(a){y(r,a);function r(t,n){t===void 0&&(t=new i.Vector3),n===void 0&&(n=new i.Vector3);var e=a.call(this)||this;e.type="FiveLine",e.needsRender=!0;var o=new L,s=new b({color:D,linewidth:H,dashScale:R,dashed:!1});e.line=new B(o,s);var f=new i.BufferGeometry,v=new i.PointsMaterial({color:D,size:T,map:O||(O=new i.TextureLoader().load(W)),sizeAttenuation:!1,transparent:!0});return e.points=new i.Points(f,v),e.points.renderOrder=11,e.points.frustumCulled=!1,e.setPoints(t,n),e.add(e.line,e.points),e}return Object.defineProperty(r,"version",{get:function(){return"6.6.0-alpha.2"},enumerable:!1,configurable:!0}),r.prototype.setPoints=function(t,n){var e=[].concat(t.toArray(),n.toArray());this.points.geometry.setAttribute("position",new i.BufferAttribute(new Float32Array(e),3)),this.line.geometry.setPositions(e),this.line.computeLineDistances(),this.needsRender=!0},r.prototype.getPoints=function(){var t=this.points.geometry.attributes.position.array;return[new i.Vector3(t[0],t[1],t[2]),new i.Vector3(t[3],t[4],t[5])]},r.prototype.setMaterial=function(t){var n=this.line.material;for(var e in t)if(t.hasOwnProperty(e)){var o=t[e];e==="dashed"?(n.dashed=o,o?n.defines.USE_DASH="":delete n.defines.USE_DASH,n.needsUpdate=!0):n[e]=t[e]}this.needsRender=!0},r.prototype.setResolution=function(t,n){var e=this.line.material.resolution;(e.x!==t||e.y!==n)&&(e.set(t,n),this.needsRender=!0)},r})(i.Object3D);Object.assign(V.prototype,{isFiveLine:!0}),c.Line=V,c.LineGeometry=L,c.LineMaterial=b,c.LineSegmentsGeometry=S,c.THREE_Line2=B,c.THREE_LineSegments2=E,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
|
package/umd/five-plugins.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
|
-
*/(function(q,de){typeof exports=="object"&&typeof module!="undefined"?de(exports,require("@realsee/five"),require("three"),require("@realsee/five/plugins")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","@realsee/five/plugins"],de):(q=typeof globalThis!="undefined"?globalThis:q||self,de(q.FiveSDK_Plugins={},q.FiveSDK,q.THREE,q.FiveSDK_Plugins))})(this,function(q,de,_,At){"use strict";function Wt(f){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const e in f)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(f,e);Object.defineProperty(o,e,a.get?a:{enumerable:!0,get:()=>f[e]})}}return o.default=f,Object.freeze(o)}const T=Wt(_);function Ht(f){return/^https?:\/\/|^\/\//.test(f)||/^data:/.test(f)}function qt(f,o){return Ht(o)?o:"".concat(f).concat(o)}q.BasePlugin=void 0,function(f){var o=function(){function e(a,t){this.hooks=new de.Subscribe,this.staticPrefix="//vr-image-4.realsee-cdn.cn",this.five=a,t!=null&&t.staticPrefix&&(this.staticPrefix=t.staticPrefix)}return e.prototype.getCurrentState=function(){return this.state},e.prototype.absoluteUrl=function(a){return qt(this.staticPrefix,a)},e}();f.Controller=o}(q.BasePlugin||(q.BasePlugin={}));var lt=function(f,o){return lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t])},lt(f,o)};function Ne(f,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");lt(f,o);function e(){this.constructor=f}f.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}var 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(w){c(w)}}function g(v){try{d(a.throw(v))}catch(w){c(w)}}function d(v){v.done?s(v.value):t(v.value).then(l,g)}d((a=a.apply(f,o||[])).next())})}function Le(f,o){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,t,s,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=l(0),c.throw=l(1),c.return=l(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return g([d,v])}}function g(d){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(e=0)),e;)try{if(a=1,t&&(s=d[0]&2?t.return:d[0]?t.throw||((s=t.return)&&s.call(t),0):t.next)&&!(s=s.call(t,d[1])).done)return s;switch(t=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return e.label++,{value:d[1],done:!1};case 5:e.label++,t=d[1],d=[0];continue;case 7:d=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){e=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){e.label=d[1];break}if(d[0]===6&&e.label<s[1]){e.label=s[1],s=d;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(d);break}s[2]&&e.ops.pop(),e.trys.pop();continue}d=o.call(f,e)}catch(v){d=[6,v],t=0}finally{a=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Mt(f,o,e){if(e||arguments.length===2)for(var a=0,t=o.length,s;a<t;a++)(s||!(a in o))&&(s||(s=Array.prototype.slice.call(o,0,a)),s[a]=o[a]);return f.concat(s||Array.prototype.slice.call(o))}typeof SuppressedError=="function"&&SuppressedError;function Kt(f){return new Promise(function(o,e){var a=new Image;a.onload=function(){a.onload=a.onerror=function(){},o(a)},a.onerror=function(t){a.onload=a.onerror=function(){},e(t)},a.crossOrigin="",a.src=f})}var Zt=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),ct=typeof performance!="undefined"?function(){return Zt+performance.now()}:function(){return Date.now()};function He(f,o,e){return f+(o-f)*e}function Qt(f,o,e,a){var t=(o*e+2*f)/Math.pow(e,3),s=-(2*o*e+3*f)/Math.pow(e,2),c=o,l=f;return t*Math.pow(a,3)+s*Math.pow(a,2)+c*a+l}function Jt(f,o,e,a){var t=(o*e+2*f)/Math.pow(e,3),s=-(2*o*e+3*f)/Math.pow(e,2),c=o;return 3*t*Math.pow(a,2)+2*s*a+c}function $t(f,o,e,a){var t=a[1]-a[0];return f=qe(f,a),o=qe(o,a),o-f>t/2?He(f+t,o,e):f-o>t/2?He(f-t,o,e):He(f,o,e)}function qe(f,o){var e=o[1]-o[0];return f<o[0]?qe(f+e,o):f>=o[1]?qe(f-e,o):f}function en(f,o,e,a){return a?$t(f,o,e,a):He(f,o,e)}var Ot=function(){function f(o){this.config={},this.progress=1,this.ended=!0,this.value={},this.startTime=ct(),this.startVelocity=0,this.duration=0,this.keyframes=[];for(var e in o){var a=o[e];typeof a=="number"?(this.value[e]=a,this.config[e]={circle:!1}):(this.value[e]=a.value,this.config[e]={circle:a.circle})}this.keyframes=[{progress:0,value: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-Qt(1,this.startVelocity,this.duration,e)},f.prototype.getValue=function(o){for(var e=1;e<this.keyframes.length;e++)if(this.keyframes[e].progress>o){var a=this.keyframes[e-1],t=this.keyframes[e],s={};for(var c in this.config){var l=(o-a.progress)/(t.progress-a.progress);s[c]=en(a.value[c],t.value[c],l,this.config[c].circle)}return s}return z({},this.keyframes[this.keyframes.length-1].value)},f.prototype.getProgressVelocity=function(o){var e=o-this.startTime;return e>=this.duration?0:Jt(1,this.startVelocity,this.duration,e)},f.prototype.update=function(o){return this.ended?!0:(this.progress=Math.min(1,Math.max(0,this.progress,this.getProgress(o))),this.value=this.getValue(this.progress),this.ended=this.progress>=1,this.ended&&this.callbacks&&(this.callbacks[0](),this.callbacks=void 0),this.ended)},f.prototype.getKeyFrameSegment=function(o){for(var e=this.getProgress(o),a=1;a<this.keyframes.length;a++)if(this.keyframes[a].progress>e)return[this.keyframes[a-1],this.keyframes[a]];return[this.keyframes[this.keyframes.length-2],this.keyframes[this.keyframes.length-1]]},f.prototype.getTargetKeyframe=function(){return this.keyframes[this.keyframes.length-1]},f.prototype.set=function(o,e,a,t){var s;a===void 0&&(a=0),isNaN(e)&&(e=0),isNaN(a)&&(a=0),t=t!=null?t:ct();var c=this.getProgress(t),l=this.getValue(c),g={};for(var d in this.config)g[d]=(s=o[d])!==null&&s!==void 0?s:l[d];var v=[{progress:0,value:l},{progress:1,value:g}];return this.setKeyframes(v,e,a,t)},f.prototype.setKeyframes=function(o,e,a,t){var s=this;if(a===void 0&&(a=0),o.length<2)throw new Error("keyframes invalid.");return isNaN(e)&&(e=0),isNaN(a)&&(a=0),this.callbacks&&(this.callbacks[1](new Error("motion aborted.")),this.callbacks=void 0),new Promise(function(c,l){t=t!=null?t:ct(),s.progress=0,s.ended=!1,s.startTime=t,s.startVelocity=a,s.keyframes=o,s.duration=e,e===0?(s.progress=1,s.value=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}(),tn=[{progress:0,value:{scale:0,opacity:0,shadow:2}},{progress:.2,value:{scale:.5,opacity:1,shadow:1}},{progress:.8,value:{scale:2,opacity:0,shadow:.5}},{progress:1,value:{scale:2,opacity:0,shadow:.5}}],nn=[{progress:0,value:{scale:0,opacity:0,shadow:2}},{progress:.2,value:{scale:.4,opacity:1,shadow:2}},{progress:.8,value:{scale:1.6,opacity:.4,shadow:.5}},{progress:1,value:{scale:2,opacity:0,shadow:.5}}],rn=`
|
|
255
|
+
*/(function(q,de){typeof exports=="object"&&typeof module!="undefined"?de(exports,require("@realsee/five"),require("three"),require("@realsee/five/plugins")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","@realsee/five/plugins"],de):(q=typeof globalThis!="undefined"?globalThis:q||self,de(q.FiveSDK_Plugins={},q.FiveSDK,q.THREE,q.FiveSDK_Plugins))})(this,(function(q,de,_,At){"use strict";function Wt(f){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const e in f)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(f,e);Object.defineProperty(o,e,a.get?a:{enumerable:!0,get:()=>f[e]})}}return o.default=f,Object.freeze(o)}const T=Wt(_);function Ht(f){return/^https?:\/\/|^\/\//.test(f)||/^data:/.test(f)}function qt(f,o){return Ht(o)?o:"".concat(f).concat(o)}q.BasePlugin=void 0,(function(f){var o=(function(){function e(a,t){this.hooks=new de.Subscribe,this.staticPrefix="//vr-image-4.realsee-cdn.cn",this.five=a,t!=null&&t.staticPrefix&&(this.staticPrefix=t.staticPrefix)}return e.prototype.getCurrentState=function(){return this.state},e.prototype.absoluteUrl=function(a){return qt(this.staticPrefix,a)},e})();f.Controller=o})(q.BasePlugin||(q.BasePlugin={}));var lt=function(f,o){return lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t])},lt(f,o)};function Ne(f,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");lt(f,o);function e(){this.constructor=f}f.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}var 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(w){c(w)}}function g(v){try{d(a.throw(v))}catch(w){c(w)}}function d(v){v.done?s(v.value):t(v.value).then(l,g)}d((a=a.apply(f,o||[])).next())})}function Le(f,o){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,t,s,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=l(0),c.throw=l(1),c.return=l(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return g([d,v])}}function g(d){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(e=0)),e;)try{if(a=1,t&&(s=d[0]&2?t.return:d[0]?t.throw||((s=t.return)&&s.call(t),0):t.next)&&!(s=s.call(t,d[1])).done)return s;switch(t=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return e.label++,{value:d[1],done:!1};case 5:e.label++,t=d[1],d=[0];continue;case 7:d=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){e=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){e.label=d[1];break}if(d[0]===6&&e.label<s[1]){e.label=s[1],s=d;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(d);break}s[2]&&e.ops.pop(),e.trys.pop();continue}d=o.call(f,e)}catch(v){d=[6,v],t=0}finally{a=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Mt(f,o,e){if(e||arguments.length===2)for(var a=0,t=o.length,s;a<t;a++)(s||!(a in o))&&(s||(s=Array.prototype.slice.call(o,0,a)),s[a]=o[a]);return f.concat(s||Array.prototype.slice.call(o))}typeof SuppressedError=="function"&&SuppressedError;function Kt(f){return new Promise(function(o,e){var a=new Image;a.onload=function(){a.onload=a.onerror=function(){},o(a)},a.onerror=function(t){a.onload=a.onerror=function(){},e(t)},a.crossOrigin="",a.src=f})}var Zt=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),ct=typeof performance!="undefined"?(function(){return Zt+performance.now()}):(function(){return Date.now()});function He(f,o,e){return f+(o-f)*e}function Qt(f,o,e,a){var t=(o*e+2*f)/Math.pow(e,3),s=-(2*o*e+3*f)/Math.pow(e,2),c=o,l=f;return t*Math.pow(a,3)+s*Math.pow(a,2)+c*a+l}function Jt(f,o,e,a){var t=(o*e+2*f)/Math.pow(e,3),s=-(2*o*e+3*f)/Math.pow(e,2),c=o;return 3*t*Math.pow(a,2)+2*s*a+c}function $t(f,o,e,a){var t=a[1]-a[0];return f=qe(f,a),o=qe(o,a),o-f>t/2?He(f+t,o,e):f-o>t/2?He(f-t,o,e):He(f,o,e)}function qe(f,o){var e=o[1]-o[0];return f<o[0]?qe(f+e,o):f>=o[1]?qe(f-e,o):f}function en(f,o,e,a){return a?$t(f,o,e,a):He(f,o,e)}var Ot=(function(){function f(o){this.config={},this.progress=1,this.ended=!0,this.value={},this.startTime=ct(),this.startVelocity=0,this.duration=0,this.keyframes=[];for(var e in o){var a=o[e];typeof a=="number"?(this.value[e]=a,this.config[e]={circle:!1}):(this.value[e]=a.value,this.config[e]={circle:a.circle})}this.keyframes=[{progress:0,value: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-Qt(1,this.startVelocity,this.duration,e)},f.prototype.getValue=function(o){for(var e=1;e<this.keyframes.length;e++)if(this.keyframes[e].progress>o){var a=this.keyframes[e-1],t=this.keyframes[e],s={};for(var c in this.config){var l=(o-a.progress)/(t.progress-a.progress);s[c]=en(a.value[c],t.value[c],l,this.config[c].circle)}return s}return z({},this.keyframes[this.keyframes.length-1].value)},f.prototype.getProgressVelocity=function(o){var e=o-this.startTime;return e>=this.duration?0:Jt(1,this.startVelocity,this.duration,e)},f.prototype.update=function(o){return this.ended?!0:(this.progress=Math.min(1,Math.max(0,this.progress,this.getProgress(o))),this.value=this.getValue(this.progress),this.ended=this.progress>=1,this.ended&&this.callbacks&&(this.callbacks[0](),this.callbacks=void 0),this.ended)},f.prototype.getKeyFrameSegment=function(o){for(var e=this.getProgress(o),a=1;a<this.keyframes.length;a++)if(this.keyframes[a].progress>e)return[this.keyframes[a-1],this.keyframes[a]];return[this.keyframes[this.keyframes.length-2],this.keyframes[this.keyframes.length-1]]},f.prototype.getTargetKeyframe=function(){return this.keyframes[this.keyframes.length-1]},f.prototype.set=function(o,e,a,t){var s;a===void 0&&(a=0),isNaN(e)&&(e=0),isNaN(a)&&(a=0),t=t!=null?t:ct();var c=this.getProgress(t),l=this.getValue(c),g={};for(var d in this.config)g[d]=(s=o[d])!==null&&s!==void 0?s:l[d];var v=[{progress:0,value:l},{progress:1,value:g}];return this.setKeyframes(v,e,a,t)},f.prototype.setKeyframes=function(o,e,a,t){var s=this;if(a===void 0&&(a=0),o.length<2)throw new Error("keyframes invalid.");return isNaN(e)&&(e=0),isNaN(a)&&(a=0),this.callbacks&&(this.callbacks[1](new Error("motion aborted.")),this.callbacks=void 0),new Promise(function(c,l){t=t!=null?t:ct(),s.progress=0,s.ended=!1,s.startTime=t,s.startVelocity=a,s.keyframes=o,s.duration=e,e===0?(s.progress=1,s.value=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})(),tn=[{progress:0,value:{scale:0,opacity:0,shadow:2}},{progress:.2,value:{scale:.5,opacity:1,shadow:1}},{progress:.8,value:{scale:2,opacity:0,shadow:.5}},{progress:1,value:{scale:2,opacity:0,shadow:.5}}],nn=[{progress:0,value:{scale:0,opacity:0,shadow:2}},{progress:.2,value:{scale:.4,opacity:1,shadow:2}},{progress:.8,value:{scale:1.6,opacity:.4,shadow:.5}},{progress:1,value:{scale:2,opacity:0,shadow:.5}}],rn=`
|
|
256
256
|
varying vec2 vUv;
|
|
257
257
|
void main() {
|
|
258
258
|
vUv = uv;
|
|
@@ -304,7 +304,7 @@ void main() {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
`,on=function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.canvas=document.createElement("canvas"),t.group=new T.Group,t.wrapper=document.createElement("div"),t.style=document.createElement("style"),t.itemMaskMesh=function(){var l=new T.Mesh(new T.SphereBufferGeometry(1,60,40),new T.ShaderMaterial({vertexShader:rn,fragmentShader:an,uniforms:{map:{value:new T.Texture},color:{value:new T.Vector4}},depthWrite:!1,depthTest:!1,transparent:!0}));return l.renderOrder=-3,l.geometry.rotateY(-Math.PI/2),l.geometry.scale(-1,1,1),l}(),t.onFivePanoArrived=function(l){t.state.mode==="mask"&&t.loadPanoMask(l)},t.onFiveWantsMoveToPano=function(l){t.state.mode==="box"&&t.select()},t.loadPanoMask=function(l){return ke(t,void 0,void 0,function(){var g,d,v,w,A,E,C,O,D,b;return Le(this,function(y){switch(y.label){case 0:return g=this,d=g.five,v=g.canvas,w=g.itemMaskMesh,A=g.data,E=v.getContext("2d"),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,Kt(O)]:[2];case 1:return D=y.sent(),v.width=D.width,v.height=D.height,E==null||E.drawImage(D,0,0,D.width,D.height),w.material.uniforms.map.value.image=D,w.material.uniforms.map.value.minFilter=T.LinearFilter,w.material.uniforms.map.value.needsUpdate=!0,w.position.copy(C.position),w.quaternion.copy(C.quaternion),d.scene.add(w),d.needsRender=!0,[2]}})})},t.onFiveMouseMove=function(l){var g;if(t.state.mode==="mask"&&t.five.state.mode==="Panorama"){var d=t,v=d.five,w=d.itemMaskMesh,A=v.observers[v.state.panoIndex],E=(g=l.pointers[0])===null||g===void 0?void 0:g.raycaster;if(E){var C=E.intersectObjects(t.group.children.filter(function(O){return O.userData.visible_viewpoint.includes(String(A.derivedId))}),!0)[0];C?w.material.uniforms.color.value=C.object.userData.color:w.material.uniforms.color.value=new T.Vector4(0,0,0,1)}}},t.onFiveTapGesture=function(l){var g=t.five,d=g.observers[g.state.panoIndex];if(l){var v=l.intersectObjects(t.group.children.filter(function(E){return E.userData.visible_viewpoint.includes(String(d.derivedId))}),!0)[0];if(v){t.select(v.object.name),t.stopAnimation&&t.stopAnimation(),t.tapPosition=v.point,t.changeTapScreenPosition();var w=new Ot({opacity:0,scale:0,shadow:2}),A=new Ot({opacity:0,scale:0,shadow:2});return w.setKeyframes(tn,1e3),A.setKeyframes(nn,1e3),t.stopAnimation=de.AnimationFrameLoop.shared.add(function(E,C){var O,D=w.update(E),b=A.update(E);t.wrapper.firstChild.style.opacity="".concat(w.value.opacity),t.wrapper.firstChild.style.transform="scale(".concat(w.value.scale,")"),t.wrapper.firstChild.style.boxShadow="0 0 0 ".concat(w.value.shadow,"px #fff"),t.wrapper.lastChild.style.opacity="".concat(A.value.opacity),t.wrapper.lastChild.style.transform="scale(".concat(A.value.scale,")"),t.wrapper.lastChild.style.boxShadow="0 0 0 ".concat(A.value.shadow,"px #fff"),D&&b&&((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
|
+
`,on=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.canvas=document.createElement("canvas"),t.group=new T.Group,t.wrapper=document.createElement("div"),t.style=document.createElement("style"),t.itemMaskMesh=(function(){var l=new T.Mesh(new T.SphereBufferGeometry(1,60,40),new T.ShaderMaterial({vertexShader:rn,fragmentShader:an,uniforms:{map:{value:new T.Texture},color:{value:new T.Vector4}},depthWrite:!1,depthTest:!1,transparent:!0}));return l.renderOrder=-3,l.geometry.rotateY(-Math.PI/2),l.geometry.scale(-1,1,1),l})(),t.onFivePanoArrived=function(l){t.state.mode==="mask"&&t.loadPanoMask(l)},t.onFiveWantsMoveToPano=function(l){t.state.mode==="box"&&t.select()},t.loadPanoMask=function(l){return ke(t,void 0,void 0,function(){var g,d,v,w,A,E,C,O,D,b;return Le(this,function(y){switch(y.label){case 0:return g=this,d=g.five,v=g.canvas,w=g.itemMaskMesh,A=g.data,E=v.getContext("2d"),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,Kt(O)]:[2];case 1:return D=y.sent(),v.width=D.width,v.height=D.height,E==null||E.drawImage(D,0,0,D.width,D.height),w.material.uniforms.map.value.image=D,w.material.uniforms.map.value.minFilter=T.LinearFilter,w.material.uniforms.map.value.needsUpdate=!0,w.position.copy(C.position),w.quaternion.copy(C.quaternion),d.scene.add(w),d.needsRender=!0,[2]}})})},t.onFiveMouseMove=function(l){var g;if(t.state.mode==="mask"&&t.five.state.mode==="Panorama"){var d=t,v=d.five,w=d.itemMaskMesh,A=v.observers[v.state.panoIndex],E=(g=l.pointers[0])===null||g===void 0?void 0:g.raycaster;if(E){var C=E.intersectObjects(t.group.children.filter(function(O){return O.userData.visible_viewpoint.includes(String(A.derivedId))}),!0)[0];C?w.material.uniforms.color.value=C.object.userData.color:w.material.uniforms.color.value=new T.Vector4(0,0,0,1)}}},t.onFiveTapGesture=function(l){var g=t.five,d=g.observers[g.state.panoIndex];if(l){var v=l.intersectObjects(t.group.children.filter(function(E){return E.userData.visible_viewpoint.includes(String(d.derivedId))}),!0)[0];if(v){t.select(v.object.name),t.stopAnimation&&t.stopAnimation(),t.tapPosition=v.point,t.changeTapScreenPosition();var w=new Ot({opacity:0,scale:0,shadow:2}),A=new Ot({opacity:0,scale:0,shadow:2});return w.setKeyframes(tn,1e3),A.setKeyframes(nn,1e3),t.stopAnimation=de.AnimationFrameLoop.shared.add(function(E,C){var O,D=w.update(E),b=A.update(E);t.wrapper.firstChild.style.opacity="".concat(w.value.opacity),t.wrapper.firstChild.style.transform="scale(".concat(w.value.scale,")"),t.wrapper.firstChild.style.boxShadow="0 0 0 ".concat(w.value.shadow,"px #fff"),t.wrapper.lastChild.style.opacity="".concat(A.value.opacity),t.wrapper.lastChild.style.transform="scale(".concat(A.value.scale,")"),t.wrapper.lastChild.style.boxShadow="0 0 0 ".concat(A.value.shadow,"px #fff"),D&&b&&((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:T.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 T.Mesh(y,x);return p.position.copy(b),p.name="".concat(l.category_name).concat(l.index),p.userData.color=new((g=T.Vector4).bind.apply(g,Mt(Mt([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 T.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}(q.BasePlugin.Controller),sn=function(f,o){return new on(f,o)};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
350
|
+
`,side:T.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 T.Mesh(y,x);return p.position.copy(b),p.name="".concat(l.category_name).concat(l.index),p.userData.color=new((g=T.Vector4).bind.apply(g,Mt(Mt([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 T.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})(q.BasePlugin.Controller),sn=function(f,o){return new on(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 ut=function(f,o,e,a){var t=["","webkit","Moz","MS","ms","o"],s=o.createElement?o.createElement("div"):a,c="function",l=Math.round,g=Math.abs,d=Date.now;function v(n,r,i){return setTimeout(y(n,i),r)}function w(n,r,i){return Array.isArray(n)?(A(n,i[r],i),!0):!1}function A(n,r,i){var h;if(n)if(n.forEach)n.forEach(r,i);else if(n.length!==a)for(h=0;h<n.length;)r.call(i,n[h],h,n),h++;else for(h in n)n.hasOwnProperty(h)&&r.call(i,n[h],h,n)}function E(n,r,i){var h="DEPRECATED METHOD: "+r+`
|
|
354
|
+
* Licensed under the MIT license */var ut=(function(f,o,e,a){var t=["","webkit","Moz","MS","ms","o"],s=o.createElement?o.createElement("div"):a,c="function",l=Math.round,g=Math.abs,d=Date.now;function v(n,r,i){return setTimeout(y(n,i),r)}function w(n,r,i){return Array.isArray(n)?(A(n,i[r],i),!0):!1}function A(n,r,i){var h;if(n)if(n.forEach)n.forEach(r,i);else if(n.length!==a)for(h=0;h<n.length;)r.call(i,n[h],h,n),h++;else for(h in n)n.hasOwnProperty(h)&&r.call(i,n[h],h,n)}function E(n,r,i){var h="DEPRECATED METHOD: "+r+`
|
|
355
355
|
`+i+` AT
|
|
356
|
-
`;return function(){var m=new Error("get-stack-trace"),P=m&&m.stack?m.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",k=f.console&&(f.console.warn||f.console.log);return k&&k.call(f.console,h,P),n.apply(this,arguments)}}var C;typeof Object.assign!="function"?C=function(r){if(r===a||r===null)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(r),h=1;h<arguments.length;h++){var m=arguments[h];if(m!==a&&m!==null)for(var P in m)m.hasOwnProperty(P)&&(i[P]=m[P])}return i}:C=Object.assign;var O=E(function(r,i,h){for(var m=Object.keys(i),P=0;P<m.length;)(!h||h&&r[m[P]]===a)&&(r[m[P]]=i[m[P]]),P++;return r},"extend","Use `assign`."),D=E(function(r,i){return O(r,i,!0)},"merge","Use `assign`.");function b(n,r,i){var h=r.prototype,m;m=n.prototype=Object.create(h),m.constructor=n,m._super=h,i&&C(m,i)}function y(n,r){return function(){return n.apply(r,arguments)}}function x(n,r){return typeof n==c?n.apply(r&&r[0]||a,r):n}function p(n,r){return n===a?r:n}function I(n,r,i){A(re(r),function(h){n.addEventListener(h,i,!1)})}function M(n,r,i){A(re(r),function(h){n.removeEventListener(h,i,!1)})}function ne(n,r){for(;n;){if(n==r)return!0;n=n.parentNode}return!1}function J(n,r){return n.indexOf(r)>-1}function re(n){return n.trim().split(/\s+/g)}function ue(n,r,i){if(n.indexOf&&!i)return n.indexOf(r);for(var h=0;h<n.length;){if(i&&n[h][i]==r||!i&&n[h]===r)return h;h++}return-1}function be(n){return Array.prototype.slice.call(n,0)}function Me(n,r,i){for(var h=[],m=[],P=0;P<n.length;){var k=n[P][r];ue(m,k)<0&&h.push(n[P]),m[P]=k,P++}return h=h.sort(function(ce,K){return ce[r]>K[r]}),h}function ie(n,r){for(var i,h,m=r[0].toUpperCase()+r.slice(1),P=0;P<t.length;){if(i=t[P],h=i?i+m:r,h in n)return h;P++}return a}var se=1;function U(){return se++}function N(n){var r=n.ownerDocument||n;return r.defaultView||r.parentWindow||f}var S=/mobile|tablet|ip(ad|hone|od)|android/i,V="ontouchstart"in f,j=ie(f,"PointerEvent")!==a,ae=V&&S.test(navigator.userAgent),X="touch",B="pen",Z="mouse",Y="kinect",R=25,L=1,te=2,G=4,W=8,Oe=1,Ee=2,Ce=4,_e=8,xe=16,le=Ee|Ce,fe=_e|xe,Ye=le|fe,je=["x","y"],Se=["clientX","clientY"];function oe(n,r){var i=this;this.manager=n,this.callback=r,this.element=n.element,this.target=n.options.inputTarget,this.domHandler=function(h){x(n.options.enable,[n])&&i.handler(h)},this.init()}oe.prototype={handler:function(){},init:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(N(this.element),this.evWin,this.domHandler)}};function Je(n){var r,i=n.options.inputClass;return i?r=i:j?r=mt:ae?r=nt:V?r=gt:r=tt,new r(n,$e)}function $e(n,r,i){var h=i.pointers.length,m=i.changedPointers.length,P=r&L&&h-m===0,k=r&(G|W)&&h-m===0;i.isFirst=!!P,i.isFinal=!!k,P&&(n.session={}),i.eventType=r,u(n,i),n.emit("hammer.input",i),n.recognize(i),n.session.prevInput=i}function u(n,r){var i=n.session,h=r.pointers,m=h.length;i.firstInput||(i.firstInput=Q(r)),m>1&&!i.firstMultiple?i.firstMultiple=Q(r):m===1&&(i.firstMultiple=!1);var P=i.firstInput,k=i.firstMultiple,$=k?k.center:P.center,ce=r.center=ve(h);r.timeStamp=d(),r.deltaTime=r.timeStamp-P.timeStamp,r.angle=vt($,ce),r.distance=et($,ce),F(i,r),r.offsetDirection=we(r.deltaX,r.deltaY);var K=ze(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=K.x,r.overallVelocityY=K.y,r.overallVelocity=g(K.x)>g(K.y)?K.x:K.y,r.scale=k?Tn(k.pointers,h):1,r.rotation=k?wn(k.pointers,h):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,H(i,r);var ge=n.element;ne(r.srcEvent.target,ge)&&(ge=r.srcEvent.target),r.target=ge}function F(n,r){var i=r.center,h=n.offsetDelta||{},m=n.prevDelta||{},P=n.prevInput||{};(r.eventType===L||P.eventType===G)&&(m=n.prevDelta={x:P.deltaX||0,y:P.deltaY||0},h=n.offsetDelta={x:i.x,y:i.y}),r.deltaX=m.x+(i.x-h.x),r.deltaY=m.y+(i.y-h.y)}function H(n,r){var i=n.lastInterval||r,h=r.timeStamp-i.timeStamp,m,P,k,$;if(r.eventType!=W&&(h>R||i.velocity===a)){var ce=r.deltaX-i.deltaX,K=r.deltaY-i.deltaY,ge=ze(h,ce,K);P=ge.x,k=ge.y,m=g(ge.x)>g(ge.y)?ge.x:ge.y,$=we(ce,K),n.lastInterval=r}else m=i.velocity,P=i.velocityX,k=i.velocityY,$=i.direction;r.velocity=m,r.velocityX=P,r.velocityY=k,r.direction=$}function Q(n){for(var r=[],i=0;i<n.pointers.length;)r[i]={clientX:l(n.pointers[i].clientX),clientY:l(n.pointers[i].clientY)},i++;return{timeStamp:d(),pointers:r,center:ve(r),deltaX:n.deltaX,deltaY:n.deltaY}}function ve(n){var r=n.length;if(r===1)return{x:l(n[0].clientX),y:l(n[0].clientY)};for(var i=0,h=0,m=0;m<r;)i+=n[m].clientX,h+=n[m].clientY,m++;return{x:l(i/r),y:l(h/r)}}function ze(n,r,i){return{x:r/n||0,y:i/n||0}}function we(n,r){return n===r?Oe:g(n)>=g(r)?n<0?Ee:Ce:r<0?_e:xe}function et(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.sqrt(h*h+m*m)}function vt(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.atan2(m,h)*180/Math.PI}function wn(n,r){return vt(r[1],r[0],Se)+vt(n[1],n[0],Se)}function Tn(n,r){return et(r[0],r[1],Se)/et(n[0],n[1],Se)}var Pn={mousedown:L,mousemove:te,mouseup:G},En="mousedown",xn="mousemove mouseup";function tt(){this.evEl=En,this.evWin=xn,this.pressed=!1,oe.apply(this,arguments)}b(tt,oe,{handler:function(r){var i=Pn[r.type];i&L&&(r.button===0||r.button===2)&&(this.pressed=!0),i&te&&r.which!==1&&(i=G),this.pressed&&(i&G&&(this.pressed=!1),this.callback(this.manager,i,{pointers:[r],changedPointers:[r],pointerType:Z,srcEvent:r}))}});var Nt={pointerdown:L,pointermove:te,pointerup:G,pointercancel:W,pointerout:W},An={2:X,3:B,4:Z,5:Y},kt="pointerdown",Lt="pointermove pointerup pointercancel";f.MSPointerEvent&&!f.PointerEvent&&(kt="MSPointerDown",Lt="MSPointerMove MSPointerUp MSPointerCancel");function mt(){this.evEl=kt,this.evWin=Lt,oe.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(mt,oe,{handler:function(r){var i=this.store,h=!1,m=!1,P=r.type.toLowerCase().replace("ms",""),k=Nt[P],$=An[r.pointerType]||r.pointerType,ce=$==X,K=ue(i,r.pointerId,"pointerId");k&L&&(r.button===0||r.button===2||ce)?K<0&&(i.push(r),K=i.length-1):k&(G|W)?h=!0:!ce&&r.buttons===0&&(h=!0,m=!0,k=Nt.pointerup),!(K<0)&&(m||(i[K]=r),this.callback(this.manager,k,{pointers:i,changedPointers:[r],pointerType:$,srcEvent:i[K]}),h&&i.splice(K,1))}});var Mn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},On="touchstart",Cn="touchstart touchmove touchend touchcancel";function Dt(){this.evTarget=On,this.evWin=Cn,this.started=!1,oe.apply(this,arguments)}b(Dt,oe,{handler:function(r){var i=Mn[r.type];if(i===L&&(this.started=!0),!!this.started){var h=_n.call(this,r,i);i&(G|W)&&h[0].length-h[1].length===0&&(this.started=!1),this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}}});function _n(n,r){var i=be(n.touches),h=be(n.changedTouches);return r&(G|W)&&(i=Me(i.concat(h),"identifier")),[i,h]}var Sn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},In="touchstart touchmove touchend touchcancel";function nt(){this.evTarget=In,this.targetIds={},oe.apply(this,arguments)}b(nt,oe,{handler:function(r){var i=Sn[r.type],h=Nn.call(this,r,i);h&&this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}});function Nn(n,r){var i=be(n.touches),h=this.targetIds;if(r&(L|te)&&i.length===1)return h[i[0].identifier]=!0,[i,i];var m,P,k=be(n.changedTouches),$=[],ce=this.target;if(P=i.filter(function(K){return ne(K.target,ce)}),r===L)for(m=0;m<P.length;)h[P[m].identifier]=!0,m++;for(m=0;m<k.length;)h[k[m].identifier]&&$.push(k[m]),r&(G|W)&&delete h[k[m].identifier],m++;if($.length)return[Me(P.concat($),"identifier"),$]}var kn=2500,Ft=25;function gt(){oe.apply(this,arguments);var n=y(this.handler,this);this.touch=new nt(this.manager,n),this.mouse=new tt(this.manager,n),this.primaryTouch=null,this.lastTouches=[]}b(gt,oe,{handler:function(r,i,h){var m=h.pointerType==X,P=h.pointerType==Z;if(!(P&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(m)Ln.call(this,i,h);else if(P&&Dn.call(this,h))return;this.callback(r,i,h)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ln(n,r){n&L?(this.primaryTouch=r.changedPointers[0].identifier,Ut.call(this,r)):n&(G|W)&&Ut.call(this,r)}function Ut(n){var r=n.changedPointers[0];if(r.identifier===this.primaryTouch){var i={x:r.clientX,y:r.clientY};this.lastTouches.push(i);var h=this.lastTouches,m=function(){var P=h.indexOf(i);P>-1&&h.splice(P,1)};setTimeout(m,kn)}}function Dn(n){for(var r=n.srcEvent.clientX,i=n.srcEvent.clientY,h=0;h<this.lastTouches.length;h++){var m=this.lastTouches[h],P=Math.abs(r-m.x),k=Math.abs(i-m.y);if(P<=Ft&&k<=Ft)return!0}return!1}var Vt=s?ie(s.style,"touchAction"):a,Bt=Vt!==a,Rt="compute",Yt="auto",yt="manipulation",Ie="none",Ge="pan-x",Xe="pan-y",rt=Un();function bt(n,r){this.manager=n,this.set(r)}bt.prototype={set:function(n){n==Rt&&(n=this.compute()),Bt&&this.manager.element.style&&rt[n]&&(this.manager.element.style[Vt]=n),this.actions=n.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var n=[];return A(this.manager.recognizers,function(r){x(r.options.enable,[r])&&(n=n.concat(r.getTouchAction()))}),Fn(n.join(" "))},preventDefaults:function(n){var r=n.srcEvent,i=n.offsetDirection;if(this.manager.session.prevented){r.preventDefault();return}var h=this.actions,m=J(h,Ie)&&!rt[Ie],P=J(h,Xe)&&!rt[Xe],k=J(h,Ge)&&!rt[Ge];if(m){var $=n.pointers.length===1,ce=n.distance<2,K=n.deltaTime<250;if($&&ce&&K)return}if(!(k&&P)&&(m||P&&i&le||k&&i&fe))return this.preventSrc(r)},preventSrc:function(n){this.manager.session.prevented=!0,n.preventDefault()}};function Fn(n){if(J(n,Ie))return Ie;var r=J(n,Ge),i=J(n,Xe);return r&&i?Ie:r||i?r?Ge:Xe:J(n,yt)?yt:Yt}function Un(){if(!Bt)return!1;var n={},r=f.CSS&&f.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){n[i]=r?f.CSS.supports("touch-action",i):!0}),n}var at=1,he=2,Fe=4,Ae=8,Te=Ae,We=16,me=32;function Pe(n){this.options=C({},this.defaults,n||{}),this.id=U(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=at,this.simultaneous={},this.requireFail=[]}Pe.prototype={defaults:{},set:function(n){return C(this.options,n),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(n){if(w(n,"recognizeWith",this))return this;var r=this.simultaneous;return n=it(n,this),r[n.id]||(r[n.id]=n,n.recognizeWith(this)),this},dropRecognizeWith:function(n){return w(n,"dropRecognizeWith",this)?this:(n=it(n,this),delete this.simultaneous[n.id],this)},requireFailure:function(n){if(w(n,"requireFailure",this))return this;var r=this.requireFail;return n=it(n,this),ue(r,n)===-1&&(r.push(n),n.requireFailure(this)),this},dropRequireFailure:function(n){if(w(n,"dropRequireFailure",this))return this;n=it(n,this);var r=ue(this.requireFail,n);return r>-1&&this.requireFail.splice(r,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(n){return!!this.simultaneous[n.id]},emit:function(n){var r=this,i=this.state;function h(m){r.manager.emit(m,n)}i<Ae&&h(r.options.event+jt(i)),h(r.options.event),n.additionalEvent&&h(n.additionalEvent),i>=Ae&&h(r.options.event+jt(i))},tryEmit:function(n){if(this.canEmit())return this.emit(n);this.state=me},canEmit:function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(me|at)))return!1;n++}return!0},recognize:function(n){var r=C({},n);if(!x(this.options.enable,[this,r])){this.reset(),this.state=me;return}this.state&(Te|We|me)&&(this.state=at),this.state=this.process(r),this.state&(he|Fe|Ae|We)&&this.tryEmit(r)},process:function(n){},getTouchAction:function(){},reset:function(){}};function jt(n){return n&We?"cancel":n&Ae?"end":n&Fe?"move":n&he?"start":""}function zt(n){return n==xe?"down":n==_e?"up":n==Ee?"left":n==Ce?"right":""}function it(n,r){var i=r.manager;return i?i.get(n):n}function pe(){Pe.apply(this,arguments)}b(pe,Pe,{defaults:{pointers:1},attrTest:function(n){var r=this.options.pointers;return r===0||n.pointers.length===r},process:function(n){var r=this.state,i=n.eventType,h=r&(he|Fe),m=this.attrTest(n);return h&&(i&W||!m)?r|We:h||m?i&G?r|Ae:r&he?r|Fe:he:me}});function ot(){pe.apply(this,arguments),this.pX=null,this.pY=null}b(ot,pe,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ye},getTouchAction:function(){var n=this.options.direction,r=[];return n&le&&r.push(Xe),n&fe&&r.push(Ge),r},directionTest:function(n){var r=this.options,i=!0,h=n.distance,m=n.direction,P=n.deltaX,k=n.deltaY;return m&r.direction||(r.direction&le?(m=P===0?Oe:P<0?Ee:Ce,i=P!=this.pX,h=Math.abs(n.deltaX)):(m=k===0?Oe:k<0?_e:xe,i=k!=this.pY,h=Math.abs(n.deltaY))),n.direction=m,i&&h>r.threshold&&m&r.direction},attrTest:function(n){return pe.prototype.attrTest.call(this,n)&&(this.state&he||!(this.state&he)&&this.directionTest(n))},emit:function(n){this.pX=n.deltaX,this.pY=n.deltaY;var r=zt(n.direction);r&&(n.additionalEvent=this.options.event+r),this._super.emit.call(this,n)}});function wt(){pe.apply(this,arguments)}b(wt,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&he)},emit:function(n){if(n.scale!==1){var r=n.scale<1?"in":"out";n.additionalEvent=this.options.event+r}this._super.emit.call(this,n)}});function Tt(){Pe.apply(this,arguments),this._timer=null,this._input=null}b(Tt,Pe,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime>r.time;if(this._input=n,!h||!i||n.eventType&(G|W)&&!m)this.reset();else if(n.eventType&L)this.reset(),this._timer=v(function(){this.state=Te,this.tryEmit()},r.time,this);else if(n.eventType&G)return Te;return me},reset:function(){clearTimeout(this._timer)},emit:function(n){this.state===Te&&(n&&n.eventType&G?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function Pt(){pe.apply(this,arguments)}b(Pt,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&he)}});function Et(){pe.apply(this,arguments)}b(Et,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:le|fe,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(n){var r=this.options.direction,i;return r&(le|fe)?i=n.overallVelocity:r&le?i=n.overallVelocityX:r&fe&&(i=n.overallVelocityY),this._super.attrTest.call(this,n)&&r&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers==this.options.pointers&&g(i)>this.options.velocity&&n.eventType&G},emit:function(n){var r=zt(n.offsetDirection);r&&this.manager.emit(this.options.event+r,n),this.manager.emit(this.options.event,n)}});function st(){Pe.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(st,Pe,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime<r.time;if(this.reset(),n.eventType&L&&this.count===0)return this.failTimeout();if(h&&m&&i){if(n.eventType!=G)return this.failTimeout();var P=this.pTime?n.timeStamp-this.pTime<r.interval:!0,k=!this.pCenter||et(this.pCenter,n.center)<r.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!k||!P?this.count=1:this.count+=1,this._input=n;var $=this.count%r.taps;if($===0)return this.hasRequireFailures()?(this._timer=v(function(){this.state=Te,this.tryEmit()},r.interval,this),he):Te}return me},failTimeout:function(){return this._timer=v(function(){this.state=me},this.options.interval,this),me},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Te&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ue(n,r){return r=r||{},r.recognizers=p(r.recognizers,Ue.defaults.preset),new xt(n,r)}Ue.VERSION="2.0.7",Ue.defaults={domEvents:!1,touchAction:Rt,enable:!0,inputTarget:null,inputClass:null,preset:[[Pt,{enable:!1}],[wt,{enable:!1},["rotate"]],[Et,{direction:le}],[ot,{direction:le},["swipe"]],[st],[st,{event:"doubletap",taps:2},["tap"]],[Tt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Vn=1,Gt=2;function xt(n,r){this.options=C({},Ue.defaults,r||{}),this.options.inputTarget=this.options.inputTarget||n,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=n,this.input=Je(this),this.touchAction=new bt(this,this.options.touchAction),Xt(this,!0),A(this.options.recognizers,function(i){var h=this.add(new i[0](i[1]));i[2]&&h.recognizeWith(i[2]),i[3]&&h.requireFailure(i[3])},this)}xt.prototype={set:function(n){return C(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},stop:function(n){this.session.stopped=n?Gt:Vn},recognize:function(n){var r=this.session;if(!r.stopped){this.touchAction.preventDefaults(n);var i,h=this.recognizers,m=r.curRecognizer;(!m||m&&m.state&Te)&&(m=r.curRecognizer=null);for(var P=0;P<h.length;)i=h[P],r.stopped!==Gt&&(!m||i==m||i.canRecognizeWith(m))?i.recognize(n):i.reset(),!m&&i.state&(he|Fe|Ae)&&(m=r.curRecognizer=i),P++}},get:function(n){if(n instanceof Pe)return n;for(var r=this.recognizers,i=0;i<r.length;i++)if(r[i].options.event==n)return r[i];return null},add:function(n){if(w(n,"add",this))return this;var r=this.get(n.options.event);return r&&this.remove(r),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},remove:function(n){if(w(n,"remove",this))return this;if(n=this.get(n),n){var r=this.recognizers,i=ue(r,n);i!==-1&&(r.splice(i,1),this.touchAction.update())}return this},on:function(n,r){if(n!==a&&r!==a){var i=this.handlers;return A(re(n),function(h){i[h]=i[h]||[],i[h].push(r)}),this}},off:function(n,r){if(n!==a){var i=this.handlers;return A(re(n),function(h){r?i[h]&&i[h].splice(ue(i[h],r),1):delete i[h]}),this}},emit:function(n,r){this.options.domEvents&&Bn(n,r);var i=this.handlers[n]&&this.handlers[n].slice();if(!(!i||!i.length)){r.type=n,r.preventDefault=function(){r.srcEvent.preventDefault()};for(var h=0;h<i.length;)i[h](r),h++}},destroy:function(){this.element&&Xt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Xt(n,r){var i=n.element;if(i.style){var h;A(n.options.cssProps,function(m,P){h=ie(i.style,P),r?(n.oldCssProps[h]=i.style[h],i.style[h]=m):i.style[h]=n.oldCssProps[h]||""}),r||(n.oldCssProps={})}}function Bn(n,r){var i=o.createEvent("Event");i.initEvent(n,!0,!0),i.gesture=r,r.target.dispatchEvent(i)}return C(Ue,{INPUT_START:L,INPUT_MOVE:te,INPUT_END:G,INPUT_CANCEL:W,STATE_POSSIBLE:at,STATE_BEGAN:he,STATE_CHANGED:Fe,STATE_ENDED:Ae,STATE_RECOGNIZED:Te,STATE_CANCELLED:We,STATE_FAILED:me,DIRECTION_NONE:Oe,DIRECTION_LEFT:Ee,DIRECTION_RIGHT:Ce,DIRECTION_UP:_e,DIRECTION_DOWN:xe,DIRECTION_HORIZONTAL:le,DIRECTION_VERTICAL:fe,DIRECTION_ALL:Ye,Manager:xt,Input:oe,TouchAction:bt,TouchInput:nt,MouseInput:tt,PointerEventInput:mt,TouchMouseInput:gt,SingleTouchInput:Dt,Recognizer:Pe,AttrRecognizer:pe,Tap:st,Pan:ot,Swipe:Et,Pinch:wt,Rotate:Pt,Press:Tt,on:I,off:M,each:A,merge:D,extend:O,assign:C,inherit:b,bindFn:y,prefixed:ie}),Ue}(typeof window!="undefined"?window:{},typeof document!="undefined"?document:{}),De=function(f,o){o===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),o===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=f,this.domElement=o,this.enabled=!0,this.target=new _.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:_.MOUSE.ROTATE,MIDDLE:_.MOUSE.DOLLY,RIGHT:_.MOUSE.PAN},this.touches={ONE:_.TOUCH.ROTATE,TWO:_.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return d.phi},this.getAzimuthalAngle=function(){return d.theta},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(a),e.update(),l=c.NONE},this.update=function(){var u=new _.Vector3,F=new _.Quaternion().setFromUnitVectors(f.up,new _.Vector3(0,1,0)),H=F.clone().inverse(),Q=new _.Vector3,ve=new _.Quaternion;return function(){var we=e.object.position;return u.copy(we).sub(e.target),u.applyQuaternion(F),d.setFromVector3(u),e.autoRotate&&l===c.NONE&&re(ne()),e.enableDamping?(d.theta+=v.theta*e.dampingFactor,d.phi+=v.phi*e.dampingFactor):(d.theta+=v.theta,d.phi+=v.phi),d.theta=Math.max(e.minAzimuthAngle,Math.min(e.maxAzimuthAngle,d.theta)),d.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,d.phi)),d.makeSafe(),d.radius*=w,d.radius=Math.max(e.minDistance,Math.min(e.maxDistance,d.radius)),e.enableDamping===!0?e.target.addScaledVector(A,e.dampingFactor):e.target.add(A),u.setFromSpherical(d),u.applyQuaternion(H),we.copy(e.target).add(u),e.object.lookAt(e.target),e.enableDamping===!0?(v.theta*=1-e.dampingFactor,v.phi*=1-e.dampingFactor,A.multiplyScalar(1-e.dampingFactor)):(v.set(0,0,0),A.set(0,0,0)),w=1,E||Q.distanceToSquared(e.object.position)>g||8*(1-ve.dot(e.object.quaternion))>g?(e.dispatchEvent(a),Q.copy(e.object.position),ve.copy(e.object.quaternion),E=!1,!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$e,!1),e.domElement.removeEventListener("mousedown",xe,!1),e.domElement.removeEventListener("wheel",Ye,!1),e.domElement.removeEventListener("touchstart",Se,!1),e.domElement.removeEventListener("touchend",Je,!1),e.domElement.removeEventListener("touchmove",oe,!1),document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.domElement.removeEventListener("keydown",je,!1)};var e=this,a={type:"change"},t={type:"start"},s={type:"end"},c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},l=c.NONE,g=1e-6,d=new _.Spherical,v=new _.Spherical,w=1,A=new _.Vector3,E=!1,C=new _.Vector2,O=new _.Vector2,D=new _.Vector2,b=new _.Vector2,y=new _.Vector2,x=new _.Vector2,p=new _.Vector2,I=new _.Vector2,M=new _.Vector2;function ne(){return 2*Math.PI/60/60*e.autoRotateSpeed}function J(){return Math.pow(.95,e.zoomSpeed)}function re(u){v.theta-=u}function ue(u){v.phi-=u}var be=function(){var u=new _.Vector3;return function(H,Q){u.setFromMatrixColumn(Q,0),u.multiplyScalar(-H),A.add(u)}}(),Me=function(){var u=new _.Vector3;return function(H,Q){e.screenSpacePanning===!0?u.setFromMatrixColumn(Q,1):(u.setFromMatrixColumn(Q,0),u.crossVectors(e.object.up,u)),u.multiplyScalar(H),A.add(u)}}(),ie=function(){var u=new _.Vector3;return function(H,Q){var ve=e.domElement;if(e.object.isPerspectiveCamera){var ze=e.object.position;u.copy(ze).sub(e.target);var we=u.length();we*=Math.tan(e.object.fov/2*Math.PI/180),be(2*H*we/ve.clientHeight,e.object.matrix),Me(2*Q*we/ve.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(be(H*(e.object.right-e.object.left)/e.object.zoom/ve.clientWidth,e.object.matrix),Me(Q*(e.object.top-e.object.bottom)/e.object.zoom/ve.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function se(u){e.object.isPerspectiveCamera?w/=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom*u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function U(u){e.object.isPerspectiveCamera?w*=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function N(u){C.set(u.clientX,u.clientY)}function S(u){p.set(u.clientX,u.clientY)}function V(u){b.set(u.clientX,u.clientY)}function j(u){O.set(u.clientX,u.clientY),D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var F=e.domElement;re(2*Math.PI*D.x/F.clientHeight),ue(2*Math.PI*D.y/F.clientHeight),C.copy(O),e.update()}function ae(u){I.set(u.clientX,u.clientY),M.subVectors(I,p),M.y>0?se(J()):M.y<0&&U(J()),p.copy(I),e.update()}function X(u){y.set(u.clientX,u.clientY),x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y),e.update()}function B(u){u.deltaY<0?U(J()):u.deltaY>0&&se(J()),e.update()}function Z(u){var F=!1;switch(u.keyCode){case e.keys.UP:ie(0,e.keyPanSpeed),F=!0;break;case e.keys.BOTTOM:ie(0,-e.keyPanSpeed),F=!0;break;case e.keys.LEFT:ie(e.keyPanSpeed,0),F=!0;break;case e.keys.RIGHT:ie(-e.keyPanSpeed,0),F=!0;break}F&&(u.preventDefault(),e.update())}function Y(u){if(u.touches.length==1)C.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);C.set(F,H)}}function R(u){if(u.touches.length==1)b.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);b.set(F,H)}}function L(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);p.set(0,Q)}function te(u){e.enableZoom&&L(u),e.enablePan&&R(u)}function G(u){e.enableZoom&&L(u),e.enableRotate&&Y(u)}function W(u){if(u.touches.length==1)O.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);O.set(F,H)}D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var Q=e.domElement;re(2*Math.PI*D.x/Q.clientHeight),ue(2*Math.PI*D.y/Q.clientHeight),C.copy(O)}function Oe(u){if(u.touches.length==1)y.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);y.set(F,H)}x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y)}function Ee(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);I.set(0,Q),M.set(0,Math.pow(I.y/p.y,e.zoomSpeed)),se(M.y),p.copy(I)}function Ce(u){e.enableZoom&&Ee(u),e.enablePan&&Oe(u)}function _e(u){e.enableZoom&&Ee(u),e.enableRotate&&W(u)}function xe(u){if(e.enabled!==!1){u.preventDefault(),e.domElement.focus?e.domElement.focus():window.focus();var F;switch(u.button){case 0:F=e.mouseButtons.LEFT;break;case 1:F=e.mouseButtons.MIDDLE;break;case 2:F=e.mouseButtons.RIGHT;break;default:F=-1}switch(F){case _.MOUSE.DOLLY:if(e.enableZoom===!1)return;S(u),l=c.DOLLY;break;case _.MOUSE.ROTATE:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enablePan===!1)return;V(u),l=c.PAN}else{if(e.enableRotate===!1)return;N(u),l=c.ROTATE}break;case _.MOUSE.PAN:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enableRotate===!1)return;N(u),l=c.ROTATE}else{if(e.enablePan===!1)return;V(u),l=c.PAN}break;default:l=c.NONE}l!==c.NONE&&(document.addEventListener("mousemove",le,!1),document.addEventListener("mouseup",fe,!1),e.dispatchEvent(t))}}function le(u){if(e.enabled!==!1)switch(u.preventDefault(),l){case c.ROTATE:if(e.enableRotate===!1)return;j(u);break;case c.DOLLY:if(e.enableZoom===!1)return;ae(u);break;case c.PAN:if(e.enablePan===!1)return;X(u);break}}function fe(u){e.enabled!==!1&&(document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.dispatchEvent(s),l=c.NONE)}function Ye(u){e.enabled===!1||e.enableZoom===!1||l!==c.NONE&&l!==c.ROTATE||(u.preventDefault(),u.stopPropagation(),e.dispatchEvent(t),B(u),e.dispatchEvent(s))}function je(u){e.enabled===!1||e.enableKeys===!1||e.enablePan===!1||Z(u)}function Se(u){if(e.enabled!==!1){switch(u.preventDefault(),u.touches.length){case 1:switch(e.touches.ONE){case _.TOUCH.ROTATE:if(e.enableRotate===!1)return;Y(u),l=c.TOUCH_ROTATE;break;case _.TOUCH.PAN:if(e.enablePan===!1)return;R(u),l=c.TOUCH_PAN;break;default:l=c.NONE}break;case 2:switch(e.touches.TWO){case _.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;te(u),l=c.TOUCH_DOLLY_PAN;break;case _.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;G(u),l=c.TOUCH_DOLLY_ROTATE;break;default:l=c.NONE}break;default:l=c.NONE}l!==c.NONE&&e.dispatchEvent(t)}}function oe(u){if(e.enabled!==!1)switch(u.preventDefault(),u.stopPropagation(),l){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;W(u),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;Oe(u),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Ce(u),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;_e(u),e.update();break;default:l=c.NONE}}function Je(u){e.enabled!==!1&&(e.dispatchEvent(s),l=c.NONE)}function $e(u){e.enabled!==!1&&u.preventDefault()}e.domElement.addEventListener("contextmenu",$e,!1),e.domElement.addEventListener("mousedown",xe,!1),e.domElement.addEventListener("wheel",Ye,!1),e.domElement.addEventListener("touchstart",Se,!1),e.domElement.addEventListener("touchend",Je,!1),e.domElement.addEventListener("touchmove",oe,!1),e.domElement.addEventListener("keydown",je,!1),e.domElement.tabIndex===-1&&(e.domElement.tabIndex=0),this.update()};De.prototype=Object.create(_.EventDispatcher.prototype),De.prototype.constructor=De;var ht=function(f,o){De.call(this,f,o),this.mouseButtons.LEFT=_.MOUSE.PAN,this.mouseButtons.RIGHT=_.MOUSE.ROTATE,this.touches.ONE=_.TOUCH.PAN,this.touches.TWO=_.TOUCH.DOLLY_ROTATE};ht.prototype=Object.create(_.EventDispatcher.prototype),ht.prototype.constructor=ht;var ye=function(f){_.Object3D.call(this),this.element=f,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.addEventListener("removed",function(){this.traverse(function(o){o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)})})};ye.prototype=Object.create(_.Object3D.prototype),ye.prototype.constructor=ye;var Ke=function(f){ye.call(this,f)};Ke.prototype=Object.create(ye.prototype),Ke.prototype.constructor=Ke;var Ct=function(){var f=this,o,e,a,t,s=new _.Matrix4,c={camera:{fov:0,style:""},objects:new WeakMap},l=document.createElement("div");l.style.overflow="hidden",this.domElement=l;var g=document.createElement("div");g.style.WebkitTransformStyle="preserve-3d",g.style.transformStyle="preserve-3d",g.style.pointerEvents="none",l.appendChild(g);var d=/Trident/i.test(navigator.userAgent);this.getSize=function(){return{width:o,height:e}},this.setSize=function(b,y){o=b,e=y,a=o/2,t=e/2,l.style.width=b+"px",l.style.height=y+"px",g.style.width=b+"px",g.style.height=y+"px"};function v(b){return Math.abs(b)<1e-10?0:b}function w(b){var y=b.elements;return"matrix3d("+v(y[0])+","+v(-y[1])+","+v(y[2])+","+v(y[3])+","+v(y[4])+","+v(-y[5])+","+v(y[6])+","+v(y[7])+","+v(y[8])+","+v(-y[9])+","+v(y[10])+","+v(y[11])+","+v(y[12])+","+v(-y[13])+","+v(y[14])+","+v(y[15])+")"}function A(b,y){var x=b.elements,p="matrix3d("+v(x[0])+","+v(x[1])+","+v(x[2])+","+v(x[3])+","+v(-x[4])+","+v(-x[5])+","+v(-x[6])+","+v(-x[7])+","+v(x[8])+","+v(x[9])+","+v(x[10])+","+v(x[11])+","+v(x[12])+","+v(x[13])+","+v(x[14])+","+v(x[15])+")";return d?"translate(-50%,-50%)translate("+a+"px,"+t+"px)"+y+p:"translate(-50%,-50%)"+p}function E(b,y,x,p){if(b instanceof ye){b.onBeforeRender(f,y,x);var I;b instanceof Ke?(s.copy(x.matrixWorldInverse),s.transpose(),s.copyPosition(b.matrixWorld),s.scale(b.scale),s.elements[3]=0,s.elements[7]=0,s.elements[11]=0,s.elements[15]=1,I=A(s,p)):I=A(b.matrixWorld,p);var M=b.element,ne=c.objects.get(b);if(ne===void 0||ne.style!==I){M.style.WebkitTransform=I,M.style.transform=I;var J={style:I};d&&(J.distanceToCameraSquared=C(x,b)),c.objects.set(b,J)}M.style.display=b.visible?"":"none",M.parentNode!==g&&g.appendChild(M),b.onAfterRender(f,y,x)}for(var re=0,ue=b.children.length;re<ue;re++)E(b.children[re],y,x,p)}var C=function(){var b=new _.Vector3,y=new _.Vector3;return function(x,p){return b.setFromMatrixPosition(x.matrixWorld),y.setFromMatrixPosition(p.matrixWorld),b.distanceToSquared(y)}}();function O(b){var y=[];return b.traverse(function(x){x instanceof ye&&y.push(x)}),y}function D(b){for(var y=O(b).sort(function(M,ne){var J=c.objects.get(M).distanceToCameraSquared,re=c.objects.get(ne).distanceToCameraSquared;return J-re}),x=y.length,p=0,I=y.length;p<I;p++)y[p].element.style.zIndex=x-p}this.render=function(b,y){var x=y.projectionMatrix.elements[5]*t;if(c.camera.fov!==x&&(y.isPerspectiveCamera?(l.style.WebkitPerspective=x+"px",l.style.perspective=x+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),c.camera.fov=x),b.autoUpdate===!0&&b.updateMatrixWorld(),y.parent===null&&y.updateMatrixWorld(),y.isOrthographicCamera)var p=-(y.right+y.left)/2,I=(y.top+y.bottom)/2;var M=y.isOrthographicCamera?"scale("+x+")translate("+v(p)+"px,"+v(I)+"px)"+w(y.matrixWorldInverse):"translateZ("+x+"px)"+w(y.matrixWorldInverse),ne=M+"translate("+a+"px,"+t+"px)";c.camera.style!==ne&&!d&&(g.style.WebkitTransform=ne,g.style.transform=ne,c.camera.style=ne),E(b,b,y,M),d&&D(b)}};function _t(f,o,e){var a=o.getBoundingClientRect(),t=a.top,s=a.left,c=a.width,l=a.height;return new T.Vector2((f.x-s)/c*2-1,-(f.y-t)/l*2+1)}var St=function(f){Ne(o,f);function o(e,a,t,s,c){var l=f.call(this)||this;l.type="RoundedBoxGeometry",c=isNaN(c)?1:Math.max(1,Math.floor(c)),e=isNaN(e)?1:e,a=isNaN(a)?1:a,t=isNaN(t)?1:t,s=isNaN(s)?.15:s,s=Math.min(s,Math.min(e,Math.min(a,Math.min(t)))/2);var g=e/2-s,d=a/2-s,v=t/2-s;l.parameters={width:e,height:a,depth:t,radius:s,radiusSegments:c};var w=c+1,A=w*c+1<<3,E=new T.BufferAttribute(new Float32Array(A*3),3),C=new T.BufferAttribute(new Float32Array(A*3),3),O=[],D=[];new T.Vector3;var b=new T.Vector3,y=[],x=[],p=[],I=w*c,M=w*c+1;ne(),re(),J(),ue(),Me(),be();function ne(){for(var U=[new T.Vector3(1,1,1),new T.Vector3(1,1,-1),new T.Vector3(-1,1,-1),new T.Vector3(-1,1,1),new T.Vector3(1,-1,1),new T.Vector3(1,-1,-1),new T.Vector3(-1,-1,-1),new T.Vector3(-1,-1,1)],N=0;N<8;N++)O.push([]),D.push([]);for(var S=Math.PI/2,V=new T.Vector3(g,d,v),j=0;j<=c;j++){var ae=j/c,X=ae*S,B=Math.cos(X),Z=Math.sin(X);if(j==c){b.set(0,1,0);var Y=b.clone().multiplyScalar(s).add(V);O[0].push(Y),y.push(Y);var R=b.clone();D[0].push(R),x.push(R);continue}for(var L=0;L<=c;L++){var te=L/c,G=te*S;b.x=B*Math.cos(G),b.y=Z,b.z=B*Math.sin(G);var Y=b.clone().multiplyScalar(s).add(V);O[0].push(Y),y.push(Y);var R=b.clone().normalize();D[0].push(R),x.push(R)}}for(var W=1;W<8;W++)for(var N=0;N<O[0].length;N++){var Y=O[0][N].clone().multiply(U[W]);O[W].push(Y),y.push(Y);var R=D[0][N].clone().multiply(U[W]);D[W].push(R),x.push(R)}}function J(){for(var U=[!0,!1,!0,!1,!1,!0,!1,!0],N=w*(c-1),S=0;S<8;S++){for(var V=M*S,j=0;j<c-1;j++)for(var ae=j*w,X=(j+1)*w,B=0;B<c;B++){var Z=B+1,Y=V+ae+B,R=V+ae+Z,L=V+X+B,te=V+X+Z;U[S]?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}for(var B=0;B<c;B++){var Y=V+N+B,R=V+N+B+1,L=V+I;U[S]?(p.push(Y),p.push(L),p.push(R)):(p.push(Y),p.push(R),p.push(L))}}}function re(){var U=I,N=I+M,S=I+M*2,V=I+M*3;p.push(U),p.push(N),p.push(S),p.push(U),p.push(S),p.push(V),U=I+M*4,N=I+M*5,S=I+M*6,V=I+M*7,p.push(U),p.push(S),p.push(N),p.push(U),p.push(V),p.push(S),U=0,N=M,S=M*4,V=M*5,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=M*2,N=M*3,S=M*6,V=M*7,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=c,N=c+M*3,S=c+M*4,V=c+M*7,p.push(U),p.push(N),p.push(S),p.push(N),p.push(V),p.push(S),U=c+M,N=c+M*2,S=c+M*5,V=c+M*6,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V)}function ue(){for(var U=0;U<4;U++)for(var N=U*M,S=4*M+N,V=(U&1)===1,j=0;j<c;j++){var ae=j+1,X=N+j,B=N+ae,Z=S+j,Y=S+ae;V?(p.push(X),p.push(Z),p.push(B),p.push(B),p.push(Z),p.push(Y)):(p.push(X),p.push(B),p.push(Z),p.push(B),p.push(Y),p.push(Z))}}function be(){for(var U=[0,2,4,6],N=[1,3,5,7],S=0;S<4;S++)for(var V=M*U[S],j=M*N[S],ae=1>=S,X=0;X<c;X++){var B=X*w,Z=(X+1)*w,Y=V+B,R=V+Z,L=j+B,te=j+Z;ae?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}}function Me(){for(var U=c-1,N=[0,1,4,5],S=[3,2,7,6],V=[0,1,1,0],j=0;j<4;j++)for(var ae=N[j]*M,X=S[j]*M,B=0;B<=U;B++){var Z=ae+c+B*w,Y=ae+(B!=U?c+(B+1)*w:M-1),R=X+c+B*w,L=X+(B!=U?c+(B+1)*w:M-1);V[j]?(p.push(Z),p.push(R),p.push(Y),p.push(Y),p.push(R),p.push(L)):(p.push(Z),p.push(Y),p.push(R),p.push(Y),p.push(L),p.push(R))}}for(var ie=0,se=0;se<y.length;se++)E.setXYZ(ie,y[se].x,y[se].y,y[se].z),C.setXYZ(ie,x[se].x,x[se].y,x[se].z),ie++;return l.setIndex(new T.BufferAttribute(new Uint16Array(p),1)),l.setAttribute("position",E),l.setAttribute("normal",C),l}return o}(T.BufferGeometry);function Ve(f,o){return typeof f!="number"||typeof o!="number"?!1:Math.abs(f-o)<.001}function Be(f,o,e,a){a===void 0&&(a=function(s){return s});var t=a(e);return f*(1-t)+o*t}var ee=Number((Math.PI/2).toFixed(5));function ln(f,o,e){var a=new T.Shape;return a.moveTo(e,0),a.lineTo(f-e,0),a.absarc(f-e,e,e,-ee,0,!1),a.lineTo(f,o-e),a.absarc(f-e,o-e,e,0,ee,!1),a.lineTo(e,o),a.absarc(e,o-e,e,ee,Math.PI,!1),a.lineTo(0,e),a.absarc(e,e,e,Math.PI,Math.PI*1.5,!1),a}var Re=function(f){var o=document.createElement("div");o.innerText=f;var e=new ye(o);return e.name=f,e.scale.set(.3,.3,.3),o.style.pointerEvents="none",o.style.backfaceVisibility="hidden",e},Ze=function(f){var o=new T.PlaneGeometry(5,5),e=new T.MeshBasicMaterial({transparent:!0,opacity:0}),a=new T.Mesh(o,e),t=document.createElement("div");t.innerText=f;var s=new ye(t);return s.name=f,s.scale.set(.3,.3,.3),t.style.color="#ffffff",t.style.opacity="0.5",t.style.pointerEvents="none",t.style.backfaceVisibility="hidden",a.rotateX(-ee),a.add(s),a},cn=function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.camera=new de.Camera(90),t.scene=new T.Scene,t.renderer=new T.WebGLRenderer({antialias:!0,alpha:!0}),t.css3drenderer=new Ct,t.ambientLight=new T.AmbientLight(16777215,.7),t.wrapper=document.createElement("div"),t.arrows=document.createElement("div"),t.arrowLeft=document.createElement("div"),t.arrowRight=document.createElement("div"),t.arrowFront=document.createElement("div"),t.arrowBack=document.createElement("div"),t.arrowTop=document.createElement("div"),t.arrowBottom=document.createElement("div"),t.spherical=null,t.dragging=!1,t.style=document.createElement("style"),t.directionalLight=new T.DirectionalLight(16777215,.2),t.box=new T.Mesh(new St(8,8,8,.5,20),new T.MeshPhongMaterial({color:16777215})),t.faces=new T.Group,t.orient=function(l){var g=l.longitude,d=l.latitude;t.dragging=!1,t.spherical=null,t.controls.enableDamping=!1,t.five.setState(Object.assign({latitude:d},g!==void 0?{longitude:g+t.config.fixedLongitude}:{})),t.five.ready().then(function(){t.controls.enableDamping=!0,t.setState({arrowsVisible:!0})})},t.onRenderFrame=function(){var l,g,d,v,w;if(t.renderer.render(t.scene,t.camera),t.css3drenderer.render(t.scene,t.camera),t.directionalLight.position.copy(t.camera.position),(l=t.controls)===null||l===void 0||l.update(),t.dragging){t.camera.computePose(),t.updateByCamera();var A=t.camera.pose,E=A.longitude,C=A.latitude;t.five.setState({longitude:E,latitude:C},!0),t.updateArrows({longitude:E,latitude:C})}else if(t.spherical&&(!Ve(t.spherical.pi,(g=t.controls)===null||g===void 0?void 0:g.getPolarAngle())||!Ve(t.spherical.theta,(d=t.controls)===null||d===void 0?void 0:d.getAzimuthalAngle()))){t.spherical={pi:(v=t.controls)===null||v===void 0?void 0:v.getPolarAngle(),theta:(w=t.controls)===null||w===void 0?void 0:w.getAzimuthalAngle()},t.camera.computePose(),t.updateByCamera();var O=t.camera.pose,E=O.longitude,C=O.latitude;t.five.setState({longitude:E,latitude:C},!0),t.updateArrows({longitude:E,latitude:C})}else t.spherical=null},t.onTapGesture=function(l){var g=l.pointers[0].clientX,d=l.pointers[0].clientY,v=_t({x:g,y:d},t.wrapper),w=new T.Raycaster;w.setFromCamera(v,t.camera);var A=w.intersectObjects(t.faces.children,!1)[0];if(A){var E=A.object.userData,C=E.longitude,O=E.latitude;t.orient({longitude:C,latitude:O})}},t.onFiveWantsGesture=function(){if(t.spherical)return!1},t.onFiveModeChange=function(l){t.controls&&(t.controls.maxPolarAngle=l==="Topview"?0:ee)},t.onCameraUpdate=function(l){var g=l.state;if(!t.dragging&&!t.spherical){var d=g.longitude,v=g.latitude;t.camera.pose.longitude===d&&t.camera.pose.latitude===v||(t.camera.setFromPose({longitude:d,latitude:v,distance:20,offset:new T.Vector3(0,0,0)}),t.updateByCamera(),t.updateArrows({longitude:d,latitude:v}))}},t.onPanStart=function(l){t.dragging=!0,t.spherical={}},t.onMouseMove=function(l){if(!t.dragging){var g=_t({x:l.clientX,y:l.clientY},t.wrapper),d=new T.Raycaster;d.setFromCamera(g,t.camera);var v=d.intersectObjects(t.faces.children,!1)[0];t.faces.children.forEach(function(w){w.material.opacity=0,w.children[0].element.style.color=""}),v&&(v.object.material.opacity=.3,v.object.children[0].element.style.color="#336dff")}},t.onPanEnd=function(l){t.dragging=!1,t.spherical={pi:t.controls.getPolarAngle(),theta:t.controls.getAzimuthalAngle()}},t.dispose=function(){t.disable()},t.five=e;var s={enabled:!1,visible:!0,arrowsVisible:!1};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=z({fixedLongitude:0,orthoView:!0},a==null?void 0:a.config);return t._config=c,t.state.enabled&&t._enable({userAction:!1}),t.mc=new ut.Manager(t.wrapper),t.mc.add(new ut.Tap({interval:410})),t.mc.add(new ut.Pan({threshold:10,pointers:0})),t.camera.setFromPose({distance:20,offset:new T.Vector3(0,0,0),longitude:e.camera.pose.latitude,latitude:e.camera.pose.latitude}),t.cylinder=new T.Mesh(new T.CylinderGeometry(13.2,14,.01,50,1,!0),new T.ShaderMaterial({uniforms:{radiusTop:{value:13.2},radiusBottom:{value:14},opacity:{value:1}},vertexShader:`
|
|
356
|
+
`;return function(){var m=new Error("get-stack-trace"),P=m&&m.stack?m.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",k=f.console&&(f.console.warn||f.console.log);return k&&k.call(f.console,h,P),n.apply(this,arguments)}}var C;typeof Object.assign!="function"?C=function(r){if(r===a||r===null)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(r),h=1;h<arguments.length;h++){var m=arguments[h];if(m!==a&&m!==null)for(var P in m)m.hasOwnProperty(P)&&(i[P]=m[P])}return i}:C=Object.assign;var O=E(function(r,i,h){for(var m=Object.keys(i),P=0;P<m.length;)(!h||h&&r[m[P]]===a)&&(r[m[P]]=i[m[P]]),P++;return r},"extend","Use `assign`."),D=E(function(r,i){return O(r,i,!0)},"merge","Use `assign`.");function b(n,r,i){var h=r.prototype,m;m=n.prototype=Object.create(h),m.constructor=n,m._super=h,i&&C(m,i)}function y(n,r){return function(){return n.apply(r,arguments)}}function x(n,r){return typeof n==c?n.apply(r&&r[0]||a,r):n}function p(n,r){return n===a?r:n}function I(n,r,i){A(re(r),function(h){n.addEventListener(h,i,!1)})}function M(n,r,i){A(re(r),function(h){n.removeEventListener(h,i,!1)})}function ne(n,r){for(;n;){if(n==r)return!0;n=n.parentNode}return!1}function J(n,r){return n.indexOf(r)>-1}function re(n){return n.trim().split(/\s+/g)}function ue(n,r,i){if(n.indexOf&&!i)return n.indexOf(r);for(var h=0;h<n.length;){if(i&&n[h][i]==r||!i&&n[h]===r)return h;h++}return-1}function be(n){return Array.prototype.slice.call(n,0)}function Me(n,r,i){for(var h=[],m=[],P=0;P<n.length;){var k=n[P][r];ue(m,k)<0&&h.push(n[P]),m[P]=k,P++}return h=h.sort(function(ce,K){return ce[r]>K[r]}),h}function ie(n,r){for(var i,h,m=r[0].toUpperCase()+r.slice(1),P=0;P<t.length;){if(i=t[P],h=i?i+m:r,h in n)return h;P++}return a}var se=1;function U(){return se++}function N(n){var r=n.ownerDocument||n;return r.defaultView||r.parentWindow||f}var S=/mobile|tablet|ip(ad|hone|od)|android/i,V="ontouchstart"in f,j=ie(f,"PointerEvent")!==a,ae=V&&S.test(navigator.userAgent),X="touch",B="pen",Z="mouse",Y="kinect",R=25,L=1,te=2,G=4,W=8,Oe=1,Ee=2,Ce=4,_e=8,xe=16,le=Ee|Ce,fe=_e|xe,Ye=le|fe,je=["x","y"],Se=["clientX","clientY"];function oe(n,r){var i=this;this.manager=n,this.callback=r,this.element=n.element,this.target=n.options.inputTarget,this.domHandler=function(h){x(n.options.enable,[n])&&i.handler(h)},this.init()}oe.prototype={handler:function(){},init:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(N(this.element),this.evWin,this.domHandler)}};function Je(n){var r,i=n.options.inputClass;return i?r=i:j?r=mt:ae?r=nt:V?r=gt:r=tt,new r(n,$e)}function $e(n,r,i){var h=i.pointers.length,m=i.changedPointers.length,P=r&L&&h-m===0,k=r&(G|W)&&h-m===0;i.isFirst=!!P,i.isFinal=!!k,P&&(n.session={}),i.eventType=r,u(n,i),n.emit("hammer.input",i),n.recognize(i),n.session.prevInput=i}function u(n,r){var i=n.session,h=r.pointers,m=h.length;i.firstInput||(i.firstInput=Q(r)),m>1&&!i.firstMultiple?i.firstMultiple=Q(r):m===1&&(i.firstMultiple=!1);var P=i.firstInput,k=i.firstMultiple,$=k?k.center:P.center,ce=r.center=ve(h);r.timeStamp=d(),r.deltaTime=r.timeStamp-P.timeStamp,r.angle=vt($,ce),r.distance=et($,ce),F(i,r),r.offsetDirection=we(r.deltaX,r.deltaY);var K=ze(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=K.x,r.overallVelocityY=K.y,r.overallVelocity=g(K.x)>g(K.y)?K.x:K.y,r.scale=k?Tn(k.pointers,h):1,r.rotation=k?wn(k.pointers,h):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,H(i,r);var ge=n.element;ne(r.srcEvent.target,ge)&&(ge=r.srcEvent.target),r.target=ge}function F(n,r){var i=r.center,h=n.offsetDelta||{},m=n.prevDelta||{},P=n.prevInput||{};(r.eventType===L||P.eventType===G)&&(m=n.prevDelta={x:P.deltaX||0,y:P.deltaY||0},h=n.offsetDelta={x:i.x,y:i.y}),r.deltaX=m.x+(i.x-h.x),r.deltaY=m.y+(i.y-h.y)}function H(n,r){var i=n.lastInterval||r,h=r.timeStamp-i.timeStamp,m,P,k,$;if(r.eventType!=W&&(h>R||i.velocity===a)){var ce=r.deltaX-i.deltaX,K=r.deltaY-i.deltaY,ge=ze(h,ce,K);P=ge.x,k=ge.y,m=g(ge.x)>g(ge.y)?ge.x:ge.y,$=we(ce,K),n.lastInterval=r}else m=i.velocity,P=i.velocityX,k=i.velocityY,$=i.direction;r.velocity=m,r.velocityX=P,r.velocityY=k,r.direction=$}function Q(n){for(var r=[],i=0;i<n.pointers.length;)r[i]={clientX:l(n.pointers[i].clientX),clientY:l(n.pointers[i].clientY)},i++;return{timeStamp:d(),pointers:r,center:ve(r),deltaX:n.deltaX,deltaY:n.deltaY}}function ve(n){var r=n.length;if(r===1)return{x:l(n[0].clientX),y:l(n[0].clientY)};for(var i=0,h=0,m=0;m<r;)i+=n[m].clientX,h+=n[m].clientY,m++;return{x:l(i/r),y:l(h/r)}}function ze(n,r,i){return{x:r/n||0,y:i/n||0}}function we(n,r){return n===r?Oe:g(n)>=g(r)?n<0?Ee:Ce:r<0?_e:xe}function et(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.sqrt(h*h+m*m)}function vt(n,r,i){i||(i=je);var h=r[i[0]]-n[i[0]],m=r[i[1]]-n[i[1]];return Math.atan2(m,h)*180/Math.PI}function wn(n,r){return vt(r[1],r[0],Se)+vt(n[1],n[0],Se)}function Tn(n,r){return et(r[0],r[1],Se)/et(n[0],n[1],Se)}var Pn={mousedown:L,mousemove:te,mouseup:G},En="mousedown",xn="mousemove mouseup";function tt(){this.evEl=En,this.evWin=xn,this.pressed=!1,oe.apply(this,arguments)}b(tt,oe,{handler:function(r){var i=Pn[r.type];i&L&&(r.button===0||r.button===2)&&(this.pressed=!0),i&te&&r.which!==1&&(i=G),this.pressed&&(i&G&&(this.pressed=!1),this.callback(this.manager,i,{pointers:[r],changedPointers:[r],pointerType:Z,srcEvent:r}))}});var Nt={pointerdown:L,pointermove:te,pointerup:G,pointercancel:W,pointerout:W},An={2:X,3:B,4:Z,5:Y},kt="pointerdown",Lt="pointermove pointerup pointercancel";f.MSPointerEvent&&!f.PointerEvent&&(kt="MSPointerDown",Lt="MSPointerMove MSPointerUp MSPointerCancel");function mt(){this.evEl=kt,this.evWin=Lt,oe.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}b(mt,oe,{handler:function(r){var i=this.store,h=!1,m=!1,P=r.type.toLowerCase().replace("ms",""),k=Nt[P],$=An[r.pointerType]||r.pointerType,ce=$==X,K=ue(i,r.pointerId,"pointerId");k&L&&(r.button===0||r.button===2||ce)?K<0&&(i.push(r),K=i.length-1):k&(G|W)?h=!0:!ce&&r.buttons===0&&(h=!0,m=!0,k=Nt.pointerup),!(K<0)&&(m||(i[K]=r),this.callback(this.manager,k,{pointers:i,changedPointers:[r],pointerType:$,srcEvent:i[K]}),h&&i.splice(K,1))}});var Mn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},On="touchstart",Cn="touchstart touchmove touchend touchcancel";function Dt(){this.evTarget=On,this.evWin=Cn,this.started=!1,oe.apply(this,arguments)}b(Dt,oe,{handler:function(r){var i=Mn[r.type];if(i===L&&(this.started=!0),!!this.started){var h=_n.call(this,r,i);i&(G|W)&&h[0].length-h[1].length===0&&(this.started=!1),this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}}});function _n(n,r){var i=be(n.touches),h=be(n.changedTouches);return r&(G|W)&&(i=Me(i.concat(h),"identifier")),[i,h]}var Sn={touchstart:L,touchmove:te,touchend:G,touchcancel:W},In="touchstart touchmove touchend touchcancel";function nt(){this.evTarget=In,this.targetIds={},oe.apply(this,arguments)}b(nt,oe,{handler:function(r){var i=Sn[r.type],h=Nn.call(this,r,i);h&&this.callback(this.manager,i,{pointers:h[0],changedPointers:h[1],pointerType:X,srcEvent:r})}});function Nn(n,r){var i=be(n.touches),h=this.targetIds;if(r&(L|te)&&i.length===1)return h[i[0].identifier]=!0,[i,i];var m,P,k=be(n.changedTouches),$=[],ce=this.target;if(P=i.filter(function(K){return ne(K.target,ce)}),r===L)for(m=0;m<P.length;)h[P[m].identifier]=!0,m++;for(m=0;m<k.length;)h[k[m].identifier]&&$.push(k[m]),r&(G|W)&&delete h[k[m].identifier],m++;if($.length)return[Me(P.concat($),"identifier"),$]}var kn=2500,Ft=25;function gt(){oe.apply(this,arguments);var n=y(this.handler,this);this.touch=new nt(this.manager,n),this.mouse=new tt(this.manager,n),this.primaryTouch=null,this.lastTouches=[]}b(gt,oe,{handler:function(r,i,h){var m=h.pointerType==X,P=h.pointerType==Z;if(!(P&&h.sourceCapabilities&&h.sourceCapabilities.firesTouchEvents)){if(m)Ln.call(this,i,h);else if(P&&Dn.call(this,h))return;this.callback(r,i,h)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ln(n,r){n&L?(this.primaryTouch=r.changedPointers[0].identifier,Ut.call(this,r)):n&(G|W)&&Ut.call(this,r)}function Ut(n){var r=n.changedPointers[0];if(r.identifier===this.primaryTouch){var i={x:r.clientX,y:r.clientY};this.lastTouches.push(i);var h=this.lastTouches,m=function(){var P=h.indexOf(i);P>-1&&h.splice(P,1)};setTimeout(m,kn)}}function Dn(n){for(var r=n.srcEvent.clientX,i=n.srcEvent.clientY,h=0;h<this.lastTouches.length;h++){var m=this.lastTouches[h],P=Math.abs(r-m.x),k=Math.abs(i-m.y);if(P<=Ft&&k<=Ft)return!0}return!1}var Vt=s?ie(s.style,"touchAction"):a,Bt=Vt!==a,Rt="compute",Yt="auto",yt="manipulation",Ie="none",Ge="pan-x",Xe="pan-y",rt=Un();function bt(n,r){this.manager=n,this.set(r)}bt.prototype={set:function(n){n==Rt&&(n=this.compute()),Bt&&this.manager.element.style&&rt[n]&&(this.manager.element.style[Vt]=n),this.actions=n.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var n=[];return A(this.manager.recognizers,function(r){x(r.options.enable,[r])&&(n=n.concat(r.getTouchAction()))}),Fn(n.join(" "))},preventDefaults:function(n){var r=n.srcEvent,i=n.offsetDirection;if(this.manager.session.prevented){r.preventDefault();return}var h=this.actions,m=J(h,Ie)&&!rt[Ie],P=J(h,Xe)&&!rt[Xe],k=J(h,Ge)&&!rt[Ge];if(m){var $=n.pointers.length===1,ce=n.distance<2,K=n.deltaTime<250;if($&&ce&&K)return}if(!(k&&P)&&(m||P&&i&le||k&&i&fe))return this.preventSrc(r)},preventSrc:function(n){this.manager.session.prevented=!0,n.preventDefault()}};function Fn(n){if(J(n,Ie))return Ie;var r=J(n,Ge),i=J(n,Xe);return r&&i?Ie:r||i?r?Ge:Xe:J(n,yt)?yt:Yt}function Un(){if(!Bt)return!1;var n={},r=f.CSS&&f.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){n[i]=r?f.CSS.supports("touch-action",i):!0}),n}var at=1,he=2,Fe=4,Ae=8,Te=Ae,We=16,me=32;function Pe(n){this.options=C({},this.defaults,n||{}),this.id=U(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=at,this.simultaneous={},this.requireFail=[]}Pe.prototype={defaults:{},set:function(n){return C(this.options,n),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(n){if(w(n,"recognizeWith",this))return this;var r=this.simultaneous;return n=it(n,this),r[n.id]||(r[n.id]=n,n.recognizeWith(this)),this},dropRecognizeWith:function(n){return w(n,"dropRecognizeWith",this)?this:(n=it(n,this),delete this.simultaneous[n.id],this)},requireFailure:function(n){if(w(n,"requireFailure",this))return this;var r=this.requireFail;return n=it(n,this),ue(r,n)===-1&&(r.push(n),n.requireFailure(this)),this},dropRequireFailure:function(n){if(w(n,"dropRequireFailure",this))return this;n=it(n,this);var r=ue(this.requireFail,n);return r>-1&&this.requireFail.splice(r,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(n){return!!this.simultaneous[n.id]},emit:function(n){var r=this,i=this.state;function h(m){r.manager.emit(m,n)}i<Ae&&h(r.options.event+jt(i)),h(r.options.event),n.additionalEvent&&h(n.additionalEvent),i>=Ae&&h(r.options.event+jt(i))},tryEmit:function(n){if(this.canEmit())return this.emit(n);this.state=me},canEmit:function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(me|at)))return!1;n++}return!0},recognize:function(n){var r=C({},n);if(!x(this.options.enable,[this,r])){this.reset(),this.state=me;return}this.state&(Te|We|me)&&(this.state=at),this.state=this.process(r),this.state&(he|Fe|Ae|We)&&this.tryEmit(r)},process:function(n){},getTouchAction:function(){},reset:function(){}};function jt(n){return n&We?"cancel":n&Ae?"end":n&Fe?"move":n&he?"start":""}function zt(n){return n==xe?"down":n==_e?"up":n==Ee?"left":n==Ce?"right":""}function it(n,r){var i=r.manager;return i?i.get(n):n}function pe(){Pe.apply(this,arguments)}b(pe,Pe,{defaults:{pointers:1},attrTest:function(n){var r=this.options.pointers;return r===0||n.pointers.length===r},process:function(n){var r=this.state,i=n.eventType,h=r&(he|Fe),m=this.attrTest(n);return h&&(i&W||!m)?r|We:h||m?i&G?r|Ae:r&he?r|Fe:he:me}});function ot(){pe.apply(this,arguments),this.pX=null,this.pY=null}b(ot,pe,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ye},getTouchAction:function(){var n=this.options.direction,r=[];return n&le&&r.push(Xe),n&fe&&r.push(Ge),r},directionTest:function(n){var r=this.options,i=!0,h=n.distance,m=n.direction,P=n.deltaX,k=n.deltaY;return m&r.direction||(r.direction&le?(m=P===0?Oe:P<0?Ee:Ce,i=P!=this.pX,h=Math.abs(n.deltaX)):(m=k===0?Oe:k<0?_e:xe,i=k!=this.pY,h=Math.abs(n.deltaY))),n.direction=m,i&&h>r.threshold&&m&r.direction},attrTest:function(n){return pe.prototype.attrTest.call(this,n)&&(this.state&he||!(this.state&he)&&this.directionTest(n))},emit:function(n){this.pX=n.deltaX,this.pY=n.deltaY;var r=zt(n.direction);r&&(n.additionalEvent=this.options.event+r),this._super.emit.call(this,n)}});function wt(){pe.apply(this,arguments)}b(wt,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&he)},emit:function(n){if(n.scale!==1){var r=n.scale<1?"in":"out";n.additionalEvent=this.options.event+r}this._super.emit.call(this,n)}});function Tt(){Pe.apply(this,arguments),this._timer=null,this._input=null}b(Tt,Pe,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime>r.time;if(this._input=n,!h||!i||n.eventType&(G|W)&&!m)this.reset();else if(n.eventType&L)this.reset(),this._timer=v(function(){this.state=Te,this.tryEmit()},r.time,this);else if(n.eventType&G)return Te;return me},reset:function(){clearTimeout(this._timer)},emit:function(n){this.state===Te&&(n&&n.eventType&G?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}});function Pt(){pe.apply(this,arguments)}b(Pt,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(n){return this._super.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&he)}});function Et(){pe.apply(this,arguments)}b(Et,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:le|fe,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(n){var r=this.options.direction,i;return r&(le|fe)?i=n.overallVelocity:r&le?i=n.overallVelocityX:r&fe&&(i=n.overallVelocityY),this._super.attrTest.call(this,n)&&r&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers==this.options.pointers&&g(i)>this.options.velocity&&n.eventType&G},emit:function(n){var r=zt(n.offsetDirection);r&&this.manager.emit(this.options.event+r,n),this.manager.emit(this.options.event,n)}});function st(){Pe.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}b(st,Pe,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[yt]},process:function(n){var r=this.options,i=n.pointers.length===r.pointers,h=n.distance<r.threshold,m=n.deltaTime<r.time;if(this.reset(),n.eventType&L&&this.count===0)return this.failTimeout();if(h&&m&&i){if(n.eventType!=G)return this.failTimeout();var P=this.pTime?n.timeStamp-this.pTime<r.interval:!0,k=!this.pCenter||et(this.pCenter,n.center)<r.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!k||!P?this.count=1:this.count+=1,this._input=n;var $=this.count%r.taps;if($===0)return this.hasRequireFailures()?(this._timer=v(function(){this.state=Te,this.tryEmit()},r.interval,this),he):Te}return me},failTimeout:function(){return this._timer=v(function(){this.state=me},this.options.interval,this),me},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Te&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ue(n,r){return r=r||{},r.recognizers=p(r.recognizers,Ue.defaults.preset),new xt(n,r)}Ue.VERSION="2.0.7",Ue.defaults={domEvents:!1,touchAction:Rt,enable:!0,inputTarget:null,inputClass:null,preset:[[Pt,{enable:!1}],[wt,{enable:!1},["rotate"]],[Et,{direction:le}],[ot,{direction:le},["swipe"]],[st],[st,{event:"doubletap",taps:2},["tap"]],[Tt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Vn=1,Gt=2;function xt(n,r){this.options=C({},Ue.defaults,r||{}),this.options.inputTarget=this.options.inputTarget||n,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=n,this.input=Je(this),this.touchAction=new bt(this,this.options.touchAction),Xt(this,!0),A(this.options.recognizers,function(i){var h=this.add(new i[0](i[1]));i[2]&&h.recognizeWith(i[2]),i[3]&&h.requireFailure(i[3])},this)}xt.prototype={set:function(n){return C(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},stop:function(n){this.session.stopped=n?Gt:Vn},recognize:function(n){var r=this.session;if(!r.stopped){this.touchAction.preventDefaults(n);var i,h=this.recognizers,m=r.curRecognizer;(!m||m&&m.state&Te)&&(m=r.curRecognizer=null);for(var P=0;P<h.length;)i=h[P],r.stopped!==Gt&&(!m||i==m||i.canRecognizeWith(m))?i.recognize(n):i.reset(),!m&&i.state&(he|Fe|Ae)&&(m=r.curRecognizer=i),P++}},get:function(n){if(n instanceof Pe)return n;for(var r=this.recognizers,i=0;i<r.length;i++)if(r[i].options.event==n)return r[i];return null},add:function(n){if(w(n,"add",this))return this;var r=this.get(n.options.event);return r&&this.remove(r),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},remove:function(n){if(w(n,"remove",this))return this;if(n=this.get(n),n){var r=this.recognizers,i=ue(r,n);i!==-1&&(r.splice(i,1),this.touchAction.update())}return this},on:function(n,r){if(n!==a&&r!==a){var i=this.handlers;return A(re(n),function(h){i[h]=i[h]||[],i[h].push(r)}),this}},off:function(n,r){if(n!==a){var i=this.handlers;return A(re(n),function(h){r?i[h]&&i[h].splice(ue(i[h],r),1):delete i[h]}),this}},emit:function(n,r){this.options.domEvents&&Bn(n,r);var i=this.handlers[n]&&this.handlers[n].slice();if(!(!i||!i.length)){r.type=n,r.preventDefault=function(){r.srcEvent.preventDefault()};for(var h=0;h<i.length;)i[h](r),h++}},destroy:function(){this.element&&Xt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Xt(n,r){var i=n.element;if(i.style){var h;A(n.options.cssProps,function(m,P){h=ie(i.style,P),r?(n.oldCssProps[h]=i.style[h],i.style[h]=m):i.style[h]=n.oldCssProps[h]||""}),r||(n.oldCssProps={})}}function Bn(n,r){var i=o.createEvent("Event");i.initEvent(n,!0,!0),i.gesture=r,r.target.dispatchEvent(i)}return C(Ue,{INPUT_START:L,INPUT_MOVE:te,INPUT_END:G,INPUT_CANCEL:W,STATE_POSSIBLE:at,STATE_BEGAN:he,STATE_CHANGED:Fe,STATE_ENDED:Ae,STATE_RECOGNIZED:Te,STATE_CANCELLED:We,STATE_FAILED:me,DIRECTION_NONE:Oe,DIRECTION_LEFT:Ee,DIRECTION_RIGHT:Ce,DIRECTION_UP:_e,DIRECTION_DOWN:xe,DIRECTION_HORIZONTAL:le,DIRECTION_VERTICAL:fe,DIRECTION_ALL:Ye,Manager:xt,Input:oe,TouchAction:bt,TouchInput:nt,MouseInput:tt,PointerEventInput:mt,TouchMouseInput:gt,SingleTouchInput:Dt,Recognizer:Pe,AttrRecognizer:pe,Tap:st,Pan:ot,Swipe:Et,Pinch:wt,Rotate:Pt,Press:Tt,on:I,off:M,each:A,merge:D,extend:O,assign:C,inherit:b,bindFn:y,prefixed:ie}),Ue})(typeof window!="undefined"?window:{},typeof document!="undefined"?document:{}),De=function(f,o){o===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),o===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=f,this.domElement=o,this.enabled=!0,this.target=new _.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:_.MOUSE.ROTATE,MIDDLE:_.MOUSE.DOLLY,RIGHT:_.MOUSE.PAN},this.touches={ONE:_.TOUCH.ROTATE,TWO:_.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return d.phi},this.getAzimuthalAngle=function(){return d.theta},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(a),e.update(),l=c.NONE},this.update=(function(){var u=new _.Vector3,F=new _.Quaternion().setFromUnitVectors(f.up,new _.Vector3(0,1,0)),H=F.clone().inverse(),Q=new _.Vector3,ve=new _.Quaternion;return function(){var we=e.object.position;return u.copy(we).sub(e.target),u.applyQuaternion(F),d.setFromVector3(u),e.autoRotate&&l===c.NONE&&re(ne()),e.enableDamping?(d.theta+=v.theta*e.dampingFactor,d.phi+=v.phi*e.dampingFactor):(d.theta+=v.theta,d.phi+=v.phi),d.theta=Math.max(e.minAzimuthAngle,Math.min(e.maxAzimuthAngle,d.theta)),d.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,d.phi)),d.makeSafe(),d.radius*=w,d.radius=Math.max(e.minDistance,Math.min(e.maxDistance,d.radius)),e.enableDamping===!0?e.target.addScaledVector(A,e.dampingFactor):e.target.add(A),u.setFromSpherical(d),u.applyQuaternion(H),we.copy(e.target).add(u),e.object.lookAt(e.target),e.enableDamping===!0?(v.theta*=1-e.dampingFactor,v.phi*=1-e.dampingFactor,A.multiplyScalar(1-e.dampingFactor)):(v.set(0,0,0),A.set(0,0,0)),w=1,E||Q.distanceToSquared(e.object.position)>g||8*(1-ve.dot(e.object.quaternion))>g?(e.dispatchEvent(a),Q.copy(e.object.position),ve.copy(e.object.quaternion),E=!1,!0):!1}})(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$e,!1),e.domElement.removeEventListener("mousedown",xe,!1),e.domElement.removeEventListener("wheel",Ye,!1),e.domElement.removeEventListener("touchstart",Se,!1),e.domElement.removeEventListener("touchend",Je,!1),e.domElement.removeEventListener("touchmove",oe,!1),document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.domElement.removeEventListener("keydown",je,!1)};var e=this,a={type:"change"},t={type:"start"},s={type:"end"},c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},l=c.NONE,g=1e-6,d=new _.Spherical,v=new _.Spherical,w=1,A=new _.Vector3,E=!1,C=new _.Vector2,O=new _.Vector2,D=new _.Vector2,b=new _.Vector2,y=new _.Vector2,x=new _.Vector2,p=new _.Vector2,I=new _.Vector2,M=new _.Vector2;function ne(){return 2*Math.PI/60/60*e.autoRotateSpeed}function J(){return Math.pow(.95,e.zoomSpeed)}function re(u){v.theta-=u}function ue(u){v.phi-=u}var be=(function(){var u=new _.Vector3;return function(H,Q){u.setFromMatrixColumn(Q,0),u.multiplyScalar(-H),A.add(u)}})(),Me=(function(){var u=new _.Vector3;return function(H,Q){e.screenSpacePanning===!0?u.setFromMatrixColumn(Q,1):(u.setFromMatrixColumn(Q,0),u.crossVectors(e.object.up,u)),u.multiplyScalar(H),A.add(u)}})(),ie=(function(){var u=new _.Vector3;return function(H,Q){var ve=e.domElement;if(e.object.isPerspectiveCamera){var ze=e.object.position;u.copy(ze).sub(e.target);var we=u.length();we*=Math.tan(e.object.fov/2*Math.PI/180),be(2*H*we/ve.clientHeight,e.object.matrix),Me(2*Q*we/ve.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(be(H*(e.object.right-e.object.left)/e.object.zoom/ve.clientWidth,e.object.matrix),Me(Q*(e.object.top-e.object.bottom)/e.object.zoom/ve.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function se(u){e.object.isPerspectiveCamera?w/=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom*u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function U(u){e.object.isPerspectiveCamera?w*=u:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/u)),e.object.updateProjectionMatrix(),E=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function N(u){C.set(u.clientX,u.clientY)}function S(u){p.set(u.clientX,u.clientY)}function V(u){b.set(u.clientX,u.clientY)}function j(u){O.set(u.clientX,u.clientY),D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var F=e.domElement;re(2*Math.PI*D.x/F.clientHeight),ue(2*Math.PI*D.y/F.clientHeight),C.copy(O),e.update()}function ae(u){I.set(u.clientX,u.clientY),M.subVectors(I,p),M.y>0?se(J()):M.y<0&&U(J()),p.copy(I),e.update()}function X(u){y.set(u.clientX,u.clientY),x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y),e.update()}function B(u){u.deltaY<0?U(J()):u.deltaY>0&&se(J()),e.update()}function Z(u){var F=!1;switch(u.keyCode){case e.keys.UP:ie(0,e.keyPanSpeed),F=!0;break;case e.keys.BOTTOM:ie(0,-e.keyPanSpeed),F=!0;break;case e.keys.LEFT:ie(e.keyPanSpeed,0),F=!0;break;case e.keys.RIGHT:ie(-e.keyPanSpeed,0),F=!0;break}F&&(u.preventDefault(),e.update())}function Y(u){if(u.touches.length==1)C.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);C.set(F,H)}}function R(u){if(u.touches.length==1)b.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);b.set(F,H)}}function L(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);p.set(0,Q)}function te(u){e.enableZoom&&L(u),e.enablePan&&R(u)}function G(u){e.enableZoom&&L(u),e.enableRotate&&Y(u)}function W(u){if(u.touches.length==1)O.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);O.set(F,H)}D.subVectors(O,C).multiplyScalar(e.rotateSpeed);var Q=e.domElement;re(2*Math.PI*D.x/Q.clientHeight),ue(2*Math.PI*D.y/Q.clientHeight),C.copy(O)}function Oe(u){if(u.touches.length==1)y.set(u.touches[0].pageX,u.touches[0].pageY);else{var F=.5*(u.touches[0].pageX+u.touches[1].pageX),H=.5*(u.touches[0].pageY+u.touches[1].pageY);y.set(F,H)}x.subVectors(y,b).multiplyScalar(e.panSpeed),ie(x.x,x.y),b.copy(y)}function Ee(u){var F=u.touches[0].pageX-u.touches[1].pageX,H=u.touches[0].pageY-u.touches[1].pageY,Q=Math.sqrt(F*F+H*H);I.set(0,Q),M.set(0,Math.pow(I.y/p.y,e.zoomSpeed)),se(M.y),p.copy(I)}function Ce(u){e.enableZoom&&Ee(u),e.enablePan&&Oe(u)}function _e(u){e.enableZoom&&Ee(u),e.enableRotate&&W(u)}function xe(u){if(e.enabled!==!1){u.preventDefault(),e.domElement.focus?e.domElement.focus():window.focus();var F;switch(u.button){case 0:F=e.mouseButtons.LEFT;break;case 1:F=e.mouseButtons.MIDDLE;break;case 2:F=e.mouseButtons.RIGHT;break;default:F=-1}switch(F){case _.MOUSE.DOLLY:if(e.enableZoom===!1)return;S(u),l=c.DOLLY;break;case _.MOUSE.ROTATE:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enablePan===!1)return;V(u),l=c.PAN}else{if(e.enableRotate===!1)return;N(u),l=c.ROTATE}break;case _.MOUSE.PAN:if(u.ctrlKey||u.metaKey||u.shiftKey){if(e.enableRotate===!1)return;N(u),l=c.ROTATE}else{if(e.enablePan===!1)return;V(u),l=c.PAN}break;default:l=c.NONE}l!==c.NONE&&(document.addEventListener("mousemove",le,!1),document.addEventListener("mouseup",fe,!1),e.dispatchEvent(t))}}function le(u){if(e.enabled!==!1)switch(u.preventDefault(),l){case c.ROTATE:if(e.enableRotate===!1)return;j(u);break;case c.DOLLY:if(e.enableZoom===!1)return;ae(u);break;case c.PAN:if(e.enablePan===!1)return;X(u);break}}function fe(u){e.enabled!==!1&&(document.removeEventListener("mousemove",le,!1),document.removeEventListener("mouseup",fe,!1),e.dispatchEvent(s),l=c.NONE)}function Ye(u){e.enabled===!1||e.enableZoom===!1||l!==c.NONE&&l!==c.ROTATE||(u.preventDefault(),u.stopPropagation(),e.dispatchEvent(t),B(u),e.dispatchEvent(s))}function je(u){e.enabled===!1||e.enableKeys===!1||e.enablePan===!1||Z(u)}function Se(u){if(e.enabled!==!1){switch(u.preventDefault(),u.touches.length){case 1:switch(e.touches.ONE){case _.TOUCH.ROTATE:if(e.enableRotate===!1)return;Y(u),l=c.TOUCH_ROTATE;break;case _.TOUCH.PAN:if(e.enablePan===!1)return;R(u),l=c.TOUCH_PAN;break;default:l=c.NONE}break;case 2:switch(e.touches.TWO){case _.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;te(u),l=c.TOUCH_DOLLY_PAN;break;case _.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;G(u),l=c.TOUCH_DOLLY_ROTATE;break;default:l=c.NONE}break;default:l=c.NONE}l!==c.NONE&&e.dispatchEvent(t)}}function oe(u){if(e.enabled!==!1)switch(u.preventDefault(),u.stopPropagation(),l){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;W(u),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;Oe(u),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Ce(u),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;_e(u),e.update();break;default:l=c.NONE}}function Je(u){e.enabled!==!1&&(e.dispatchEvent(s),l=c.NONE)}function $e(u){e.enabled!==!1&&u.preventDefault()}e.domElement.addEventListener("contextmenu",$e,!1),e.domElement.addEventListener("mousedown",xe,!1),e.domElement.addEventListener("wheel",Ye,!1),e.domElement.addEventListener("touchstart",Se,!1),e.domElement.addEventListener("touchend",Je,!1),e.domElement.addEventListener("touchmove",oe,!1),e.domElement.addEventListener("keydown",je,!1),e.domElement.tabIndex===-1&&(e.domElement.tabIndex=0),this.update()};De.prototype=Object.create(_.EventDispatcher.prototype),De.prototype.constructor=De;var ht=function(f,o){De.call(this,f,o),this.mouseButtons.LEFT=_.MOUSE.PAN,this.mouseButtons.RIGHT=_.MOUSE.ROTATE,this.touches.ONE=_.TOUCH.PAN,this.touches.TWO=_.TOUCH.DOLLY_ROTATE};ht.prototype=Object.create(_.EventDispatcher.prototype),ht.prototype.constructor=ht;var ye=function(f){_.Object3D.call(this),this.element=f,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.addEventListener("removed",function(){this.traverse(function(o){o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)})})};ye.prototype=Object.create(_.Object3D.prototype),ye.prototype.constructor=ye;var Ke=function(f){ye.call(this,f)};Ke.prototype=Object.create(ye.prototype),Ke.prototype.constructor=Ke;var Ct=function(){var f=this,o,e,a,t,s=new _.Matrix4,c={camera:{fov:0,style:""},objects:new WeakMap},l=document.createElement("div");l.style.overflow="hidden",this.domElement=l;var g=document.createElement("div");g.style.WebkitTransformStyle="preserve-3d",g.style.transformStyle="preserve-3d",g.style.pointerEvents="none",l.appendChild(g);var d=/Trident/i.test(navigator.userAgent);this.getSize=function(){return{width:o,height:e}},this.setSize=function(b,y){o=b,e=y,a=o/2,t=e/2,l.style.width=b+"px",l.style.height=y+"px",g.style.width=b+"px",g.style.height=y+"px"};function v(b){return Math.abs(b)<1e-10?0:b}function w(b){var y=b.elements;return"matrix3d("+v(y[0])+","+v(-y[1])+","+v(y[2])+","+v(y[3])+","+v(y[4])+","+v(-y[5])+","+v(y[6])+","+v(y[7])+","+v(y[8])+","+v(-y[9])+","+v(y[10])+","+v(y[11])+","+v(y[12])+","+v(-y[13])+","+v(y[14])+","+v(y[15])+")"}function A(b,y){var x=b.elements,p="matrix3d("+v(x[0])+","+v(x[1])+","+v(x[2])+","+v(x[3])+","+v(-x[4])+","+v(-x[5])+","+v(-x[6])+","+v(-x[7])+","+v(x[8])+","+v(x[9])+","+v(x[10])+","+v(x[11])+","+v(x[12])+","+v(x[13])+","+v(x[14])+","+v(x[15])+")";return d?"translate(-50%,-50%)translate("+a+"px,"+t+"px)"+y+p:"translate(-50%,-50%)"+p}function E(b,y,x,p){if(b instanceof ye){b.onBeforeRender(f,y,x);var I;b instanceof Ke?(s.copy(x.matrixWorldInverse),s.transpose(),s.copyPosition(b.matrixWorld),s.scale(b.scale),s.elements[3]=0,s.elements[7]=0,s.elements[11]=0,s.elements[15]=1,I=A(s,p)):I=A(b.matrixWorld,p);var M=b.element,ne=c.objects.get(b);if(ne===void 0||ne.style!==I){M.style.WebkitTransform=I,M.style.transform=I;var J={style:I};d&&(J.distanceToCameraSquared=C(x,b)),c.objects.set(b,J)}M.style.display=b.visible?"":"none",M.parentNode!==g&&g.appendChild(M),b.onAfterRender(f,y,x)}for(var re=0,ue=b.children.length;re<ue;re++)E(b.children[re],y,x,p)}var C=(function(){var b=new _.Vector3,y=new _.Vector3;return function(x,p){return b.setFromMatrixPosition(x.matrixWorld),y.setFromMatrixPosition(p.matrixWorld),b.distanceToSquared(y)}})();function O(b){var y=[];return b.traverse(function(x){x instanceof ye&&y.push(x)}),y}function D(b){for(var y=O(b).sort(function(M,ne){var J=c.objects.get(M).distanceToCameraSquared,re=c.objects.get(ne).distanceToCameraSquared;return J-re}),x=y.length,p=0,I=y.length;p<I;p++)y[p].element.style.zIndex=x-p}this.render=function(b,y){var x=y.projectionMatrix.elements[5]*t;if(c.camera.fov!==x&&(y.isPerspectiveCamera?(l.style.WebkitPerspective=x+"px",l.style.perspective=x+"px"):(l.style.WebkitPerspective="",l.style.perspective=""),c.camera.fov=x),b.autoUpdate===!0&&b.updateMatrixWorld(),y.parent===null&&y.updateMatrixWorld(),y.isOrthographicCamera)var p=-(y.right+y.left)/2,I=(y.top+y.bottom)/2;var M=y.isOrthographicCamera?"scale("+x+")translate("+v(p)+"px,"+v(I)+"px)"+w(y.matrixWorldInverse):"translateZ("+x+"px)"+w(y.matrixWorldInverse),ne=M+"translate("+a+"px,"+t+"px)";c.camera.style!==ne&&!d&&(g.style.WebkitTransform=ne,g.style.transform=ne,c.camera.style=ne),E(b,b,y,M),d&&D(b)}};function _t(f,o,e){var a=o.getBoundingClientRect(),t=a.top,s=a.left,c=a.width,l=a.height;return new T.Vector2((f.x-s)/c*2-1,-(f.y-t)/l*2+1)}var St=(function(f){Ne(o,f);function o(e,a,t,s,c){var l=f.call(this)||this;l.type="RoundedBoxGeometry",c=isNaN(c)?1:Math.max(1,Math.floor(c)),e=isNaN(e)?1:e,a=isNaN(a)?1:a,t=isNaN(t)?1:t,s=isNaN(s)?.15:s,s=Math.min(s,Math.min(e,Math.min(a,Math.min(t)))/2);var g=e/2-s,d=a/2-s,v=t/2-s;l.parameters={width:e,height:a,depth:t,radius:s,radiusSegments:c};var w=c+1,A=w*c+1<<3,E=new T.BufferAttribute(new Float32Array(A*3),3),C=new T.BufferAttribute(new Float32Array(A*3),3),O=[],D=[];new T.Vector3;var b=new T.Vector3,y=[],x=[],p=[],I=w*c,M=w*c+1;ne(),re(),J(),ue(),Me(),be();function ne(){for(var U=[new T.Vector3(1,1,1),new T.Vector3(1,1,-1),new T.Vector3(-1,1,-1),new T.Vector3(-1,1,1),new T.Vector3(1,-1,1),new T.Vector3(1,-1,-1),new T.Vector3(-1,-1,-1),new T.Vector3(-1,-1,1)],N=0;N<8;N++)O.push([]),D.push([]);for(var S=Math.PI/2,V=new T.Vector3(g,d,v),j=0;j<=c;j++){var ae=j/c,X=ae*S,B=Math.cos(X),Z=Math.sin(X);if(j==c){b.set(0,1,0);var Y=b.clone().multiplyScalar(s).add(V);O[0].push(Y),y.push(Y);var R=b.clone();D[0].push(R),x.push(R);continue}for(var L=0;L<=c;L++){var te=L/c,G=te*S;b.x=B*Math.cos(G),b.y=Z,b.z=B*Math.sin(G);var Y=b.clone().multiplyScalar(s).add(V);O[0].push(Y),y.push(Y);var R=b.clone().normalize();D[0].push(R),x.push(R)}}for(var W=1;W<8;W++)for(var N=0;N<O[0].length;N++){var Y=O[0][N].clone().multiply(U[W]);O[W].push(Y),y.push(Y);var R=D[0][N].clone().multiply(U[W]);D[W].push(R),x.push(R)}}function J(){for(var U=[!0,!1,!0,!1,!1,!0,!1,!0],N=w*(c-1),S=0;S<8;S++){for(var V=M*S,j=0;j<c-1;j++)for(var ae=j*w,X=(j+1)*w,B=0;B<c;B++){var Z=B+1,Y=V+ae+B,R=V+ae+Z,L=V+X+B,te=V+X+Z;U[S]?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}for(var B=0;B<c;B++){var Y=V+N+B,R=V+N+B+1,L=V+I;U[S]?(p.push(Y),p.push(L),p.push(R)):(p.push(Y),p.push(R),p.push(L))}}}function re(){var U=I,N=I+M,S=I+M*2,V=I+M*3;p.push(U),p.push(N),p.push(S),p.push(U),p.push(S),p.push(V),U=I+M*4,N=I+M*5,S=I+M*6,V=I+M*7,p.push(U),p.push(S),p.push(N),p.push(U),p.push(V),p.push(S),U=0,N=M,S=M*4,V=M*5,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=M*2,N=M*3,S=M*6,V=M*7,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V),U=c,N=c+M*3,S=c+M*4,V=c+M*7,p.push(U),p.push(N),p.push(S),p.push(N),p.push(V),p.push(S),U=c+M,N=c+M*2,S=c+M*5,V=c+M*6,p.push(U),p.push(S),p.push(N),p.push(N),p.push(S),p.push(V)}function ue(){for(var U=0;U<4;U++)for(var N=U*M,S=4*M+N,V=(U&1)===1,j=0;j<c;j++){var ae=j+1,X=N+j,B=N+ae,Z=S+j,Y=S+ae;V?(p.push(X),p.push(Z),p.push(B),p.push(B),p.push(Z),p.push(Y)):(p.push(X),p.push(B),p.push(Z),p.push(B),p.push(Y),p.push(Z))}}function be(){for(var U=[0,2,4,6],N=[1,3,5,7],S=0;S<4;S++)for(var V=M*U[S],j=M*N[S],ae=1>=S,X=0;X<c;X++){var B=X*w,Z=(X+1)*w,Y=V+B,R=V+Z,L=j+B,te=j+Z;ae?(p.push(Y),p.push(L),p.push(R),p.push(R),p.push(L),p.push(te)):(p.push(Y),p.push(R),p.push(L),p.push(R),p.push(te),p.push(L))}}function Me(){for(var U=c-1,N=[0,1,4,5],S=[3,2,7,6],V=[0,1,1,0],j=0;j<4;j++)for(var ae=N[j]*M,X=S[j]*M,B=0;B<=U;B++){var Z=ae+c+B*w,Y=ae+(B!=U?c+(B+1)*w:M-1),R=X+c+B*w,L=X+(B!=U?c+(B+1)*w:M-1);V[j]?(p.push(Z),p.push(R),p.push(Y),p.push(Y),p.push(R),p.push(L)):(p.push(Z),p.push(Y),p.push(R),p.push(Y),p.push(L),p.push(R))}}for(var ie=0,se=0;se<y.length;se++)E.setXYZ(ie,y[se].x,y[se].y,y[se].z),C.setXYZ(ie,x[se].x,x[se].y,x[se].z),ie++;return l.setIndex(new T.BufferAttribute(new Uint16Array(p),1)),l.setAttribute("position",E),l.setAttribute("normal",C),l}return o})(T.BufferGeometry);function Ve(f,o){return typeof f!="number"||typeof o!="number"?!1:Math.abs(f-o)<.001}function Be(f,o,e,a){a===void 0&&(a=function(s){return s});var t=a(e);return f*(1-t)+o*t}var ee=Number((Math.PI/2).toFixed(5));function ln(f,o,e){var a=new T.Shape;return a.moveTo(e,0),a.lineTo(f-e,0),a.absarc(f-e,e,e,-ee,0,!1),a.lineTo(f,o-e),a.absarc(f-e,o-e,e,0,ee,!1),a.lineTo(e,o),a.absarc(e,o-e,e,ee,Math.PI,!1),a.lineTo(0,e),a.absarc(e,e,e,Math.PI,Math.PI*1.5,!1),a}var Re=function(f){var o=document.createElement("div");o.innerText=f;var e=new ye(o);return e.name=f,e.scale.set(.3,.3,.3),o.style.pointerEvents="none",o.style.backfaceVisibility="hidden",e},Ze=function(f){var o=new T.PlaneGeometry(5,5),e=new T.MeshBasicMaterial({transparent:!0,opacity:0}),a=new T.Mesh(o,e),t=document.createElement("div");t.innerText=f;var s=new ye(t);return s.name=f,s.scale.set(.3,.3,.3),t.style.color="#ffffff",t.style.opacity="0.5",t.style.pointerEvents="none",t.style.backfaceVisibility="hidden",a.rotateX(-ee),a.add(s),a},cn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.camera=new de.Camera(90),t.scene=new T.Scene,t.renderer=new T.WebGLRenderer({antialias:!0,alpha:!0}),t.css3drenderer=new Ct,t.ambientLight=new T.AmbientLight(16777215,.7),t.wrapper=document.createElement("div"),t.arrows=document.createElement("div"),t.arrowLeft=document.createElement("div"),t.arrowRight=document.createElement("div"),t.arrowFront=document.createElement("div"),t.arrowBack=document.createElement("div"),t.arrowTop=document.createElement("div"),t.arrowBottom=document.createElement("div"),t.spherical=null,t.dragging=!1,t.style=document.createElement("style"),t.directionalLight=new T.DirectionalLight(16777215,.2),t.box=new T.Mesh(new St(8,8,8,.5,20),new T.MeshPhongMaterial({color:16777215})),t.faces=new T.Group,t.orient=function(l){var g=l.longitude,d=l.latitude;t.dragging=!1,t.spherical=null,t.controls.enableDamping=!1,t.five.setState(Object.assign({latitude:d},g!==void 0?{longitude:g+t.config.fixedLongitude}:{})),t.five.ready().then(function(){t.controls.enableDamping=!0,t.setState({arrowsVisible:!0})})},t.onRenderFrame=function(){var l,g,d,v,w;if(t.renderer.render(t.scene,t.camera),t.css3drenderer.render(t.scene,t.camera),t.directionalLight.position.copy(t.camera.position),(l=t.controls)===null||l===void 0||l.update(),t.dragging){t.camera.computePose(),t.updateByCamera();var A=t.camera.pose,E=A.longitude,C=A.latitude;t.five.setState({longitude:E,latitude:C},!0),t.updateArrows({longitude:E,latitude:C})}else if(t.spherical&&(!Ve(t.spherical.pi,(g=t.controls)===null||g===void 0?void 0:g.getPolarAngle())||!Ve(t.spherical.theta,(d=t.controls)===null||d===void 0?void 0:d.getAzimuthalAngle()))){t.spherical={pi:(v=t.controls)===null||v===void 0?void 0:v.getPolarAngle(),theta:(w=t.controls)===null||w===void 0?void 0:w.getAzimuthalAngle()},t.camera.computePose(),t.updateByCamera();var O=t.camera.pose,E=O.longitude,C=O.latitude;t.five.setState({longitude:E,latitude:C},!0),t.updateArrows({longitude:E,latitude:C})}else t.spherical=null},t.onTapGesture=function(l){var g=l.pointers[0].clientX,d=l.pointers[0].clientY,v=_t({x:g,y:d},t.wrapper),w=new T.Raycaster;w.setFromCamera(v,t.camera);var A=w.intersectObjects(t.faces.children,!1)[0];if(A){var E=A.object.userData,C=E.longitude,O=E.latitude;t.orient({longitude:C,latitude:O})}},t.onFiveWantsGesture=function(){if(t.spherical)return!1},t.onFiveModeChange=function(l){t.controls&&(t.controls.maxPolarAngle=l==="Topview"?0:ee)},t.onCameraUpdate=function(l){var g=l.state;if(!t.dragging&&!t.spherical){var d=g.longitude,v=g.latitude;t.camera.pose.longitude===d&&t.camera.pose.latitude===v||(t.camera.setFromPose({longitude:d,latitude:v,distance:20,offset:new T.Vector3(0,0,0)}),t.updateByCamera(),t.updateArrows({longitude:d,latitude:v}))}},t.onPanStart=function(l){t.dragging=!0,t.spherical={}},t.onMouseMove=function(l){if(!t.dragging){var g=_t({x:l.clientX,y:l.clientY},t.wrapper),d=new T.Raycaster;d.setFromCamera(g,t.camera);var v=d.intersectObjects(t.faces.children,!1)[0];t.faces.children.forEach(function(w){w.material.opacity=0,w.children[0].element.style.color=""}),v&&(v.object.material.opacity=.3,v.object.children[0].element.style.color="#336dff")}},t.onPanEnd=function(l){t.dragging=!1,t.spherical={pi:t.controls.getPolarAngle(),theta:t.controls.getAzimuthalAngle()}},t.dispose=function(){t.disable()},t.five=e;var s={enabled:!1,visible:!0,arrowsVisible:!1};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=z({fixedLongitude:0,orthoView:!0},a==null?void 0:a.config);return t._config=c,t.state.enabled&&t._enable({userAction:!1}),t.mc=new ut.Manager(t.wrapper),t.mc.add(new ut.Tap({interval:410})),t.mc.add(new ut.Pan({threshold:10,pointers:0})),t.camera.setFromPose({distance:20,offset:new T.Vector3(0,0,0),longitude:e.camera.pose.latitude,latitude:e.camera.pose.latitude}),t.cylinder=new T.Mesh(new T.CylinderGeometry(13.2,14,.01,50,1,!0),new T.ShaderMaterial({uniforms:{radiusTop:{value:13.2},radiusBottom:{value:14},opacity:{value:1}},vertexShader:`
|
|
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:ee})},this.arrowLeft.onclick=function(){return e.orient({longitude:-ee,latitude:0})},this.arrowRight.onclick=function(){return e.orient({longitude:ee,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=Be(.2,1,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),a=Be(11,13,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),t=Be(12,15,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),s=Be(13,19,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),c=Be(-.2,.5,this.camera.pose.latitude/Math.PI*2,function(l){return l*l});this.cylinder.geometry=new T.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=ee-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(ee-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 Ve(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 Ve(ee,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 Ve(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=ln(7,7,.5),a=new T.ShapeGeometry(e);a.translate(-3.5,-3.5,0);var t=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));t.userData={longitude:0,latitude:0},t.position.z=4.1,t.add(Re("前"));var s=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));s.rotateY(Math.PI),s.position.z=-4.1,s.add(Re("后")),s.userData={longitude:Math.PI,latitude:0};var c=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));c.rotateY(ee),c.position.x=4.1,c.add(Re("右")),c.userData={longitude:ee,latitude:0};var l=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));l.rotateY(-ee),l.position.x=-4.1,l.add(Re("左")),l.userData={longitude:-ee,latitude:0};var g=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));g.rotateX(-ee),g.position.y=4.1,g.add(Re("上")),g.userData={longitude:0,latitude:ee},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=ee,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 T.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}(q.BasePlugin.Controller),un=function(f,o){return new cn(f,o)},hn=function(f){Ne(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:ee})},this.arrowLeft.onclick=function(){return e.orient({longitude:-ee,latitude:0})},this.arrowRight.onclick=function(){return e.orient({longitude:ee,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=Be(.2,1,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),a=Be(11,13,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),t=Be(12,15,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),s=Be(13,19,this.camera.pose.latitude/Math.PI*2,function(l){return l*l}),c=Be(-.2,.5,this.camera.pose.latitude/Math.PI*2,function(l){return l*l});this.cylinder.geometry=new T.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=ee-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(ee-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 Ve(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 Ve(ee,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 Ve(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=ln(7,7,.5),a=new T.ShapeGeometry(e);a.translate(-3.5,-3.5,0);var t=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));t.userData={longitude:0,latitude:0},t.position.z=4.1,t.add(Re("前"));var s=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));s.rotateY(Math.PI),s.position.z=-4.1,s.add(Re("后")),s.userData={longitude:Math.PI,latitude:0};var c=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));c.rotateY(ee),c.position.x=4.1,c.add(Re("右")),c.userData={longitude:ee,latitude:0};var l=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));l.rotateY(-ee),l.position.x=-4.1,l.add(Re("左")),l.userData={longitude:-ee,latitude:0};var g=new T.Mesh(a,new T.MeshBasicMaterial({transparent:!0,color:3370495,opacity:0}));g.rotateX(-ee),g.position.y=4.1,g.add(Re("上")),g.userData={longitude:0,latitude:ee},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=ee,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 T.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})(q.BasePlugin.Controller),un=function(f,o){return new cn(f,o)},hn=(function(f){Ne(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}(At.BasePlugin.Controller),fn=function(f,o){return new hn(f,o)};new T.Matrix4().fromArray([1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1]);var ft=function(){function f(o,e,a,t,s){this.R=o,this.Q=e,this.A=a,this.B=t,this.C=s,this.cov=NaN,this.x=NaN}return f.prototype.filter=function(o,e){if(e===void 0&&(e=0),isNaN(this.x))this.x=1/this.C*o,this.cov=1/this.C*this.Q*(1/this.C);else{var a=this.A*this.x+this.B*e,t=this.A*this.cov*this.A+this.R,s=t*this.C*(1/(this.C*t*this.C+this.Q));this.x=a+s*(o-this.C*a),this.cov=t-s*this.C*t}return this.x},f}(),pn=function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.dispose=function(){t.disable()},t.five=e;var s={enabled:!0,visible:!0};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=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 ft(a,t,s,c,l),d=new ft(a,t,s,c,l),v=new ft(a,t,s,c,l);if(this.trajectory&&this.trajectory.content.loadState==="READY"){for(var w=this.trajectory.content.data.positionArray,A=new Float32Array(w.length/3),E=0;E<A.length;E++)if(E===0)A[E]=0;else{var C=new T.Vector3(w[E-3],w[E-2],w[E-1]),O=new T.Vector3(w[E],w[E+1],w[E+2]);A[E]=O.distanceTo(C)+A[E-1]}this.totalDistance=A[A.length-1];for(var E=0;E<A.length;E++){for(var D=new T.Vector3(0,0,0),b=0,y=E-5;y<E+6;y++)y>=0&&y<A.length&&(D.add(new T.Vector3(w[y*3],w[y*3+1],w[y*3+2])),b++);D.divideScalar(b).applyMatrix4(e.transform);var x=g.filter(D.x),p=d.filter(D.y),I=v.filter(D.z),M={position:new T.Vector3(x,p,I),location:A[E]};this.keyframes.push(M)}}else throw new Error("trajectory content is not ready")},o.prototype.setPlayingState=function(e){(e.keyframeIndex!==null||e.progress!==null)&&(this.cancelAnimation&&this.cancelAnimation(),this.playingState.keyframeIndex=e.keyframeIndex?e.keyframeIndex:this.playingState.keyframeIndex,this.playingState.progress=e.progress?e.progress:this.playingState.progress,this.play())},o.prototype._enable=function(e){},o.prototype.play=function(){var e=this,a=this.keyframes.length;if(a<2)throw new Error("keyframes length must be greater than 2");var t={keyframeIndex:null,progress:null};this.playingState.keyframeIndex!==null&&this.playingState.progress!==null?(t.keyframeIndex=this.playingState.keyframeIndex,t.progress=this.playingState.progress):this.playingState.keyframeIndex===null&&this.playingState.progress===null&&(this.playingState.keyframeIndex=this.skipStart,this.playingState.progress=0,this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()),this.virualCamera.lookAt(this.keyframes[1].position.clone()),this.virualCamera.computePose(),this.five.setState(z({},this.virualCamera.pose)));var s=this.playingState.keyframeIndex,c=0;this.cancelAnimation=de.AnimationFrameLoop.shared.add(function(l,g){if(s===a-1-e.skipEnd&&e.cancelAnimation){e.cancelAnimation();return}e.currentKeyFrame=e.keyframes[s],e.nextKeyframe=e.keyframes[s+1],s+2<=a-1?e.nextButOneKeyframe=e.keyframes[s+2]:e.nextButOneKeyframe=null;var d=e.currentKeyFrame.position.clone(),v=e.nextKeyframe.position.clone(),w=e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(),A=d.clone().add(w.clone().multiplyScalar(.01)),E=new T.Vector3;e.nextButOneKeyframe!==null?E=e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize():E.copy(w);var C=v.clone().add(E.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}(q.BasePlugin.Controller),dn=function(f,o){return new pn(f,o)};function It(f,o,e){return f<o?o:f>e?e:f}var vn=`
|
|
507
|
+
`,t.enable()),t}return o})(At.BasePlugin.Controller),fn=function(f,o){return new hn(f,o)};new T.Matrix4().fromArray([1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1]);var ft=(function(){function f(o,e,a,t,s){this.R=o,this.Q=e,this.A=a,this.B=t,this.C=s,this.cov=NaN,this.x=NaN}return f.prototype.filter=function(o,e){if(e===void 0&&(e=0),isNaN(this.x))this.x=1/this.C*o,this.cov=1/this.C*this.Q*(1/this.C);else{var a=this.A*this.x+this.B*e,t=this.A*this.cov*this.A+this.R,s=t*this.C*(1/(this.C*t*this.C+this.Q));this.x=a+s*(o-this.C*a),this.cov=t-s*this.C*t}return this.x},f})(),pn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.dispose=function(){t.disable()},t.five=e;var s={enabled:!0,visible:!0};t.state=Object.assign(s,a==null?void 0:a.initialState);var c=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 ft(a,t,s,c,l),d=new ft(a,t,s,c,l),v=new ft(a,t,s,c,l);if(this.trajectory&&this.trajectory.content.loadState==="READY"){for(var w=this.trajectory.content.data.positionArray,A=new Float32Array(w.length/3),E=0;E<A.length;E++)if(E===0)A[E]=0;else{var C=new T.Vector3(w[E-3],w[E-2],w[E-1]),O=new T.Vector3(w[E],w[E+1],w[E+2]);A[E]=O.distanceTo(C)+A[E-1]}this.totalDistance=A[A.length-1];for(var E=0;E<A.length;E++){for(var D=new T.Vector3(0,0,0),b=0,y=E-5;y<E+6;y++)y>=0&&y<A.length&&(D.add(new T.Vector3(w[y*3],w[y*3+1],w[y*3+2])),b++);D.divideScalar(b).applyMatrix4(e.transform);var x=g.filter(D.x),p=d.filter(D.y),I=v.filter(D.z),M={position:new T.Vector3(x,p,I),location:A[E]};this.keyframes.push(M)}}else throw new Error("trajectory content is not ready")},o.prototype.setPlayingState=function(e){(e.keyframeIndex!==null||e.progress!==null)&&(this.cancelAnimation&&this.cancelAnimation(),this.playingState.keyframeIndex=e.keyframeIndex?e.keyframeIndex:this.playingState.keyframeIndex,this.playingState.progress=e.progress?e.progress:this.playingState.progress,this.play())},o.prototype._enable=function(e){},o.prototype.play=function(){var e=this,a=this.keyframes.length;if(a<2)throw new Error("keyframes length must be greater than 2");var t={keyframeIndex:null,progress:null};this.playingState.keyframeIndex!==null&&this.playingState.progress!==null?(t.keyframeIndex=this.playingState.keyframeIndex,t.progress=this.playingState.progress):this.playingState.keyframeIndex===null&&this.playingState.progress===null&&(this.playingState.keyframeIndex=this.skipStart,this.playingState.progress=0,this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()),this.virualCamera.lookAt(this.keyframes[1].position.clone()),this.virualCamera.computePose(),this.five.setState(z({},this.virualCamera.pose)));var s=this.playingState.keyframeIndex,c=0;this.cancelAnimation=de.AnimationFrameLoop.shared.add(function(l,g){if(s===a-1-e.skipEnd&&e.cancelAnimation){e.cancelAnimation();return}e.currentKeyFrame=e.keyframes[s],e.nextKeyframe=e.keyframes[s+1],s+2<=a-1?e.nextButOneKeyframe=e.keyframes[s+2]:e.nextButOneKeyframe=null;var d=e.currentKeyFrame.position.clone(),v=e.nextKeyframe.position.clone(),w=e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(),A=d.clone().add(w.clone().multiplyScalar(.01)),E=new T.Vector3;e.nextButOneKeyframe!==null?E=e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize():E.copy(w);var C=v.clone().add(E.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})(q.BasePlugin.Controller),dn=function(f,o){return new pn(f,o)};function It(f,o,e){return f<o?o:f>e?e:f}var vn=`
|
|
508
508
|
varying vec2 vUv;
|
|
509
509
|
varying vec3 vPosition;
|
|
510
510
|
void main() {
|
|
@@ -531,4 +531,4 @@ void main() {
|
|
|
531
531
|
}
|
|
532
532
|
gl_FragColor.a = gl_FragColor.a * opacity;
|
|
533
533
|
}
|
|
534
|
-
`,gn=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],pt=512,dt=512,Qe=128,yn=function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.group=new T.Group,t.mesh=function(){var l=new T.CylinderGeometry(.12,.12,1,32,1,!0);l.translate(0,.5,0);var g=new T.ShaderMaterial({vertexShader:vn,fragmentShader:mn,uniforms:{map:{value:new T.Texture},progress:{value:0},opacity:{value:0}},transparent:!0,depthTest:!1}),d=new T.Mesh(l,g);return d}(),t.panoMesh=new de.PanoCircleMesh({scale:1.5}),t.stop=function(){},t.drawLine=function(l,g){if(t.ctx){var d=function(){var A,E=pt/16|0;return E*((A=gn[l])!==null&&A!==void 0?A:0)}(),v=(1-(g+l*150)%1200/1200)*(dt+Qe),w=t.ctx.createLinearGradient(0,v-Qe,0,v);w.addColorStop(0,"rgba(255,255,255,0)"),w.addColorStop(.5,"rgba(255,255,255,1)"),w.addColorStop(1,"rgba(255,255,255,0)"),t.ctx.fillStyle=w,t.ctx.fillRect(d,v-Qe,3,Qe)}},t.anime=function(l){if(t.ctx&&t.startTime){t.ctx.clearRect(0,0,pt,dt);for(var g=0;g<16;g++)t.drawLine(g,l-t.startTime);var d=It((l-t.startTime)/1e3,0,1),v=It((l-t.startTime)/300,0,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=pt,t.canvas.height=dt,t.ctx.shadowColor="rgba(255,255,255,0.5)",t.ctx.shadowBlur=6,t.ctx.shadowOffsetX=0,t.ctx.shadowOffsetY=0,t.mesh.material.uniforms.map.value=new T.CanvasTexture(t.canvas),t.group.add(t.mesh),t.panoMesh.setProgress(1),t.panoMesh.setOpacity(0),t.group.add(t.panoMesh),t.state.enabled&&t._enable({userAction:!1})),t}return Object.defineProperty(o.prototype,"config",{get:function(){return 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=de.AnimationFrameLoop.shared.add(function(t,s){a.startTime||(a.startTime=t),a.panoMesh.updateTime(t,s),a.anime(t)})})},o.prototype._disable=function(e){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0},o.prototype.enable=function(e){var a;if(this.ctx&&!this.state.enabled&&this.five.observers[this.five.state.panoIndex]){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!0},t),this._enable({userAction:t})}},o.prototype.disable=function(e){var a;if(this.state.enabled!==!1){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!1},t),this._disable({userAction:t})}},o.prototype.setState=function(e,a){a===void 0&&(a={});var t=this.state,s=a.userAction!==void 0?a.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&t.enabled!==e.enabled){var c={userAction:s};e.enabled?this._enable(c):this._disable(c)}},o}(At.BasePlugin.Controller),bn=function(f,o){return new yn(f,o)};q.BackgroundPlugin=fn,q.CSS3DRenderer=Ct,q.ItemMaskPlugin=sn,q.OrbitControls=De,q.OrientationPlugin=un,q.PanoAnimePlugin=bn,q.RoundedBoxGeometry=St,q.TrajectoryPlugin=dn,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
|
|
534
|
+
`,gn=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],pt=512,dt=512,Qe=128,yn=(function(f){Ne(o,f);function o(e,a){var t=f.call(this,e)||this;t.group=new T.Group,t.mesh=(function(){var l=new T.CylinderGeometry(.12,.12,1,32,1,!0);l.translate(0,.5,0);var g=new T.ShaderMaterial({vertexShader:vn,fragmentShader:mn,uniforms:{map:{value:new T.Texture},progress:{value:0},opacity:{value:0}},transparent:!0,depthTest:!1}),d=new T.Mesh(l,g);return d})(),t.panoMesh=new de.PanoCircleMesh({scale:1.5}),t.stop=function(){},t.drawLine=function(l,g){if(t.ctx){var d=(function(){var A,E=pt/16|0;return E*((A=gn[l])!==null&&A!==void 0?A:0)})(),v=(1-(g+l*150)%1200/1200)*(dt+Qe),w=t.ctx.createLinearGradient(0,v-Qe,0,v);w.addColorStop(0,"rgba(255,255,255,0)"),w.addColorStop(.5,"rgba(255,255,255,1)"),w.addColorStop(1,"rgba(255,255,255,0)"),t.ctx.fillStyle=w,t.ctx.fillRect(d,v-Qe,3,Qe)}},t.anime=function(l){if(t.ctx&&t.startTime){t.ctx.clearRect(0,0,pt,dt);for(var g=0;g<16;g++)t.drawLine(g,l-t.startTime);var d=It((l-t.startTime)/1e3,0,1),v=It((l-t.startTime)/300,0,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=pt,t.canvas.height=dt,t.ctx.shadowColor="rgba(255,255,255,0.5)",t.ctx.shadowBlur=6,t.ctx.shadowOffsetX=0,t.ctx.shadowOffsetY=0,t.mesh.material.uniforms.map.value=new T.CanvasTexture(t.canvas),t.group.add(t.mesh),t.panoMesh.setProgress(1),t.panoMesh.setOpacity(0),t.group.add(t.panoMesh),t.state.enabled&&t._enable({userAction:!1})),t}return Object.defineProperty(o.prototype,"config",{get:function(){return 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=de.AnimationFrameLoop.shared.add(function(t,s){a.startTime||(a.startTime=t),a.panoMesh.updateTime(t,s),a.anime(t)})})},o.prototype._disable=function(e){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0},o.prototype.enable=function(e){var a;if(this.ctx&&!this.state.enabled&&this.five.observers[this.five.state.panoIndex]){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!0},t),this._enable({userAction:t})}},o.prototype.disable=function(e){var a;if(this.state.enabled!==!1){var t=(a=e==null?void 0:e.userAction)!==null&&a!==void 0?a:!0;this.updateState({enabled:!1},t),this._disable({userAction:t})}},o.prototype.setState=function(e,a){a===void 0&&(a={});var t=this.state,s=a.userAction!==void 0?a.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&t.enabled!==e.enabled){var c={userAction:s};e.enabled?this._enable(c):this._disable(c)}},o})(At.BasePlugin.Controller),bn=function(f,o){return new yn(f,o)};q.BackgroundPlugin=fn,q.CSS3DRenderer=Ct,q.ItemMaskPlugin=sn,q.OrbitControls=De,q.OrientationPlugin=un,q.PanoAnimePlugin=bn,q.RoundedBoxGeometry=St,q.TrajectoryPlugin=dn,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
|