@realsee/five 6.8.0-alpha.0 → 6.8.0-alpha.10
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 +4 -0
- package/AI_CONTEXT.md +4 -0
- package/README.md +50 -389
- package/ai_guides/README.md +122 -0
- package/ai_guides/ai-doc-guidelines.md +102 -0
- package/ai_guides/api.md +274 -0
- package/ai_guides/features/3dtile.md +172 -0
- package/ai_guides/features/camera-animation.md +205 -0
- package/ai_guides/features/clipper.md +135 -0
- package/ai_guides/features/coordinate-system.md +128 -0
- package/ai_guides/features/event.md +154 -0
- package/ai_guides/features/five.md +184 -0
- package/ai_guides/features/flowing-light-2d-pass.md +438 -0
- package/ai_guides/features/flowing-light-3d-pass.md +420 -0
- package/ai_guides/features/gaussian-blur-pass.md +202 -0
- package/ai_guides/features/gesture.md +180 -0
- package/ai_guides/features/get-screen-pixels.md +182 -0
- package/ai_guides/features/image-options.md +164 -0
- package/ai_guides/features/load-external-model.md +350 -0
- package/ai_guides/features/load-progress.md +140 -0
- package/ai_guides/features/material.md +151 -0
- package/ai_guides/features/mode.md +269 -0
- package/ai_guides/features/model.md +186 -0
- package/ai_guides/features/move-pano-effect.md +145 -0
- package/ai_guides/features/multi-work.md +146 -0
- package/ai_guides/features/pano-tile.md +132 -0
- package/ai_guides/features/pano-uv.md +131 -0
- package/ai_guides/features/parameter.md +153 -0
- package/ai_guides/features/plugin.md +210 -0
- package/ai_guides/features/postprocessing.md +259 -0
- package/ai_guides/features/raycast.md +175 -0
- package/ai_guides/features/request-proxy.md +112 -0
- package/ai_guides/features/screen-project.md +165 -0
- package/ai_guides/features/state.md +101 -0
- package/ai_guides/features/view-layer.md +187 -0
- package/ai_guides/features/work.md +303 -0
- package/ai_guides/glossary.md +93 -0
- package/ai_guides/intro.md +23 -0
- package/ai_guides/quick-start.md +69 -0
- package/ai_guides/release_notes/6.6.md +86 -0
- package/ai_guides/release_notes/6.7.md +401 -0
- package/ai_guides/release_notes/6.8.md +90 -0
- package/ai_guides/support.md +23 -0
- package/ai_guides/template.md +70 -0
- package/docs/00_FOR_AI_AGENTS.md +11 -0
- package/docs/README.md +11 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +29 -29
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +3 -3
- package/docs/classes/five.AdaptiveLuminancePass.html +2 -2
- package/docs/classes/five.AnimationFrameLoop.html +5 -5
- package/docs/classes/five.BoundingMesh.html +1 -1
- package/docs/classes/five.Camera.html +5 -5
- package/docs/classes/five.EffectComposer.html +1 -1
- package/docs/classes/five.EyeDomeLightingPass.html +2 -2
- package/docs/classes/five.Five.html +134 -134
- package/docs/classes/five.FivePass.html +2 -2
- package/docs/classes/five.FullScreenQuad.html +2 -2
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +36 -36
- package/docs/classes/five.ModelScene.html +12 -12
- package/docs/classes/five.Motion.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +23 -23
- package/docs/classes/five.PBMContainer.html +3 -3
- package/docs/classes/five.PBMGSObject.html +24 -0
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +15 -6
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +3 -3
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PanoCircleMesh.html +4 -4
- package/docs/classes/five.PanoCircleMeshCustom.html +4 -4
- package/docs/classes/five.PanoCircleMeshSolid.html +4 -4
- package/docs/classes/five.Parameter.html +55 -51
- package/docs/classes/five.Scene.html +3 -3
- package/docs/classes/five.Subscribe.html +26 -25
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +30 -26
- package/docs/classes/five.TileNode.html +2 -2
- package/docs/classes/five.Tileset.html +11 -11
- package/docs/classes/five.Trajectory.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +19 -19
- package/docs/classes/five.WorkResolvedObserver.html +41 -16
- 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 +6 -6
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +4 -4
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +4 -4
- 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 +16 -16
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/react.Store.html +12 -11
- package/docs/classes/sticker.Sticker.html +11 -11
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +31 -31
- package/docs/classes/vfx.ParticleGPU.html +7 -7
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +138 -0
- package/docs/documents/ai-doc-guidelines.html +117 -0
- package/docs/documents/api.html +337 -0
- package/docs/documents/features_3dtile.html +216 -0
- package/docs/documents/features_camera-animation.html +157 -0
- package/docs/documents/features_clipper.html +80 -0
- package/docs/documents/features_coordinate-system.html +127 -0
- package/docs/documents/features_event.html +104 -0
- package/docs/documents/features_five.html +147 -0
- package/docs/documents/features_flowing-light-2d-pass.html +356 -0
- package/docs/documents/features_flowing-light-3d-pass.html +351 -0
- package/docs/documents/features_gaussian-blur-pass.html +182 -0
- package/docs/documents/features_gesture.html +120 -0
- package/docs/documents/features_get-screen-pixels.html +88 -0
- package/docs/documents/features_image-options.html +108 -0
- package/docs/documents/features_load-external-model.html +600 -0
- package/docs/documents/features_load-progress.html +110 -0
- package/docs/documents/features_material.html +334 -0
- package/docs/documents/features_mode.html +114 -0
- package/docs/documents/features_model.html +141 -0
- package/docs/documents/features_move-pano-effect.html +110 -0
- package/docs/documents/features_multi-work.html +97 -0
- package/docs/documents/features_pano-tile.html +100 -0
- package/docs/documents/features_pano-uv.html +82 -0
- package/docs/documents/features_parameter.html +101 -0
- package/docs/documents/features_plugin.html +105 -0
- package/docs/documents/features_postprocessing.html +109 -0
- package/docs/documents/features_raycast.html +98 -0
- package/docs/documents/features_request-proxy.html +78 -0
- package/docs/documents/features_screen-project.html +112 -0
- package/docs/documents/features_state.html +71 -0
- package/docs/documents/features_view-layer.html +158 -0
- package/docs/documents/features_work.html +129 -0
- package/docs/documents/glossary.html +94 -0
- package/docs/documents/intro.html +24 -0
- package/docs/documents/quick-start.html +32 -0
- package/docs/documents/release_notes_6.6.html +79 -0
- package/docs/documents/release_notes_6.7.html +209 -0
- package/docs/documents/release_notes_6.8.html +103 -0
- package/docs/documents/support.html +49 -0
- package/docs/documents/template.html +80 -0
- package/docs/functions/five.coordinatesToVector.html +1 -1
- package/docs/functions/five.defaultImageURLTransform.html +3 -3
- package/docs/functions/five.headingToLongitude.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.loadSplat.html +1 -0
- package/docs/functions/five.loadSpz.html +1 -0
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.longitudeToHeading.html +1 -1
- package/docs/functions/five.parseWork.html +3 -3
- package/docs/functions/five.vectorToCoordinates.html +1 -1
- package/docs/functions/react.createFiveProvider.html +2 -2
- package/docs/functions/react.createStore.html +8 -8
- package/docs/functions/react.useFiveAction.html +6 -6
- package/docs/functions/react.useFiveCameraDirection.html +1 -1
- package/docs/functions/react.useFiveCameraRaycaster.html +1 -1
- package/docs/functions/react.useFiveCurrentObserver.html +1 -1
- package/docs/functions/react.useFiveCurrentState.html +1 -1
- package/docs/functions/react.useFiveEventCallback.html +1 -1
- package/docs/functions/react.useFiveFloor.html +1 -1
- package/docs/functions/react.useFiveHelper.html +1 -1
- package/docs/functions/react.useFiveModelIntersectRaycaster.html +2 -2
- package/docs/functions/react.useFiveModelReadyState.html +1 -1
- package/docs/functions/react.useFiveProject2d.html +2 -2
- package/docs/functions/react.useFiveSceneEffect.html +1 -1
- package/docs/functions/react.useFiveWork.html +2 -2
- package/docs/functions/vue.useFiveAction.html +8 -8
- package/docs/functions/vue.useFiveCameraDirection.html +1 -1
- package/docs/functions/vue.useFiveCameraRaycaster.html +1 -1
- package/docs/functions/vue.useFiveCurrentObserver.html +1 -1
- package/docs/functions/vue.useFiveCurrentState.html +1 -1
- package/docs/functions/vue.useFiveEventCallback.html +1 -1
- package/docs/functions/vue.useFiveFloor.html +1 -1
- package/docs/functions/vue.useFiveHelper.html +1 -1
- package/docs/functions/vue.useFiveModel.html +1 -1
- package/docs/functions/vue.useFiveModelBounding.html +1 -1
- package/docs/functions/vue.useFiveModelIntersectRaycaster.html +2 -2
- package/docs/functions/vue.useFiveModelReadyState.html +1 -1
- package/docs/functions/vue.useFiveProject2d.html +2 -2
- package/docs/functions/vue.useFiveScene.html +1 -1
- package/docs/functions/vue.useFiveState.html +1 -1
- package/docs/functions/vue.useFiveWorks.html +4 -4
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +115 -187
- package/docs/interfaces/five.AddableObject.html +5 -5
- package/docs/interfaces/five.AjaxOptions.html +5 -5
- package/docs/interfaces/five.BaseEvent.html +2 -2
- package/docs/interfaces/five.EventCallback.html +198 -194
- package/docs/interfaces/five.FiveInitArgs.html +18 -18
- package/docs/interfaces/five.FiveLoadOptions.html +3 -3
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.GestureEvent.html +2 -2
- package/docs/interfaces/five.ImageOptions.html +11 -11
- package/docs/interfaces/five.ImageURLOptions.html +8 -8
- package/docs/interfaces/five.IntersectEvent.html +2 -2
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +4 -3
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.ModeChangeEvent.html +2 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModelEvent.html +2 -2
- package/docs/interfaces/five.ModelOptions.html +3 -3
- package/docs/interfaces/five.ModelSceneEvent.html +2 -2
- package/docs/interfaces/five.ModelTileEvent.html +8 -0
- package/docs/interfaces/five.MovePanoOptions.html +10 -10
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +4 -4
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
- package/docs/interfaces/five.PBMPanoDepth.html +4 -4
- package/docs/interfaces/five.PBMPanoPicture.html +5 -5
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshInterface.html +4 -4
- package/docs/interfaces/five.PanoEvent.html +2 -2
- package/docs/interfaces/five.PanoTextureEvent.html +2 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +15 -15
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ParameterMaterialValue.html +40 -36
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +54 -50
- package/docs/interfaces/five.Pass.html +1 -1
- package/docs/interfaces/five.Pose.html +6 -7
- package/docs/interfaces/five.RenderEvent.html +2 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +54 -50
- package/docs/interfaces/five.SplatData.html +10 -0
- package/docs/interfaces/five.State.html +9 -9
- package/docs/interfaces/five.StateEvent.html +2 -2
- package/docs/interfaces/five.TextureOptions.html +12 -12
- package/docs/interfaces/five.Tile3DOptions.html +2 -2
- package/docs/interfaces/five.TileCoordinateSystem.html +2 -2
- package/docs/interfaces/five.TilesetHeader.html +12 -12
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +13 -13
- package/docs/interfaces/five.ViewLayer.html +30 -26
- package/docs/interfaces/five.Viewport.html +4 -4
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +4 -4
- 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 +41 -16
- package/docs/interfaces/five.WorkTile.html +4 -4
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +2 -2
- package/docs/interfaces/five.XRControllerEvent.html +2 -2
- package/docs/interfaces/five.XRGestureEvent.html +2 -2
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +13 -13
- package/docs/interfaces/five.XRSessionEvent.html +2 -2
- package/docs/interfaces/plugins.BackgroundPluginController.html +11 -11
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +8 -8
- package/docs/interfaces/plugins.BasePlugin.BaseOptions.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.Config.html +2 -2
- package/docs/interfaces/plugins.BasePlugin.State.html +4 -4
- package/docs/interfaces/plugins.BasePlugin.StateChangeParams.html +3 -3
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +45 -45
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +18 -18
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +13 -13
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +2 -2
- package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +14 -14
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +5 -5
- package/docs/interfaces/plugins.ItemMaskController.html +12 -12
- package/docs/interfaces/plugins.ItemMaskPluginType.Config.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +5 -5
- package/docs/interfaces/plugins.ItemMaskPluginType.Params.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +7 -7
- package/docs/interfaces/plugins.OrientationPluginController.html +12 -12
- package/docs/interfaces/plugins.OrientationPluginType.Config.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +5 -5
- package/docs/interfaces/plugins.OrientationPluginType.Params.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +5 -5
- package/docs/interfaces/plugins.PanoAnimeController.html +14 -14
- package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.ConfigChangeEvent.html +3 -3
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +6 -6
- package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +4 -4
- package/docs/interfaces/plugins.PluginTemplateType.Config.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +5 -5
- package/docs/interfaces/plugins.PluginTemplateType.Params.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +4 -4
- package/docs/interfaces/plugins.TrajectoryController.html +30 -15
- package/docs/interfaces/react.FiveActionReactCallbacks.html +23 -23
- package/docs/interfaces/react.FiveCanvasProps.html +2 -2
- package/docs/interfaces/react.FiveInjectionTypes.html +76 -76
- package/docs/interfaces/sticker.IntersectionLike.html +2 -2
- package/docs/interfaces/vfx.ParticleArgs.html +26 -26
- package/docs/interfaces/vfx.ParticleGPUArgs.html +30 -30
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +23 -23
- package/docs/modules/five.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +32 -32
- package/docs/types/five.EventTypes.html +26 -24
- package/docs/types/five.FivePlugin.html +2 -2
- package/docs/types/five.FivePluginInit.html +1 -1
- package/docs/types/five.FivePluginInstance.html +1 -1
- package/docs/types/five.LegacyEventType.html +142 -142
- package/docs/types/five.LoadResultType.html +2 -2
- package/docs/types/five.Mode.html +1 -1
- package/docs/types/five.MotionCircle.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/plugins.BasePlugin.EventMap.html +5 -5
- package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +1 -1
- package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +1 -1
- package/docs/variables/react.FiveCanvas.html +1 -1
- package/docs/variables/react.useFiveScene.html +1 -1
- package/docs/variables/vue.FiveCanvas.html +1 -1
- package/docs/variables/vue.FiveProvider.html +1 -1
- package/five/application/analysis.d.ts +40 -0
- package/five/application/controllers.d.ts +41 -0
- package/five/application/events-legacy.d.ts +454 -0
- package/five/application/events.d.ts +69 -0
- package/five/application/five.d.ts +518 -0
- package/five/application/fiveInitArgs.d.ts +176 -0
- package/five/application/fiveLoadOptions.d.ts +21 -0
- package/five/application/generateDefaultVideoElement.d.ts +2 -0
- package/five/application/getViewportScale.d.ts +2 -0
- package/five/application/initLights.d.ts +3 -0
- package/five/application/mode.d.ts +28 -0
- package/five/application/renderPoweredByRealsee.d.ts +3 -0
- package/five/assets/cardboard-png-data-url.d.ts +2 -0
- package/five/assets/gradient-png-data-url.d.ts +2 -0
- package/five/assets/loading-png-data-url.d.ts +2 -0
- package/five/assets/phone-png-data-url.d.ts +2 -0
- package/five/assets/realsee-pmg-data-url.d.ts +2 -0
- package/five/bvh/bvhMath.d.ts +33 -0
- package/five/bvh/bvhMesh.d.ts +7 -0
- package/five/bvh/bvhNode.d.ts +29 -0
- package/five/bvh/bvhObject.d.ts +18 -0
- package/five/bvh/bvhPoints.d.ts +6 -0
- package/five/bvh/index.d.ts +10 -0
- package/five/bvh/worker.d.ts +35 -0
- package/five/cardboard/helper.d.ts +2 -0
- package/five/cardboard/index.d.ts +13 -0
- package/five/cardboard/sensor.d.ts +158 -0
- package/five/certificates/hardware.d.ts +1 -0
- package/five/controllers/base.d.ts +166 -0
- package/five/controllers/events.d.ts +69 -0
- package/five/controllers/floorplan.d.ts +119 -0
- package/five/controllers/mapview.d.ts +138 -0
- package/five/controllers/model.d.ts +57 -0
- package/five/controllers/panorama.d.ts +143 -0
- package/five/controllers/panoramaLike.d.ts +87 -0
- package/five/controllers/topview.d.ts +42 -0
- package/five/controllers/vrPanorama.d.ts +56 -0
- package/five/controllers/xrPanorama.d.ts +81 -0
- package/five/core/camera.d.ts +65 -0
- package/five/core/internalWebGLRenderer.d.ts +14 -0
- package/five/core/panoVideo.d.ts +18 -0
- package/five/core/scene.d.ts +10 -0
- package/five/core/tiling.d.ts +43 -0
- package/five/declare.d.ts +2 -1
- package/five/gs/util/renderData.d.ts +32 -0
- package/five/gs/wasm/data.d.ts +20 -0
- package/five/gs/wasm/sort.d.ts +18 -0
- package/five/gs/worker/dataWorker.d.ts +1 -0
- package/five/gs/worker/sortWorker.d.ts +1 -0
- package/five/index.d.ts +57 -4582
- package/five/index.js +605 -92
- package/five/index.mjs +9661 -7537
- package/five/meshes/boundingMesh.d.ts +12 -0
- package/five/meshes/intersectMesh.d.ts +8 -0
- package/five/meshes/panoCircleMesh.d.ts +35 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
- package/five/meshes/panoSphereMesh.d.ts +27 -0
- package/five/model/helpers/coordinate-transform.d.ts +3 -0
- package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
- package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
- package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
- package/five/model/index.d.ts +70 -0
- package/five/model/intersection.d.ts +18 -0
- package/five/model/loaders/at3d.d.ts +12 -0
- package/five/model/loaders/b3dm.d.ts +9 -0
- package/five/model/loaders/dome.d.ts +22 -0
- package/five/model/loaders/domez.d.ts +11 -0
- package/five/model/loaders/fbx.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
- package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
- package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
- package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
- package/five/model/loaders/gltf.d.ts +10 -0
- package/five/model/loaders/obj.d.ts +9 -0
- package/five/model/loaders/pbm.d.ts +26 -0
- package/five/model/loaders/ply.d.ts +24 -0
- package/five/model/loaders/pnts.d.ts +8 -0
- package/five/model/loaders/protobuf/dome.d.ts +540 -0
- package/five/model/loaders/protobuf/pbm.d.ts +203 -0
- package/five/model/loaders/shared.d.ts +16 -0
- package/five/model/loaders/splat.d.ts +8 -0
- package/five/model/loaders/spz.d.ts +14 -0
- package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
- package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
- package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
- package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
- package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
- package/five/model/loaders/x3p.d.ts +22 -0
- package/five/model/materials/pbmMaterial.d.ts +87 -0
- package/five/model/materials/pbmMeshMaterial.d.ts +124 -0
- package/five/model/materials/pbmPointCloudMaterial.d.ts +72 -0
- package/five/model/model-scene.d.ts +172 -0
- package/five/model/model.d.ts +209 -0
- package/five/model/objects/pbmContainer.d.ts +28 -0
- package/five/model/objects/pbmGSObject.d.ts +40 -0
- package/five/model/objects/pbmGSRenderMesh.d.ts +32 -0
- package/five/model/objects/pbmGroup.d.ts +8 -0
- package/five/model/objects/pbmMesh.d.ts +10 -0
- package/five/model/objects/pbmPointCloud.d.ts +7 -0
- package/five/model/parameter.d.ts +136 -0
- package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
- package/five/model/tile3d/header.d.ts +88 -0
- package/five/model/tile3d/index.d.ts +214 -0
- package/five/model/tile3d/tile-cache.d.ts +18 -0
- package/five/model/tile3d/tile-content.d.ts +10 -0
- package/five/model/tile3d/tile-node.d.ts +24 -0
- package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
- package/five/model/tile3d/tile.d.ts +79 -0
- package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
- package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
- package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
- package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
- package/five/model/tile3d/tileset.d.ts +69 -0
- package/five/model/tile3d/trajectory-content.d.ts +9 -0
- package/five/model/tile3d/trajectory-node.d.ts +15 -0
- package/five/model/tile3d/trajectory.d.ts +30 -0
- package/five/model/tile3d/types.d.ts +33 -0
- package/five/model/view-layer.d.ts +20 -0
- package/five/renderer/five-renderer.d.ts +17 -0
- package/five/renderer/index.d.ts +3 -0
- package/five/renderer/postprocessing/composer.d.ts +37 -0
- package/five/renderer/postprocessing/index.d.ts +7 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +15 -0
- package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
- package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
- package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
- package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
- package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
- package/five/renderer/tools/full-screen-quad.d.ts +15 -0
- package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
- package/five/renderer/tools/render-full-screen.d.ts +2 -0
- package/five/texture/imageBitmap.d.ts +13 -0
- package/five/texture/initTexture.d.ts +3 -0
- package/five/texture/loader.d.ts +39 -0
- package/five/thirdparty/fflate.d.ts +1407 -0
- package/five/thirdparty/hammer.d.ts +259 -0
- package/five/thirdparty/jsrsasign.d.ts +768 -0
- package/five/thirdparty/meshopt_decoder.d.ts +15 -0
- package/five/three-version-check.d.ts +1 -0
- package/five/types/addableObject.d.ts +12 -0
- package/five/types/cube.d.ts +1 -0
- package/five/types/gestureInput.d.ts +24 -0
- package/five/types/imageOptions.d.ts +20 -0
- package/five/types/intersectMeshInterface.d.ts +8 -0
- package/five/types/movePanoEffect.d.ts +13 -0
- package/five/types/movePanoOptions.d.ts +35 -0
- package/five/types/panoCircleMeshInterface.d.ts +34 -0
- package/five/types/plugin.d.ts +25 -0
- package/five/types/pose.d.ts +17 -0
- package/five/types/state.d.ts +20 -0
- package/five/types/viewport.d.ts +22 -0
- package/five/utils/ajax.d.ts +66 -0
- package/five/utils/animationFrameLoop.d.ts +45 -0
- package/five/utils/array.d.ts +31 -0
- package/five/utils/asyncTaskQueue.d.ts +8 -0
- package/five/utils/bufferGeometry.d.ts +33 -0
- package/five/utils/calculateProgress.d.ts +39 -0
- package/five/utils/calculateThreeMouse.d.ts +13 -0
- package/five/utils/canplayVideo.d.ts +2 -0
- package/five/utils/clamp.d.ts +2 -0
- package/five/utils/clock.d.ts +17 -0
- package/five/utils/createSymbol.d.ts +5 -0
- package/five/utils/decodeText.d.ts +2 -0
- package/five/utils/deepEqual.d.ts +2 -0
- package/five/utils/deepFreeze.d.ts +2 -0
- package/five/utils/defineProperty.d.ts +9 -0
- package/five/utils/detector.d.ts +14 -0
- package/five/utils/distance.d.ts +10 -0
- package/five/utils/draco.d.ts +26 -0
- package/five/utils/easing.d.ts +63 -0
- package/five/utils/event.d.ts +149 -0
- package/five/utils/formatRad.d.ts +7 -0
- package/five/utils/imageSupport.d.ts +6 -0
- package/five/utils/imageURL.d.ts +42 -0
- package/five/utils/isEmptyObject.d.ts +2 -0
- package/five/utils/isNil.d.ts +6 -0
- package/five/utils/isNumber.d.ts +2 -0
- package/five/utils/isPowerOfTwo.d.ts +2 -0
- package/five/utils/isPromise.d.ts +2 -0
- package/five/utils/isSimilar.d.ts +6 -0
- package/five/utils/json.d.ts +7 -0
- package/five/utils/ktx2.d.ts +30 -0
- package/five/utils/lzma/index.d.ts +2 -0
- package/five/utils/lzma/lzma.d.ts +3 -0
- package/five/utils/lzma/lzmaWASM.d.ts +2 -0
- package/five/utils/lzma/lzmaWorker.d.ts +14 -0
- package/five/utils/memoryUsage.d.ts +29 -0
- package/five/utils/motion.d.ts +38 -0
- package/five/utils/noop.d.ts +6 -0
- package/five/utils/now.d.ts +7 -0
- package/five/utils/pano.d.ts +9 -0
- package/five/utils/pick.d.ts +3 -0
- package/five/utils/poseUtils.d.ts +5 -0
- package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
- package/five/utils/renderDepth.d.ts +2 -0
- package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
- package/five/utils/requestPermission.d.ts +3 -0
- package/five/utils/shaderContentFix.d.ts +7 -0
- package/five/utils/shaderMaterial.d.ts +20 -0
- package/five/utils/stateUtils.d.ts +5 -0
- package/five/utils/string-pattern.d.ts +8 -0
- package/five/utils/subscribe.d.ts +67 -0
- package/five/utils/tileCube.d.ts +19 -0
- package/five/utils/toFastProperties.d.ts +1 -0
- package/five/utils/typedCache.d.ts +10 -0
- package/five/utils/uniform.d.ts +15 -0
- package/five/utils/url.d.ts +35 -0
- package/five/utils/uuid.d.ts +5 -0
- package/five/utils/values.d.ts +2 -0
- package/five/utils/vectorCoordinates.d.ts +29 -0
- package/five/utils/volume.d.ts +111 -0
- package/five/utils/webglError.d.ts +7 -0
- package/five/utils/worker.d.ts +26 -0
- package/five/webxr/XRControllerModelFactory.d.ts +28 -0
- package/five/webxr/motionHelper.d.ts +68 -0
- package/five/webxr/xrButton.d.ts +4 -0
- package/five/webxr/xrController.d.ts +24 -0
- package/five/webxr/xrManager.d.ts +84 -0
- package/five/work/_ALLOW_HOST.d.ts +2 -0
- package/five/work/index.d.ts +6 -0
- package/five/work/keychain.d.ts +5 -0
- package/five/work/looseWorkType.d.ts +121 -0
- package/five/work/verify.d.ts +7 -0
- package/five/work/work.d.ts +236 -0
- package/five/work/workFetcher.d.ts +4 -0
- package/five/work/workJson.d.ts +3 -0
- package/five/work/workJsonType.d.ts +73 -0
- package/five/work/workObserverUtils.d.ts +36 -0
- package/five/work/workParser.d.ts +6 -0
- package/five/work/workResolvedObserver.d.ts +12 -0
- package/five/work/workVerify.d.ts +2 -0
- package/five/work/works.d.ts +10 -0
- package/gltf-loader/gltf-object.d.ts +17 -0
- package/gltf-loader/index.d.ts +60 -160
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
- package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
- package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
- package/line/circle_png.d.ts +1 -0
- package/line/index.d.ts +19 -69
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/line/utils/Line2.d.ts +7 -0
- package/line/utils/LineGeometry.d.ts +10 -0
- package/line/utils/LineMaterial.d.ts +20 -0
- package/line/utils/LineSegments2.d.ts +11 -0
- package/line/utils/LineSegmentsGeometry.d.ts +15 -0
- package/llms.txt +65 -0
- package/package.json +10 -1
- package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
- package/plugins/BackgroundPlugin/index.d.ts +5 -0
- package/plugins/BackgroundPlugin/typings.d.ts +44 -0
- package/plugins/BasePlugin/index.d.ts +119 -0
- package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
- package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
- package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
- package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
- package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
- package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
- package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
- package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
- package/plugins/ItemMaskPlugin/index.d.ts +5 -0
- package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
- package/plugins/OrientationPlugin/Controller.d.ts +82 -0
- package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
- package/plugins/OrientationPlugin/index.d.ts +6 -0
- package/plugins/OrientationPlugin/typing.d.ts +25 -0
- package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
- package/plugins/PanoAnimePlugin/index.d.ts +5 -0
- package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
- package/plugins/PluginTemplate/Controller.d.ts +27 -0
- package/plugins/PluginTemplate/index.d.ts +5 -0
- package/plugins/PluginTemplate/typing.d.ts +21 -0
- package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
- package/plugins/TrajectoryPlugin/index.d.ts +6 -0
- package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
- package/plugins/index.d.ts +9 -1078
- package/plugins/index.js +17 -17
- package/plugins/index.mjs +1518 -1370
- package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
- package/plugins/thirdParty/OrbitControls.d.ts +78 -0
- package/plugins/utils/absoluteUrl.d.ts +5 -0
- package/plugins/utils/clamp.d.ts +2 -0
- package/plugins/utils/loadImage.d.ts +1 -0
- package/plugins/utils/motion.d.ts +38 -0
- package/plugins/utils/now.d.ts +6 -0
- package/plugins/utils/uuid.d.ts +5 -0
- package/react/canvas.d.ts +19 -0
- package/react/context.d.ts +11 -0
- package/react/createProvider.d.ts +95 -0
- package/react/createStore.d.ts +144 -0
- package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
- package/react/hooks/useFiveAction.d.ts +147 -0
- package/react/hooks/useFiveCameraDirection.d.ts +7 -0
- package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
- package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
- package/react/hooks/useFiveCurrentState.d.ts +15 -0
- package/react/hooks/useFiveEventCallback.d.ts +12 -0
- package/react/hooks/useFiveFloor.d.ts +15 -0
- package/react/hooks/useFiveHelper.d.ts +14 -0
- package/react/hooks/useFiveModelBounding.d.ts +5 -0
- package/react/hooks/useFiveModelEffect.d.ts +14 -0
- package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
- package/react/hooks/useFiveModelReadyState.d.ts +8 -0
- package/react/hooks/useFiveProject2d.d.ts +20 -0
- package/react/hooks/useFiveSceneEffect.d.ts +21 -0
- package/react/hooks/useFiveState.d.ts +6 -0
- package/react/hooks/useFiveWork.d.ts +29 -0
- package/react/index.d.ts +24 -830
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/react/rendererPool.d.ts +7 -0
- package/react/withFive.d.ts +213 -0
- package/shader-lib/EvenessPlane/index.d.ts +10 -0
- package/shader-lib/PointCloudExpand/index.d.ts +59 -0
- package/shader-lib/PolygonCuter/index.d.ts +52 -0
- package/shader-lib/PolygonCuter/worker.d.ts +14 -0
- package/shader-lib/ShineModel/index.d.ts +7 -0
- package/shader-lib/SweepModel/index.d.ts +7 -0
- package/shader-lib/index.d.ts +5 -86
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/geometry.d.ts +3 -0
- package/sticker/index.d.ts +68 -71
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +16 -16
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +605 -92
- package/vfx/airflow/airflow.d.ts +18 -0
- package/vfx/airflow/fragment-shader.d.ts +2 -0
- package/vfx/airflow/vertex-shader.d.ts +2 -0
- package/vfx/common/scale-shader.d.ts +2 -0
- package/vfx/common/simplex-noise-shader.d.ts +2 -0
- package/vfx/frame/fragment-shader.d.ts +2 -0
- package/vfx/frame/frame.d.ts +22 -0
- package/vfx/frame/vertex-shader.d.ts +2 -0
- package/vfx/index.d.ts +7 -363
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vfx/particle/fragment-shader.d.ts +2 -0
- package/vfx/particle/instance.d.ts +36 -0
- package/vfx/particle/particle.d.ts +205 -0
- package/vfx/particle/utils.d.ts +11 -0
- package/vfx/particle/vertex-shader.d.ts +2 -0
- package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
- package/vfx/particle-gpu/instance.d.ts +36 -0
- package/vfx/particle-gpu/particle.d.ts +95 -0
- package/vfx/particle-gpu/utils.d.ts +11 -0
- package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
- package/vfx/spotLight/fragment-shader.d.ts +2 -0
- package/vfx/spotLight/spotLight.d.ts +15 -0
- package/vfx/spotLight/vertex-shader.d.ts +2 -0
- package/vue/context.d.ts +7 -0
- package/vue/hooks/FiveCanvas.d.ts +36 -0
- package/vue/hooks/FiveProvider.d.ts +35 -0
- package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
- package/vue/hooks/useFiveAction.d.ts +178 -0
- package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
- package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
- package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
- package/vue/hooks/useFiveCurrentState.d.ts +16 -0
- package/vue/hooks/useFiveEventCallback.d.ts +11 -0
- package/vue/hooks/useFiveFloor.d.ts +16 -0
- package/vue/hooks/useFiveHelper.d.ts +15 -0
- package/vue/hooks/useFiveModel.d.ts +7 -0
- package/vue/hooks/useFiveModelBounding.d.ts +7 -0
- package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
- package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
- package/vue/hooks/useFiveProject2d.d.ts +26 -0
- package/vue/hooks/useFiveScene.d.ts +6 -0
- package/vue/hooks/useFiveState.d.ts +16 -0
- package/vue/hooks/useFiveWork.d.ts +30 -0
- package/vue/index.d.ts +23 -467
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/vue/rendererPool.d.ts +10 -0
- package/work-downloader/components/model-3d-tile.d.ts +2 -0
- package/work-downloader/components/model.d.ts +3 -0
- package/work-downloader/components/observer.d.ts +7 -0
- package/work-downloader/download.d.ts +16 -0
- package/work-downloader/index.d.ts +2 -33
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
- package/work-downloader/type.d.ts +28 -0
- package/work-downloader/utils/download-to-file.d.ts +1 -0
- package/work-downloader/utils/image-processing.d.ts +7 -0
- package/work-downloader/utils/join-url.d.ts +2 -0
- package/work-downloader/utils/log.d.ts +1 -0
- package/work-downloader/utils/relative-url.d.ts +1 -0
- package/docs/documents/coordinate.html +0 -9
- package/docs/documents/five.FivePlugin.plugins.html +0 -77
- package/docs/documents/five.Pose.coordinate.html +0 -9
- package/docs/documents/plugins.html +0 -77
- package/docs/documents/react-component.html +0 -32
- package/docs/media/coordinate.jpg +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# 相机动画 (Camera Animation)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 介绍如何在 Five 中通过编程方式控制相机运动,包括旋转、位移、全景切换以及模态转换时的动画效果。
|
|
4
|
+
- **Schema**: `State` (状态), `MovePanoOptions` (移动参数)。
|
|
5
|
+
- **Concepts**: Pose (位姿), Animation Loop, Easing (缓动), Fly/Fade Effect。
|
|
6
|
+
- **Configuration**: `modeChangeDuration`, `movePanoOptions`。
|
|
7
|
+
- **Examples**: 旋转视角、切换全景点、模态切换动画。
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
### MovePanoOptions
|
|
12
|
+
|
|
13
|
+
> **Definition**: [MovePanoOptions](../../five/types/movePanoOptions.d.ts)
|
|
14
|
+
|
|
15
|
+
点位移动参数配置。
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
interface MovePanoOptions extends Partial<Omit<State, "offset" | 'distance' | 'mode'>> {
|
|
19
|
+
/** 动画效果: 'fly' | 'fade' | 'instant' ... */
|
|
20
|
+
effect?: MovePanoEffect;
|
|
21
|
+
/** 走点图片过度策略 */
|
|
22
|
+
effectEasing?: (progress: number) => number;
|
|
23
|
+
/**
|
|
24
|
+
* 运动耗时 (ms)
|
|
25
|
+
* - number: 固定时长
|
|
26
|
+
* - function: (distance, speed) => number 根据距离动态计算
|
|
27
|
+
*/
|
|
28
|
+
duration?: number | ((distance: number, speed: number) => number) | string | null;
|
|
29
|
+
/** 运动开始回调 */
|
|
30
|
+
moveStartCallback?: (toState: State) => void;
|
|
31
|
+
/** 运动结束回调 */
|
|
32
|
+
moveEndCallback?: (state: State) => void;
|
|
33
|
+
/** 运动被取消回调 */
|
|
34
|
+
moveCancelCallback?: () => void;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### MovePanoEffect
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
type MovePanoEffect =
|
|
42
|
+
| "fly" // 通过相机移动方式变化 (默认)
|
|
43
|
+
| "instant" // 直接变化 (无动画)
|
|
44
|
+
| "fade" // 通过渐变方式变化
|
|
45
|
+
| "model"; // 通过过度到模型
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Core Methods (核心方法)
|
|
49
|
+
|
|
50
|
+
Five 提供了多种层级的 API 来控制相机动画。
|
|
51
|
+
|
|
52
|
+
### 1. setState
|
|
53
|
+
|
|
54
|
+
最通用的状态更新方法。可以通过修改 `longitude` / `latitude` (旋转) 或 `fov` (缩放) 来产生动画。
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
five.setState(state: Partial<State>, immediately?: boolean): void
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
* `state`: 目标状态 (包含 mode, panoIndex, longitude, latitude, fov 等)。
|
|
61
|
+
* `immediately`: 是否立即跳转 (无动画)。默认为 `false` (有动画)。
|
|
62
|
+
|
|
63
|
+
### 2. moveToPano
|
|
64
|
+
|
|
65
|
+
专用于全景点位之间的切换。支持 "飞行" (Fly) 和 "渐变" (Fade) 两种效果。
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
five.moveToPano(panoIndex: number, options?: MovePanoOptions): Promise<void>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
* `options.effect`: 切换效果。`'fly'` (空间飞行) 或 `'fade'` (淡入淡出)。
|
|
72
|
+
* `options.duration`: 动画时长 (ms)。
|
|
73
|
+
* `options.moveEndCallback`: 动画结束回调。
|
|
74
|
+
|
|
75
|
+
### 3. changeMode
|
|
76
|
+
|
|
77
|
+
切换交互模式 (如从全景切换到模型鸟瞰)。
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
five.changeMode(mode: Mode, options?, animationOptions?): Promise<void>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Concepts
|
|
84
|
+
|
|
85
|
+
### Pose (位姿)
|
|
86
|
+
|
|
87
|
+
相机的状态主要由位姿描述:
|
|
88
|
+
|
|
89
|
+
* **Longitude (经度)**: 水平旋转角度 (0 - 2π)。
|
|
90
|
+
* **Latitude (纬度)**: 垂直旋转角度 (-π/2 - π/2)。
|
|
91
|
+
* **FOV (视场角)**: 相机可视范围角度。
|
|
92
|
+
|
|
93
|
+
### Animation Effects (动画效果)
|
|
94
|
+
|
|
95
|
+
* **Linear / Easing**: 大多数 `setState` 产生的旋转和缩放动画使用平滑的缓动函数 (Ease-in-out)。
|
|
96
|
+
* **Fly (飞行)**: 模拟真实空间中的移动,相机位置会发生物理位移。适用于 `Panorama` 模式下的点位切换。
|
|
97
|
+
* **Fade (渐变)**: 保持相机位置不变,通过透明度渐变切换场景。适用于距离较远或不通视的点位切换。
|
|
98
|
+
|
|
99
|
+
## Configuration
|
|
100
|
+
|
|
101
|
+
### Global Configuration (全局配置)
|
|
102
|
+
|
|
103
|
+
在 `new Five(config)` 初始化时可以设置全局动画参数:
|
|
104
|
+
|
|
105
|
+
| Parameter | Type | Default | Description |
|
|
106
|
+
| :--- | :--- | :--- | :--- |
|
|
107
|
+
| `modeChangeDuration` | `number` | `1000` | 模态切换 (如 Panorama -> Mapview) 的默认时长 (ms)。 |
|
|
108
|
+
|
|
109
|
+
### MovePanoOptions Configuration (移动参数)
|
|
110
|
+
|
|
111
|
+
调用 `five.moveToPano(index, options)` 时使用的配置参数:
|
|
112
|
+
|
|
113
|
+
| Parameter | Type | Default | Description |
|
|
114
|
+
| :--- | :--- | :--- | :--- |
|
|
115
|
+
| `effect` | `MovePanoEffect` | `'fly'` | 动画效果。<br>`'fly'`: 空间移动(模拟行走);<br>`'fade'`: 淡入淡出(保持位置不变);<br>`'instant'`: 瞬间跳转。 |
|
|
116
|
+
| `duration` | `number` \| `Function` | - | 动画时长 (ms)。若不传,则根据距离和速度自动计算。 |
|
|
117
|
+
| `effectEasing` | `Function` | - | 自定义过渡效果的缓动函数。 |
|
|
118
|
+
| `moveEndCallback` | `Function` | - | 动画结束后的回调函数。 |
|
|
119
|
+
|
|
120
|
+
## Examples
|
|
121
|
+
|
|
122
|
+
### 1. 旋转视角 (Rotate Camera)
|
|
123
|
+
|
|
124
|
+
平滑旋转到指定角度。
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
// 旋转到水平 0 度,垂直 0 度
|
|
128
|
+
five.setState({
|
|
129
|
+
longitude: 0,
|
|
130
|
+
latitude: 0
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// 立即跳转 (无动画)
|
|
134
|
+
five.setState({ longitude: Math.PI }, true);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 2. 切换全景点 (Change Pano)
|
|
138
|
+
|
|
139
|
+
模拟行走效果切换到下一个房间。
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
// 飞向索引为 2 的全景点
|
|
143
|
+
five.moveToPano(2, {
|
|
144
|
+
effect: 'fly', // 飞行效果
|
|
145
|
+
duration: 1500, // 1.5秒
|
|
146
|
+
moveEndCallback: () => {
|
|
147
|
+
console.log("到达目的地");
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 3. 模态切换 (Change Mode)
|
|
153
|
+
|
|
154
|
+
从全景模式切换到户型图模式。
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
// 切换到 Floorplan 模式
|
|
158
|
+
five.changeMode('Floorplan');
|
|
159
|
+
|
|
160
|
+
// 切换回 Panorama 模式,并指定进入时的视角
|
|
161
|
+
five.setState({
|
|
162
|
+
mode: 'Panorama',
|
|
163
|
+
panoIndex: 0,
|
|
164
|
+
longitude: Math.PI / 2
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 4. 自动巡更 (Auto Tour)
|
|
169
|
+
|
|
170
|
+
通过连续调用 `setState` 或 `moveToPano` 实现简单的自动导览。
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
async function startTour() {
|
|
174
|
+
// 1. 先看天花板
|
|
175
|
+
five.setState({ latitude: Math.PI / 3 });
|
|
176
|
+
await wait(2000); // 等待动画完成
|
|
177
|
+
|
|
178
|
+
// 2. 移动到下一个点
|
|
179
|
+
await five.moveToPano(1, { effect: 'fly' });
|
|
180
|
+
|
|
181
|
+
// 3. 切换到模型鸟瞰
|
|
182
|
+
await five.changeMode('Mapview');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function wait(ms: number) {
|
|
186
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Common Pitfalls
|
|
191
|
+
|
|
192
|
+
1. **并发调用**: 尽量避免在动画过程中再次调用 `setState`,这可能会打断当前动画或导致状态突变。建议使用 `Promise` 或回调等待动画结束。
|
|
193
|
+
3. **相机位姿**: 确保传入的 `longitude` / `latitude` 符合 Five 的坐标系定义 (Y-up, 右手系)。
|
|
194
|
+
|
|
195
|
+
## Related
|
|
196
|
+
|
|
197
|
+
* [Five](./five.md): Five 核心类及 `setState` 方法。
|
|
198
|
+
* [Mode](./mode.md): 各种交互模式说明。
|
|
199
|
+
* [State](./state.md): 状态对象的完整定义。
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
tags: [camera-animation, pose, state]
|
|
205
|
+
```
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# 模型裁切 (Model Clipper)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 使用 `parameter.clippers` 定义裁切盒,用于隐藏 (discard) 模型中特定区域的点云或网格。
|
|
4
|
+
- **Schema**: `PBMClipperParameter` 数组,包含变换矩阵和楼层索引。
|
|
5
|
+
- **Concepts**: Clipping Box (裁切盒), Matrix Transformation (矩阵变换), Negative Space (负空间).
|
|
6
|
+
- **Configuration**: `five.model.clippers`.
|
|
7
|
+
- **Examples**: 创建裁切盒并应用。
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [PBMClipperParameter](../../five/model/materials/pbmMaterial.d.ts)
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
/** 模型裁切参数 */
|
|
15
|
+
interface PBMClipperParameter {
|
|
16
|
+
/**
|
|
17
|
+
* 裁切盒的变换矩阵。
|
|
18
|
+
* @description
|
|
19
|
+
* 定义了一个变换后的立方体空间。
|
|
20
|
+
* 基础形状为边长为 1 的立方体,中心在 (0,0,0),范围 [-0.5, 0.5]。
|
|
21
|
+
* 凡是落在这个变换后立方体内部的模型点,都会被丢弃 (discard)。
|
|
22
|
+
*/
|
|
23
|
+
clippingBoxMatrix: THREE.Matrix4;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* (可选) 楼层索引。
|
|
27
|
+
* @description
|
|
28
|
+
* 如果指定,则裁切仅对该楼层的点云生效。
|
|
29
|
+
* 如果未指定 (undefined),则对所有楼层生效。
|
|
30
|
+
*/
|
|
31
|
+
floorIndex?: number;
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Concepts
|
|
36
|
+
|
|
37
|
+
### Clipping Box (裁切盒)
|
|
38
|
+
Five 的裁切机制是基于**负空间**的:
|
|
39
|
+
- 默认情况下,所有模型点都是可见的。
|
|
40
|
+
- 当你添加一个 Clipper 时,你实际上是在定义一个“不可见区域”。
|
|
41
|
+
- 任何位于 Clipper 定义的 3D 盒体内部的点,都不会被渲染。
|
|
42
|
+
|
|
43
|
+
### Matrix Transformation (矩阵变换)
|
|
44
|
+
Clipper 的几何定义依赖于 `clippingBoxMatrix`。
|
|
45
|
+
- shader 内部逻辑是将世界坐标系下的点,乘以 `clippingBoxMatrix` 的**逆矩阵**。
|
|
46
|
+
- 然后判断该点是否在 `[-0.5, 0.5]` 的单位立方体范围内。
|
|
47
|
+
- 这意味着你可以直接使用 `THREE.Mesh` (BoxGeometry 1x1x1) 的 `matrix` 属性作为 `clippingBoxMatrix`,所见即所得。
|
|
48
|
+
|
|
49
|
+
## Configuration
|
|
50
|
+
|
|
51
|
+
你可以通过 `five.model.clippers` 属性来读写裁切配置。
|
|
52
|
+
|
|
53
|
+
| 属性 | 类型 | 说明 |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| `five.model.clippers` | `PBMClipperParameter[]` | 设置裁切参数数组。设置新数组会覆盖旧配置。 |
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
### 基础用法 (Basic Usage)
|
|
60
|
+
|
|
61
|
+
创建一个不可见的 Box,将其位置和大小作为裁切区域。
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
import * as THREE from 'three';
|
|
65
|
+
import { Five } from '@realsee/five';
|
|
66
|
+
|
|
67
|
+
// 1. 创建一个辅助 Mesh 来定义裁切区域
|
|
68
|
+
// 注意:必须使用 1x1x1 的 BoxGeometry,因为 Shader 是基于单位立方体判断的
|
|
69
|
+
const clipperMesh = new THREE.Mesh(
|
|
70
|
+
new THREE.BoxGeometry(1, 1, 1),
|
|
71
|
+
new THREE.MeshBasicMaterial({ color: 0xff0000, wireframe: true })
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// 2. 设置裁切盒的位置、旋转和缩放
|
|
75
|
+
clipperMesh.position.set(0, 1.5, 0); // 抬高位置
|
|
76
|
+
clipperMesh.scale.set(2, 3, 2); // 设定大小为 2x3x2
|
|
77
|
+
clipperMesh.rotation.y = Math.PI / 4; // 旋转 45 度
|
|
78
|
+
|
|
79
|
+
// 更新矩阵,确保 .matrix 属性是最新的
|
|
80
|
+
clipperMesh.updateMatrix();
|
|
81
|
+
|
|
82
|
+
// (可选) 将辅助 Mesh 加入场景以便调试看到范围
|
|
83
|
+
five.scene.add(clipperMesh);
|
|
84
|
+
|
|
85
|
+
// 3. 应用裁切参数
|
|
86
|
+
five.model.clippers = [
|
|
87
|
+
{
|
|
88
|
+
clippingBoxMatrix: clipperMesh.matrix,
|
|
89
|
+
// floorIndex: 0 // 可选:仅裁切第 0 层
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
// 4. 触发重绘
|
|
94
|
+
five.needsRender = true;
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 动态更新 (Dynamic Update)
|
|
98
|
+
|
|
99
|
+
如果需要动态移动裁切盒,需要重新赋值 `five.model.clippers` 或手动触发更新机制(虽然 setter 会自动触发更新,但如果只修改数组内部对象可能需要重新赋值)。
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
function updateClipper(mesh: THREE.Mesh) {
|
|
103
|
+
mesh.updateMatrix();
|
|
104
|
+
|
|
105
|
+
// 重新赋值以触发 Five 内部的 setter 和 uniform 更新
|
|
106
|
+
five.model.clippers = [{
|
|
107
|
+
clippingBoxMatrix: mesh.matrix
|
|
108
|
+
}];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 在动画循环或交互事件中调用
|
|
112
|
+
// ...
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Debugging
|
|
116
|
+
|
|
117
|
+
- **辅助显示**: 始终建议在开发阶段将用于生成矩阵的 `THREE.Mesh` (Wireframe 模式) 添加到 `five.scene` 中,这样可以直观地看到裁切范围是否正确。
|
|
118
|
+
- **单位问题**: 确保 `BoxGeometry` 构造时没有传入参数 (默认 1,1,1) 或者显式传入 `(1, 1, 1)`。如果使用了 `(10, 10, 10)` 的几何体,那么 `scale` 设置为 1 时实际裁切范围是 10,可能会导致误解。建议统一使用单位几何体 + `scale` 的方式。
|
|
119
|
+
|
|
120
|
+
## Common Pitfalls
|
|
121
|
+
|
|
122
|
+
1. **矩阵未更新**: 修改了 Mesh 的 position/scale 后忘记调用 `updateMatrix()`,导致裁切位置没变。
|
|
123
|
+
2. **几何体尺寸**: 使用了非 `1x1x1` 的 BoxGeometry,导致裁切范围与 Mesh视觉大小不一致(Shader 始终假定是单位立方体)。
|
|
124
|
+
3. **楼层索引**: 设置了错误的 `floorIndex` 导致裁切看起来没生效(因为该区域的点可能属于另一个 floorIndex)。
|
|
125
|
+
4. **坐标系**: `clippingBoxMatrix` 是世界坐标系下的变换。如果模型本身有额外的父级变换(通常 Five 的模型直接在 Scene 下,或者是 Identity 变换),通常不需要额外处理。
|
|
126
|
+
|
|
127
|
+
## Related
|
|
128
|
+
|
|
129
|
+
* [model.md](./model.md): 模型模块概览。
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
tags: [clipper, model, cut, discard, geometry]
|
|
135
|
+
```
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# 坐标系 (Coordinate System)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 详解 Five 中的坐标系定义(Local, ENU, ECEF)及其相互转换关系。
|
|
4
|
+
- **Concepts**: Local (Y-up), ENU (Z-up), ECEF, ENU84, RootMeta, Observers.
|
|
5
|
+
- **Configuration**: `rootMeta` `coordinate` 配置。
|
|
6
|
+
- **Examples**: 坐标转换方法示例。
|
|
7
|
+
|
|
8
|
+
## Schema
|
|
9
|
+
|
|
10
|
+
> **Definition**: [TilesetHeader](../../five/model/tile3d/header.d.ts)
|
|
11
|
+
|
|
12
|
+
### RootMeta
|
|
13
|
+
|
|
14
|
+
3D Tiles `rootMeta` 字段中定义的坐标系元数据。
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
interface RootMeta {
|
|
18
|
+
/** 模型垂直轴向 (如 "Z", "-Y") */
|
|
19
|
+
upAxis?: string;
|
|
20
|
+
/** 坐标系转换矩阵信息 */
|
|
21
|
+
coordinate?: Coordinate;
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Coordinate
|
|
26
|
+
|
|
27
|
+
描述 ECEF 与 ENU 之间的转换关系。
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
interface Coordinate {
|
|
31
|
+
/** 地面高度 */
|
|
32
|
+
ground_height?: number;
|
|
33
|
+
/** ECEF 到 ENU 的转换矩阵 (4x4 数组) */
|
|
34
|
+
pose_ecef_to_enu?: number[];
|
|
35
|
+
/** ENU 到 ECEF 的转换矩阵 (4x4 数组) */
|
|
36
|
+
pose_enu_to_ecef?: number[];
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Concepts
|
|
41
|
+
|
|
42
|
+
### Local Coordinate System (Y-up)
|
|
43
|
+
Five 的渲染场景 (`five.scene`) 和 Observers (观察点) 使用 **Y-up** (Y 轴向上) 的右手坐标系。
|
|
44
|
+
这与 Three.js 的默认坐标系一致,便于前端开发和场景渲染。
|
|
45
|
+
- **Y 轴**: 垂直向上。
|
|
46
|
+
- **X/Z 轴**: 水平平面。
|
|
47
|
+
|
|
48
|
+
### ENU Coordinate System (Z-up)
|
|
49
|
+
在本项目及相关算法交互中,**ENU** 指代 **Z-up** (Z 轴向上) 的坐标系。这是为了和测绘行业习惯保持一致。
|
|
50
|
+
- **Z 轴**: 垂直向上。
|
|
51
|
+
- **X/Y 轴**: 水平平面。
|
|
52
|
+
- **ENU84**: 特指 Y 轴正向指向正北 (North) 的 ENU 坐标系。(注:普通的 ENU 坐标系中,北向不一定对应 Y 轴,这与部分行业标准有所区别)。
|
|
53
|
+
- **用途**: 推荐在给算法或后端接口传递模型数据时,使用 ENU 坐标系。
|
|
54
|
+
|
|
55
|
+
### ECEF Coordinate System
|
|
56
|
+
地心地固坐标系 (Earth-Centered, Earth-Fixed)。
|
|
57
|
+
- 当模型包含 RTK (Real-time kinematic) 信息时,通常基于 ECEF 坐标系进行描述。
|
|
58
|
+
- 可以通过 `ecefToEnu` 方法将 ECEF 坐标转换为 ENU 坐标。
|
|
59
|
+
|
|
60
|
+
### Model Orientation (at3d / 3dtiles)
|
|
61
|
+
模型 (如 `.at3d`, 3D Tiles) 的加载逻辑遵循以下原则:
|
|
62
|
+
1. **无 RTK 信息**: 默认为 **Z-up** (ENU)。
|
|
63
|
+
2. **有 RTK 信息**: 遵循 **ECEF** 坐标系。
|
|
64
|
+
3. **自动对齐**: Five 加载模型时(load 方法),会自动处理旋转和坐标系转换,将其对齐到 Five 的 Local (Y-up) 坐标系中。
|
|
65
|
+
- 开发者在 `five.scene` 中看到的所有模型都已处于统一的 Y-up 坐标系下。
|
|
66
|
+
|
|
67
|
+
### Coordinate in Files
|
|
68
|
+
在 3D Tiles 的 `tileset.json` 中,`rootMeta` 字段用于描述坐标系转换信息(没有该字段则默认 Z-up):
|
|
69
|
+
- 包含 `pose_ecef_to_enu` 和 `pose_enu_to_ecef` 变换矩阵。
|
|
70
|
+
- Five 读取这些信息来计算并构建完整的坐标转换链, 进行模型-观察点的坐标对齐。
|
|
71
|
+
|
|
72
|
+
在 model 的 `coordinate` 字段用于描述坐标系转换信息(没有该字段则默认 Z-up):
|
|
73
|
+
- 包含 `pose_ecef_to_enu` 和 `pose_enu_to_ecef` 变换矩阵。
|
|
74
|
+
- Five 读取这些信息来计算并构建完整的坐标转换链,确保模型-观察点的坐标对齐。
|
|
75
|
+
|
|
76
|
+
## Instance Methods
|
|
77
|
+
|
|
78
|
+
`ViewLayer` (继承自 `Tile3D`) 提供了成套的坐标转换方法,用于在 Local, ENU, ECEF 和 World 之间进行转换。
|
|
79
|
+
|
|
80
|
+
| 方法名 | 说明 |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `localToEnu(vector)` | Local (Y-up) -> ENU (Z-up) |
|
|
83
|
+
| `enuToLocal(vector)` | ENU (Z-up) -> Local (Y-up) |
|
|
84
|
+
| `enuToEcef(vector)` | ENU (Z-up) -> ECEF |
|
|
85
|
+
| `ecefToEnu(vector)` | ECEF -> ENU (Z-up) |
|
|
86
|
+
| `localToEcef(vector)` | Local (Y-up) -> ECEF |
|
|
87
|
+
| `ecefToLocal(vector)` | ECEF -> Local (Y-up) |
|
|
88
|
+
| `worldToEnu(vector)` | World -> ENU (Z-up) |
|
|
89
|
+
| `enuToWorld(vector)` | ENU (Z-up) -> World |
|
|
90
|
+
|
|
91
|
+
> 注: `World` 坐标系通常指 Three.js 的世界坐标 (即 `five.scene` 的坐标)。在未通过 `Object3D` 层级嵌套偏移的情况下,`World` 等同于 `Local`。
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
### 坐标转换 (Coordinate Transformation)
|
|
96
|
+
|
|
97
|
+
推荐在与后端或算法交互时,将 Local 坐标转换为 ENU 坐标。
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
import * as THREE from 'three';
|
|
101
|
+
import { ViewLayer } from '@realsee/five';
|
|
102
|
+
|
|
103
|
+
// 假设已加载 ViewLayer
|
|
104
|
+
const viewLayer: ViewLayer = ...;
|
|
105
|
+
|
|
106
|
+
// 1. 获取场景中某点的坐标 (Local Y-up)
|
|
107
|
+
const localPosition = new THREE.Vector3(10, 20, 30);
|
|
108
|
+
|
|
109
|
+
// 2. 转换为 ENU 坐标 (Z-up) 用于传输给后端/算法
|
|
110
|
+
const enuPosition = viewLayer.localToEnu(localPosition.clone());
|
|
111
|
+
|
|
112
|
+
console.log(`Local: ${localPosition.toArray()}`); // [x, y, z] (y-up)
|
|
113
|
+
console.log(`ENU: ${enuPosition.toArray()}`); // [x, y, z] (z-up)
|
|
114
|
+
|
|
115
|
+
// 3. 将 ECEF 坐标转换为 Local 坐标用于显示
|
|
116
|
+
const ecefPosition = new THREE.Vector3( ... );
|
|
117
|
+
const displayPosition = viewLayer.ecefToLocal(ecefPosition.clone());
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Related
|
|
121
|
+
|
|
122
|
+
* [load-external-model.md](./load-external-model.md): 加载外部模型时的坐标轴配置 (`upAxis`, `modelUpAxis`)。
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
tags: [coordinate-system, enu, ecef, z-up, y-up, transform]
|
|
128
|
+
```
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Events (事件系统)
|
|
2
|
+
|
|
3
|
+
- **Summary**: Five 提供了一套基于发布/订阅模式的事件系统,用于监听用户交互、状态变更、数据加载及渲染生命周期。
|
|
4
|
+
- **Schema**: `on` / `once` / `off` 接口定义。
|
|
5
|
+
- **Concepts**: Gesture Events, State Events, Pano Events, Model Events, Lifecycle Events.
|
|
6
|
+
- **Examples**: 监听全景移动、手势交互及状态变更。
|
|
7
|
+
|
|
8
|
+
## Schema
|
|
9
|
+
|
|
10
|
+
> **Definition**: [Five](../../five/application/five.d.ts), [EventTypes](../../five/application/events.d.ts)
|
|
11
|
+
|
|
12
|
+
Five 实例提供了以下方法来管理事件监听:
|
|
13
|
+
|
|
14
|
+
### on
|
|
15
|
+
注册持久化事件监听器。
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
five.on(
|
|
19
|
+
name: string,
|
|
20
|
+
callback: (...args: any[]) => void,
|
|
21
|
+
once?: boolean
|
|
22
|
+
): () => void
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- **name**: 事件名称(支持的事件见 Concepts)。
|
|
26
|
+
- **callback**: 事件触发时的回调函数。
|
|
27
|
+
- **once**: (可选) 是否仅执行一次,默认为 `false`。
|
|
28
|
+
- **返回**: 一个函数,调用该函数可取消当前监听。
|
|
29
|
+
|
|
30
|
+
### once
|
|
31
|
+
注册一次性事件监听器(触发一次后自动销毁)。
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
five.once(
|
|
35
|
+
name: string,
|
|
36
|
+
callback: (...args: any[]) => void
|
|
37
|
+
): () => void
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### off
|
|
41
|
+
取消事件监听。
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
five.off(
|
|
45
|
+
name?: string,
|
|
46
|
+
callback?: (...args: any[]) => void
|
|
47
|
+
): void
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- **name**: (可选) 若不传,则清空所有事件;若传,则取消指定类型的事件。
|
|
51
|
+
- **callback**: (可选) 若传,则仅取消该特定的回调函数;若不传,则取消该类型下的所有回调。
|
|
52
|
+
|
|
53
|
+
## Concepts
|
|
54
|
+
|
|
55
|
+
Five 的事件系统将事件主要分为以下几类:
|
|
56
|
+
|
|
57
|
+
### Gesture Events (交互手势)
|
|
58
|
+
监听用户的鼠标或触摸操作。
|
|
59
|
+
|
|
60
|
+
- `gesture.tap`: 点击/轻触。
|
|
61
|
+
- `gesture.dbltap`: 双击/双击轻触。
|
|
62
|
+
- `gesture.press`: 长按。
|
|
63
|
+
- `gesture.pan`: 平移/拖拽。
|
|
64
|
+
- `gesture.pinch`: 缩放(双指或滚轮)。
|
|
65
|
+
- `gesture.mousewheel`: 鼠标滚轮滚动。
|
|
66
|
+
- `gesture.mousemove`: 鼠标移动。
|
|
67
|
+
|
|
68
|
+
### Pano Events (全景导航)
|
|
69
|
+
监听全景图的点位切换过程。
|
|
70
|
+
|
|
71
|
+
- `pano.arrived`: 成功到达新点位(移动动画结束)。
|
|
72
|
+
- `pano.moving`: 正在移动到新点位(动画进行中)。
|
|
73
|
+
- `pano.willChange`: 即将发生点位变更(旧版兼容)。
|
|
74
|
+
- `pano.error`: 点位加载或移动出错。
|
|
75
|
+
|
|
76
|
+
### State Events (状态变更)
|
|
77
|
+
监听 Five 内部状态(State)的变化,常用于 UI 同步或数据记录。
|
|
78
|
+
|
|
79
|
+
- `state.change`: 状态发生变更(可能是用户操作或代码触发)。
|
|
80
|
+
- `currentState.change`: 当前状态发生变更(通常指即时状态)。
|
|
81
|
+
- `state.synced`: 状态已同步。
|
|
82
|
+
|
|
83
|
+
### Model & Work Events (数据加载)
|
|
84
|
+
监听场景数据(Work)或模型(Model)的加载生命周期。
|
|
85
|
+
|
|
86
|
+
- `works.load`: Work 数据开始加载。
|
|
87
|
+
- `works.ready`: Work 数据加载完成且 Controller 就绪。
|
|
88
|
+
- `model.load`: 模型开始加载。
|
|
89
|
+
- `models.load`: 所有模型加载完成。
|
|
90
|
+
|
|
91
|
+
### Render Events (渲染循环)
|
|
92
|
+
监听每一帧的渲染过程。
|
|
93
|
+
|
|
94
|
+
- `render`: 每一帧渲染后触发。
|
|
95
|
+
- `render.prepare`: 每一帧渲染前触发。
|
|
96
|
+
|
|
97
|
+
## Examples
|
|
98
|
+
|
|
99
|
+
### 快速上手 (Quick Example)
|
|
100
|
+
监听点击事件并打印日志。
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
import { Five } from "@realsee/five";
|
|
104
|
+
|
|
105
|
+
const five = new Five();
|
|
106
|
+
|
|
107
|
+
// 监听点击事件
|
|
108
|
+
five.on("gesture.tap", (pose) => {
|
|
109
|
+
console.log("User tapped at:", pose);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// 监听点位变更完成
|
|
113
|
+
five.on("pano.arrived", (index) => {
|
|
114
|
+
console.log("Arrived at pano index:", index);
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 进阶用法 (Advanced Usage)
|
|
119
|
+
使用 `once` 监听一次性初始化事件,使用返回值取消监听。
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
// 1. 等待首次数据加载完成
|
|
123
|
+
five.once("works.ready", () => {
|
|
124
|
+
console.log("Five is ready!");
|
|
125
|
+
// 执行初始化逻辑,如自动巡游
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// 2. 动态绑定与解绑
|
|
129
|
+
const onRender = () => {
|
|
130
|
+
// 每一帧执行的逻辑
|
|
131
|
+
updateUI();
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// 开始监听
|
|
135
|
+
five.on("render", onRender);
|
|
136
|
+
|
|
137
|
+
// 在某个时刻取消监听(例如组件销毁时)
|
|
138
|
+
// five.off("render", onRender);
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Debugging
|
|
142
|
+
|
|
143
|
+
- 使用 `five.on("error", (err) => console.error(err))` 捕获全局错误。
|
|
144
|
+
|
|
145
|
+
## Related
|
|
146
|
+
|
|
147
|
+
- [state.md](./state.md): 了解 State 的结构与变更机制。
|
|
148
|
+
- [five.md](./five.md): Five 核心类说明。
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
tags: [events, interaction, lifecycle, gesture, state]
|
|
154
|
+
```
|