@realsee/five 6.8.0-alpha.2 → 6.8.0-alpha.21
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 +9 -6
- package/{guides → ai_guides}/README.md +12 -2
- package/ai_guides/ai-doc-guidelines.md +102 -0
- package/{guides → ai_guides}/api.md +24 -1
- package/ai_guides/features/3dtile.md +172 -0
- package/{guides → ai_guides}/features/camera-animation.md +24 -3
- package/{guides → ai_guides}/features/clipper.md +2 -0
- package/{guides/features/coordnate-system.md → ai_guides/features/coordinate-system.md} +2 -0
- package/{guides → ai_guides}/features/event.md +2 -0
- package/{guides → ai_guides}/features/five.md +4 -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/{guides → ai_guides}/features/gesture.md +3 -0
- package/{guides → ai_guides}/features/get-screen-pixels.md +2 -0
- package/{guides → ai_guides}/features/image-options.md +3 -0
- package/{guides → ai_guides}/features/load-external-model.md +21 -0
- package/ai_guides/features/load-progress.md +140 -0
- package/ai_guides/features/material.md +153 -0
- package/{guides → ai_guides}/features/mode.md +4 -0
- package/{guides → ai_guides}/features/model.md +4 -1
- package/{guides → ai_guides}/features/move-pano-effect.md +2 -0
- package/{guides → ai_guides}/features/multi-work.md +2 -0
- package/ai_guides/features/pano-filter.md +148 -0
- package/{guides → ai_guides}/features/pano-tile.md +7 -14
- 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/{guides → ai_guides}/features/postprocessing.md +39 -4
- package/{guides → ai_guides}/features/raycast.md +11 -0
- package/{guides → ai_guides}/features/request-proxy.md +2 -0
- package/{guides → ai_guides}/features/screen-project.md +2 -0
- package/{guides → ai_guides}/features/state.md +2 -0
- package/ai_guides/features/view-layer.md +187 -0
- package/{guides → ai_guides}/features/work.md +63 -2
- package/{guides → ai_guides}/glossary.md +26 -5
- package/{guides → ai_guides}/intro.md +1 -1
- package/{guides → ai_guides}/quick-start.md +1 -0
- package/ai_guides/release_notes/6.8.md +208 -0
- package/{guides → ai_guides}/template.md +17 -3
- package/docs/00_FOR_AI_AGENTS.md +11 -0
- package/docs/README.md +4 -7
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
- package/docs/classes/five.BoundingMesh.html +2 -2
- package/docs/classes/five.Camera.html +1 -1
- package/docs/classes/five.EyeDomeLightingPass.html +1 -1
- package/docs/classes/five.Five.html +73 -72
- package/docs/classes/five.FivePass.html +1 -1
- package/docs/classes/five.Histogram.html +19 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +31 -31
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMCustomShader.html +42 -3
- package/docs/classes/five.PBMGSObject.html +5 -3
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +16 -7
- package/docs/classes/five.PBMPanoFilter.html +61 -0
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PBMUpdateable.html +41 -0
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.Parameter.html +57 -53
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +1 -1
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +30 -26
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Trajectory.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +27 -2
- 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 +1 -1
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.GLTFParser.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.ParticleGPU.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +11 -2
- package/docs/documents/ai-doc-guidelines.html +60 -15
- package/docs/documents/api.html +40 -15
- package/docs/documents/features_3dtile.html +142 -45
- package/docs/documents/features_camera-animation.html +62 -5
- package/docs/documents/features_clipper.html +3 -0
- package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +4 -1
- package/docs/documents/features_event.html +3 -0
- package/docs/documents/features_five.html +4 -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 +4 -0
- package/docs/documents/features_get-screen-pixels.html +3 -0
- package/docs/documents/features_image-options.html +3 -0
- package/docs/documents/features_load-external-model.html +25 -2
- package/docs/documents/features_load-progress.html +110 -0
- package/docs/documents/features_material.html +341 -0
- package/docs/documents/features_mode.html +5 -0
- package/docs/documents/features_model.html +5 -1
- package/docs/documents/features_move-pano-effect.html +3 -0
- package/docs/documents/features_multi-work.html +3 -0
- package/docs/documents/features_pano-filter.html +122 -0
- package/docs/documents/features_pano-tile.html +34 -19
- package/docs/documents/features_pano-uv.html +82 -0
- package/docs/documents/features_parameter.html +76 -56
- package/docs/documents/features_plugin.html +105 -0
- package/docs/documents/features_postprocessing.html +22 -5
- package/docs/documents/features_raycast.html +4 -1
- package/docs/documents/features_request-proxy.html +3 -0
- package/docs/documents/features_screen-project.html +3 -0
- package/docs/documents/features_state.html +3 -0
- package/docs/documents/features_view-layer.html +158 -0
- package/docs/documents/features_work.html +63 -2
- package/docs/documents/glossary.html +31 -6
- package/docs/documents/intro.html +1 -1
- package/docs/documents/quick-start.html +1 -0
- package/docs/documents/release_notes_6.8.html +189 -0
- package/docs/documents/template.html +45 -4
- 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 -1
- package/docs/functions/five.loadSpz.html +1 -1
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +11 -2
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +2 -2
- package/docs/interfaces/five.EventCallback.html +53 -47
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +2 -2
- package/docs/interfaces/five.ImageOptions.html +1 -1
- 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 +6 -6
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModeChangeEvent.html +2 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +2 -2
- package/docs/interfaces/five.ModelSceneEvent.html +2 -2
- package/docs/interfaces/five.ModelTileEvent.html +8 -0
- package/docs/interfaces/five.MovePanoOptions.html +7 -7
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +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.PBMClipperParameter.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
- package/docs/interfaces/five.PBMPanoDepth.html +5 -5
- package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
- package/docs/interfaces/five.PBMPanoPicture.html +8 -6
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
- package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
- package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/five.PanoEvent.html +2 -2
- package/docs/interfaces/five.PanoTextureEvent.html +2 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +56 -52
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +2 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +56 -52
- package/docs/interfaces/five.RgbaData.html +7 -0
- package/docs/interfaces/five.SplatData.html +2 -2
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +2 -2
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DOptions.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +30 -26
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkModel.html +8 -8
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +27 -2
- package/docs/interfaces/five.WorkTile.html +1 -1
- 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 +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +2 -2
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +13 -13
- package/docs/modules/five.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +27 -25
- package/docs/types/five.EasingFunction.html +1 -0
- package/docs/types/five.EventTypes.html +27 -25
- package/docs/types/five.FivePlugin.html +1 -1
- package/docs/types/five.FivePluginInit.html +1 -1
- package/docs/types/five.FivePluginInstance.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.PBMAlphaMode.html +1 -1
- package/docs/types/five.PBMColorStyle.html +1 -1
- package/docs/types/five.PBMFloorStyle.html +1 -1
- package/docs/types/five.PBMMeshShaderType.html +1 -1
- package/docs/types/five.PBMPointBack.html +1 -1
- package/docs/types/five.PBMPointCloudShaderType.html +1 -1
- package/docs/types/five.PBMPointShape.html +1 -1
- package/docs/types/five.PBMPointSize.html +1 -1
- package/docs/types/five.PBMTransition.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.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 +519 -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-png-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 +167 -0
- package/five/controllers/events.d.ts +71 -0
- package/five/controllers/floorplan.d.ts +119 -0
- package/five/controllers/mapview.d.ts +139 -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/gaussian-splatting/util/renderData.d.ts +52 -0
- package/five/gaussian-splatting/wasm/data.d.ts +20 -0
- package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
- package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
- package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
- package/five/index.d.ts +60 -4637
- package/five/index.js +193 -341
- package/five/index.mjs +26455 -31011
- 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 +137 -0
- package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
- package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -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/pbmGaussianSplattingObject.d.ts +43 -0
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -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 +140 -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 +17 -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-cube-to-equirectangular.d.ts +7 -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/histogram.d.ts +54 -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/texture/textureData.d.ts +11 -0
- package/five/thirdparty/fflate.d.ts +1407 -0
- package/five/thirdparty/hammer.d.ts +375 -0
- package/five/thirdparty/jsrsasign.d.ts +753 -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 +36 -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 +159 -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 +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- 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 +4 -4
- package/line/index.mjs +334 -513
- 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 +43 -31
- package/package.json +11 -2
- 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 -1102
- package/plugins/index.js +17 -21
- package/plugins/index.mjs +3342 -4245
- 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 +3 -3
- package/react/index.mjs +572 -783
- 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 +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/geometry.d.ts +3 -0
- package/sticker/index.d.ts +68 -71
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +17 -21
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +13 -14
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +21 -21
- package/umd/five-vue.js +3 -3
- package/umd/five.js +188 -336
- 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 +21 -21
- package/vfx/index.mjs +454 -910
- 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 +3 -3
- package/vue/index.mjs +309 -301
- 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 +3 -3
- package/work-downloader/index.mjs +317 -556
- 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/five.FivePlugin.plugin.html +0 -60
- package/docs/documents/plugin.html +0 -60
- package/docs/media/five.ts +0 -2881
- package/docs/media/pass.ts +0 -64
- package/guides/ai-doc-guidelines.md +0 -72
- package/guides/features/3dtile.md +0 -264
- package/guides/features/parameter.md +0 -178
- package/guides/plugin.md +0 -206
- /package/{guides → ai_guides}/release_notes/6.6.md +0 -0
- /package/{guides → ai_guides}/release_notes/6.7.md +0 -0
- /package/{guides → ai_guides}/support.md +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Resource Loading Progress (资源加载进度)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 监控 3D 模型与全景图的加载状态和实时进度。
|
|
4
|
+
- **Schema**: `Model`, `Tile`, `PanoTextureEvent`
|
|
5
|
+
- **Concepts**: Loaded vs Refined, Level of Detail (LOD), Panorama Lifecycle
|
|
6
|
+
- **Configuration**: `minLevelOfDetail`, `maxScreenSpaceError`
|
|
7
|
+
- **Examples**: 状态检查、进度监听、生命周期事件
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [Model](../../five/model/index.d.ts), [Tile](../../five/model/tile3d/tile.d.ts), [PanoTextureEvent](../../five/controllers/events.d.ts)
|
|
12
|
+
|
|
13
|
+
## Concepts
|
|
14
|
+
|
|
15
|
+
在 3D Tiles 模型(如 Five 的 Work 模型)中,"加载" 分为两个阶段:
|
|
16
|
+
|
|
17
|
+
1. **Loaded (初步加载完成)**:
|
|
18
|
+
* 表示模型已经加载了足够用于显示的**基础**数据。
|
|
19
|
+
* 受 `minLevelOfDetail` 参数影响。只有当满足最小 LOD 要求的 Tile 加载完毕后,`loaded` 才会变为 `true`。
|
|
20
|
+
* 通常作为 "首屏加载完成" 的标志,此时模型可能还比较模糊。
|
|
21
|
+
|
|
22
|
+
2. **Refined (细化完成)**:
|
|
23
|
+
* 表示模型在当前视角下,已经加载了所有必要的**高清**数据,达到了最佳渲染效果。
|
|
24
|
+
* 受 `maxScreenSpaceError` 参数影响。该值越小,需要的 Tile 精度越高,细化完成所需的时间越长。
|
|
25
|
+
* 这是一个动态状态。当相机移动时,可能会因为需要加载新的高清分块而从 `refined: true` 变为 `false`。
|
|
26
|
+
|
|
27
|
+
## Instance Properties
|
|
28
|
+
|
|
29
|
+
### Model Status
|
|
30
|
+
|
|
31
|
+
| Property | Type | Description |
|
|
32
|
+
| :--- | :--- | :--- |
|
|
33
|
+
| `five.model.loaded` | `boolean` | 检查模型是否已完成初步加载 (Loaded)。 |
|
|
34
|
+
| `five.model.refined` | `boolean` | 检查模型是否已完成细化 (Refined)。 |
|
|
35
|
+
| `five.model.refineProgress` | `[number, number]` | 细化进度元组 `[current, total]` (已加载/总需加载)。 |
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
### 1. Model Loading (模型加载)
|
|
40
|
+
|
|
41
|
+
#### 检查当前状态 (State Checking)
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
if (five.model.loaded) {
|
|
45
|
+
console.log("Model is ready (basic data loaded)!");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (five.model.refined) {
|
|
49
|
+
console.log("Model is fully refined (high-res data loaded)!");
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
#### 监控细化进度 (Refine Progress)
|
|
54
|
+
|
|
55
|
+
`five.model.refineProgress` 提供了当前视图下模型细化的整体进度。
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
const [current, total] = five.model.refineProgress;
|
|
59
|
+
console.log(`Model Refine Progress: ${current} / ${total}`);
|
|
60
|
+
|
|
61
|
+
if (current === total && total > 0) {
|
|
62
|
+
console.log("Model is fully refined for current view.");
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### 监听加载完成事件
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
five.on("modelLoaded", () => {
|
|
70
|
+
console.log("Model has been loaded.");
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### (Advanced) Tile 级别进度
|
|
75
|
+
|
|
76
|
+
对于 `3dtiles` 类型的模型,你可以访问具体的 Tile 对象来查看进度。
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
// 仅示例,通常在调试或特定渲染逻辑中使用
|
|
80
|
+
const progress = tile.content.loadProgress; // [0, 1]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### Tile Lifecycle Monitoring (Tile 生命周期监控)
|
|
84
|
+
|
|
85
|
+
监控单个 Tile 的加载与卸载事件,用于更精细的调试或资源统计。
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
five.on("model.tileLoad", (tile) => {
|
|
89
|
+
console.log(`Tile loaded: ${tile.debugLabel}, Size: ${tile.content.byteLength}`);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
five.on("model.tileUnload", (tile) => {
|
|
93
|
+
console.log(`Tile unloaded: ${tile.debugLabel}`);
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 2. Panorama Loading (全景图加载)
|
|
98
|
+
|
|
99
|
+
全景图通常在用户移动到某个点位时按需加载。
|
|
100
|
+
|
|
101
|
+
#### 监听加载进度
|
|
102
|
+
|
|
103
|
+
使用 `pano.texture.progress` 事件获取当前全景图的加载进度。
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
five.on("pano.texture.progress", (event) => {
|
|
107
|
+
const { progress, pano } = event;
|
|
108
|
+
console.log(`Pano ${pano.panoIndex} loading: ${(progress * 100).toFixed(1)}%`);
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### 生命周期事件
|
|
113
|
+
|
|
114
|
+
* **`pano.texture.load`**: 开始加载。
|
|
115
|
+
* **`pano.texture.success`**: 加载完成。
|
|
116
|
+
* **`pano.texture.error`**: 加载失败。
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
five.on("pano.texture.load", (event) => {
|
|
120
|
+
console.log(`Started loading pano ${event.pano.panoIndex}`);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
five.on("pano.texture.success", (event) => {
|
|
124
|
+
console.log(`Finished loading pano ${event.pano.panoIndex}`);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
five.on("pano.texture.error", (event) => {
|
|
128
|
+
console.error(`Failed to load pano ${event.pano.panoIndex}`, event.error);
|
|
129
|
+
});
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Related
|
|
133
|
+
|
|
134
|
+
* [Five Class](../api.md): Five 核心类 API 索引。
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
tags: [loading, progress, refined, loaded, event]
|
|
140
|
+
```
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Material Parameters (材质参数)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 配置 3D 模型与全景图过渡的视觉表现、渲染样式及特效。
|
|
4
|
+
- **Schema**: 对应 `ParameterMaterialValue` 接口,定义了材质、点云、楼层等外观属性。
|
|
5
|
+
- **Concepts**: Transparency (透明度), Point Cloud (点云), Floor Style (楼层样式), PBR (物理渲染)。
|
|
6
|
+
- **Configuration**: 包含透明度、混合模式、点云大小/形状、阴影设置等详细参数。
|
|
7
|
+
- **Examples**: 模型透明度调整、点云样式定制。
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [ParameterMaterialValue](../../five/model/parameter.d.ts)
|
|
12
|
+
|
|
13
|
+
以下是 `ParameterMaterialValue` 的 TypeScript 定义摘要:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
export interface ParameterMaterialValue {
|
|
17
|
+
/** 模型整体透明度 [0, 1] */
|
|
18
|
+
opacity: number;
|
|
19
|
+
/** 点云基础缩放比例 */
|
|
20
|
+
pointScale: number;
|
|
21
|
+
/** 点云大小绘制方式 ('ATTENUATION' | 'FIXED') */
|
|
22
|
+
pointSize: PBMPointSize;
|
|
23
|
+
/** 楼层显示样式 ('OPACITY' | 'VISIBILITY') */
|
|
24
|
+
floorStyle: PBMFloorStyle;
|
|
25
|
+
// ... 更多字段见下方配置表
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Concepts
|
|
30
|
+
|
|
31
|
+
### 1. Transparency & Blending (透明度与混合)
|
|
32
|
+
|
|
33
|
+
材质系统提供了两种维度的透明度控制:
|
|
34
|
+
* **Opacity (`opacity`)**: 控制模型整体的不透明度 (0-1)。
|
|
35
|
+
* **Model Alpha (`modelAlpha`)**: 控制纹理混合的权重。
|
|
36
|
+
* `0`: 仅显示模型自带的 UV 纹理(通常是颜色单一的白模或人工烘焙的纹理)。
|
|
37
|
+
* `1`: 仅显示从全景图投影到模型上的纹理(真实感强,但可能存在投影误差)。
|
|
38
|
+
* `0.5`: 两者混合。
|
|
39
|
+
|
|
40
|
+
### 2. Point Cloud Rendering (点云渲染)
|
|
41
|
+
|
|
42
|
+
Five 支持高性能的点云渲染(PBM),并提供灵活的样式配置:
|
|
43
|
+
* **Size Attenuation**: 通过 `pointSize: 'ATTENUATION'` 开启近大远小的透视效果,增强空间感。
|
|
44
|
+
* **Pixel Limits**: 通过 `pointMinPixel` 和 `pointMaxPixel` 限制点在屏幕上的最小/最大像素尺寸,防止远处点消失或近处点过大遮挡视线。
|
|
45
|
+
|
|
46
|
+
### 3. Floor Management (楼层管理)
|
|
47
|
+
|
|
48
|
+
对于多楼层场景,可以通过参数控制楼层的显示策略:
|
|
49
|
+
* **Floor Style (`floorStyle`)**: 控制非当前楼层的显示方式(如 `OPACITY` 半透明、`VISIBILITY` 隐藏等)。
|
|
50
|
+
* **Shown Floor (`shownFloorIndex`)**: 指定当前高亮显示的楼层索引。
|
|
51
|
+
|
|
52
|
+
### 4. Vertex Marks & Semantic Filtering (顶点标记与语义过滤)
|
|
53
|
+
|
|
54
|
+
`vertexMarks` 是一个**全局开关**,用于控制是否启用模型顶点上的语义标记(`_feature_id_rsmask`)逻辑。
|
|
55
|
+
|
|
56
|
+
* **机制**: 模型顶点预置了 `_feature_id_rsmask` 属性,不同的值代表不同的语义部分。
|
|
57
|
+
* **当前支持**: 目前主要支持 `_feature_id_rsmask=1`(通常标记为天花板/房顶)。
|
|
58
|
+
* 当 `vertexMarks` 开启时,标记为 `1` 的顶点部分会在特定视角(如俯视)下自动隐藏,实现“开盖”效果,优化室内布局观测体验。
|
|
59
|
+
* **未来扩展**: 该机制设计支持更多标记值,未来可能用于控制其他特定模型部件的显示效果。
|
|
60
|
+
|
|
61
|
+
## Configuration
|
|
62
|
+
|
|
63
|
+
以下表格列出了控制材质与外观的可用参数,按使用频率和场景分类。
|
|
64
|
+
|
|
65
|
+
### Common Configuration (常用配置)
|
|
66
|
+
|
|
67
|
+
| Parameter | Type | Default | Description |
|
|
68
|
+
| :--- | :--- | :--- | :--- |
|
|
69
|
+
| `opacity` | `number` | `1.0` | 模型整体透明度 [0, 1]。0 为完全透明,1 为完全不透明。 |
|
|
70
|
+
| `pointScale` | `number` | `0.02` | 点的基础缩放比例(控制点的大小)。 |
|
|
71
|
+
| `pointSize` | `PBMPointSize` | `'ATTENUATION'` | 点云大小绘制方式。<br>`'ATTENUATION'`: 随距离衰减(近大远小);<br>`'FIXED'`: 固定像素大小。 |
|
|
72
|
+
| `pointShape` | `PBMPointShape` | `'CIRCLE'` | 点云形状。<br>`'CIRCLE'`: 圆形;<br>`'SQUARE'`:方形。 |
|
|
73
|
+
| `pointBack` | `PBMPointBack` | `'DARK'` | 点云背面绘制方式。 |
|
|
74
|
+
| `pointMinPixel` | `number` | `0` | 点云最小像素尺寸。 |
|
|
75
|
+
| `pointMaxPixel` | `number` | `40` | 点云最大像素尺寸。 |
|
|
76
|
+
| `pointAppearAnimation` | `boolean` | `true` | 是否开启点云出现动画。 |
|
|
77
|
+
| `vertexMarks` | `boolean` | `true` | 是否显示/生效标注。 |
|
|
78
|
+
| `brightness` | `number` | `1.0` | 场景亮度倍数。 |
|
|
79
|
+
| `floorStyle` | `PBMFloorStyle` | `'OPACITY'` | 楼层显示样式。 |
|
|
80
|
+
| `shownFloorIndex` | `number` | `-1` | 当前显示的楼层索引。`-1` 表示显示所有楼层。 |
|
|
81
|
+
| `castShadow` | `boolean` | `false` | 模型是否产生阴影。 |
|
|
82
|
+
| `receiveShadow` | `boolean` | `false` | 模型是否接收阴影。 |
|
|
83
|
+
| `useAddBlend` | `boolean` | `false` | 是否使用半透明叠加渲染。 |
|
|
84
|
+
| `customShaders` | `PBMCustomShader[]` | `[]` | 自定义 Shader 配置。 |
|
|
85
|
+
| `panoFilter` | `PBMPanoFilter` | `null` | 全景图滤镜 (亮度、对比度、色温等)。详情见 [Pano Filter](./pano-filter.md)。 |
|
|
86
|
+
| `clippers` | `PBMClipperParameter[]` | `[]` | 模型裁切参数。 |
|
|
87
|
+
| `boundingBox` | `THREE.Box3` | `Infinity` | 模型包围盒。 |
|
|
88
|
+
|
|
89
|
+
### Advanced Appearance (进阶外观配置)
|
|
90
|
+
|
|
91
|
+
> 这些参数较少使用,仅在需要精细调整特殊视觉效果时修改。
|
|
92
|
+
|
|
93
|
+
| Parameter | Type | Default | Description |
|
|
94
|
+
| :--- | :--- | :--- | :--- |
|
|
95
|
+
| `colorSaturation` | `number` | `0.0` | 饱和度调整值。 |
|
|
96
|
+
| `colorBrightness` | `number` | `0.0` | 亮度调整值(与 `brightness` 叠加)。 |
|
|
97
|
+
| `colorStyle` | `PBMColorStyle` | `'RGB'` | 颜色显示样式。 |
|
|
98
|
+
| `constantColor` | `THREE.Vector3` | `(0.6, 0.6, 0.6)` | 模型纯色模式下的颜色值。 |
|
|
99
|
+
| `outlineGain` | `number` | `0.0` | 轮廓线增益。 |
|
|
100
|
+
| `distanceGain` | `number` | `0.0` | 距离增益。 |
|
|
101
|
+
| `gaussianSplattingSHDegree` | `number` | `0` | 3D Gaussian Splatting 的球谐阶数。 |
|
|
102
|
+
|
|
103
|
+
### Internal & Low-Level (内部与底层配置)
|
|
104
|
+
|
|
105
|
+
> **注意**: 以下参数主要用于引擎内部状态同步或特定底层逻辑,**不建议开发者手动修改**,以免引起渲染异常。
|
|
106
|
+
|
|
107
|
+
| Parameter | Type | Default | Description |
|
|
108
|
+
| :--- | :--- | :--- | :--- |
|
|
109
|
+
| `modelAlpha` | `number` | `1.0` | 模型纹理混合系数。通常由 Five 内部模式切换控制。 |
|
|
110
|
+
| `useHQWeight` | `boolean` | `false` | 是否使用高质量权重计算(影响渲染质量)。 |
|
|
111
|
+
| `useHQDepth` | `boolean` | `false` | 是否使用高质量深度遮罩。 |
|
|
112
|
+
| `progress` | `number` | `0` | 全景图混合进度。 |
|
|
113
|
+
| `transition` | `PBMTransition` | `'FADE'` | 全景图过渡混合模式。 |
|
|
114
|
+
| `gradientTexture` | `THREE.Texture` | `default` | 高程着色材质纹理。 |
|
|
115
|
+
| `pano0` | `PBMPanoPicture` | `null` | 起始点全景图信息。 |
|
|
116
|
+
| `pano1` | `PBMPanoPicture` | `null` | 结束点全景图信息。 |
|
|
117
|
+
| `pano0Depth` | `PBMPanoDepth` | `null` | 起始点深度信息。 |
|
|
118
|
+
| `pano1Depth` | `PBMPanoDepth` | `null` | 结束点深度信息。 |
|
|
119
|
+
| `refinedScreen` | `PBMRefinedScreen` | `null` | 细化瓦片的屏幕渲染配置。 |
|
|
120
|
+
|
|
121
|
+
## Examples
|
|
122
|
+
|
|
123
|
+
### 1. Adjusting Model Transparency and Style (调整模型透明度与样式)
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
five.model.set({
|
|
127
|
+
opacity: 0.5, // Make model semi-transparent (半透明)
|
|
128
|
+
modelAlpha: 0.0, // Show original UV texture only (仅显示原始UV贴图)
|
|
129
|
+
floorStyle: 'wireframe' // Wireframe mode (线框模式)
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 2. Configuring Point Cloud Appearance (配置点云外观)
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
five.model.set({
|
|
137
|
+
pointSize: 'ATTENUATION', // 大小随距离衰减
|
|
138
|
+
pointScale: 0.05, // 基础大小
|
|
139
|
+
pointMaxPixel: 20 // 最大像素限制
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Related
|
|
144
|
+
|
|
145
|
+
* [Parameter](./parameter.md): 配置系统入口与继承逻辑。
|
|
146
|
+
* [Pano Filter](./pano-filter.md): 了解全景图滤镜的详细用法。
|
|
147
|
+
* [3DTile Params](./3dtile.md): 性能与加载相关参数。
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
tags: [material, appearance, pointcloud, parameter, roof, ceiling, config]
|
|
153
|
+
```
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
## Schema
|
|
9
9
|
|
|
10
|
+
> **Definition**: [Mode](../../five/application/mode.d.ts), [FiveInitArgs](../../five/application/fiveInitArgs.d.ts)
|
|
11
|
+
|
|
10
12
|
**Mode** 类型定义如下:
|
|
11
13
|
|
|
12
14
|
```ts
|
|
@@ -257,6 +259,8 @@ document.querySelector('#btn-map').addEventListener('click', () => {
|
|
|
257
259
|
## Related
|
|
258
260
|
|
|
259
261
|
* [State - 状态](./state.md): 了解 Mode 在 State 中的位置及其他状态属性。
|
|
262
|
+
* [Gesture - 手势](./gesture.md): 了解不同模式下的手势交互逻辑。
|
|
263
|
+
* [Event - 事件](./event.md): 了解模式切换等相关事件。
|
|
260
264
|
|
|
261
265
|
---
|
|
262
266
|
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
### Model
|
|
11
11
|
|
|
12
|
+
> **Definition**: [Model](../../five/model/model.d.ts)
|
|
13
|
+
|
|
12
14
|
Model 类继承自 `THREE.Object3D`,是三维场景中的顶级对象。
|
|
13
15
|
|
|
14
16
|
```typescript
|
|
@@ -23,7 +25,7 @@ class Model extends THREE.Object3D {
|
|
|
23
25
|
/** 模型参数配置 */
|
|
24
26
|
public parameter: Parameter;
|
|
25
27
|
|
|
26
|
-
/** 包含的视图层 (如 mesh, point_cloud) */
|
|
28
|
+
/** 包含的视图层 (如 mesh, point_cloud, gaussian_splatting) */
|
|
27
29
|
public viewLayers: ViewLayer[];
|
|
28
30
|
|
|
29
31
|
/** 是否加载完成 (初次加载) */
|
|
@@ -77,6 +79,7 @@ const model2 = five.model;
|
|
|
77
79
|
常见的 ViewLayer 类型:
|
|
78
80
|
* **`mesh` (网格层)**: 也就是可以看到的实体模型(墙面、地板等)。
|
|
79
81
|
* **`point_cloud` (点云层)**: 激光点云数据。它并非低精度数据,同样支持高精度的近距离观察,并支持碰撞检测。
|
|
82
|
+
* **`gaussian_splatting` (高斯泼溅层)**: 新一代三维重建渲染技术,用于展示极高真实感的场景细节。
|
|
80
83
|
|
|
81
84
|
**层级结构**:
|
|
82
85
|
Model 加载完成后,会自动根据 Work 数据生成对应的 ViewLayer,并挂载为 `Model` 的子对象。开发者可以通过 `model.viewLayers` 访问它们。
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Pano Filter (全景图滤镜)
|
|
2
|
+
|
|
3
|
+
- **Summary**: `PBMPanoFilter` 用于调整全景图的视觉效果,包括亮度、对比度、饱和度、色温、色调等。它作为参数传递给 `ModelScene`,可实时改变全景图的渲染表现。
|
|
4
|
+
- **Schema**: `PBMPanoFilter`, `PBMUpdateable`
|
|
5
|
+
- **Concepts**: Material Filter, Color Correction
|
|
6
|
+
- **Configuration**: Temperature, Tint, Brightness, Contrast, Saturation
|
|
7
|
+
- **Examples**: 滤镜开启与参数调整
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [PBMPanoFilter](../../five/model/materials/pbmMaterial.d.ts)
|
|
12
|
+
|
|
13
|
+
`PBMPanoFilter` 类定义了全景图的滤镜参数。所有属性均为对象引用,直接修改其内部属性即可生效。
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { PBMUpdateable } from "@realsee/five";
|
|
17
|
+
|
|
18
|
+
export class PBMPanoFilter extends PBMUpdateable {
|
|
19
|
+
/** 对比度控制 */
|
|
20
|
+
public readonly contrast: {
|
|
21
|
+
/** 对比度偏移 [-1, 1] (默认 0) */
|
|
22
|
+
contrastBias: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** 饱和度控制 */
|
|
26
|
+
public readonly saturation: {
|
|
27
|
+
/** 饱和度偏移 [-1, 1] (默认 0) */
|
|
28
|
+
saturationBias: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** 颜色控制 (色温与色调) */
|
|
32
|
+
public readonly color: {
|
|
33
|
+
/** 色温偏移 [-100, 100] (默认 0) */
|
|
34
|
+
temperatureBias: number;
|
|
35
|
+
/** 色调偏移 [-100, 100] (默认 0) */
|
|
36
|
+
tintBias: number
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** 高光与阴影控制 */
|
|
40
|
+
public readonly highlightShadow: {
|
|
41
|
+
/** 全局亮度偏移 [-255, 255] (默认 0) */
|
|
42
|
+
globalBias: number;
|
|
43
|
+
/** 高光偏移 [-255, 255] (默认 0) */
|
|
44
|
+
highlightBias: number;
|
|
45
|
+
/** 阴影偏移 [-255, 255] (默认 0) */
|
|
46
|
+
shadowBias: number;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Concepts
|
|
52
|
+
|
|
53
|
+
### Material Filter (材质滤镜)
|
|
54
|
+
与 [Postprocessing](./postprocessing.md) (后处理) 不同,`PBMPanoFilter` 是作用于全景图材质 (Material) 阶段的滤镜。这意味着它直接影响纹理的采样和着色计算,而不是对最终渲染图像进行二次处理。
|
|
55
|
+
|
|
56
|
+
### Parameter Binding (参数绑定)
|
|
57
|
+
滤镜实例需要通过 `five.modelScene.parameter.set('panoFilter', filter)` 绑定到场景中才能生效。
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
|
|
61
|
+
以下参数均通过修改 `PBMPanoFilter` 实例的属性进行配置。
|
|
62
|
+
|
|
63
|
+
### Color & Tone (色彩与色调)
|
|
64
|
+
|
|
65
|
+
| Property | Type | Range | Default | Description |
|
|
66
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
67
|
+
| `color.temperatureBias` | `number` | `[-100, 100]` | `0` | **色温**。正值偏暖 (黄),负值偏冷 (蓝)。 |
|
|
68
|
+
| `color.tintBias` | `number` | `[-100, 100]` | `0` | **色调**。正值偏洋红,负值偏绿。 |
|
|
69
|
+
| `saturation.saturationBias` | `number` | `[-1, 1]` | `0` | **饱和度**。`0` 为原色,`-1` 为黑白。 |
|
|
70
|
+
| `contrast.contrastBias` | `number` | `[-1, 1]` | `0` | **对比度**。正值增强对比,负值降低对比。 |
|
|
71
|
+
|
|
72
|
+
### Light & Shadow (光影)
|
|
73
|
+
|
|
74
|
+
| Property | Type | Range | Default | Description |
|
|
75
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
76
|
+
| `highlightShadow.globalBias` | `number` | `[-255, 255]` | `0` | **亮度 (Brightness)**。整体提升或降低画面亮度。 |
|
|
77
|
+
| `highlightShadow.highlightBias` | `number` | `[-255, 255]` | `0` | **高光 (Highlight)**。仅调整画面亮部的亮度。 |
|
|
78
|
+
| `highlightShadow.shadowBias` | `number` | `[-255, 255]` | `0` | **阴影 (Shadow)**。仅调整画面暗部的亮度。 |
|
|
79
|
+
|
|
80
|
+
## Examples
|
|
81
|
+
|
|
82
|
+
### Basic Usage (基础用法)
|
|
83
|
+
|
|
84
|
+
创建一个滤镜实例并应用到 Five 场景中。
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
import { Five, PBMPanoFilter } from "@realsee/five";
|
|
88
|
+
|
|
89
|
+
const five = new Five();
|
|
90
|
+
// ... 初始化 five ...
|
|
91
|
+
|
|
92
|
+
// 1. 创建滤镜实例
|
|
93
|
+
const panoFilter = new PBMPanoFilter();
|
|
94
|
+
|
|
95
|
+
// 2. 配置参数 (例如:增加一点暖色调和亮度)
|
|
96
|
+
panoFilter.color.temperatureBias = 10; // 暖色
|
|
97
|
+
panoFilter.highlightShadow.globalBias = 20; // 提亮
|
|
98
|
+
|
|
99
|
+
// 3. 启用滤镜
|
|
100
|
+
five.modelScene.parameter.set('panoFilter', panoFilter);
|
|
101
|
+
|
|
102
|
+
// 4. (可选) 停用滤镜
|
|
103
|
+
// five.modelScene.parameter.reset('panoFilter');
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Interactive Adjustment (动态调整)
|
|
107
|
+
|
|
108
|
+
滤镜参数支持实时修改,适合制作调节面板。
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import { Five, PBMPanoFilter } from "@realsee/five";
|
|
112
|
+
|
|
113
|
+
// 假设已经有 five 实例
|
|
114
|
+
const panoFilter = new PBMPanoFilter();
|
|
115
|
+
five.modelScene.parameter.set('panoFilter', panoFilter);
|
|
116
|
+
|
|
117
|
+
// 模拟 UI 绑定的数据对象
|
|
118
|
+
const filterSettings = {
|
|
119
|
+
brightness: 0,
|
|
120
|
+
contrast: 0,
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// 监听 UI 变化 (示例伪代码)
|
|
124
|
+
function onBrightnessChange(value: number) {
|
|
125
|
+
// value range: [-255, 255]
|
|
126
|
+
panoFilter.highlightShadow.globalBias = value;
|
|
127
|
+
// 如果 five 没有开启自动渲染 (play: false),需要手动触发重绘
|
|
128
|
+
five.needsRender = true;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function onContrastChange(value: number) {
|
|
132
|
+
// value range: [-1, 1]
|
|
133
|
+
panoFilter.contrast.contrastBias = value;
|
|
134
|
+
five.needsRender = true;
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Related
|
|
139
|
+
|
|
140
|
+
* [Model](./model.md): 了解 ModelScene 及其参数系统。
|
|
141
|
+
* [Parameter](./parameter.md): 了解 Five 的全局初始化参数。
|
|
142
|
+
* [Postprocessing](./postprocessing.md): 了解屏幕空间的后处理效果。
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
tags: [filter, material, visual, color, brightness, contrast]
|
|
148
|
+
```
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
## Schema
|
|
10
10
|
|
|
11
|
+
> **Definition**: [WorkImage](../../five/work/work.d.ts), [ImageOptions](../../five/types/imageOptions.d.ts)
|
|
12
|
+
|
|
11
13
|
### WorkObserver.images
|
|
12
14
|
点位全景图数据结构,包含瓦片列表。
|
|
13
15
|
|
|
@@ -63,20 +65,11 @@ interface ImageOptions {
|
|
|
63
65
|
|
|
64
66
|
在初始化 `Five` 时,可以通过 `panorama` 配置参数来配置瓦片加载行为。
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### tileMaxRequest
|
|
72
|
-
- **类型**: `number`
|
|
73
|
-
- **默认值**: `3` (在某些 VR/XR 模式下可能不同)
|
|
74
|
-
- **说明**: 最大的瓦片图片并发请求数。增加此值可能加快加载速度,但也可能导致网络拥塞。
|
|
75
|
-
|
|
76
|
-
### imageOptions
|
|
77
|
-
- **类型**: `ImageOptions`
|
|
78
|
-
- **默认值**: `undefined`
|
|
79
|
-
- **说明**: 全景图及瓦片的图片处理配置。可用于全局控制图片的加载格式(如强制使用 WebP)、质量压缩比例或通过 `transform` 函数自定义图片 URL(如适配不同的 CDN 规则)。这对于优化首屏加载速度和节省带宽非常有用。
|
|
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。 |
|
|
80
73
|
|
|
81
74
|
## Examples
|
|
82
75
|
|
|
@@ -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
|
+
```
|