@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
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/postprocessing | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">features/postprocessing</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="后处理-post-processing" class="tsd-anchor-link">后处理 (Post Processing)<a href="#后处理-post-processing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1>
|
|
2
2
|
<ul>
|
|
3
|
-
<li><strong>Summary</strong>: Five 提供了基于 EffectComposer
|
|
3
|
+
<li><strong>Summary</strong>: Five 提供了基于 EffectComposer 的后处理机制,默认挂载了自适应亮度 (Auto Exposure) 和眼球穹顶光照 (EDL) 两种效果,同时提供多种可选内置 Pass,并支持开发者编写自定义 Pass。</li>
|
|
4
4
|
<li><strong>Schema</strong>: <code>FivePass</code> 类及 <code>Pass</code> 接口。</li>
|
|
5
5
|
<li><strong>Concepts</strong>: EffectComposer, G-Buffer, Pass, AdaptiveLuminance, EyeDomeLighting。</li>
|
|
6
6
|
<li><strong>Configuration</strong>: 开启内置 Pass 的开关及参数配置。</li>
|
|
7
7
|
<li><strong>Examples</strong>: 开启内置 Pass 示例,自定义黑白滤镜 Pass 示例。</li>
|
|
8
8
|
</ul>
|
|
9
9
|
<h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
10
|
+
<blockquote>
|
|
11
|
+
<p><strong>Definition</strong>: <a href="../../five/renderer/postprocessing/passes/pass.d.ts">FivePass</a></p>
|
|
12
|
+
</blockquote>
|
|
10
13
|
<pre><code class="typescript"><span class="hl-8">/**</span><br/><span class="hl-8"> * Pass 接口 (兼容 three.js EffectComposer)</span><br/><span class="hl-8"> */</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Pass</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">enabled</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">needsSwap</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">clear</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">renderToScreen</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-5">setSize</span><span class="hl-1">(</span><span class="hl-6">width</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">, </span><span class="hl-6">height</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">): </span><span class="hl-7">void</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-5">render</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-6">renderer</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderer</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">writeBuffer</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderTarget</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">readBuffer</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderTarget</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">deltaTime</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">maskActive</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><br/><span class="hl-1"> ): </span><span class="hl-7">void</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-8">/**</span><br/><span class="hl-8"> * FivePass 基类</span><br/><span class="hl-8"> * 支持 G-Buffer 注入 (depth, normal, color)</span><br/><span class="hl-8"> */</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">class</span><span class="hl-1"> </span><span class="hl-7">FivePass</span><span class="hl-1"> </span><span class="hl-3">implements</span><span class="hl-1"> </span><span class="hl-7">Pass</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">enabled</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">true</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">needsSwap</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">true</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">clear</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">false</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">renderToScreen</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">true</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">dependencies</span><span class="hl-1">: (</span><span class="hl-9">'depth'</span><span class="hl-1"> | </span><span class="hl-9">'normal'</span><span class="hl-1"> | </span><span class="hl-9">'color'</span><span class="hl-1">)[];</span><br/><br/><span class="hl-1"> </span><span class="hl-8">// 由 EffectComposer 在 render 时注入</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">gbuffer</span><span class="hl-1">!: </span><span class="hl-7">Map</span><span class="hl-1"><</span><span class="hl-9">'depth'</span><span class="hl-1"> | </span><span class="hl-9">'normal'</span><span class="hl-1"> | </span><span class="hl-9">'color'</span><span class="hl-1">, </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Texture</span><span class="hl-1">>;</span><br/><br/><span class="hl-1"> </span><span class="hl-3">constructor</span><span class="hl-1">(</span><span class="hl-6">dependencies</span><span class="hl-1">?: (</span><span class="hl-9">'depth'</span><span class="hl-1"> | </span><span class="hl-9">'normal'</span><span class="hl-1"> | </span><span class="hl-9">'color'</span><span class="hl-1">)[]);</span><br/><span class="hl-1"> </span><span class="hl-8">// ... render method implementation</span><br/><span class="hl-1">}</span>
|
|
11
14
|
</code><button type="button">Copy</button></pre>
|
|
12
15
|
|
|
@@ -18,7 +21,7 @@
|
|
|
18
21
|
<li><strong>EyeDomeLightingPass (EDL)</strong>: 一种非真实感渲染技术,主要用于增强点云模型的深度感知。通过屏幕空间的深度差计算遮蔽效果,让点云看起来更有轮廓感。</li>
|
|
19
22
|
</ul>
|
|
20
23
|
<h2 id="built-in-passes-内置-pass" class="tsd-anchor-link">Built-in Passes (内置 Pass)<a href="#built-in-passes-内置-pass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
21
|
-
<p>Five
|
|
24
|
+
<p>Five 默认挂载了两个 Pass 实例,挂载在 <code>five</code> 实例上,默认是关闭状态。</p>
|
|
22
25
|
<h3 id="1-adaptiveluminancepass" class="tsd-anchor-link">1. AdaptiveLuminancePass<a href="#1-adaptiveluminancepass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
23
26
|
<p>位于 <code>five.adaptiveLuminancePass</code>。</p>
|
|
24
27
|
<ul>
|
|
@@ -44,6 +47,17 @@
|
|
|
44
47
|
</li>
|
|
45
48
|
<li><strong>注意</strong>: 这是一个基于屏幕空间深度的算法,依赖 Depth Buffer。</li>
|
|
46
49
|
</ul>
|
|
50
|
+
<h3 id="3-optional-built-in-passes-可选内置-pass" class="tsd-anchor-link">3. Optional Built-in Passes (可选内置 Pass)<a href="#3-optional-built-in-passes-可选内置-pass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
51
|
+
<p>Five 新增了三个可选使用的内置 Pass,这些 Pass 没有预先挂载在 <code>five</code> 实例上,需手动导入并添加到渲染链中:</p>
|
|
52
|
+
<ul>
|
|
53
|
+
<li><strong><a href="features_gaussian-blur-pass.html">GaussianBlurPass</a></strong>: 高斯模糊效果。</li>
|
|
54
|
+
<li><strong><a href="features_flowing-light-2d-pass.html">FlowingLight2DPass</a></strong>: 2D 流光效果(通常用于平面路线流光)。</li>
|
|
55
|
+
<li><strong><a href="features_flowing-light-3d-pass.html">FlowingLight3DPass</a></strong>: 3D 流光效果(通常用于空间路径流光)。</li>
|
|
56
|
+
</ul>
|
|
57
|
+
<h4 id="gaussianblurpass-使用示例" class="tsd-anchor-link">GaussianBlurPass 使用示例<a href="#gaussianblurpass-使用示例" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
58
|
+
<pre><code class="typescript"><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">GaussianBlurPass</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">'@realsee/five'</span><span class="hl-1">;</span><br/><br/><span class="hl-8">// 1. 创建 GaussianBlurPass 实例 (需要传入 camera)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">gaussianBlurPass</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">GaussianBlurPass</span><span class="hl-1">(</span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">camera</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 2. 配置参数</span><br/><span class="hl-8">// 设置模糊半径 (默认 4.0)</span><br/><span class="hl-6">gaussianBlurPass</span><span class="hl-1">.</span><span class="hl-5">setRadius</span><span class="hl-1">(</span><span class="hl-11">6</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 3. 将 Pass 添加到渲染链</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-5">addPass</span><span class="hl-1">(</span><span class="hl-6">gaussianBlurPass</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 4. (可选) 动态开关</span><br/><span class="hl-8">// gaussianBlurPass.enabled = false;</span><br/><br/><span class="hl-8">// 5. (可选) 移除 Pass</span><br/><span class="hl-8">// five.removePass(gaussianBlurPass);</span>
|
|
59
|
+
</code><button type="button">Copy</button></pre>
|
|
60
|
+
|
|
47
61
|
<h2 id="custom-pass-自定义-pass" class="tsd-anchor-link">Custom Pass (自定义 Pass)<a href="#custom-pass-自定义-pass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
48
62
|
<p>如果需要实现自定义的后处理效果(如景深、色彩校正、描边等),建议继承 <code>FivePass</code>。</p>
|
|
49
63
|
<h3 id="步骤" class="tsd-anchor-link">步骤<a href="#步骤" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
@@ -82,11 +96,14 @@
|
|
|
82
96
|
</ol>
|
|
83
97
|
<h2 id="related" class="tsd-anchor-link">Related<a href="#related" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
84
98
|
<ul>
|
|
85
|
-
<li><a href="
|
|
86
|
-
<li><a href="
|
|
99
|
+
<li><a href="features_gaussian-blur-pass.html">Gaussian Blur Pass</a>: 高斯模糊 Pass 文档。</li>
|
|
100
|
+
<li><a href="features_flowing-light-2d-pass.html">Flowing Light 2D Pass</a>: 2D 流光 Pass 文档。</li>
|
|
101
|
+
<li><a href="features_flowing-light-3d-pass.html">Flowing Light 3D Pass</a>: 3D 流光 Pass 文档。</li>
|
|
102
|
+
<li><a href="../../five/application/five.d.ts">five.ts</a>: 查看 <code>addPass</code> 方法的实现。</li>
|
|
103
|
+
<li><a href="../../five/renderer/postprocessing/passes/pass.d.ts">pass.ts</a>: 查看 <code>FivePass</code> 基类定义。</li>
|
|
87
104
|
</ul>
|
|
88
105
|
<hr>
|
|
89
106
|
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">postprocessing</span><span class="hl-1">, </span><span class="hl-2">shader</span><span class="hl-1">, </span><span class="hl-2">effect</span><span class="hl-1">, </span><span class="hl-2">adaptive-luminance</span><span class="hl-1">, </span><span class="hl-2">edl</span><span class="hl-1">]</span>
|
|
90
107
|
</code><button type="button">Copy</button></pre>
|
|
91
108
|
|
|
92
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#后处理-post-processing"><span>后处理 (<wbr/>Post <wbr/>Processing)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><a href="#built-in-passes-内置-pass"><span>Built-<wbr/>in <wbr/>Passes (内置 <wbr/>Pass)</span></a></li><li><ul><li><a href="#1-adaptiveluminancepass"><span>1. <wbr/>Adaptive<wbr/>Luminance<wbr/>Pass</span></a></li><li><a href="#2-eyedomelightingpass"><span>2. <wbr/>Eye<wbr/>Dome<wbr/>Lighting<wbr/>Pass</span></a></li></ul></li><li><a href="#custom-pass-自定义-pass"><span>Custom <wbr/>Pass (自定义 <wbr/>Pass)</span></a></li><li><ul><li><a href="#步骤"><span>步骤</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#开启内置-pass"><span>开启内置 <wbr/>Pass</span></a></li><li><a href="#自定义-pass-黑白滤镜"><span>自定义 <wbr/>Pass (黑白滤镜)</span></a></li><li><a href="#使用-g-buffer-深度图示例"><span>使用 <wbr/>G-<wbr/>Buffer (深度图示例)</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
109
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#后处理-post-processing"><span>后处理 (<wbr/>Post <wbr/>Processing)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><a href="#built-in-passes-内置-pass"><span>Built-<wbr/>in <wbr/>Passes (内置 <wbr/>Pass)</span></a></li><li><ul><li><a href="#1-adaptiveluminancepass"><span>1. <wbr/>Adaptive<wbr/>Luminance<wbr/>Pass</span></a></li><li><a href="#2-eyedomelightingpass"><span>2. <wbr/>Eye<wbr/>Dome<wbr/>Lighting<wbr/>Pass</span></a></li><li><a href="#3-optional-built-in-passes-可选内置-pass"><span>3. <wbr/>Optional <wbr/>Built-<wbr/>in <wbr/>Passes (可选内置 <wbr/>Pass)</span></a></li><li><ul><li><a href="#gaussianblurpass-使用示例"><span>Gaussian<wbr/>Blur<wbr/>Pass 使用示例</span></a></li></ul></li></ul></li><li><a href="#custom-pass-自定义-pass"><span>Custom <wbr/>Pass (自定义 <wbr/>Pass)</span></a></li><li><ul><li><a href="#步骤"><span>步骤</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#开启内置-pass"><span>开启内置 <wbr/>Pass</span></a></li><li><a href="#自定义-pass-黑白滤镜"><span>自定义 <wbr/>Pass (黑白滤镜)</span></a></li><li><a href="#使用-g-buffer-深度图示例"><span>使用 <wbr/>G-<wbr/>Buffer (深度图示例)</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
<li><strong>Examples</strong>: 提供基础检测与性能优化示例。</li>
|
|
7
7
|
</ul>
|
|
8
8
|
<h2 id="schema-threejs-raycaster-extensions" class="tsd-anchor-link">Schema: Three.js Raycaster Extensions<a href="#schema-threejs-raycaster-extensions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
9
|
+
<blockquote>
|
|
10
|
+
<p><strong>Definition</strong>: <a href="../../five/declare.d.ts">Raycaster</a></p>
|
|
11
|
+
</blockquote>
|
|
9
12
|
<p>Five 对 Three.js 的 <code>Raycaster</code> 进行了扩展,在 <code>declare module 'three'</code> 中增加了以下属性:</p>
|
|
10
|
-
<pre><code class="typescript"><span class="hl-8">// defined in five/declare.d.ts</span><br/><span class="hl-3">declare</span><span class="hl-1"> </span><span class="hl-3">module</span><span class="hl-1"> </span><span class="hl-9">'three'</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Raycaster</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 只捕获第一个焦点 (性能优化)</span><br/><span class="hl-8"> * - true: 找到第一个交点后立即停止检测,返回结果。</span><br/><span class="hl-8"> * - false (默认): 检测所有可能的交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">firstHitOnly</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 自定义交点过滤器</span><br/><span class="hl-8"> * - 回调函数,返回 boolean。</span><br/><span class="hl-8"> * - true: 保留该交点。</span><br/><span class="hl-8"> * - false: 丢弃该交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">hitFilter</span><span class="hl-1">?: (</span><span class="hl-6">intersect</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Intersection</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 是否由近及远排序</span><br/><span class="hl-8"> * - true (默认): 返回的结果数组按距离摄像机从近到远排序。</span><br/><span class="hl-8"> * - false: 结果顺序不确定(通常按遍历顺序)。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">sortByDistance</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 作用楼层 (Five 特有逻辑)</span><br/><span class="hl-8"> * - 用于多楼层场景过滤。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">floorIndex</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
13
|
+
<pre><code class="typescript"><span class="hl-8">// defined in five/declare.d.ts</span><br/><span class="hl-3">declare</span><span class="hl-1"> </span><span class="hl-3">module</span><span class="hl-1"> </span><span class="hl-9">'three'</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Raycaster</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 只捕获第一个焦点 (性能优化)</span><br/><span class="hl-8"> * - true: 找到第一个交点后立即停止检测,返回结果。</span><br/><span class="hl-8"> * - false (默认): 检测所有可能的交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">firstHitOnly</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 自定义交点过滤器</span><br/><span class="hl-8"> * - 回调函数,返回 boolean。</span><br/><span class="hl-8"> * - true: 保留该交点。</span><br/><span class="hl-8"> * - false: 丢弃该交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">hitFilter</span><span class="hl-1">?: (</span><span class="hl-6">intersect</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Intersection</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 是否由近及远排序</span><br/><span class="hl-8"> * - true (默认): 返回的结果数组按距离摄像机从近到远排序。</span><br/><span class="hl-8"> * - false: 结果顺序不确定(通常按遍历顺序)。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">sortByDistance</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 作用楼层 (Five 特有逻辑)</span><br/><span class="hl-8"> * - 用于多楼层场景过滤。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">floorIndex</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Intersection</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** 命中的具体 Tile 对象 (仅 3DTiles) */</span><br/><span class="hl-1"> </span><span class="hl-6">tile</span><span class="hl-1">?: </span><span class="hl-7">Tile</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 命中的 ViewLayer 对象 */</span><br/><span class="hl-1"> </span><span class="hl-6">viewLayer</span><span class="hl-1">?: </span><span class="hl-7">ViewLayer</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 命中的 Model 对象 */</span><br/><span class="hl-1"> </span><span class="hl-6">model</span><span class="hl-1">?: </span><span class="hl-7">Model</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
|
11
14
|
</code><button type="button">Copy</button></pre>
|
|
12
15
|
|
|
13
16
|
<h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
<li><strong>Examples</strong>: CDN 替换、私有化部署鉴权、调试模式。</li>
|
|
8
8
|
</ul>
|
|
9
9
|
<h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
10
|
+
<blockquote>
|
|
11
|
+
<p><strong>Definition</strong>: <a href="../../five/application/fiveInitArgs.d.ts">FiveInitArgs</a></p>
|
|
12
|
+
</blockquote>
|
|
10
13
|
<pre><code class="typescript"><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">FiveInitArgs</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 请求代理函数</span><br/><span class="hl-8"> * </span><span class="hl-3">@description</span><span class="hl-8"> 在 Five 内部发起任何网络请求(如加载图片、模型、配置)之前调用。</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">url</span><span class="hl-8"> - 原始请求 URL</span><br/><span class="hl-8"> * </span><span class="hl-3">@returns</span><span class="hl-8"> 修改后的 URL (string) 或异步返回修改后的 URL (Promise<string>)</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">requestProxy</span><span class="hl-1">?: (</span><span class="hl-6">url</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">) </span><span class="hl-3">=></span><span class="hl-1"> </span><span class="hl-7">string</span><span class="hl-1"> | </span><span class="hl-7">Promise</span><span class="hl-1"><</span><span class="hl-7">string</span><span class="hl-1">>;</span><br/><span class="hl-1">}</span>
|
|
11
14
|
</code><button type="button">Copy</button></pre>
|
|
12
15
|
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
<li><strong>Examples</strong>: 空间点位转屏幕坐标 (标签功能)、屏幕坐标转空间射线。</li>
|
|
7
7
|
</ul>
|
|
8
8
|
<h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
9
|
+
<blockquote>
|
|
10
|
+
<p><strong>Definition</strong>: <a href="../../five/application/five.d.ts">Five</a></p>
|
|
11
|
+
</blockquote>
|
|
9
12
|
<pre><code class="typescript"><span class="hl-8">// defined in Five class</span><br/><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Five</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 计算三维坐标对应到屏幕的二维坐标</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">vector</span><span class="hl-8"> - 三维空间坐标 (World Space)</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">testModel</span><span class="hl-8"> - 是否进行模型遮挡检测 (默认 false)。如果为 true,且该点被模型遮挡,则返回 null。</span><br/><span class="hl-8"> * </span><span class="hl-3">@returns</span><span class="hl-8"> 二维屏幕坐标 (相对于 Canvas 左上角) 或 null (如果点在视野外或被遮挡)</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">project2d</span><span class="hl-1">(</span><span class="hl-6">vector</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector3</span><span class="hl-1">, </span><span class="hl-6">testModel</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">): </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector2</span><span class="hl-1"> | </span><span class="hl-7">null</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
|
|
10
13
|
</code><button type="button">Copy</button></pre>
|
|
11
14
|
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
<li><strong>Examples</strong>: 状态获取与更新。</li>
|
|
7
7
|
</ul>
|
|
8
8
|
<h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
9
|
+
<blockquote>
|
|
10
|
+
<p><strong>Definition</strong>: <a href="../../five/types/state.d.ts">State</a></p>
|
|
11
|
+
</blockquote>
|
|
9
12
|
<p><strong>State</strong> 类型定义如下(继承自 <code>Pose</code>):</p>
|
|
10
13
|
<pre><code class="ts"><span class="hl-10">import</span><span class="hl-1"> </span><span class="hl-3">*</span><span class="hl-1"> </span><span class="hl-10">as</span><span class="hl-1"> </span><span class="hl-6">THREE</span><span class="hl-1"> </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">"three"</span><span class="hl-1">;</span><br/><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">Mode</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">"@realsee/five"</span><span class="hl-1">;</span><br/><br/><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Pose</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** 相机偏航角 (水平方向),单位:弧度 */</span><br/><span class="hl-1"> </span><span class="hl-6">longitude</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 相机俯仰角 (垂直方向),单位:弧度 */</span><br/><span class="hl-1"> </span><span class="hl-6">latitude</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 相机垂直视场角,单位:度 */</span><br/><span class="hl-1"> </span><span class="hl-6">fov</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 相机看向的目标中心点坐标 */</span><br/><span class="hl-1"> </span><span class="hl-6">offset</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector3</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 相机距离目标中心点的距离 */</span><br/><span class="hl-1"> </span><span class="hl-6">distance</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">State</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-7">Pose</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** 显示模式 */</span><br/><span class="hl-1"> </span><span class="hl-6">mode</span><span class="hl-1">: </span><span class="hl-7">Mode</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 当前点位的唯一标识 (workCode) */</span><br/><span class="hl-1"> </span><span class="hl-6">workCode</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 当前点位在列表中的索引 */</span><br/><span class="hl-1"> </span><span class="hl-6">panoIndex</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
|
|
11
14
|
</code><button type="button">Copy</button></pre>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/view-layer | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">features/view-layer</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="viewlayer-视图层" class="tsd-anchor-link">ViewLayer (视图层)<a href="#viewlayer-视图层" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1>
|
|
2
|
+
<ul>
|
|
3
|
+
<li><strong>Summary</strong>: ViewLayer 是 Model 的组成部分,负责管理具体的 3D 资源(如 Mesh 或 PointCloud),支持独立的渲染配置和可见性控制。</li>
|
|
4
|
+
<li><strong>Schema</strong>: 继承自 <code>Tile3D</code>,由 <code>Model</code> 统一管理。</li>
|
|
5
|
+
<li><strong>Concepts</strong>: Layer Fallback, 3DTile Integration, Parameter Inheritance.</li>
|
|
6
|
+
<li><strong>Examples</strong>: 可见性控制、参数配置、事件监听。</li>
|
|
7
|
+
</ul>
|
|
8
|
+
<h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
9
|
+
<blockquote>
|
|
10
|
+
<p><strong>Definition</strong>: <a href="../../five/model/view-layer.d.ts">ViewLayer</a>, <a href="../../five/model/view-layer.d.ts">ViewLayerInit</a></p>
|
|
11
|
+
</blockquote>
|
|
12
|
+
<p>ViewLayer 是一个具体的渲染图层,它对应一个具体的 3D 数据源(通常是一个 <code>.gltf</code> / <code>.b3dm</code> / <code>.pnts</code> 等 Tileset 入口)。</p>
|
|
13
|
+
<pre><code class="typescript"><span class="hl-8">// 简化定义</span><br/><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">ViewLayer</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-7">Tile3D</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** 图层名称 (如 'mesh', 'point_cloud') */</span><br/><span class="hl-1"> </span><span class="hl-6">name</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 图层类型 */</span><br/><span class="hl-1"> </span><span class="hl-6">type</span><span class="hl-1">: </span><span class="hl-9">"point_cloud"</span><span class="hl-1"> | </span><span class="hl-9">"mesh"</span><span class="hl-1"> | </span><span class="hl-9">"gaussian_splatting"</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 独立的参数配置对象 */</span><br/><span class="hl-1"> </span><span class="hl-6">parameter</span><span class="hl-1">: </span><span class="hl-7">Parameter</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 是否可见 */</span><br/><span class="hl-1"> </span><span class="hl-6">visible</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 对应的 Tileset URL */</span><br/><span class="hl-1"> </span><span class="hl-6">tilesetUrl</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
|
|
14
|
+
</code><button type="button">Copy</button></pre>
|
|
15
|
+
|
|
16
|
+
<h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
17
|
+
<h3 id="1-viewlayer-vs-workmodel" class="tsd-anchor-link">1. ViewLayer vs Work.Model<a href="#1-viewlayer-vs-workmodel" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
18
|
+
<p><code>ViewLayer</code> 的生成逻辑严格依赖于 <code>Work</code> 数据中的定义,但也包含了向后兼容的 Fallback 机制。</p>
|
|
19
|
+
<h4 id="数据来源-data-source" class="tsd-anchor-link">数据来源 (Data Source)<a href="#数据来源-data-source" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
20
|
+
<ol>
|
|
21
|
+
<li>
|
|
22
|
+
<p><strong>优先使用 <code>work.model.layers</code></strong>:
|
|
23
|
+
这是标准的定义方式。<code>work.model.layers</code> 是一个数组,每个元素显式定义了一个 Layer 的 <code>name</code>, <code>type</code>, <code>tileset</code> (URL) 等信息。
|
|
24
|
+
Five 会遍历这个数组,为每一项创建一个 <code>ViewLayer</code> 实例。</p>
|
|
25
|
+
</li>
|
|
26
|
+
<li>
|
|
27
|
+
<p><strong>Fallback to <code>work.model.file</code></strong>:
|
|
28
|
+
如果 <code>work.model.layers</code> 中没有定义 <code>mesh</code> 类型的层,且 <code>work.model.file</code> 存在(旧版数据字段),Five 会自动创建一个 <strong>虚拟的 Mesh Layer</strong>。</p>
|
|
29
|
+
<ul>
|
|
30
|
+
<li><strong>Name</strong>: 默认为 <code>model</code> (或其他内部标识)。</li>
|
|
31
|
+
<li><strong>Type</strong>: <code>mesh</code>。</li>
|
|
32
|
+
<li><strong>URL</strong>: 指向 <code>work.model.file</code>。</li>
|
|
33
|
+
<li><strong>UpAxis</strong>: 根据文件后缀自动推断 (如 <code>.obj</code> 可能需要特殊处理)。</li>
|
|
34
|
+
</ul>
|
|
35
|
+
</li>
|
|
36
|
+
</ol>
|
|
37
|
+
<blockquote>
|
|
38
|
+
<p><strong>总结</strong>: <code>ViewLayer</code> 是 <code>work.model</code> 数据的运行时表现。<code>layers</code> 字段提供了精细的控制,而 <code>file</code> 字段提供了旧数据的兼容支持。</p>
|
|
39
|
+
</blockquote>
|
|
40
|
+
<h3 id="2-viewlayer-vs-3dtile" class="tsd-anchor-link">2. ViewLayer vs 3DTile<a href="#2-viewlayer-vs-3dtile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
41
|
+
<p><code>ViewLayer</code> 本质上是一个 <strong>3DTile</strong> 加载器实例(继承自 <code>Tile3D</code>)。</p>
|
|
42
|
+
<ul>
|
|
43
|
+
<li><strong>加载机制</strong>: 每个 ViewLayer 独立维护一个 3DTiles 的遍历器 (Traverser) 和调度器 (Scheduler)。这意味着 Mesh 层、PointCloud 层和 GaussianSplatting 层是独立加载、独立计算 LOD (Level of Detail) 的。</li>
|
|
44
|
+
<li><strong>空间变换</strong>: ViewLayer 负责处理数据的坐标系转换 (如 ECEF 转 ENU,Y-Up 转 Z-Up),确保不同格式的数据在 Five 场景中正确对齐。</li>
|
|
45
|
+
</ul>
|
|
46
|
+
<h3 id="3-viewlayer-model-modelscene-parameter" class="tsd-anchor-link">3. ViewLayer, Model, ModelScene & Parameter<a href="#3-viewlayer-model-modelscene-parameter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
47
|
+
<p>这是 Five 渲染架构的核心层级关系,<code>Parameter</code> 在其中起到了“胶水”的作用。</p>
|
|
48
|
+
<h4 id="层级关系-hierarchy" class="tsd-anchor-link">层级关系 (Hierarchy)<a href="#层级关系-hierarchy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
49
|
+
<pre><code class="mermaid"><span class="hl-1">graph TD</span><br/><span class="hl-1"> Scene[ModelScene] -->|包含| Model[Model]</span><br/><span class="hl-1"> Model -->|包含| LayerA[ViewLayer (Mesh)]</span><br/><span class="hl-1"> Model -->|包含| LayerB[ViewLayer (PointCloud)]</span>
|
|
50
|
+
</code><button type="button">Copy</button></pre>
|
|
51
|
+
|
|
52
|
+
<h4 id="parameter-的作用-inheritance" class="tsd-anchor-link">Parameter 的作用 (Inheritance)<a href="#parameter-的作用-inheritance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
53
|
+
<p><code>Parameter</code> 系统贯穿了上述三层,实现了**“配置继承与覆盖”**。</p>
|
|
54
|
+
<ol>
|
|
55
|
+
<li><strong>ModelScene (全局配置)</strong>:
|
|
56
|
+
<ul>
|
|
57
|
+
<li>持有 <code>five.modelScene.parameter</code>。</li>
|
|
58
|
+
<li>定义了场景级的默认值(如:默认显存上限 <code>512MB</code>)。</li>
|
|
59
|
+
</ul>
|
|
60
|
+
</li>
|
|
61
|
+
<li><strong>Model (模型级配置)</strong>:
|
|
62
|
+
<ul>
|
|
63
|
+
<li>持有 <code>model.parameter</code>。</li>
|
|
64
|
+
<li>可以覆盖全局配置(如:特定模型需要 <code>1024MB</code> 显存)。</li>
|
|
65
|
+
</ul>
|
|
66
|
+
</li>
|
|
67
|
+
<li><strong>ViewLayer (图层级配置)</strong>:
|
|
68
|
+
<ul>
|
|
69
|
+
<li>持有 <code>viewLayer.parameter</code>。</li>
|
|
70
|
+
<li><strong>最具体的控制点</strong>。它在计算最终值时,会依次继承 <code>Model</code> 和 <code>ModelScene</code> 的配置。</li>
|
|
71
|
+
</ul>
|
|
72
|
+
</li>
|
|
73
|
+
</ol>
|
|
74
|
+
<p><strong>示例场景</strong>:</p>
|
|
75
|
+
<ul>
|
|
76
|
+
<li>如果你想让<strong>整个场景</strong>变暗,设置 <code>modelScene.parameter.set('opacity', 0.5)</code>。</li>
|
|
77
|
+
<li>如果你只想让<strong>点云层</strong>变暗,保留模型层亮度,设置 <code>pointCloudLayer.parameter.set('opacity', 0.5)</code>。</li>
|
|
78
|
+
</ul>
|
|
79
|
+
<h3 id="4-visibility-control-可见性控制" class="tsd-anchor-link">4. Visibility Control (可见性控制)<a href="#4-visibility-control-可见性控制" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
80
|
+
<p>默认情况下,Five <strong>不会</strong>加载所有图层,而是根据优先级<strong>仅加载一个</strong>图层,以节省资源。
|
|
81
|
+
优先级顺序:<code>mesh</code> > <code>point_cloud</code> > 其他类型。</p>
|
|
82
|
+
<p><strong>可见性与内存管理 (Visibility & Memory)</strong>:</p>
|
|
83
|
+
<ul>
|
|
84
|
+
<li><strong>显示 (Show)</strong>: 当图层设置为可见 (<code>visible = true</code>) 时,Five 会开始加载该图层的资源。</li>
|
|
85
|
+
<li><strong>隐藏 (Hide)</strong>: 当图层设置为隐藏 (<code>visible = false</code>) 时,Five 会<strong>释放该图层占用的所有内存资源</strong> (Geometry, Texture 等)。这意味着“隐藏”等同于“卸载”。</li>
|
|
86
|
+
</ul>
|
|
87
|
+
<p>Five 提供了两种层级的可见性控制方式:</p>
|
|
88
|
+
<ol>
|
|
89
|
+
<li>
|
|
90
|
+
<p><strong>初始化配置 (Load Options)</strong>:
|
|
91
|
+
在 <code>five.load</code> 时,通过 <code>model["3d-tiles"].showLayers</code> 参数指定初始显示的图层。</p>
|
|
92
|
+
<ul>
|
|
93
|
+
<li><code>true</code> (默认): 使用上述的默认优先级策略(仅加载一个最佳图层)。</li>
|
|
94
|
+
<li><code>string[]</code>: 仅显示名称在数组中的图层(例如 <code>['mesh', 'point_cloud']</code> 可以强制同时显示模型和点云)。</li>
|
|
95
|
+
</ul>
|
|
96
|
+
</li>
|
|
97
|
+
<li>
|
|
98
|
+
<p><strong>运行时控制 (Runtime Control)</strong>:
|
|
99
|
+
加载完成后,可以直接修改 <code>viewLayer.visible</code> 属性来切换可见性。</p>
|
|
100
|
+
</li>
|
|
101
|
+
</ol>
|
|
102
|
+
<h2 id="configuration" class="tsd-anchor-link">Configuration<a href="#configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
103
|
+
<p>ViewLayer 的配置主要通过其 <code>parameter</code> 属性进行。</p>
|
|
104
|
+
<h3 id="common-configuration" class="tsd-anchor-link">Common Configuration<a href="#common-configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
105
|
+
<table>
|
|
106
|
+
<thead>
|
|
107
|
+
<tr>
|
|
108
|
+
<th style="text-align:left">Parameter</th>
|
|
109
|
+
<th style="text-align:left">Type</th>
|
|
110
|
+
<th style="text-align:left">Description</th>
|
|
111
|
+
</tr>
|
|
112
|
+
</thead>
|
|
113
|
+
<tbody>
|
|
114
|
+
<tr>
|
|
115
|
+
<td style="text-align:left"><code>visible</code></td>
|
|
116
|
+
<td style="text-align:left"><code>boolean</code></td>
|
|
117
|
+
<td style="text-align:left">控制图层的可见性 (也可直接修改 <code>viewLayer.visible</code>)。</td>
|
|
118
|
+
</tr>
|
|
119
|
+
<tr>
|
|
120
|
+
<td style="text-align:left"><code>opacity</code></td>
|
|
121
|
+
<td style="text-align:left"><code>number</code></td>
|
|
122
|
+
<td style="text-align:left">图层透明度 (0.0 - 1.0)。</td>
|
|
123
|
+
</tr>
|
|
124
|
+
<tr>
|
|
125
|
+
<td style="text-align:left"><code>pointSize</code></td>
|
|
126
|
+
<td style="text-align:left"><code>number</code></td>
|
|
127
|
+
<td style="text-align:left">(仅点云) 点的大小。</td>
|
|
128
|
+
</tr>
|
|
129
|
+
</tbody>
|
|
130
|
+
</table>
|
|
131
|
+
<blockquote>
|
|
132
|
+
<p>更多配置项请参考 <a href="features_parameter.html">Parameter</a> 和 <a href="features_3dtile.html">3DTile Params</a>。</p>
|
|
133
|
+
</blockquote>
|
|
134
|
+
<h2 id="examples" class="tsd-anchor-link">Examples<a href="#examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
135
|
+
<h3 id="1-访问-viewlayer" class="tsd-anchor-link">1. 访问 ViewLayer<a href="#1-访问-viewlayer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
136
|
+
<pre><code class="typescript"><span class="hl-8">// 获取当前模型</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">model</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">model</span><span class="hl-1">;</span><br/><br/><span class="hl-8">// 遍历所有图层</span><br/><span class="hl-6">model</span><span class="hl-1">.</span><span class="hl-6">viewLayers</span><span class="hl-1">.</span><span class="hl-5">forEach</span><span class="hl-1">(</span><span class="hl-6">layer</span><span class="hl-1"> </span><span class="hl-3">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-9">`Layer Name: </span><span class="hl-3">${</span><span class="hl-6">layer</span><span class="hl-12">.</span><span class="hl-6">name</span><span class="hl-3">}</span><span class="hl-9">, Type: </span><span class="hl-3">${</span><span class="hl-6">layer</span><span class="hl-12">.</span><span class="hl-6">type</span><span class="hl-3">}</span><span class="hl-9">`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-8">// 查找特定的图层 (例如点云层)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pointCloudLayer</span><span class="hl-1"> = </span><span class="hl-6">model</span><span class="hl-1">.</span><span class="hl-6">viewLayers</span><span class="hl-1">.</span><span class="hl-5">find</span><span class="hl-1">(</span><span class="hl-6">layer</span><span class="hl-1"> </span><span class="hl-3">=></span><span class="hl-1"> </span><span class="hl-6">layer</span><span class="hl-1">.</span><span class="hl-6">type</span><span class="hl-1"> === </span><span class="hl-9">'point_cloud'</span><span class="hl-1">);</span>
|
|
137
|
+
</code><button type="button">Copy</button></pre>
|
|
138
|
+
|
|
139
|
+
<h3 id="2-独立控制图层可见性" class="tsd-anchor-link">2. 独立控制图层可见性<a href="#2-独立控制图层可见性" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
140
|
+
<pre><code class="typescript"><span class="hl-8">// 方式 A: 运行时控制</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">meshLayer</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">model</span><span class="hl-1">.</span><span class="hl-6">viewLayers</span><span class="hl-1">.</span><span class="hl-5">find</span><span class="hl-1">(</span><span class="hl-6">layer</span><span class="hl-1"> </span><span class="hl-3">=></span><span class="hl-1"> </span><span class="hl-6">layer</span><span class="hl-1">.</span><span class="hl-6">type</span><span class="hl-1"> === </span><span class="hl-9">'mesh'</span><span class="hl-1">);</span><br/><br/><span class="hl-10">if</span><span class="hl-1"> (</span><span class="hl-6">meshLayer</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-8">// 隐藏模型层,只看点云</span><br/><span class="hl-1"> </span><span class="hl-6">meshLayer</span><span class="hl-1">.</span><span class="hl-6">visible</span><span class="hl-1"> = </span><span class="hl-3">false</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">// 或者通过 parameter 设置</span><br/><span class="hl-1"> </span><span class="hl-8">// meshLayer.parameter.set('visible', false);</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-8">// 方式 B: 加载时控制 (初始化时仅显示 mesh)</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-5">load</span><span class="hl-1">(</span><span class="hl-6">work</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-6">model:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-9">"3d-tiles"</span><span class="hl-6">:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">showLayers:</span><span class="hl-1"> [</span><span class="hl-9">'mesh'</span><span class="hl-1">] </span><span class="hl-8">// 仅显示 mesh 层,隐藏 point_cloud 等其他层</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
|
|
141
|
+
</code><button type="button">Copy</button></pre>
|
|
142
|
+
|
|
143
|
+
<h3 id="3-修改特定图层的渲染参数" class="tsd-anchor-link">3. 修改特定图层的渲染参数<a href="#3-修改特定图层的渲染参数" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
144
|
+
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pointCloudLayer</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">model</span><span class="hl-1">.</span><span class="hl-6">viewLayers</span><span class="hl-1">.</span><span class="hl-5">find</span><span class="hl-1">(</span><span class="hl-6">layer</span><span class="hl-1"> </span><span class="hl-3">=></span><span class="hl-1"> </span><span class="hl-6">layer</span><span class="hl-1">.</span><span class="hl-6">type</span><span class="hl-1"> === </span><span class="hl-9">'point_cloud'</span><span class="hl-1">);</span><br/><br/><span class="hl-10">if</span><span class="hl-1"> (</span><span class="hl-6">pointCloudLayer</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-8">// 仅修改点云层的点大小,不影响其他模型</span><br/><span class="hl-1"> </span><span class="hl-6">pointCloudLayer</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">'pointSize'</span><span class="hl-1">, </span><span class="hl-11">2.0</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-8">// 仅修改点云层的最大显存占用</span><br/><span class="hl-1"> </span><span class="hl-6">pointCloudLayer</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">'maxMemoryUsage'</span><span class="hl-1">, </span><span class="hl-11">128</span><span class="hl-1">);</span><br/><span class="hl-1">}</span>
|
|
145
|
+
</code><button type="button">Copy</button></pre>
|
|
146
|
+
|
|
147
|
+
<h2 id="related" class="tsd-anchor-link">Related<a href="#related" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
148
|
+
<ul>
|
|
149
|
+
<li><a href="features_model.html">Model</a>: ViewLayer 的父级容器。</li>
|
|
150
|
+
<li><a href="features_work.html">Work</a>: 定义 ViewLayer 数据结构的数据源。</li>
|
|
151
|
+
<li><a href="features_parameter.html">Parameter</a>: 控制 ViewLayer 渲染表现的配置系统。</li>
|
|
152
|
+
<li><a href="features_3dtile.html">3DTile</a>: ViewLayer 的底层技术实现。</li>
|
|
153
|
+
</ul>
|
|
154
|
+
<hr>
|
|
155
|
+
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">viewlayer</span><span class="hl-1">, </span><span class="hl-2">model</span><span class="hl-1">, </span><span class="hl-2">3dtile</span><span class="hl-1">, </span><span class="hl-2">parameter</span><span class="hl-1">, </span><span class="hl-2">layer</span><span class="hl-1">]</span>
|
|
156
|
+
</code><button type="button">Copy</button></pre>
|
|
157
|
+
|
|
158
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#viewlayer-视图层"><span>View<wbr/>Layer (视图层)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#1-viewlayer-vs-workmodel"><span>1. <wbr/>View<wbr/>Layer vs <wbr/>Work.<wbr/>Model</span></a></li><li><ul><li><a href="#数据来源-data-source"><span>数据来源 (<wbr/>Data <wbr/>Source)</span></a></li></ul></li><li><a href="#2-viewlayer-vs-3dtile"><span>2. <wbr/>View<wbr/>Layer vs 3<wbr/>D<wbr/>Tile</span></a></li><li><a href="#3-viewlayer-model-modelscene-parameter"><span>3. <wbr/>View<wbr/>Layer, <wbr/>Model, <wbr/>Model<wbr/>Scene & <wbr/>Parameter</span></a></li><li><ul><li><a href="#层级关系-hierarchy"><span>层级关系 (<wbr/>Hierarchy)</span></a></li><li><a href="#parameter-的作用-inheritance"><span>Parameter 的作用 (<wbr/>Inheritance)</span></a></li></ul></li><li><a href="#4-visibility-control-可见性控制"><span>4. <wbr/>Visibility <wbr/>Control (可见性控制)</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#common-configuration"><span>Common <wbr/>Configuration</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-访问-viewlayer"><span>1. 访问 <wbr/>View<wbr/>Layer</span></a></li><li><a href="#2-独立控制图层可见性"><span>2. 独立控制图层可见性</span></a></li><li><a href="#3-修改特定图层的渲染参数"><span>3. 修改特定图层的渲染参数</span></a></li></ul></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|