@realsee/five 6.8.0-alpha.9 → 6.8.1
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/AGENTS_READ_ME.md +6 -1
- package/AI_CONTEXT.md +6 -1
- package/README.md +10 -3
- package/ai_guides/README.md +29 -0
- package/ai_guides/api.md +92 -21
- package/ai_guides/features/3dtile.md +1 -1
- package/ai_guides/features/camera-animation.md +18 -1
- package/ai_guides/features/clipper.md +2 -2
- package/ai_guides/features/coordinate-system.md +20 -2
- package/ai_guides/features/event.md +106 -10
- package/ai_guides/features/five.md +17 -17
- package/ai_guides/features/flowing-light-2d-pass.md +75 -17
- package/ai_guides/features/flowing-light-3d-pass.md +76 -17
- package/ai_guides/features/gaussian-blur-pass.md +1 -1
- package/ai_guides/features/gesture.md +2 -1
- package/ai_guides/features/get-screen-pixels.md +2 -2
- package/ai_guides/features/image-options.md +2 -2
- package/ai_guides/features/load-external-model.md +6 -2
- package/ai_guides/features/load-progress.md +1 -1
- package/ai_guides/features/material.md +20 -12
- package/ai_guides/features/mode.md +1 -1
- package/ai_guides/features/model.md +1 -1
- package/ai_guides/features/move-pano-effect.md +1 -1
- package/ai_guides/features/multi-work.md +1 -1
- package/ai_guides/features/pano-filter.md +149 -0
- package/ai_guides/features/pano-tile.md +1 -1
- package/ai_guides/features/pano-uv.md +1 -1
- package/ai_guides/features/parameter.md +26 -2
- package/ai_guides/features/plugin.md +1 -1
- package/ai_guides/features/postprocessing.md +1 -1
- package/ai_guides/features/raycast.md +5 -2
- package/ai_guides/features/request-proxy.md +1 -1
- package/ai_guides/features/screen-project.md +2 -1
- package/ai_guides/features/state.md +23 -3
- package/ai_guides/features/view-layer.md +1 -1
- package/ai_guides/features/work.md +1 -1
- package/ai_guides/glossary.md +4 -4
- package/ai_guides/release_notes/6.8.md +190 -58
- package/ai_guides/template.md +11 -0
- package/docs/00_FOR_AI_AGENTS.md +3 -2
- package/docs/README.md +3 -2
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/main.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.BoundingMesh.html +2 -2
- package/docs/classes/five.Camera.html +3 -3
- package/docs/classes/five.EyeDomeLightingPass.html +1 -1
- package/docs/classes/five.Five.html +77 -76
- package/docs/classes/five.FivePass.html +1 -1
- package/docs/classes/five.Histogram.html +19 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +8 -8
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +5 -5
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMCustomShader.html +42 -3
- package/docs/classes/five.PBMGSObject.html +5 -3
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +7 -7
- package/docs/classes/five.PBMPanoFilter.html +61 -0
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PBMUpdateable.html +41 -0
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.Parameter.html +57 -55
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +5 -5
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +24 -24
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +3 -2
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +22 -22
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFLoader.html +2 -2
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.GLTFParser.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +2 -2
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
- package/docs/classes/plugins.CSS2DObject.html +10 -0
- package/docs/classes/plugins.CSS2DRenderer.html +7 -0
- package/docs/classes/plugins.CSS3DObject.html +9 -0
- package/docs/classes/plugins.CSS3DRenderer.html +4 -2
- package/docs/classes/plugins.CSS3DSprite.html +11 -0
- package/docs/classes/plugins.Object3DHelperController.html +43 -0
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +6 -6
- package/docs/classes/vfx.ParticleGPU.html +3 -3
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +122 -1
- package/docs/documents/api.html +163 -35
- package/docs/documents/features_3dtile.html +1 -1
- package/docs/documents/features_camera-animation.html +18 -2
- package/docs/documents/features_clipper.html +2 -2
- package/docs/documents/features_coordinate-system.html +52 -3
- package/docs/documents/features_event.html +44 -8
- package/docs/documents/features_five.html +17 -17
- package/docs/documents/features_flowing-light-2d-pass.html +41 -125
- package/docs/documents/features_flowing-light-3d-pass.html +43 -132
- package/docs/documents/features_gaussian-blur-pass.html +6 -6
- package/docs/documents/features_gesture.html +2 -1
- package/docs/documents/features_get-screen-pixels.html +2 -2
- package/docs/documents/features_image-options.html +2 -2
- package/docs/documents/features_load-external-model.html +6 -2
- package/docs/documents/features_load-progress.html +1 -1
- package/docs/documents/features_material.html +11 -4
- package/docs/documents/features_mode.html +1 -1
- package/docs/documents/features_model.html +1 -1
- package/docs/documents/features_move-pano-effect.html +1 -1
- package/docs/documents/features_multi-work.html +1 -1
- package/docs/documents/features_pano-filter.html +123 -0
- package/docs/documents/features_pano-tile.html +1 -1
- package/docs/documents/features_pano-uv.html +1 -1
- package/docs/documents/features_parameter.html +11 -3
- package/docs/documents/features_plugin.html +1 -1
- package/docs/documents/features_postprocessing.html +1 -1
- package/docs/documents/features_raycast.html +5 -2
- package/docs/documents/features_request-proxy.html +1 -1
- package/docs/documents/features_screen-project.html +2 -1
- package/docs/documents/features_state.html +9 -2
- package/docs/documents/features_view-layer.html +1 -1
- package/docs/documents/features_work.html +1 -1
- package/docs/documents/glossary.html +5 -5
- package/docs/documents/release_notes_6.8.html +164 -64
- package/docs/documents/template.html +9 -0
- package/docs/functions/five.createDebugBoundingMesh.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/plugins.CSS2DPlugin.html +1 -0
- package/docs/functions/plugins.CSS3DPlugin.html +1 -0
- package/docs/functions/plugins.GaussianSplattingEntranceAnimationPlugin.html +1 -0
- package/docs/functions/plugins.Object3DHelperPlugin.html +1 -0
- package/docs/functions/react.getPlugin.html +2 -0
- package/docs/functions/react.setPlugin.html +2 -0
- package/docs/functions/react.useFiveCurrentObserver.html +2 -2
- package/docs/functions/react.useFiveFloor.html +2 -2
- package/docs/functions/react.useFivePlugin.html +8 -0
- package/docs/functions/react.useFiveProject2d.html +2 -2
- package/docs/functions/react.withFive.html +1 -1
- package/docs/functions/vue.useFiveCurrentObserver.html +2 -2
- package/docs/functions/vue.useFiveFloor.html +2 -2
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +122 -1
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +7 -2
- package/docs/interfaces/five.BaseExtendableEvent.html +11 -0
- package/docs/interfaces/five.EventCallback.html +58 -54
- package/docs/interfaces/five.FiveInitArgs.html +2 -2
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +21 -2
- package/docs/interfaces/five.GesturePointer.html +20 -0
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +10 -2
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.LooseWorkObserver.html +2 -2
- package/docs/interfaces/five.LooseWorkPanorama.html +2 -2
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +10 -10
- package/docs/interfaces/five.ModeChangeEvent.html +9 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +7 -2
- package/docs/interfaces/five.ModelSceneEvent.html +7 -2
- package/docs/interfaces/five.ModelTileEvent.html +7 -2
- package/docs/interfaces/five.MovePanoOptions.html +8 -8
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +7 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +7 -2
- package/docs/interfaces/five.PBMClipperParameter.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
- package/docs/interfaces/five.PBMPanoDepth.html +5 -5
- package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
- package/docs/interfaces/five.PBMPanoPicture.html +8 -6
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
- package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
- package/docs/interfaces/five.PanoCircleMeshInterface.html +2 -2
- package/docs/interfaces/five.PanoEvent.html +15 -2
- package/docs/interfaces/five.PanoPrepareEvent.html +15 -0
- package/docs/interfaces/five.PanoTextureEvent.html +11 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +40 -38
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +54 -52
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +7 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +55 -54
- package/docs/interfaces/five.RgbaData.html +7 -0
- package/docs/interfaces/five.SplatData.html +2 -2
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +9 -2
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DOptions.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +24 -24
- package/docs/interfaces/five.WorkCubeImage.html +3 -2
- package/docs/interfaces/five.WorkImage.html +6 -5
- package/docs/interfaces/five.WorkInitial.html +8 -8
- package/docs/interfaces/five.WorkModel.html +8 -8
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +29 -29
- package/docs/interfaces/five.WorkObserverJson.html +2 -2
- package/docs/interfaces/five.WorkObserverProto.html +26 -0
- package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
- package/docs/interfaces/five.WorkTile.html +6 -5
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +7 -2
- package/docs/interfaces/five.XRControllerEvent.html +10 -2
- package/docs/interfaces/five.XRControllerState.html +8 -0
- package/docs/interfaces/five.XRGestureEvent.html +13 -2
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +9 -2
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
- package/docs/interfaces/plugins.CSS2DPluginController.html +49 -0
- package/docs/interfaces/plugins.CSS2DPluginType.Config.html +2 -0
- package/docs/interfaces/plugins.CSS2DPluginType.CreateCSS2DObjectType.html +8 -0
- package/docs/interfaces/plugins.CSS2DPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.CSS2DPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.CSS2DPluginType.State.html +8 -0
- package/docs/interfaces/plugins.CSS2DRendererParameters.html +2 -0
- package/docs/interfaces/plugins.CSS3DPluginController.html +52 -0
- package/docs/interfaces/plugins.CSS3DPluginType.Config.html +2 -0
- package/docs/interfaces/plugins.CSS3DPluginType.CreateCSS3DObjectType.html +10 -0
- package/docs/interfaces/plugins.CSS3DPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.CSS3DPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.CSS3DPluginType.State.html +8 -0
- package/docs/interfaces/plugins.CSS3DRendererParameters.html +2 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +3 -3
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationController.html +44 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.BoundingAABB2D.html +3 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Config.html +8 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Keyframe.html +3 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.State.html +8 -0
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +2 -2
- package/docs/interfaces/plugins.Object3DHelperPluginType.BaseController.html +30 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.BaseHelper.html +22 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.BoundingBoxController.html +30 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.HelperOffset.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.MoveController.html +36 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.MoveHelperAbstract.html +32 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelper.html +12 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelperPluginState.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelperState.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.ObjectHelperControllers.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.RotateController.html +36 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.RotateHelperAbstract.html +28 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Scissor.html +5 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Vector2Position.html +3 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Vector3Position.html +4 -0
- package/docs/interfaces/plugins.OrientationPluginController.html +6 -6
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PlayingState.html +2 -2
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +8 -8
- package/docs/interfaces/react.FiveAppProps.html +11 -0
- package/docs/interfaces/react.FiveInjectionTypes.html +21 -21
- package/docs/interfaces/sticker.IntersectionLike.html +2 -2
- package/docs/interfaces/vfx.ParticleArgs.html +4 -4
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +3 -3
- package/docs/modules/five.html +1 -1
- package/docs/modules/plugins.CSS2DPluginType.html +1 -0
- package/docs/modules/plugins.CSS3DPluginType.html +1 -0
- package/docs/modules/plugins.GaussianSplattingEntranceAnimationPluginType.html +1 -0
- package/docs/modules/plugins.Object3DHelperPluginType.html +1 -0
- package/docs/modules/plugins.html +1 -1
- package/docs/modules/react.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +30 -26
- package/docs/types/five.EasingFunction.html +1 -0
- package/docs/types/five.EventTypes.html +26 -26
- package/docs/types/five.LegacyEventType.html +7 -7
- 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.ParseOptions.html +6 -6
- package/docs/types/five.Works.html +1 -1
- package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
- package/docs/types/plugins.CSS2DPluginType.PluginData.html +1 -0
- package/docs/types/plugins.CSS2DPluginType.ServerData.html +1 -0
- package/docs/types/plugins.CSS3DPluginType.PluginData.html +1 -0
- package/docs/types/plugins.CSS3DPluginType.ServerData.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.AddObject3DHelperConfig.html +13 -0
- package/docs/types/plugins.Object3DHelperPluginType.Circle.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Color.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Direction.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Direction4.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.HelperConfig.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.HelperEventMap.html +17 -0
- package/docs/types/plugins.Object3DHelperPluginType.InternalHelperEventMap.html +8 -0
- package/docs/types/plugins.Object3DHelperPluginType.Object3DHelperEventMap.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Object3DHelperPluginEventMap.html +7 -0
- package/docs/types/plugins.Object3DHelperPluginType.PositionFrom.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.ScaleCallback.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.ScalePosition.html +4 -0
- package/docs/types/plugins.Object3DHelperPluginType.UseFaceNormalInterface.html +4 -0
- package/docs/types/plugins.Object3DHelperPluginType.Vector2WithArray.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Vector3WithArray.html +1 -0
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/docs/variables/react.FiveApp.html +3 -0
- package/docs/variables/react.FiveAutoCanvas.html +3 -0
- package/five/application/events.d.ts +1 -1
- package/five/application/five.d.ts +6 -5
- package/five/bvh/bvhObject.d.ts +2 -2
- package/five/controllers/base.d.ts +1 -0
- package/five/controllers/events.d.ts +5 -1
- package/five/controllers/mapview.d.ts +1 -0
- package/five/controllers/model.d.ts +2 -2
- package/five/controllers/panorama.d.ts +3 -2
- package/five/controllers/xrPanorama.d.ts +1 -1
- package/five/core/camera.d.ts +1 -1
- package/five/gaussian-splatting/util/renderData.d.ts +66 -0
- package/five/index.d.ts +4 -1
- package/five/index.js +272 -782
- package/five/index.mjs +26894 -32056
- package/five/meshes/boundingMesh.d.ts +1 -0
- package/five/model/index.d.ts +2 -2
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting.d.ts +26 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +7 -5
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +13 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +2 -1
- package/five/model/loaders/glTF-helpers/index.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +2 -1
- package/five/model/loaders/spz.d.ts +2 -2
- package/five/model/materials/pbmMaterial.d.ts +54 -4
- package/five/model/materials/pbmMeshMaterial.d.ts +5 -3
- package/five/model/materials/pbmPointCloudMaterial.d.ts +0 -2
- package/five/model/objects/{pbmGSObject.d.ts → pbmGaussianSplattingObject.d.ts} +4 -1
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +59 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
- package/five/model/parameter.d.ts +11 -6
- package/five/model/tile3d/index.d.ts +5 -3
- package/five/model/tile3d/tile-node.d.ts +2 -2
- package/five/model/tile3d/tileset.d.ts +1 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +9 -7
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +6 -1
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +3 -1
- package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
- package/five/renderer/tools/render-full-screen.d.ts +1 -1
- package/five/texture/histogram.d.ts +54 -0
- package/five/texture/loader.d.ts +1 -1
- package/five/texture/textureData.d.ts +11 -0
- package/five/thirdparty/hammer.d.ts +371 -255
- package/five/thirdparty/jsrsasign.d.ts +5 -20
- package/five/types/movePanoOptions.d.ts +4 -3
- package/five/utils/error.d.ts +1 -0
- package/five/utils/event.d.ts +98 -37
- package/five/utils/imageURL.d.ts +1 -1
- package/five/utils/memoryUsage.d.ts +2 -2
- package/five/utils/subscribe.d.ts +2 -2
- package/five/webxr/motionHelper.d.ts +1 -1
- package/five/work/index.d.ts +1 -0
- package/five/work/looseWorkType.d.ts +2 -2
- package/five/work/work.d.ts +5 -35
- package/five/work/workJsonType.d.ts +2 -2
- package/five/work/workObserverProto.d.ts +39 -0
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/llms.txt +37 -1
- package/package.json +4 -4
- package/plugins/CSS2DPlugin/Controller.d.ts +59 -0
- package/plugins/CSS2DPlugin/index.d.ts +5 -0
- package/plugins/CSS2DPlugin/typing.d.ts +30 -0
- package/plugins/CSS3DPlugin/Controller.d.ts +64 -0
- package/plugins/CSS3DPlugin/index.d.ts +5 -0
- package/plugins/CSS3DPlugin/typing.d.ts +32 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +30 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +5 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/typing.d.ts +28 -0
- package/plugins/Object3DHelperPlugin/Controller.d.ts +99 -0
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.d.ts +142 -0
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.d.ts +66 -0
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.d.ts +61 -0
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.d.ts +17 -0
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.d.ts +97 -0
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.d.ts +37 -0
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.d.ts +93 -0
- package/plugins/Object3DHelperPlugin/constant.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/index.d.ts +6 -0
- package/plugins/Object3DHelperPlugin/typing.d.ts +143 -0
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.d.ts +22 -0
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.d.ts +23 -0
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.d.ts +19 -0
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.d.ts +2 -0
- package/plugins/Object3DHelperPlugin/utils/direction.d.ts +14 -0
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/solidGuide.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/utils/tipsDom.d.ts +8 -0
- package/plugins/TrajectoryPlugin/Controller.d.ts +1 -1
- package/plugins/index.d.ts +6 -1
- package/plugins/index.js +55 -21
- package/plugins/index.mjs +5582 -4238
- package/plugins/thirdParty/CSS2DRenderer.d.ts +37 -0
- package/plugins/thirdParty/CSS3DRenderer.d.ts +16 -3
- package/plugins/thirdParty/domevents.d.ts +36 -0
- package/plugins/utils/uuid.d.ts +1 -4
- package/react/autoCanvas.d.ts +9 -0
- package/react/context.d.ts +3 -2
- package/react/createProvider.d.ts +4 -4
- package/react/createStore.d.ts +3 -3
- package/react/fiveApp.d.ts +22 -0
- package/react/hooks/useFivePlugin.d.ts +26 -0
- package/react/hooks/useFiveProject2d.d.ts +1 -1
- package/react/index.d.ts +4 -0
- package/react/index.js +3 -3
- package/react/index.mjs +687 -782
- package/react/rendererPool.d.ts +2 -2
- package/react/withFive.d.ts +1 -1
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +55 -21
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +13 -14
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +21 -21
- package/umd/five-vue.js +3 -3
- package/umd/five.js +267 -777
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/vue/rendererPool.d.ts +5 -5
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +339 -556
- package/five/gs/util/renderData.d.ts +0 -32
- package/five/model/objects/pbmGSRenderMesh.d.ts +0 -29
- package/five/work/workObserverUtils.d.ts +0 -36
- /package/five/assets/{realsee-pmg-data-url.d.ts → realsee-png-data-url.d.ts} +0 -0
- /package/five/{gs → gaussian-splatting}/wasm/data.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/wasm/sort.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/dataWorker.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/sortWorker.d.ts +0 -0
package/react/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 6.8.
|
|
4
|
+
* Generated: 2026/4/28
|
|
5
|
+
* Version: 6.8.1
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -252,786 +252,691 @@
|
|
|
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
|
-
*/import * as
|
|
256
|
-
import
|
|
257
|
-
import
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
*/import * as e from "react";
|
|
256
|
+
import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
257
|
+
import * as a from "three";
|
|
258
|
+
import { Five as o, getViewportScale as s } from "@realsee/five";
|
|
259
|
+
//#region build/react/rendererPool.js
|
|
260
|
+
var c = [], l = [];
|
|
261
|
+
function u({ preserveDrawingBuffer: e = !0, webgl2: t = !1 } = {}) {
|
|
262
|
+
if (typeof window > "u") return;
|
|
263
|
+
let n = null;
|
|
264
|
+
if (n = t ? c.shift() : l.shift(), !n) {
|
|
265
|
+
if (t) {
|
|
266
|
+
let t = document.createElement("canvas"), r = t.getContext("webgl2");
|
|
267
|
+
r ? n = new a.WebGLRenderer({
|
|
268
|
+
preserveDrawingBuffer: e,
|
|
269
|
+
antialias: !0,
|
|
270
|
+
alpha: !0,
|
|
271
|
+
stencil: !0,
|
|
272
|
+
canvas: t,
|
|
273
|
+
context: r
|
|
274
|
+
}) : (console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."), n = new a.WebGLRenderer({
|
|
275
|
+
preserveDrawingBuffer: e,
|
|
276
|
+
antialias: !1,
|
|
277
|
+
alpha: !0,
|
|
278
|
+
stencil: !0
|
|
279
|
+
}));
|
|
280
|
+
} else n = new a.WebGLRenderer({
|
|
281
|
+
preserveDrawingBuffer: e,
|
|
282
|
+
antialias: !1,
|
|
283
|
+
alpha: !0,
|
|
284
|
+
stencil: !0
|
|
285
|
+
});
|
|
286
|
+
n.outputEncoding = a.sRGBEncoding;
|
|
287
|
+
}
|
|
288
|
+
return n.autoClear = !0, n;
|
|
289
|
+
}
|
|
290
|
+
function d(e) {
|
|
291
|
+
e && (e.capabilities.isWebGL2 ? l.indexOf(e) === -1 && l.push(e) : c.indexOf(e) === -1 && c.push(e));
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region build/react/context.js
|
|
295
|
+
var f = e.createContext(null);
|
|
296
|
+
function p() {
|
|
297
|
+
let t = e.useContext(f);
|
|
298
|
+
if (!t) throw Error("FiveProvider never found.");
|
|
299
|
+
return t.five;
|
|
300
|
+
}
|
|
301
|
+
function m() {
|
|
302
|
+
let t = e.useContext(f);
|
|
303
|
+
if (!t) throw Error("FiveProvider never found.");
|
|
304
|
+
return t.loadWork;
|
|
305
|
+
}
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region build/react/createProvider.js
|
|
308
|
+
function h(e, t) {
|
|
309
|
+
let n = Array.isArray(e) ? e : [e], r = Array.isArray(t) ? t : [t];
|
|
310
|
+
if (n.length !== r.length) return !1;
|
|
311
|
+
for (let e = 0; e < n.length; e++) if (n[e].workCode !== r[e].workCode) return !1;
|
|
312
|
+
return !0;
|
|
313
|
+
}
|
|
314
|
+
function g(t = {}) {
|
|
315
|
+
return class extends e.Component {
|
|
316
|
+
constructor(e) {
|
|
317
|
+
super(e), this.__fiveEventDisposers = [], this.__fiveDisposeTimer = null, this.five = new o(Object.assign(Object.assign({}, t), { renderer: void 0 })), this.loadWork = this.loadWork.bind(this), this.state = {};
|
|
318
|
+
}
|
|
319
|
+
loadWork(e, t, n, r = !0) {
|
|
320
|
+
if (this.props.work) throw Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");
|
|
321
|
+
return this.five.load(e, t, n, r);
|
|
322
|
+
}
|
|
323
|
+
shouldComponentUpdate(e) {
|
|
324
|
+
return this.five.renderer && this.five && e.work && !h(e.work, this.five.works) && this.five.load(e.work, e.initialState, e.initialOptions), !0;
|
|
325
|
+
}
|
|
326
|
+
componentDidMount() {
|
|
327
|
+
var e;
|
|
328
|
+
clearTimeout(this.__fiveDisposeTimer), this.__fiveDisposeTimer = null;
|
|
329
|
+
let n;
|
|
330
|
+
if (typeof window < "u") {
|
|
331
|
+
n = u({
|
|
332
|
+
webgl2: t == null ? void 0 : t.webgl2,
|
|
333
|
+
preserveDrawingBuffer: t == null ? void 0 : t.preserveDrawingBuffer
|
|
334
|
+
});
|
|
335
|
+
let e = s() === 1 ? window.devicePixelRatio : 1;
|
|
336
|
+
n == null || n.setPixelRatio(e);
|
|
337
|
+
}
|
|
338
|
+
this.five.renderer = n, this.setState({ renderer: n }), this.__fiveEventDisposers.push(this.five.on("load", () => {
|
|
339
|
+
this.props.onWorksChange && this.props.onWorksChange(this.five.works);
|
|
340
|
+
})), this.__fiveEventDisposers.push(this.five.on("stateChange", (e, t) => {
|
|
341
|
+
this.props.onStateChange && this.props.onStateChange(e, t);
|
|
342
|
+
})), this.__fiveEventDisposers.push(this.five.on("currentStateChange", (e, t) => {
|
|
343
|
+
this.props.onCurrentStateChange && this.props.onCurrentStateChange(e, t);
|
|
344
|
+
})), this.__fiveEventDisposers.push(this.five.on("error", (e) => {
|
|
345
|
+
this.props.onError ? this.props.onError(e) : console.warn(e.message);
|
|
346
|
+
}));
|
|
347
|
+
let r = this.props.work || this.props.initialWork;
|
|
348
|
+
r && this.five.load(r, this.props.initialState, this.props.initialOptions, (e = this.props.initialUserAction) == null ? !0 : e);
|
|
349
|
+
}
|
|
350
|
+
componentWillUnmount() {
|
|
351
|
+
var e;
|
|
352
|
+
(e = this.five.controller) == null || e.destroy();
|
|
353
|
+
let t = this.five.renderer;
|
|
354
|
+
this.five.renderer = void 0, d(t), this.setState({ renderer: void 0 }), this.__fiveDisposeTimer = setTimeout(() => {
|
|
355
|
+
this.__fiveDisposeTimer = null, this.five.dispose();
|
|
356
|
+
}, 1e3);
|
|
357
|
+
}
|
|
358
|
+
render() {
|
|
359
|
+
let t = this.five, n = this.loadWork, r = this.state.renderer;
|
|
360
|
+
return e.createElement(f.Provider, { value: {
|
|
361
|
+
renderer: r,
|
|
362
|
+
five: t,
|
|
363
|
+
loadWork: n
|
|
364
|
+
} }, this.props.children);
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region build/react/canvas.js
|
|
370
|
+
var _ = typeof window < "u" ? e.useLayoutEffect : e.useEffect, v = {
|
|
371
|
+
display: "inline-block",
|
|
372
|
+
overflow: "hidden"
|
|
373
|
+
}, y = ({ width: t, height: n }) => {
|
|
374
|
+
let r = p(), i = e.createRef(), a = Object.assign({
|
|
375
|
+
width: t,
|
|
376
|
+
height: n
|
|
377
|
+
}, v);
|
|
378
|
+
return _(() => {
|
|
379
|
+
let e = i.current;
|
|
380
|
+
if (!e || !r.renderer) return;
|
|
381
|
+
let a = r.renderer.domElement;
|
|
382
|
+
if (a.parentNode !== null && a.parentNode !== e) throw Error("There are more than 2 fiveCanvas in this context.");
|
|
383
|
+
return a.parentNode !== e && e.appendChild(a), r.camera.aspect = t / n, r.camera.updateProjectionMatrix(), r.renderer.setSize(t, n), r.refresh({
|
|
384
|
+
width: t,
|
|
385
|
+
height: n
|
|
386
|
+
}), r.needsRender = !0, () => {
|
|
387
|
+
a.parentNode === e && e.removeChild(a);
|
|
388
|
+
};
|
|
389
|
+
}, [
|
|
390
|
+
r,
|
|
391
|
+
r.renderer,
|
|
392
|
+
t,
|
|
393
|
+
n,
|
|
394
|
+
i.current
|
|
395
|
+
]), e.createElement("div", {
|
|
396
|
+
ref: i,
|
|
397
|
+
style: a
|
|
398
|
+
});
|
|
399
|
+
}, b = ({ children: t }) => {
|
|
400
|
+
let n = p(), r = e.useRef(null);
|
|
401
|
+
return e.useEffect(() => {
|
|
402
|
+
let e = r.current;
|
|
403
|
+
if (!e || !n.renderer) return;
|
|
404
|
+
let t = n.renderer.domElement;
|
|
405
|
+
e.appendChild(t);
|
|
406
|
+
let i = () => {
|
|
407
|
+
var t;
|
|
408
|
+
let { width: r, height: i } = e.getBoundingClientRect();
|
|
409
|
+
r === 0 || i === 0 || (n.camera.aspect = r / i, n.camera.updateProjectionMatrix(), (t = n.renderer) == null || t.setSize(r, i), n.refresh({
|
|
410
|
+
width: r,
|
|
411
|
+
height: i
|
|
412
|
+
}), n.needsRender = !0);
|
|
413
|
+
}, a = new ResizeObserver(i);
|
|
414
|
+
return a.observe(e), i(), () => {
|
|
415
|
+
t.parentNode === e && e.removeChild(t), a.unobserve(e), a.disconnect();
|
|
416
|
+
};
|
|
417
|
+
}, []), e.createElement("div", {
|
|
418
|
+
ref: r,
|
|
419
|
+
style: {
|
|
420
|
+
position: "absolute",
|
|
421
|
+
top: 0,
|
|
422
|
+
left: 0,
|
|
423
|
+
right: 0,
|
|
424
|
+
bottom: 0
|
|
425
|
+
}
|
|
426
|
+
}, t);
|
|
427
|
+
}, x = ({ renderChildren: t, load: n, children: r, fallback: i }) => {
|
|
428
|
+
let a = p(), [o, s] = e.useState(!!t), [c, l] = e.useState(!1);
|
|
429
|
+
return e.useEffect(() => {
|
|
430
|
+
a.getElement() && (s(!0), n && n(a).then((e) => {
|
|
431
|
+
a.load(...e);
|
|
432
|
+
}));
|
|
433
|
+
}, [a]), e.useEffect(() => {
|
|
434
|
+
let e = () => l(!0);
|
|
435
|
+
return a.on("works.load", e), a.works && a.works.length > 0 && l(!0), () => {
|
|
436
|
+
a.off("works.load", e);
|
|
437
|
+
};
|
|
438
|
+
}, [a]), !c && !t || !o ? i == null ? null : e.createElement(e.Fragment, null, i) : e.createElement(e.Fragment, null, r);
|
|
439
|
+
}, S = {
|
|
440
|
+
position: "relative",
|
|
441
|
+
width: "100vw",
|
|
442
|
+
height: "100vh",
|
|
443
|
+
overflow: "hidden"
|
|
444
|
+
}, C = {
|
|
445
|
+
backgroundAlpha: 1,
|
|
446
|
+
backgroundColor: 0,
|
|
447
|
+
imageOptions: { size: 512 },
|
|
448
|
+
textureOptions: { autoResize: !1 },
|
|
449
|
+
preserveDrawingBuffer: !0,
|
|
450
|
+
webgl2: !0
|
|
451
|
+
}, w = ({ fiveInitArgs: t = C, renderChildren: n, plugins: r, load: i, children: a, fullscreen: o, autoCanvas: s = !0, fallback: c }) => {
|
|
452
|
+
let [l] = e.useState(() => g(Object.assign(Object.assign({}, t), { plugins: r }))), u = [];
|
|
453
|
+
s && u.push(e.createElement(b, { key: "auto-canvas" })), a && u.push(a);
|
|
454
|
+
let d = e.createElement(l, null, e.createElement(x, {
|
|
455
|
+
load: i,
|
|
456
|
+
renderChildren: n,
|
|
457
|
+
fallback: c
|
|
458
|
+
}, ...u));
|
|
459
|
+
return o ? e.createElement("div", { style: S }, d) : d;
|
|
264
460
|
};
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
function t(r) {
|
|
337
|
-
var o = n.call(this, r) || this;
|
|
338
|
-
return o.__fiveEventDisposers = [], o.__fiveDisposeTimer = null, o.five = new ue(h(h({}, e), { renderer: void 0 })), o.loadWork = o.loadWork.bind(o), o.state = {}, o;
|
|
339
|
-
}
|
|
340
|
-
return t.prototype.loadWork = function(r, o, a, i) {
|
|
341
|
-
if (i === void 0 && (i = !0), this.props.work)
|
|
342
|
-
throw new Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");
|
|
343
|
-
return this.five.load(r, o, a, i);
|
|
344
|
-
}, t.prototype.shouldComponentUpdate = function(r) {
|
|
345
|
-
return this.five.renderer && this.five && r.work && !ce(r.work, this.five.works) && this.five.load(r.work, r.initialState, r.initialOptions), !0;
|
|
346
|
-
}, t.prototype.componentDidMount = function() {
|
|
347
|
-
var r = this, o;
|
|
348
|
-
clearTimeout(this.__fiveDisposeTimer), this.__fiveDisposeTimer = null;
|
|
349
|
-
var a;
|
|
350
|
-
if (typeof window != "undefined") {
|
|
351
|
-
a = ie({
|
|
352
|
-
webgl2: e == null ? void 0 : e.webgl2,
|
|
353
|
-
preserveDrawingBuffer: e == null ? void 0 : e.preserveDrawingBuffer
|
|
354
|
-
});
|
|
355
|
-
var i = ae(), s = i === 1 ? window.devicePixelRatio : 1;
|
|
356
|
-
a == null || a.setPixelRatio(s);
|
|
357
|
-
}
|
|
358
|
-
this.five.renderer = a, this.setState({ renderer: a }), this.__fiveEventDisposers.push(this.five.on("load", function() {
|
|
359
|
-
r.props.onWorksChange && r.props.onWorksChange(r.five.works);
|
|
360
|
-
})), this.__fiveEventDisposers.push(this.five.on("stateChange", function(l, d) {
|
|
361
|
-
r.props.onStateChange && r.props.onStateChange(l, d);
|
|
362
|
-
})), this.__fiveEventDisposers.push(this.five.on("currentStateChange", function(l, d) {
|
|
363
|
-
r.props.onCurrentStateChange && r.props.onCurrentStateChange(l, d);
|
|
364
|
-
})), this.__fiveEventDisposers.push(this.five.on("error", function(l) {
|
|
365
|
-
r.props.onError ? r.props.onError(l) : console.warn(l.message);
|
|
366
|
-
}));
|
|
367
|
-
var c = this.props.work || this.props.initialWork;
|
|
368
|
-
c && this.five.load(c, this.props.initialState, this.props.initialOptions, (o = this.props.initialUserAction) !== null && o !== void 0 ? o : !0);
|
|
369
|
-
}, t.prototype.componentWillUnmount = function() {
|
|
370
|
-
var r = this, o;
|
|
371
|
-
(o = this.five.controller) === null || o === void 0 || o.destroy();
|
|
372
|
-
var a = this.five.renderer;
|
|
373
|
-
this.five.renderer = void 0, se(a), this.setState({ renderer: void 0 }), this.__fiveDisposeTimer = setTimeout(function() {
|
|
374
|
-
r.__fiveDisposeTimer = null, r.five.dispose();
|
|
375
|
-
}, 1e3);
|
|
376
|
-
}, t.prototype.render = function() {
|
|
377
|
-
var r = this.five, o = this.loadWork, a = this.state.renderer;
|
|
378
|
-
return u.createElement(L.Provider, {
|
|
379
|
-
value: { renderer: a, five: r, loadWork: o }
|
|
380
|
-
}, this.props.children);
|
|
381
|
-
}, t;
|
|
382
|
-
})(u.Component);
|
|
383
|
-
}
|
|
384
|
-
var fe = typeof window != "undefined" ? u.useLayoutEffect : u.useEffect, le = {
|
|
385
|
-
display: "inline-block",
|
|
386
|
-
overflow: "hidden"
|
|
387
|
-
}, Ie = function(e) {
|
|
388
|
-
var n = e.width, t = e.height, r = v(), o = u.createRef(), a = h({ width: n, height: t }, le);
|
|
389
|
-
return fe(function() {
|
|
390
|
-
var i = o.current;
|
|
391
|
-
if (i && r.renderer) {
|
|
392
|
-
var s = r.renderer.domElement;
|
|
393
|
-
if (s.parentNode !== null && s.parentNode !== i)
|
|
394
|
-
throw new Error("There are more than 2 fiveCanvas in this context.");
|
|
395
|
-
return s.parentNode !== i && i.appendChild(s), r.camera.aspect = n / t, r.camera.updateProjectionMatrix(), r.renderer.setSize(n, t), r.refresh({ width: n, height: t }), r.needsRender = !0, function() {
|
|
396
|
-
s.parentNode === i && i.removeChild(s);
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
}, [r, r.renderer, n, t, o.current]), u.createElement("div", { ref: o, style: a });
|
|
400
|
-
};
|
|
401
|
-
function qe() {
|
|
402
|
-
return v();
|
|
403
|
-
}
|
|
404
|
-
function ve(e, n) {
|
|
405
|
-
var t = v(), r = [t];
|
|
406
|
-
n !== void 0 && (r = r.concat(n)), u.useLayoutEffect(function() {
|
|
407
|
-
return e(t.scene);
|
|
408
|
-
}, r);
|
|
409
|
-
}
|
|
410
|
-
var ze = ve;
|
|
411
|
-
function Ae() {
|
|
412
|
-
var e = v(), n = H(), t = u.useState(function() {
|
|
413
|
-
return e.works;
|
|
414
|
-
}), r = t[0], o = t[1];
|
|
415
|
-
return u.useLayoutEffect(function() {
|
|
416
|
-
return e.on("load", function() {
|
|
417
|
-
return o(e.works);
|
|
418
|
-
});
|
|
419
|
-
}, [e]), [r, n];
|
|
420
|
-
}
|
|
421
|
-
function U(e) {
|
|
422
|
-
return h({}, e.state);
|
|
423
|
-
}
|
|
424
|
-
function Je() {
|
|
425
|
-
var e = v(), n = u.useState(function() {
|
|
426
|
-
return U(e);
|
|
427
|
-
}), t = n[0], r = n[1], o = u.useCallback(function(a, i, s) {
|
|
428
|
-
i === void 0 && (i = !1), s === void 0 && (s = !0);
|
|
429
|
-
var c = typeof a == "function" ? a(e.getCurrentState()) : a;
|
|
430
|
-
e.setState(c, i, s);
|
|
431
|
-
}, [e]);
|
|
432
|
-
return u.useLayoutEffect(function() {
|
|
433
|
-
return e.on("stateChange", function() {
|
|
434
|
-
return r(U(e));
|
|
435
|
-
});
|
|
436
|
-
}, [e]), [t, o];
|
|
437
|
-
}
|
|
438
|
-
function Ke() {
|
|
439
|
-
var e = v(), n = u.useState(function() {
|
|
440
|
-
return e.getCurrentState();
|
|
441
|
-
}), t = n[0], r = n[1], o = u.useCallback(function(a, i, s) {
|
|
442
|
-
i === void 0 && (i = !1), s === void 0 && (s = !0);
|
|
443
|
-
var c = typeof a == "function" ? a(e.getCurrentState()) : a;
|
|
444
|
-
e.setState(c, i, s);
|
|
445
|
-
}, [e]);
|
|
446
|
-
return u.useLayoutEffect(function() {
|
|
447
|
-
return e.on("currentStateChange", function() {
|
|
448
|
-
return r(e.getCurrentState());
|
|
449
|
-
});
|
|
450
|
-
}, [e]), [t, o];
|
|
451
|
-
}
|
|
452
|
-
function Qe() {
|
|
453
|
-
var e = v(), n = u.useState(function() {
|
|
454
|
-
return e.getCurrentState();
|
|
455
|
-
}), t = n[0], r = n[1];
|
|
456
|
-
return u.useLayoutEffect(function() {
|
|
457
|
-
return e.on("currentStateChange", function() {
|
|
458
|
-
return r(e.getCurrentState());
|
|
459
|
-
});
|
|
460
|
-
}, [e]), e.works.getObserver(t);
|
|
461
|
-
}
|
|
462
|
-
function Xe(e, n, t) {
|
|
463
|
-
var r = v(), o = [r, e];
|
|
464
|
-
t !== void 0 && (o = o.concat(t)), u.useLayoutEffect(function() {
|
|
465
|
-
return r.on(e, n);
|
|
466
|
-
}, o);
|
|
467
|
-
}
|
|
468
|
-
function Ye() {
|
|
469
|
-
var e = v(), n = u.useCallback(function(i, s) {
|
|
470
|
-
return e.updateCamera(i, s);
|
|
471
|
-
}, [e]), t = u.useCallback(e.getPixels.bind(e), [e]), r = u.useCallback(function(i) {
|
|
472
|
-
return e.render(i);
|
|
473
|
-
}, [e]), o = u.useCallback(function() {
|
|
474
|
-
return e.needsRender = !0;
|
|
475
|
-
}, [e]), a = u.useCallback(function(i, s) {
|
|
476
|
-
return e.preloadPano(i, s);
|
|
477
|
-
}, [e]);
|
|
478
|
-
return { updateCamera: n, getPixels: t, render: r, needsRender: o, preloadPano: a };
|
|
479
|
-
}
|
|
480
|
-
function Ze() {
|
|
481
|
-
var e = v(), n = u.useState(function() {
|
|
482
|
-
return Symbol();
|
|
483
|
-
});
|
|
484
|
-
n[0];
|
|
485
|
-
var t = n[1];
|
|
486
|
-
u.useLayoutEffect(function() {
|
|
487
|
-
return e.on("cameraUpdate", function() {
|
|
488
|
-
return t(Symbol());
|
|
489
|
-
});
|
|
490
|
-
}, [e]);
|
|
491
|
-
var r = u.useCallback(function(o, a) {
|
|
492
|
-
return e.project2d(o, a);
|
|
493
|
-
}, [e]);
|
|
494
|
-
return r;
|
|
495
|
-
}
|
|
496
|
-
function j(e) {
|
|
497
|
-
var n = e.camera.getWorldDirection(new p.Vector3()), t = new p.Raycaster(e.camera.position, n);
|
|
498
|
-
return t;
|
|
499
|
-
}
|
|
500
|
-
function er() {
|
|
501
|
-
var e = v(), n = u.useState(function() {
|
|
502
|
-
return j(e);
|
|
503
|
-
}), t = n[0], r = n[1];
|
|
504
|
-
return u.useLayoutEffect(function() {
|
|
505
|
-
return e.on("cameraUpdate", function() {
|
|
506
|
-
return r(j(e));
|
|
507
|
-
});
|
|
508
|
-
}, [e]), t;
|
|
509
|
-
}
|
|
510
|
-
function T(e) {
|
|
511
|
-
return e.camera.getWorldDirection(new p.Vector3());
|
|
512
|
-
}
|
|
513
|
-
function rr() {
|
|
514
|
-
var e = v(), n = u.useState(function() {
|
|
515
|
-
return T(e);
|
|
516
|
-
}), t = n[0], r = n[1];
|
|
517
|
-
return u.useLayoutEffect(function() {
|
|
518
|
-
return e.on("cameraUpdate", function() {
|
|
519
|
-
return r(T(e));
|
|
520
|
-
});
|
|
521
|
-
}, [e]), t;
|
|
522
|
-
}
|
|
523
|
-
function tr() {
|
|
524
|
-
var e = v(), n = u.useCallback(function(t) {
|
|
525
|
-
return e.model.intersectRaycaster(t);
|
|
526
|
-
}, [e]);
|
|
527
|
-
return n;
|
|
528
|
-
}
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region build/react/hooks/unsafe__useFiveInstance.js
|
|
463
|
+
function T() {
|
|
464
|
+
return p();
|
|
465
|
+
}
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region build/react/hooks/useFiveSceneEffect.js
|
|
468
|
+
function E(t, n) {
|
|
469
|
+
let r = p(), i = [r];
|
|
470
|
+
n !== void 0 && (i = i.concat(n)), e.useLayoutEffect(() => t(r.scene), i);
|
|
471
|
+
}
|
|
472
|
+
var D = E;
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region build/react/hooks/useFiveWork.js
|
|
475
|
+
function O() {
|
|
476
|
+
let t = p(), n = m(), [r, i] = e.useState(() => t.works);
|
|
477
|
+
return e.useLayoutEffect(() => t.on("load", () => i(t.works)), [t]), [r, n];
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region build/react/hooks/useFiveState.js
|
|
481
|
+
function k(e) {
|
|
482
|
+
return Object.assign({}, e.state);
|
|
483
|
+
}
|
|
484
|
+
function A() {
|
|
485
|
+
let t = p(), [n, r] = e.useState(() => k(t)), i = e.useCallback((e, n = !1, r = !0) => {
|
|
486
|
+
let i = typeof e == "function" ? e(t.getCurrentState()) : e;
|
|
487
|
+
t.setState(i, n, r);
|
|
488
|
+
}, [t]);
|
|
489
|
+
return e.useLayoutEffect(() => t.on("stateChange", () => r(k(t))), [t]), [n, i];
|
|
490
|
+
}
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region build/react/hooks/useFiveCurrentState.js
|
|
493
|
+
function j() {
|
|
494
|
+
let t = p(), [n, r] = e.useState(() => t.getCurrentState()), i = e.useCallback((e, n = !1, r = !0) => {
|
|
495
|
+
let i = typeof e == "function" ? e(t.getCurrentState()) : e;
|
|
496
|
+
t.setState(i, n, r);
|
|
497
|
+
}, [t]);
|
|
498
|
+
return e.useLayoutEffect(() => t.on("currentStateChange", () => r(t.getCurrentState())), [t]), [n, i];
|
|
499
|
+
}
|
|
500
|
+
//#endregion
|
|
501
|
+
//#region build/react/hooks/useFiveCurrentObserver.js
|
|
502
|
+
function M() {
|
|
503
|
+
let t = p(), [n, r] = e.useState(() => t.getCurrentState());
|
|
504
|
+
return e.useLayoutEffect(() => t.on("currentStateChange", () => r(t.getCurrentState())), [t]), t.works.getObserver(n);
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region build/react/hooks/useFiveEventCallback.js
|
|
508
|
+
function ee(t, n, r) {
|
|
509
|
+
let i = p(), a = [i, t];
|
|
510
|
+
r !== void 0 && (a = a.concat(r)), e.useLayoutEffect(() => i.on(t, n), a);
|
|
511
|
+
}
|
|
512
|
+
//#endregion
|
|
513
|
+
//#region build/react/hooks/useFiveAction.js
|
|
514
|
+
function te() {
|
|
515
|
+
let t = p();
|
|
516
|
+
return {
|
|
517
|
+
updateCamera: e.useCallback((e, n) => t.updateCamera(e, n), [t]),
|
|
518
|
+
getPixels: e.useCallback(t.getPixels.bind(t), [t]),
|
|
519
|
+
render: e.useCallback((e) => t.render(e), [t]),
|
|
520
|
+
needsRender: e.useCallback(() => t.needsRender = !0, [t]),
|
|
521
|
+
preloadPano: e.useCallback((e, n) => t.preloadPano(e, n), [t])
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
//#endregion
|
|
525
|
+
//#region build/react/hooks/useFiveProject2d.js
|
|
526
|
+
function ne() {
|
|
527
|
+
let t = p(), [n, r] = e.useState(() => Symbol());
|
|
528
|
+
return e.useLayoutEffect(() => t.on("cameraUpdate", () => r(Symbol())), [t]), e.useCallback((e, n) => t.project2d(e, n), [t]);
|
|
529
|
+
}
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region build/react/hooks/useFiveCameraRaycaster.js
|
|
529
532
|
function N(e) {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
function
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
function
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
}
|
|
698
|
-
function
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
function
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
}
|
|
863
|
-
function
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
var a = r.listeners.indexOf(o);
|
|
895
|
-
a >= 0 && r.listeners.splice(a, 1);
|
|
896
|
-
};
|
|
897
|
-
}, e.prototype.getValues = function(n) {
|
|
898
|
-
return F(this.values, n);
|
|
899
|
-
}, e.prototype.setValues = function(n, t) {
|
|
900
|
-
var r = [];
|
|
901
|
-
for (var o in t)
|
|
902
|
-
n.indexOf(o) >= 0 && !Ne(t[o], this.values[o]) && r.push(o);
|
|
903
|
-
if (r.length !== 0) {
|
|
904
|
-
for (var a = h({}, this.values), i = 0, s = r; i < s.length; i++) {
|
|
905
|
-
var c = s[i];
|
|
906
|
-
this.values[c] = t[c];
|
|
907
|
-
}
|
|
908
|
-
this.onValuesChange && this.onValuesChange(this.values, a);
|
|
909
|
-
for (var l = 0, d = this.listeners; l < d.length; l++) {
|
|
910
|
-
var m = d[l], g = m[0], S = m[1];
|
|
911
|
-
if ($e(g, r)) {
|
|
912
|
-
var b = F(a, g), C = F(this.values, g);
|
|
913
|
-
S(C, b);
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}, e;
|
|
918
|
-
})()
|
|
919
|
-
);
|
|
920
|
-
function cr(e) {
|
|
921
|
-
var n = u.createContext(null);
|
|
922
|
-
return {
|
|
923
|
-
/**
|
|
924
|
-
* 使用 Store
|
|
925
|
-
* @param names - 获取的 Store 字段
|
|
926
|
-
* @returns [值, 修改值方法]
|
|
927
|
-
*/
|
|
928
|
-
useStore: function(t) {
|
|
929
|
-
var r = u.useContext(n);
|
|
930
|
-
if (r === null)
|
|
931
|
-
throw new Error("StoreProvider never found.");
|
|
932
|
-
var o = u.useRef(!0), a = u.useState(r.getValues(t)), i = a[0], s = a[1], c = w([r], t, !0);
|
|
933
|
-
u.useLayoutEffect(function() {
|
|
934
|
-
return o.current ? o.current = !1 : s(r.getValues(t)), r.on(t, function(d) {
|
|
935
|
-
return s(d);
|
|
936
|
-
});
|
|
937
|
-
}, c);
|
|
938
|
-
var l = u.useCallback(function(d) {
|
|
939
|
-
return r.setValues(t, d);
|
|
940
|
-
}, c);
|
|
941
|
-
return [i, l];
|
|
942
|
-
},
|
|
943
|
-
/**
|
|
944
|
-
* 使用 Store (仅设置值)
|
|
945
|
-
* @param names - 获取的 Store 字段
|
|
946
|
-
* @returns 修改值方法
|
|
947
|
-
*/
|
|
948
|
-
useStoreSetter: function(t) {
|
|
949
|
-
var r = u.useContext(n);
|
|
950
|
-
if (r === null)
|
|
951
|
-
throw new Error("StoreProvider never found.");
|
|
952
|
-
var o = u.useCallback(function(a) {
|
|
953
|
-
return r.setValues(t, a);
|
|
954
|
-
}, w([r], t, !0));
|
|
955
|
-
return o;
|
|
956
|
-
},
|
|
957
|
-
/**
|
|
958
|
-
* 监听 Store 变化
|
|
959
|
-
* @param names - Store 字段
|
|
960
|
-
* @param callback - 监听变化的回调函数
|
|
961
|
-
* @param deps - 依赖对象
|
|
962
|
-
*/
|
|
963
|
-
watchStore: function(t, r, o) {
|
|
964
|
-
var a = u.useContext(n);
|
|
965
|
-
if (a === null)
|
|
966
|
-
throw new Error("StoreProvider never found.");
|
|
967
|
-
var i = w([a], t, !0);
|
|
968
|
-
o !== void 0 && (i = i.concat(o)), u.useLayoutEffect(function() {
|
|
969
|
-
return a.on(t, r);
|
|
970
|
-
}, i);
|
|
971
|
-
},
|
|
972
|
-
useStoreAction: function(t) {
|
|
973
|
-
var r = u.useContext(n);
|
|
974
|
-
if (r === null)
|
|
975
|
-
throw new Error("StoreProvider never found.");
|
|
976
|
-
var o = u.useCallback(function() {
|
|
977
|
-
for (var a = [], i = 0; i < arguments.length; i++)
|
|
978
|
-
a[i] = arguments[i];
|
|
979
|
-
var s = e[t], c = s[0], l = s.slice(1), d = function() {
|
|
980
|
-
return r.getValues(l);
|
|
981
|
-
}, m = function(g) {
|
|
982
|
-
return r.setValues(l, g);
|
|
983
|
-
};
|
|
984
|
-
return c.apply(void 0, w([d, m], a, !1));
|
|
985
|
-
}, []);
|
|
986
|
-
return o;
|
|
987
|
-
},
|
|
988
|
-
/**
|
|
989
|
-
* Store Provider.
|
|
990
|
-
* 内部组件均可和 store 交互
|
|
991
|
-
*/
|
|
992
|
-
StoreProvider: (
|
|
993
|
-
/** @class */
|
|
994
|
-
(function(t) {
|
|
995
|
-
B(r, t);
|
|
996
|
-
function r(o) {
|
|
997
|
-
var a = t.call(this, o) || this;
|
|
998
|
-
return a.store = new Be(o.initialValue, function() {
|
|
999
|
-
for (var i, s = [], c = 0; c < arguments.length; c++)
|
|
1000
|
-
s[c] = arguments[c];
|
|
1001
|
-
a.props.onValuesChange && (i = a.props).onValuesChange.apply(i, s);
|
|
1002
|
-
}), a;
|
|
1003
|
-
}
|
|
1004
|
-
return r.prototype.shouldComponentUpdate = function(o) {
|
|
1005
|
-
return o.children !== this.props.children;
|
|
1006
|
-
}, r.prototype.render = function() {
|
|
1007
|
-
return u.createElement(n.Provider, { value: this.store }, this.props.children);
|
|
1008
|
-
}, r;
|
|
1009
|
-
})(u.Component)
|
|
1010
|
-
)
|
|
1011
|
-
};
|
|
1012
|
-
}
|
|
1013
|
-
export {
|
|
1014
|
-
Ie as FiveCanvas,
|
|
1015
|
-
ur as INJECTION_PROPNAME,
|
|
1016
|
-
Be as Store,
|
|
1017
|
-
sr as createFiveFeature,
|
|
1018
|
-
Ge as createFiveProvider,
|
|
1019
|
-
cr as createStore,
|
|
1020
|
-
qe as unsafe__useFiveInstance,
|
|
1021
|
-
Ye as useFiveAction,
|
|
1022
|
-
rr as useFiveCameraDirection,
|
|
1023
|
-
er as useFiveCameraRaycaster,
|
|
1024
|
-
Qe as useFiveCurrentObserver,
|
|
1025
|
-
Ke as useFiveCurrentState,
|
|
1026
|
-
Xe as useFiveEventCallback,
|
|
1027
|
-
or as useFiveFloor,
|
|
1028
|
-
ar as useFiveHelper,
|
|
1029
|
-
tr as useFiveModelIntersectRaycaster,
|
|
1030
|
-
nr as useFiveModelReadyState,
|
|
1031
|
-
Ze as useFiveProject2d,
|
|
1032
|
-
ze as useFiveScene,
|
|
1033
|
-
ve as useFiveSceneEffect,
|
|
1034
|
-
Je as useFiveState,
|
|
1035
|
-
Ae as useFiveWork,
|
|
1036
|
-
ir as withFive
|
|
533
|
+
let t = e.camera.getWorldDirection(new a.Vector3());
|
|
534
|
+
return new a.Raycaster(e.camera.position, t);
|
|
535
|
+
}
|
|
536
|
+
function re() {
|
|
537
|
+
let t = p(), [n, r] = e.useState(() => N(t));
|
|
538
|
+
return e.useLayoutEffect(() => t.on("cameraUpdate", () => r(N(t))), [t]), n;
|
|
539
|
+
}
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region build/react/hooks/useFiveCameraDirection.js
|
|
542
|
+
function P(e) {
|
|
543
|
+
return e.camera.getWorldDirection(new a.Vector3());
|
|
544
|
+
}
|
|
545
|
+
function F() {
|
|
546
|
+
let t = p(), [n, r] = e.useState(() => P(t));
|
|
547
|
+
return e.useLayoutEffect(() => t.on("cameraUpdate", () => r(P(t))), [t]), n;
|
|
548
|
+
}
|
|
549
|
+
//#endregion
|
|
550
|
+
//#region build/react/hooks/useFiveModelIntersectRaycaster.js
|
|
551
|
+
function I() {
|
|
552
|
+
let t = p();
|
|
553
|
+
return e.useCallback((e) => t.model.intersectRaycaster(e), [t]);
|
|
554
|
+
}
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region build/react/hooks/useFiveModelReadyState.js
|
|
557
|
+
function L(e) {
|
|
558
|
+
return e.model.empty ? "Empty" : "Loaded";
|
|
559
|
+
}
|
|
560
|
+
function ie() {
|
|
561
|
+
let t = p(), [n, r] = e.useState(() => L(t));
|
|
562
|
+
return e.useLayoutEffect(() => t.on("modelLoaded", () => r(L(t))), [t]), n;
|
|
563
|
+
}
|
|
564
|
+
//#endregion
|
|
565
|
+
//#region build/react/hooks/useFivePlugin.js
|
|
566
|
+
var R = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
|
|
567
|
+
function B(e) {
|
|
568
|
+
let t = z.get(e);
|
|
569
|
+
t && t.forEach((e) => e());
|
|
570
|
+
}
|
|
571
|
+
function V(e, t) {
|
|
572
|
+
return z.has(e) || z.set(e, /* @__PURE__ */ new Set()), z.get(e).add(t), () => {
|
|
573
|
+
let n = z.get(e);
|
|
574
|
+
n && (n.delete(t), n.size === 0 && z.delete(e));
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
function H(e, t) {
|
|
578
|
+
return `${e}:${t}`;
|
|
579
|
+
}
|
|
580
|
+
function U(e, t) {
|
|
581
|
+
var n;
|
|
582
|
+
return (n = R.get(H(e, t))) == null ? void 0 : n.plugin;
|
|
583
|
+
}
|
|
584
|
+
function W(e, t, n) {
|
|
585
|
+
R.set(H(e, t), { plugin: n }), B(e);
|
|
586
|
+
}
|
|
587
|
+
function G(e, a) {
|
|
588
|
+
var o, s;
|
|
589
|
+
let c = p(), l = (s = (o = c.work) == null ? void 0 : o.workCode) == null ? "" : s, u = H(l, e), d = r(c), [, f] = i(0);
|
|
590
|
+
return n(() => {
|
|
591
|
+
if (l) return V(l, () => f((e) => e + 1));
|
|
592
|
+
}, [l]), n(() => {
|
|
593
|
+
if (d.current === c) return;
|
|
594
|
+
d.current = c;
|
|
595
|
+
let t = R.get(u);
|
|
596
|
+
if (!t) return;
|
|
597
|
+
let n = t.plugin;
|
|
598
|
+
if (a != null && a.reCreateOnFiveChange && a.createPlugin) {
|
|
599
|
+
typeof n.dispose == "function" && n.dispose();
|
|
600
|
+
let t = a.createPlugin(c);
|
|
601
|
+
R.set(u, { plugin: t }), c.plugins[e] = t, B(l);
|
|
602
|
+
} else n && (typeof n.updateFive == "function" ? n.updateFive(c) : "five" in n && (n.five = c));
|
|
603
|
+
}, [c]), t(() => {
|
|
604
|
+
let t = R.get(u);
|
|
605
|
+
if (t) return c.plugins[e] = t.plugin, t.plugin;
|
|
606
|
+
let n = c.plugins[e];
|
|
607
|
+
if (n) return R.set(u, { plugin: n }), n;
|
|
608
|
+
if (a != null && a.createPlugin) {
|
|
609
|
+
let t = a.createPlugin(c);
|
|
610
|
+
return R.set(u, { plugin: t }), c.plugins[e] = t, B(l), t;
|
|
611
|
+
}
|
|
612
|
+
}, [
|
|
613
|
+
u,
|
|
614
|
+
c,
|
|
615
|
+
a == null ? void 0 : a.createPlugin
|
|
616
|
+
])();
|
|
617
|
+
}
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region build/react/hooks/useFiveFloor.js
|
|
620
|
+
function K() {
|
|
621
|
+
let t = p(), [n, r] = e.useState(t.model.shownFloor), [i, a] = e.useState(t.model.floorLength), o = e.useCallback((e) => {
|
|
622
|
+
typeof e == "number" ? t.model.show(e) : t.model.show();
|
|
623
|
+
}, [t]);
|
|
624
|
+
return e.useLayoutEffect(() => {
|
|
625
|
+
let e = [];
|
|
626
|
+
return e.push(t.on("modelShownFloorChange", () => r(t.model.shownFloor))), e.push(t.on("modelLoaded", () => a(t.model.floorLength))), () => {
|
|
627
|
+
let t;
|
|
628
|
+
for (; t = e.shift();) t();
|
|
629
|
+
};
|
|
630
|
+
}, [t]), [
|
|
631
|
+
n,
|
|
632
|
+
i,
|
|
633
|
+
o
|
|
634
|
+
];
|
|
635
|
+
}
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region build/react/hooks/useFiveHelper.js
|
|
638
|
+
function q() {
|
|
639
|
+
let t = p(), [n, r] = e.useState(t.helperVisible), i = e.useCallback((e) => {
|
|
640
|
+
t.helperVisible = e;
|
|
641
|
+
}, [t]);
|
|
642
|
+
return e.useLayoutEffect(() => t.on("helpersVisibleChange", (e) => r(e)), [t]), [n, i];
|
|
643
|
+
}
|
|
644
|
+
//#endregion
|
|
645
|
+
//#region build/react/withFive.js
|
|
646
|
+
var J = "$five";
|
|
647
|
+
function Y(e, t) {
|
|
648
|
+
return t.indexOf(e) >= 0;
|
|
649
|
+
}
|
|
650
|
+
function X(e, t) {
|
|
651
|
+
for (let n of Object.keys(t)) t[n] !== void 0 && (e[n] = t[n]);
|
|
652
|
+
}
|
|
653
|
+
function ae(t, n) {
|
|
654
|
+
let r = Y("state", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
655
|
+
if (r) return Object.assign({}, t.state);
|
|
656
|
+
}, [t, i]);
|
|
657
|
+
return e.useLayoutEffect(() => {
|
|
658
|
+
if (r) return t.on("stateChange", () => a(Symbol()));
|
|
659
|
+
}, [t]), [o, i];
|
|
660
|
+
}
|
|
661
|
+
function oe(t, n) {
|
|
662
|
+
let r = Y("currentState", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
663
|
+
if (r) return t.getCurrentState();
|
|
664
|
+
}, [t, i]);
|
|
665
|
+
return e.useLayoutEffect(() => {
|
|
666
|
+
if (r) return t.on("currentStateChange", () => a(Symbol()));
|
|
667
|
+
}, [t]), [o, i];
|
|
668
|
+
}
|
|
669
|
+
function se(t, n) {
|
|
670
|
+
let r = Y("currentObserver", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
671
|
+
if (r) return t.getCurrentState();
|
|
672
|
+
}, [t, i]);
|
|
673
|
+
e.useLayoutEffect(() => {
|
|
674
|
+
if (r) return t.on("currentStateChange", () => a(Symbol()));
|
|
675
|
+
}, [t]);
|
|
676
|
+
let s;
|
|
677
|
+
return o && (s = t.works.getObserver(o)), [s, i];
|
|
678
|
+
}
|
|
679
|
+
function ce(e, t) {
|
|
680
|
+
return [Y("unsafe__fiveInstance", t) ? e : void 0];
|
|
681
|
+
}
|
|
682
|
+
function le(t, n) {
|
|
683
|
+
let r = Y("works", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
684
|
+
if (r) return t.works;
|
|
685
|
+
}, [t, i]);
|
|
686
|
+
return e.useLayoutEffect(() => {
|
|
687
|
+
if (r) return t.on("load", () => a(Symbol()));
|
|
688
|
+
}, [t]), [o, i];
|
|
689
|
+
}
|
|
690
|
+
function ue(t, n) {
|
|
691
|
+
let r = Y("model", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
692
|
+
if (r) return t.model;
|
|
693
|
+
}, [t, i]);
|
|
694
|
+
return e.useLayoutEffect(() => {
|
|
695
|
+
if (r) return t.on("modelLoaded", () => a(Symbol()));
|
|
696
|
+
}, [t]), [o, i];
|
|
697
|
+
}
|
|
698
|
+
function de(e, t) {
|
|
699
|
+
return [Y("scene", t) ? e.scene : void 0];
|
|
700
|
+
}
|
|
701
|
+
function fe(t, n) {
|
|
702
|
+
let r = Y("cameraDirection", n), [i, o] = e.useState(Symbol()), s = e.useMemo(() => {
|
|
703
|
+
if (r) return t.camera.getWorldDirection(new a.Vector3());
|
|
704
|
+
}, [t, i]);
|
|
705
|
+
return e.useLayoutEffect(() => {
|
|
706
|
+
if (r) return t.on("cameraUpdate", () => o(Symbol()));
|
|
707
|
+
}, [t]), [s, i];
|
|
708
|
+
}
|
|
709
|
+
function pe(t, n) {
|
|
710
|
+
let r = Y("cameraRaycaster", n), [i, o] = e.useState(Symbol()), s = e.useMemo(() => {
|
|
711
|
+
if (r) {
|
|
712
|
+
let e = t.camera.getWorldDirection(new a.Vector3());
|
|
713
|
+
return new a.Raycaster(t.camera.position, e);
|
|
714
|
+
}
|
|
715
|
+
}, [t, i]);
|
|
716
|
+
return e.useLayoutEffect(() => {
|
|
717
|
+
if (r) return t.on("cameraUpdate", () => o(Symbol()));
|
|
718
|
+
}, [t]), [s, i];
|
|
719
|
+
}
|
|
720
|
+
function me(t, n) {
|
|
721
|
+
let r = Y("modelReadyState", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
722
|
+
if (r) return t.model.empty ? "Empty" : "Loaded";
|
|
723
|
+
}, [t, i]);
|
|
724
|
+
return e.useLayoutEffect(() => {
|
|
725
|
+
if (r) return t.on("modelLoaded", () => a(Symbol()));
|
|
726
|
+
}, [t]), [o, i];
|
|
727
|
+
}
|
|
728
|
+
function he(t, n) {
|
|
729
|
+
let r = Y("shownFloor", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
730
|
+
if (r) return t.model.shownFloor;
|
|
731
|
+
}, [t, i]);
|
|
732
|
+
return e.useLayoutEffect(() => {
|
|
733
|
+
if (r) return t.on("modelShownFloorChange", () => a(Symbol()));
|
|
734
|
+
}, [t]), [o, i];
|
|
735
|
+
}
|
|
736
|
+
function ge(t, n) {
|
|
737
|
+
let r = Y("helperVisible", n), [i, a] = e.useState(Symbol()), o = e.useMemo(() => {
|
|
738
|
+
if (r) return t.helperVisible;
|
|
739
|
+
}, [t, i]);
|
|
740
|
+
return e.useLayoutEffect(() => {
|
|
741
|
+
if (r) return t.on("helpersVisibleChange", () => a(Symbol()));
|
|
742
|
+
}, [t]), [o, i];
|
|
743
|
+
}
|
|
744
|
+
function _e(e, t) {
|
|
745
|
+
if (Y("loadWork", t)) return e;
|
|
746
|
+
}
|
|
747
|
+
function ve(e, t) {
|
|
748
|
+
if (Y("setState", t)) return (...t) => e.setState(...t);
|
|
749
|
+
}
|
|
750
|
+
function ye(e, t) {
|
|
751
|
+
if (Y("on", t)) return (...t) => e.on(...t);
|
|
752
|
+
}
|
|
753
|
+
function be(e, t) {
|
|
754
|
+
if (Y("on", t)) return (...t) => e.once(...t);
|
|
755
|
+
}
|
|
756
|
+
function xe(e, t) {
|
|
757
|
+
if (Y("off", t)) return (...t) => e.off(...t);
|
|
758
|
+
}
|
|
759
|
+
function Se(e, t) {
|
|
760
|
+
if (Y("intersectRaycaster", t)) return (...t) => e.model.intersectRaycaster(...t);
|
|
761
|
+
}
|
|
762
|
+
function Ce(e, t) {
|
|
763
|
+
if (Y("project2d", t)) return (...t) => e.project2d(...t);
|
|
764
|
+
}
|
|
765
|
+
function we(e, t) {
|
|
766
|
+
if (Y("updateCamera", t)) return (...t) => e.updateCamera(...t);
|
|
767
|
+
}
|
|
768
|
+
function Te(e, t) {
|
|
769
|
+
if (Y("getPixels", t)) return e.getPixels.bind(e);
|
|
770
|
+
}
|
|
771
|
+
function Ee(e, t) {
|
|
772
|
+
if (Y("render", t)) return (...t) => e.render(...t);
|
|
773
|
+
}
|
|
774
|
+
function De(e, t) {
|
|
775
|
+
if (Y("needsRender", t)) return () => {
|
|
776
|
+
e.needsRender = !0;
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
function Oe(e, t) {
|
|
780
|
+
if (Y("preloadPano", t)) return (...t) => e.preloadPano(...t);
|
|
781
|
+
}
|
|
782
|
+
function ke(e, t) {
|
|
783
|
+
if (Y("showFloor", t)) return (t) => {
|
|
784
|
+
typeof t == "number" ? e.model.show(t) : e.model.show();
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
function Z(e, t) {
|
|
788
|
+
if (Y("toggleHelperVisible", t)) return (t) => {
|
|
789
|
+
e.helperVisible = t;
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
function Ae(t) {
|
|
793
|
+
return function(n) {
|
|
794
|
+
return e.forwardRef((r, i) => {
|
|
795
|
+
let a = p(), o = m(), [s] = ce(a, t), [c, l] = ae(a, t), [u, d] = oe(a, t), [f, h] = se(a, t), [g, _] = le(a, t), [v, y] = ue(a, t), [b] = de(a, t), [x, S] = fe(a, t), [C, w] = pe(a, t), [T, E] = me(a, t), [D, O] = he(a, t), [k, A] = ge(a, t), j = e.useMemo(() => {
|
|
796
|
+
let e = {};
|
|
797
|
+
return X(e, {
|
|
798
|
+
setState: ve(a, t),
|
|
799
|
+
loadWork: _e(o, t),
|
|
800
|
+
on: ye(a, t),
|
|
801
|
+
once: be(a, t),
|
|
802
|
+
off: xe(a, t),
|
|
803
|
+
intersectRaycaster: Se(a, t),
|
|
804
|
+
project2d: Ce(a, t),
|
|
805
|
+
updateCamera: we(a, t),
|
|
806
|
+
getPixels: Te(a, t),
|
|
807
|
+
render: Ee(a, t),
|
|
808
|
+
needsRender: De(a, t),
|
|
809
|
+
preloadPano: Oe(a, t),
|
|
810
|
+
showFloor: ke(a, t),
|
|
811
|
+
toggleHelperVisible: Z(a, t)
|
|
812
|
+
}), e;
|
|
813
|
+
}, [a, o]), M = e.useMemo(() => {
|
|
814
|
+
let e = Object.assign({}, j);
|
|
815
|
+
return X(e, {
|
|
816
|
+
unsafe__fiveInstance: s,
|
|
817
|
+
state: c,
|
|
818
|
+
currentState: u,
|
|
819
|
+
currentObserver: f,
|
|
820
|
+
work: g,
|
|
821
|
+
model: v,
|
|
822
|
+
scene: b,
|
|
823
|
+
cameraDirection: x,
|
|
824
|
+
cameraRaycaster: C,
|
|
825
|
+
modelReadyState: T,
|
|
826
|
+
shownFloor: D,
|
|
827
|
+
helperVisible: k
|
|
828
|
+
}), e;
|
|
829
|
+
}, [
|
|
830
|
+
a,
|
|
831
|
+
j,
|
|
832
|
+
l,
|
|
833
|
+
d,
|
|
834
|
+
h,
|
|
835
|
+
_,
|
|
836
|
+
y,
|
|
837
|
+
S,
|
|
838
|
+
w,
|
|
839
|
+
E,
|
|
840
|
+
O,
|
|
841
|
+
A
|
|
842
|
+
]);
|
|
843
|
+
return e.createElement(n, Object.assign({
|
|
844
|
+
ref: i,
|
|
845
|
+
$five: M
|
|
846
|
+
}, r));
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
function je(...e) {
|
|
851
|
+
return e;
|
|
852
|
+
}
|
|
853
|
+
//#endregion
|
|
854
|
+
//#region build/react/createStore.js
|
|
855
|
+
function Q(e, t) {
|
|
856
|
+
let n = {}, r = t.length, i = -1;
|
|
857
|
+
for (; ++i < r;) {
|
|
858
|
+
let r = t[i];
|
|
859
|
+
r in e && (n[r] = e[r]);
|
|
860
|
+
}
|
|
861
|
+
return n;
|
|
862
|
+
}
|
|
863
|
+
function Me(e, t) {
|
|
864
|
+
return typeof e == "number" && typeof t == "number" && isNaN(e) && isNaN(t) ? !0 : e === t;
|
|
865
|
+
}
|
|
866
|
+
function Ne(e, t) {
|
|
867
|
+
for (let n = 0; n < e.length; n++) for (let r = 0; r < t.length; r++) if (e[n] === t[r]) return !0;
|
|
868
|
+
return !1;
|
|
869
|
+
}
|
|
870
|
+
var $ = class {
|
|
871
|
+
constructor(e, t) {
|
|
872
|
+
this.values = e, this.listeners = [], this.onValuesChange = t;
|
|
873
|
+
}
|
|
874
|
+
on(e, t) {
|
|
875
|
+
let n = [e, t];
|
|
876
|
+
return this.listeners.push(n), () => {
|
|
877
|
+
let e = this.listeners.indexOf(n);
|
|
878
|
+
e >= 0 && this.listeners.splice(e, 1);
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
getValues(e) {
|
|
882
|
+
return Q(this.values, e);
|
|
883
|
+
}
|
|
884
|
+
setValues(e, t) {
|
|
885
|
+
let n = [];
|
|
886
|
+
for (let r in t) e.indexOf(r) >= 0 && !Me(t[r], this.values[r]) && n.push(r);
|
|
887
|
+
if (n.length === 0) return;
|
|
888
|
+
let r = Object.assign({}, this.values);
|
|
889
|
+
for (let e of n) this.values[e] = t[e];
|
|
890
|
+
this.onValuesChange && this.onValuesChange(this.values, r);
|
|
891
|
+
for (let [e, t] of this.listeners) {
|
|
892
|
+
if (!Ne(e, n)) continue;
|
|
893
|
+
let i = Q(r, e);
|
|
894
|
+
t(Q(this.values, e), i);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
1037
897
|
};
|
|
898
|
+
function Pe(t) {
|
|
899
|
+
let n = e.createContext(null);
|
|
900
|
+
return {
|
|
901
|
+
useStore(t) {
|
|
902
|
+
let r = e.useContext(n);
|
|
903
|
+
if (r === null) throw Error("StoreProvider never found.");
|
|
904
|
+
let i = e.useRef(!0), [a, o] = e.useState(r.getValues(t)), s = [r, ...t];
|
|
905
|
+
return e.useLayoutEffect(() => (i.current ? i.current = !1 : o(r.getValues(t)), r.on(t, (e) => o(e))), s), [a, e.useCallback((e) => r.setValues(t, e), s)];
|
|
906
|
+
},
|
|
907
|
+
useStoreSetter(t) {
|
|
908
|
+
let r = e.useContext(n);
|
|
909
|
+
if (r === null) throw Error("StoreProvider never found.");
|
|
910
|
+
return e.useCallback((e) => r.setValues(t, e), [r, ...t]);
|
|
911
|
+
},
|
|
912
|
+
watchStore(t, r, i) {
|
|
913
|
+
let a = e.useContext(n);
|
|
914
|
+
if (a === null) throw Error("StoreProvider never found.");
|
|
915
|
+
let o = [a, ...t];
|
|
916
|
+
i !== void 0 && (o = o.concat(i)), e.useLayoutEffect(() => a.on(t, r), o);
|
|
917
|
+
},
|
|
918
|
+
useStoreAction(r) {
|
|
919
|
+
let i = e.useContext(n);
|
|
920
|
+
if (i === null) throw Error("StoreProvider never found.");
|
|
921
|
+
return e.useCallback((...e) => {
|
|
922
|
+
let [n, ...a] = t[r];
|
|
923
|
+
return n(() => i.getValues(a), (e) => i.setValues(a, e), ...e);
|
|
924
|
+
}, []);
|
|
925
|
+
},
|
|
926
|
+
StoreProvider: class extends e.Component {
|
|
927
|
+
constructor(e) {
|
|
928
|
+
super(e), this.store = new $(e.initialValue, (...e) => {
|
|
929
|
+
this.props.onValuesChange && this.props.onValuesChange(...e);
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
shouldComponentUpdate(e) {
|
|
933
|
+
return e.children !== this.props.children;
|
|
934
|
+
}
|
|
935
|
+
render() {
|
|
936
|
+
return e.createElement(n.Provider, { value: this.store }, this.props.children);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
//#endregion
|
|
942
|
+
export { w as FiveApp, b as FiveAutoCanvas, y as FiveCanvas, J as INJECTION_PROPNAME, $ as Store, je as createFiveFeature, g as createFiveProvider, Pe as createStore, U as getPlugin, W as setPlugin, T as unsafe__useFiveInstance, te as useFiveAction, F as useFiveCameraDirection, re as useFiveCameraRaycaster, M as useFiveCurrentObserver, j as useFiveCurrentState, ee as useFiveEventCallback, K as useFiveFloor, q as useFiveHelper, I as useFiveModelIntersectRaycaster, ie as useFiveModelReadyState, G as useFivePlugin, ne as useFiveProject2d, D as useFiveScene, E as useFiveSceneEffect, A as useFiveState, O as useFiveWork, Ae as withFive };
|