@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,146 @@
|
|
|
1
|
+
# 多 Work (沙盘) 场景 (Multi-Work / Sandbox)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 在同一个 Five 实例中加载和管理多个 Work 数据(如沙盘场景),实现多楼盘/多户型的同屏展示与切换。
|
|
4
|
+
- **Schema**: `Work[]`, `LooseWorkWithExtrinsics`, `FiveLoadOptions`.
|
|
5
|
+
- **Concepts**: WorkCode, Works Collection, Coordinate Transform.
|
|
6
|
+
- **Configuration**: `five.load()` 参数配置。
|
|
7
|
+
- **Examples**: 加载多个 Work、动态添加 Work、Work 间切换。
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [FiveLoadOptions](../../five/application/fiveLoadOptions.d.ts), [LooseWorkWithExtrinsics](../../five/work/looseWorkType.d.ts)
|
|
12
|
+
|
|
13
|
+
### 核心类型定义
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
// 输入数据类型
|
|
17
|
+
type FiveLoadInput =
|
|
18
|
+
| Work[]
|
|
19
|
+
| LooseWorkWithExtrinsics[]
|
|
20
|
+
| string[]; // JSON Strings
|
|
21
|
+
|
|
22
|
+
// 带位姿信息的 LooseWork (用于调整模型在场景中的位置)
|
|
23
|
+
interface LooseWorkWithExtrinsics {
|
|
24
|
+
work: LooseWork; // Work 数据内容
|
|
25
|
+
transform?: number[]; // 4x4 变换矩阵 (数组格式), 用于整体偏移/旋转该 Work
|
|
26
|
+
workCode?: string; // 强制指定 WorkCode (覆盖数据中的默认值)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 加载选项
|
|
30
|
+
interface FiveLoadOptions {
|
|
31
|
+
mode?: "replace" | "add"; // 替换当前场景 vs 追加到当前场景
|
|
32
|
+
// ... 其他常规选项
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Concepts
|
|
37
|
+
|
|
38
|
+
### 1. Works Collection (数据集)
|
|
39
|
+
当 Five 加载多个 Work 时,它们被存储在 `five.works` 集合中。
|
|
40
|
+
- `five.works` 是一个增强的只读数组 (`ReadonlyArray<Work>`)。
|
|
41
|
+
- 提供了 `getWork(workCode)` 和 `getObserver(panoId)` 等辅助方法。
|
|
42
|
+
|
|
43
|
+
### 2. WorkCode (唯一标识)
|
|
44
|
+
在多 Work 场景中,`workCode` 是区分不同 Work 的关键。
|
|
45
|
+
- **必须唯一**: 加载的每个 Work 必须有唯一的 `workCode`。如果数据中重复,建议在加载时通过 `ParseOptions` 重写。
|
|
46
|
+
- **状态索引**: `five.state` 和 `five.setState` 中需要通过 `workCode` 来指定目标 Work。
|
|
47
|
+
|
|
48
|
+
### 3. Coordinate Alignment (坐标对齐)
|
|
49
|
+
不同 Work 的原始模型可能位于其各自的坐标系原点。为了在沙盘中正确排列它们(避免重叠),需要使用 `transform` 矩阵对每个 Work 进行空间变换(平移、旋转)。
|
|
50
|
+
|
|
51
|
+
## Configuration
|
|
52
|
+
|
|
53
|
+
`five.load(input, state, options)` 是入口方法。
|
|
54
|
+
|
|
55
|
+
| 参数 | 类型 | 说明 |
|
|
56
|
+
| :--- | :--- | :--- |
|
|
57
|
+
| `input` | `FiveLoadInput` | Work 数据数组。 |
|
|
58
|
+
| `options.mode` | `"replace" \| "add"` | 默认为 `"replace"` (清空当前场景)。设为 `"add"` 可保留现有场景并追加新 Work。 |
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
### 1. 基础加载 (Basic Loading)
|
|
63
|
+
一次性加载两个 Work。
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
const works = [workDataA, workDataB];
|
|
67
|
+
|
|
68
|
+
five.load(works).then(() => {
|
|
69
|
+
console.log("所有 Work 加载完成");
|
|
70
|
+
console.log("当前 Works:", five.works);
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2. 沙盘排布 (Sandbox Layout)
|
|
75
|
+
使用 `transform` 将两个户型并排摆放。
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import * as THREE from "three";
|
|
79
|
+
|
|
80
|
+
// 创建变换矩阵:向 X 轴正方向平移 20 米
|
|
81
|
+
const matrixB = new THREE.Matrix4().makeTranslation(20, 0, 0);
|
|
82
|
+
|
|
83
|
+
const input = [
|
|
84
|
+
// Work A: 保持在原点
|
|
85
|
+
{ work: workDataA },
|
|
86
|
+
// Work B: 偏移位置
|
|
87
|
+
{
|
|
88
|
+
work: workDataB,
|
|
89
|
+
transform: matrixB.toArray()
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
five.load(input);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 3. 动态添加 (Dynamic Add)
|
|
97
|
+
在不销毁当前场景的情况下,追加一个新的 Work。
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// 假设当前已经加载了 Work A
|
|
101
|
+
// 追加 Work C
|
|
102
|
+
five.load(workDataC, undefined, {
|
|
103
|
+
mode: "add" // 关键参数
|
|
104
|
+
}).then(() => {
|
|
105
|
+
console.log("Work C 已加入场景");
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4. Work 间切换 (Switching Works)
|
|
110
|
+
跳转到指定 Work 的特定点位。
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
const targetWorkCode = "work-id-b";
|
|
114
|
+
|
|
115
|
+
// 方式一:指定点位索引
|
|
116
|
+
five.setState({
|
|
117
|
+
workCode: targetWorkCode,
|
|
118
|
+
panoIndex: 0, // 目标 Work 的第 0 个点位
|
|
119
|
+
mode: "Panorama"
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// 方式二:查找特定 Work
|
|
123
|
+
const targetWork = five.works.getWork(targetWorkCode);
|
|
124
|
+
if (targetWork) {
|
|
125
|
+
// 你的业务逻辑
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Common Pitfalls
|
|
130
|
+
|
|
131
|
+
1. **WorkCode 冲突**: 如果加载的两个 Work 拥有相同的 `workCode`,SDK 行为可能不可预期。务必确保唯一性。
|
|
132
|
+
* *解决*: 在构造 `LooseWorkWithExtrinsics` 时传入 `workCode` 字段强制覆盖。
|
|
133
|
+
2. **资源隔离**: 每个 Work 的纹理/模型请求是独立的。如果 Work A 和 Work B 引用了相同的 URL 资源,浏览器缓存会生效,但 SDK 内部逻辑仍视为独立资源。
|
|
134
|
+
3. **内存压力**: 同时加载多个大型模型会显著增加显存占用。建议根据设备性能限制同时加载的 Work 数量。
|
|
135
|
+
4. **坐标系混淆**: `transform` 仅影响 3D 模型的渲染位置。Work 内部的点位坐标 (`observer.position`) 也会自动应用此变换,但开发者在进行手动射线检测或计算时,需注意区分**原始坐标**和**世界坐标**。
|
|
136
|
+
|
|
137
|
+
## Related
|
|
138
|
+
|
|
139
|
+
* [Five](./five.md): Five 核心类说明。
|
|
140
|
+
* [State](./state.md): 状态管理说明。
|
|
141
|
+
* [Work](./work.md): Work 数据结构详解。
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
```yaml
|
|
145
|
+
tags: [multi-work, sandbox, works, load, transform]
|
|
146
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Panorama Tile
|
|
2
|
+
|
|
3
|
+
- **Summary**: 全景模式下的瓦片加载策略,支持多分辨率层级(LOD)和视锥体裁剪,以优化全景浏览的性能和清晰度。
|
|
4
|
+
- **Schema**: WorkTile 接口及相关配置参数。
|
|
5
|
+
- **Concepts**: LOD (Level of Detail), Frustum Culling, Tile URL Generation.
|
|
6
|
+
- **Configuration**: tileLevelForFov, tileMaxRequest, imageOptions.
|
|
7
|
+
- **Examples**: 瓦片数据结构查看与 Five 初始化配置。
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [WorkImage](../../five/work/work.d.ts), [ImageOptions](../../five/types/imageOptions.d.ts)
|
|
12
|
+
|
|
13
|
+
### WorkObserver.images
|
|
14
|
+
点位全景图数据结构,包含瓦片列表。
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
interface WorkImage {
|
|
18
|
+
/** 分辨率列表 */
|
|
19
|
+
sizeList: readonly number[];
|
|
20
|
+
/** 瓦片信息列表,按 level 排序 */
|
|
21
|
+
tiles: readonly WorkTile[];
|
|
22
|
+
// ... 其他基础图片 URL
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### ImageOptions
|
|
27
|
+
全景图及瓦片的图片处理配置。
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
interface ImageOptions {
|
|
31
|
+
/** 图片尺寸参数 (例如 512, 1024...) */
|
|
32
|
+
size?: number;
|
|
33
|
+
/** 图片质量参数 (0-100) */
|
|
34
|
+
quality?: number;
|
|
35
|
+
/** 图片格式参数 */
|
|
36
|
+
format?: "jpg" | "jpeg" | "png" | "heif" | "heic" | "webp" | "avif";
|
|
37
|
+
/** URL 转换函数 */
|
|
38
|
+
transform?: (url: string, options: ImageURLOptions) => string;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Concepts
|
|
43
|
+
|
|
44
|
+
### Tile Parsing (瓦片解析)
|
|
45
|
+
在 `Five` 加载 `Work` 数据时,`WorkParser` 会解析 `panorama.size_list` (或 `panorama.tiles`) 字段。
|
|
46
|
+
- **Level 计算**: `level = log2(size / 512)`。
|
|
47
|
+
- **URL 生成**:
|
|
48
|
+
- 如果 `size > baseSize` (通常是初始全景图大小),URL 中的 `/cube_{size}/` 部分会被动态替换(通过 `replaceImageSize` 函数)。
|
|
49
|
+
- 如果 `size <= baseSize`,直接使用基础全景图 URL,并设置 `scale`。
|
|
50
|
+
- **排序**: 解析后的 `tiles` 数组会按 `level` 升序排列。
|
|
51
|
+
|
|
52
|
+
### sizeList
|
|
53
|
+
- **类型**: `readonly number[]`
|
|
54
|
+
- **说明**: 包含所有可用的分辨率(以像素为单位)。
|
|
55
|
+
- **示例**: `[2048, 6144]` 表示该点位全景图有两个层级,分别是 2048px 和 6144px。
|
|
56
|
+
- **图片路径**: 每个层级的图片路径都是 `cube_{size}`,`{size}` 是层级分辨率,必须与 `sizeList` 中的值对应。并必须存在 2048px 层级的图片。
|
|
57
|
+
|
|
58
|
+
### Level of Detail (LOD) & Loading Strategy
|
|
59
|
+
`PanoramaController` 使用 `Tiling` 类来管理瓦片加载:
|
|
60
|
+
- **LOD 选择**: 根据当前的视场角 (`FOV`) 和视图大小 (`viewSize`),计算所需的最佳瓦片层级。默认策略会优先保证画面清晰度,同时考虑网络开销。
|
|
61
|
+
- **视锥体裁剪 (Frustum Culling)**: 仅加载当前相机视锥体可见范围内的瓦片面。
|
|
62
|
+
- **并发控制**: 通过 `tileMaxRequest` 限制同时进行的网络请求数量,避免阻塞。
|
|
63
|
+
|
|
64
|
+
## Configuration
|
|
65
|
+
|
|
66
|
+
在初始化 `Five` 时,可以通过 `panorama` 配置参数来配置瓦片加载行为。
|
|
67
|
+
|
|
68
|
+
| Parameter | Type | Default | Description |
|
|
69
|
+
| :--- | :--- | :--- | :--- |
|
|
70
|
+
| `tileLevelForFov` | `(fov: number, viewSize: Vector2) => number` \| `false` | `undefined` | 自定义函数,用于根据当前 FOV 和视图尺寸决定加载哪个层级的瓦片。返回 `level` 数值。如果设置为 `false`,则禁用动态瓦片加载。默认使用内部策略。 |
|
|
71
|
+
| `tileMaxRequest` | `number` | `3` | 最大的瓦片图片并发请求数。增加此值可能加快加载速度,但也可能导致网络拥塞。 |
|
|
72
|
+
| `imageOptions` | `ImageOptions` | `undefined` | 全景图及瓦片的图片处理配置。可用于全局控制图片的加载格式(如强制使用 WebP)、质量压缩比例或通过 `transform` 函数自定义图片 URL。 |
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
### 查看瓦片数据结构
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
import { Five } from "@realsee/five";
|
|
80
|
+
|
|
81
|
+
const five = new Five();
|
|
82
|
+
|
|
83
|
+
five.on("loaded", () => {
|
|
84
|
+
const observer = five.work.observers[0];
|
|
85
|
+
if (observer && observer.images && observer.images.tiles) {
|
|
86
|
+
console.log("Available Tiles:", observer.images.tiles);
|
|
87
|
+
observer.images.tiles.forEach(tile => {
|
|
88
|
+
console.log(`Level: ${tile.level}, Size: ${tile.size}, Scale: ${tile.scale}`);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 配置瓦片加载策略与图片参数
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
import { Five } from "@realsee/five";
|
|
98
|
+
|
|
99
|
+
const five = new Five({
|
|
100
|
+
// 自定义瓦片层级选择策略
|
|
101
|
+
tileLevelForFov: (fov, viewSize) => {
|
|
102
|
+
// 简单示例:FOV 小于 60 度时强制使用 Level 2,否则使用 Level 1
|
|
103
|
+
if (fov < 60) {
|
|
104
|
+
return 2;
|
|
105
|
+
}
|
|
106
|
+
return 1;
|
|
107
|
+
},
|
|
108
|
+
// 限制并发请求数
|
|
109
|
+
tileMaxRequest: 6,
|
|
110
|
+
// 图片加载配置
|
|
111
|
+
imageOptions: {
|
|
112
|
+
// 强制请求 WebP 格式的图片
|
|
113
|
+
format: "webp",
|
|
114
|
+
// 图片质量设置为 80%
|
|
115
|
+
quality: 80,
|
|
116
|
+
// (可选) 自定义 URL 转换逻辑
|
|
117
|
+
// transform: (url, options) => {
|
|
118
|
+
// return url + `?x-oss-process=image/format,webp/quality,q_80`;
|
|
119
|
+
// }
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Related
|
|
125
|
+
- [Mode](./mode.md): 了解不同模态下 Work 数据的表现。
|
|
126
|
+
- [ImageOptions](./image-options.md): 了解图片加载配置选项。
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
tags: [pano-tile, observer]
|
|
132
|
+
```
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# 全景图 UV 与方向转换 (Panorama UV Conversion)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 提供了一组工具方法,用于在**全景图 UV 坐标** (Equirectangular UV / Cubemap UV) 与**三维空间方向向量** (Vector3) 之间进行转换。
|
|
4
|
+
- **Schema**: 依赖 `WorkObserver` 实例,提供四个核心转换方法。
|
|
5
|
+
- **Concepts**: Equirectangular Projection, Cubemap Projection, UV Origin, Coordinate Systems.
|
|
6
|
+
- **Configuration**: `uvOrigin` (UV 原点设置).
|
|
7
|
+
- **Examples**: 向量转全景 UV、UV 转向量、Cubemap 转换。
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [WorkObserver](../../five/work/work.d.ts)
|
|
12
|
+
|
|
13
|
+
这些方法挂载在 `WorkObserver` 实例上,依赖当前观察点 (Observer) 的位姿信息 (Position & Quaternion) 以及 `work.transform` 进行计算。
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
interface WorkObserver {
|
|
17
|
+
/**
|
|
18
|
+
* 将方向向量转化为全景图 uv
|
|
19
|
+
* @param vector - 全局方向向量 (World Space)
|
|
20
|
+
* @param uvOrigin - UV 原点位置,默认为 'top-left'
|
|
21
|
+
*/
|
|
22
|
+
vectorToEquirectangularUv(vector: THREE.Vector3, uvOrigin?: 'top-left' | 'bottom-left'): THREE.Vector2;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 将全景图 uv 转化为方向向量
|
|
26
|
+
* @param uv - 全景图 UV 坐标 [0, 1]
|
|
27
|
+
* @param uvOrigin - UV 原点位置,默认为 'top-left'
|
|
28
|
+
*/
|
|
29
|
+
equirectangularUvToVector(uv: THREE.Vector2, uvOrigin?: 'top-left' | 'bottom-left'): THREE.Vector3;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 将方向向量转化为六视图 uv
|
|
33
|
+
* @param vector - 全局方向向量 (World Space)
|
|
34
|
+
* @param uvOrigin - UV 原点位置,默认为 'top-left'
|
|
35
|
+
*/
|
|
36
|
+
vectorToCubemapUv(vector: THREE.Vector3, uvOrigin?: 'top-left' | 'bottom-left'): [cubeFace: CubeFace, cubemapUv: THREE.Vector2];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 将六视图 uv 转化为方向向量
|
|
40
|
+
* @param cubeFace - 立方体面 ('up' | 'down' | 'left' | 'right' | 'front' | 'back')
|
|
41
|
+
* @param uv - 该面上的 UV 坐标 [0, 1]
|
|
42
|
+
* @param uvOrigin - UV 原点位置,默认为 'top-left'
|
|
43
|
+
*/
|
|
44
|
+
cubemapUvToVector(cubeFace: CubeFace, uv: THREE.Vector2, uvOrigin?: 'top-left' | 'bottom-left'): THREE.Vector3;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type CubeFace = 'up' | 'down' | 'left' | 'right' | 'front' | 'back';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Concepts
|
|
51
|
+
|
|
52
|
+
### 1. 坐标系转换 (Coordinate Transformation)
|
|
53
|
+
转换过程会自动处理以下坐标空间的变换:
|
|
54
|
+
1. **World Space (世界坐标系)**: `vector` 参数所处的坐标系。
|
|
55
|
+
2. **Work Space (Work 坐标系)**: 考虑 `work.transform` 带来的整体旋转。
|
|
56
|
+
3. **Observer Space (观察者坐标系)**: 考虑 `observer.quaternion` 带来的观察点旋转。
|
|
57
|
+
4. **Panorama Space (全景图空间)**: 最终映射到 2D 图片上的 UV 坐标。
|
|
58
|
+
|
|
59
|
+
### 2. 投影方式 (Projection Types)
|
|
60
|
+
* **Equirectangular (等距柱状投影)**: 将球体展开为 2:1 的矩形图片。常用于全景图预览。
|
|
61
|
+
* **Cubemap (立方体贴图)**: 将球体投影到立方体的六个面上。常用于高清全景浏览。
|
|
62
|
+
|
|
63
|
+
### 3. UV 原点 (UV Origin)
|
|
64
|
+
* **top-left (默认)**: 原点 `(0, 0)` 在图片**左上角**。U 轴向右,V 轴向下。符合大多数 Web 图片处理习惯 (Canvas, DOM)。
|
|
65
|
+
* **bottom-left**: 原点 `(0, 0)` 在图片**左下角**。U 轴向右,V 轴向上。符合 WebGL / OpenGL 纹理坐标习惯。
|
|
66
|
+
|
|
67
|
+
## Configuration
|
|
68
|
+
|
|
69
|
+
所有方法均包含可选参数 `uvOrigin`。
|
|
70
|
+
|
|
71
|
+
### Common Configuration
|
|
72
|
+
|
|
73
|
+
| Parameter | Type | Default | Description |
|
|
74
|
+
| :--- | :--- | :--- | :--- |
|
|
75
|
+
| `uvOrigin` | `'top-left' \| 'bottom-left'` | `'top-left'` | 指定 UV 坐标系的原点位置。 |
|
|
76
|
+
|
|
77
|
+
## Examples
|
|
78
|
+
|
|
79
|
+
### 1. 点击全景图获取空间方向 (Click to Vector)
|
|
80
|
+
假设你有一个全景图的点击事件,获取到了点击位置的 UV:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
const observer = five.work.observers[0];
|
|
84
|
+
// 假设这是用户点击全景图后归一化得到的 UV (0~1)
|
|
85
|
+
const clickUv = new THREE.Vector2(0.5, 0.5);
|
|
86
|
+
|
|
87
|
+
// 转换为世界空间的方向向量
|
|
88
|
+
const direction = observer.equirectangularUvToVector(clickUv);
|
|
89
|
+
|
|
90
|
+
console.log('点击方向:', direction);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 2. 将空间点映射到全景图上 (World Point to UV)
|
|
94
|
+
假设场景中有一个 3D 物体,你想知道它在当前全景图上的位置(例如打标签):
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
const observer = five.work.observers[0];
|
|
98
|
+
const objectPosition = new THREE.Vector3(10, 2, 5);
|
|
99
|
+
|
|
100
|
+
// 计算物体相对于观察点的方向向量
|
|
101
|
+
const direction = objectPosition.clone().sub(observer.position).normalize();
|
|
102
|
+
|
|
103
|
+
// 获取全景图 UV
|
|
104
|
+
const uv = observer.vectorToEquirectangularUv(direction);
|
|
105
|
+
|
|
106
|
+
console.log(`物体在全景图上的位置: u=${uv.x}, v=${uv.y}`);
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 3. 处理 Cubemap 坐标 (Cubemap Conversion)
|
|
110
|
+
如果你使用的是六面体全景图资源:
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
const observer = five.work.observers[0];
|
|
114
|
+
const direction = new THREE.Vector3(0, 0, -1); // 正前方
|
|
115
|
+
|
|
116
|
+
// 获取对应的面和 UV
|
|
117
|
+
const [face, uv] = observer.vectorToCubemapUv(direction);
|
|
118
|
+
|
|
119
|
+
console.log(`正前方对应 Cubemap 的 ${face} 面,UV 为`, uv);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Related
|
|
123
|
+
|
|
124
|
+
* [Work](./work.md): 了解 WorkObserver 的数据结构。
|
|
125
|
+
* [Coordinate System](./coordinate-system.md): 了解 Five 的坐标系定义。
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
tags: [work, observer, uv, projection, math]
|
|
131
|
+
```
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Parameter (配置系统)
|
|
2
|
+
|
|
3
|
+
- **Summary**: Five 用于控制三维模型渲染表现的核心配置系统,采用树形继承设计。
|
|
4
|
+
- **Schema**: 是所有配置项的容器,通过继承机制管理 Material 和 3DTile 等子配置。
|
|
5
|
+
- **Concepts**: Hierarchy (树形继承), Override (覆盖), Resolution (解析)。
|
|
6
|
+
- **Examples**: 全局配置、局部覆盖、参数重置。
|
|
7
|
+
|
|
8
|
+
## Schema
|
|
9
|
+
|
|
10
|
+
> **Definition**: [Parameter](../../five/model/parameter.d.ts)
|
|
11
|
+
|
|
12
|
+
`Parameter` 类是配置的入口。它并不直接包含所有配置字段的定义,而是将它们组织在不同的接口中。
|
|
13
|
+
|
|
14
|
+
### Parameter Categories (参数分类)
|
|
15
|
+
|
|
16
|
+
为了便于理解,我们将参数分为两大类:
|
|
17
|
+
|
|
18
|
+
| Category | Description | Link |
|
|
19
|
+
| :--- | :--- | :--- |
|
|
20
|
+
| **Material & Appearance** | 控制“长什么样”。包括材质、颜色、楼层显示、阴影、点云样式等。 | [Material Params](./material.md) |
|
|
21
|
+
| **3DTile & Performance** | 控制“怎么加载”。包括 LOD (细节层级)、显存配额、网络并发、SSE 阈值等。 | [3DTile Params](./3dtile.md) |
|
|
22
|
+
|
|
23
|
+
### Parameter Class API
|
|
24
|
+
|
|
25
|
+
#### 1. Getting Values (获取值)
|
|
26
|
+
|
|
27
|
+
获取参数值**不使用** `get()` 方法,而是直接访问属性。
|
|
28
|
+
|
|
29
|
+
* **Direct Access (直接访问)**: 获取当前 `Parameter` 实例上设置的值。如果未设置,返回 `undefined`。
|
|
30
|
+
* **Resolve Value (计算最终值)**: 获取经过树形继承计算后的最终生效值。
|
|
31
|
+
* 如果不传参,则基于默认值计算 (Default -> Current)。
|
|
32
|
+
* 如果传入上游 Parameter,则基于默认值 + 上游 Parameter 计算 (Default -> Upstream -> Current)。
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// 方式 A: 直接访问 (获取当前层级配置)
|
|
36
|
+
const currentVal = parameter.maxMemoryUsage;
|
|
37
|
+
|
|
38
|
+
// 方式 B: 计算最终值 (包含继承逻辑)
|
|
39
|
+
|
|
40
|
+
// 1. 基础用法:仅继承默认值
|
|
41
|
+
const finalVal = parameter.resolveValue().maxMemoryUsage;
|
|
42
|
+
|
|
43
|
+
// 2. 进阶用法:指定继承源 (例如 ViewLayer 继承自 Model)
|
|
44
|
+
const inheritedVal = viewLayerParam.resolveValue(parentParameter).maxMemoryUsage;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### 2. Methods (方法)
|
|
48
|
+
|
|
49
|
+
`Parameter` 实例提供了以下核心方法来管理配置:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
class Parameter {
|
|
53
|
+
/**
|
|
54
|
+
* 设置配置项
|
|
55
|
+
* @param key 参数名 (如 'opacity', 'maxMemoryUsage')
|
|
56
|
+
* @param value 参数值
|
|
57
|
+
*/
|
|
58
|
+
set(key: string, value: any): void;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 重置配置项(移除当前层级的设置,恢复继承上游的值)
|
|
62
|
+
* @param keys 要重置的参数名列表
|
|
63
|
+
*/
|
|
64
|
+
reset(...keys: string[]): void;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 获取经过继承计算后的最终值
|
|
68
|
+
* @param upstream 上游 Parameter 对象列表(通常由引擎自动传入)
|
|
69
|
+
*/
|
|
70
|
+
resolveValue(...upstream: Parameter[]): ResolvedParameterValue;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Concepts
|
|
75
|
+
|
|
76
|
+
### 树形继承关系 (Hierarchy)
|
|
77
|
+
|
|
78
|
+
Parameter 遵循 **“就近原则” (Override)** 的继承逻辑。
|
|
79
|
+
|
|
80
|
+
1. **ViewLayer Parameter**: 最具体,优先级最高。通常对应一个具体的 `.gltf` 文件或数据块。
|
|
81
|
+
2. **Model Parameter**: 覆盖该 Model 下的所有 ViewLayer。一个 Model 可能包含多个 ViewLayer (如 Mesh 层和 PointCloud 层)。
|
|
82
|
+
3. **ModelScene Parameter**: 全局默认值,优先级最低。影响整个场景。
|
|
83
|
+
|
|
84
|
+
```mermaid
|
|
85
|
+
graph TD
|
|
86
|
+
Scene[ModelScene.parameter] -->|Inherit| Model[Model.parameter]
|
|
87
|
+
Model -->|Inherit| Layer1[ViewLayer.parameter]
|
|
88
|
+
Model -->|Inherit| Layer2[ViewLayer.parameter]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
> **Global Configuration (全局设置)**:
|
|
92
|
+
> 若需修改所有模型的默认表现(如统一调暗亮度、统一设置显存上限),**请直接配置 `five.modelScene.parameter`**。它是继承链的根节点,其设置会向下传递给所有 Model 和 ViewLayer。
|
|
93
|
+
>
|
|
94
|
+
> **Why modelScene? (生命周期优势)**:
|
|
95
|
+
> `Model` 实例是跟随 Work 加载生命周期的(需 `five.load(work)` 后才能访问,且切换 Work 会销毁重建)。
|
|
96
|
+
> 相比之下,`ModelScene` 是常驻对象。因此,**使用 `modelScene` 进行配置更安全且持久**,既无需等待 Work 加载完成,也无需担心切换 Work 导致配置丢失。
|
|
97
|
+
|
|
98
|
+
## Examples
|
|
99
|
+
|
|
100
|
+
### 1. 基础配置 (Basic Usage)
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
// 1. 设置全局最大显存 (影响所有模型)
|
|
104
|
+
five.modelScene.parameter.set('maxMemoryUsage', 512);
|
|
105
|
+
|
|
106
|
+
// 2. 设置全局半透明
|
|
107
|
+
five.modelScene.parameter.set('opacity', 0.5);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 2. 局部覆盖 (Override)
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
// 场景中大部分模型不产生阴影
|
|
114
|
+
five.modelScene.parameter.set('castShadow', false);
|
|
115
|
+
|
|
116
|
+
// 但让特定的“主角”模型产生阴影
|
|
117
|
+
const heroModel = five.models[0];
|
|
118
|
+
heroModel.parameter.set('castShadow', true);
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 3. 重置配置 (Reset)
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// 假设之前设置了 opacity
|
|
125
|
+
five.modelScene.parameter.set('opacity', 0.5);
|
|
126
|
+
|
|
127
|
+
// ... 一段时间后 ...
|
|
128
|
+
|
|
129
|
+
// 移除该设置,恢复默认值 (或继承值)
|
|
130
|
+
five.modelScene.parameter.reset('opacity');
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 4. 获取配置 (Get Value)
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
// 获取当前对象上的配置(如果未设置,则为 undefined)
|
|
137
|
+
const ownOpacity = five.modelScene.parameter.opacity;
|
|
138
|
+
|
|
139
|
+
// 获取最终生效的配置(计算继承链后的值)
|
|
140
|
+
const finalOpacity = five.modelScene.parameter.resolveValue().opacity;
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Related
|
|
144
|
+
|
|
145
|
+
* [Material Parameters](./material.md): 材质与外观参数详情。
|
|
146
|
+
* [3DTile Parameters](./3dtile.md): 性能与加载参数详情。
|
|
147
|
+
* [Model](./model.md): Parameter 的宿主。
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
tags: [parameter, config, hierarchy, api]
|
|
153
|
+
```
|