@realsee/five 6.8.0-alpha.8 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_READ_ME.md +6 -1
- package/AI_CONTEXT.md +6 -1
- package/README.md +10 -3
- package/ai_guides/README.md +32 -2
- package/ai_guides/api.md +92 -21
- package/ai_guides/features/3dtile.md +1 -1
- package/ai_guides/features/camera-animation.md +18 -1
- package/ai_guides/features/clipper.md +2 -2
- package/ai_guides/features/coordinate-system.md +20 -2
- package/ai_guides/features/event.md +106 -10
- package/ai_guides/features/five.md +17 -17
- package/ai_guides/features/flowing-light-2d-pass.md +280 -56
- package/ai_guides/features/flowing-light-3d-pass.md +224 -39
- package/ai_guides/features/gaussian-blur-pass.md +1 -1
- package/ai_guides/features/gesture.md +2 -1
- package/ai_guides/features/get-screen-pixels.md +2 -2
- package/ai_guides/features/image-options.md +2 -2
- package/ai_guides/features/load-external-model.md +6 -2
- package/ai_guides/features/load-progress.md +1 -1
- package/ai_guides/features/material.md +20 -12
- package/ai_guides/features/mode.md +1 -1
- package/ai_guides/features/model.md +1 -1
- package/ai_guides/features/move-pano-effect.md +1 -1
- package/ai_guides/features/multi-work.md +1 -1
- package/ai_guides/features/pano-filter.md +149 -0
- package/ai_guides/features/pano-tile.md +1 -1
- package/ai_guides/features/pano-uv.md +1 -1
- package/ai_guides/features/parameter.md +26 -2
- package/ai_guides/features/plugin.md +1 -1
- package/ai_guides/features/postprocessing.md +1 -1
- package/ai_guides/features/raycast.md +5 -2
- package/ai_guides/features/request-proxy.md +1 -1
- package/ai_guides/features/screen-project.md +2 -1
- package/ai_guides/features/state.md +23 -3
- package/ai_guides/features/view-layer.md +1 -1
- package/ai_guides/features/work.md +1 -1
- package/ai_guides/glossary.md +4 -4
- package/ai_guides/release_notes/6.8.md +190 -58
- package/ai_guides/template.md +11 -0
- package/docs/00_FOR_AI_AGENTS.md +3 -2
- package/docs/README.md +3 -2
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/main.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.BoundingMesh.html +2 -2
- package/docs/classes/five.Camera.html +3 -3
- package/docs/classes/five.EyeDomeLightingPass.html +1 -1
- package/docs/classes/five.Five.html +77 -76
- package/docs/classes/five.FivePass.html +1 -1
- package/docs/classes/five.Histogram.html +19 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +8 -8
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +5 -5
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMCustomShader.html +42 -3
- package/docs/classes/five.PBMGSObject.html +5 -3
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +7 -7
- package/docs/classes/five.PBMPanoFilter.html +61 -0
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PBMUpdateable.html +41 -0
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.Parameter.html +57 -55
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +5 -5
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +24 -24
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +3 -2
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +22 -22
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFLoader.html +2 -2
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.GLTFParser.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +2 -2
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
- package/docs/classes/plugins.CSS3DObject.html +9 -0
- package/docs/classes/plugins.CSS3DRenderer.html +4 -2
- package/docs/classes/plugins.CSS3DSprite.html +11 -0
- package/docs/classes/plugins.Object3DHelperController.html +43 -0
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +6 -6
- package/docs/classes/vfx.ParticleGPU.html +3 -3
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +124 -3
- package/docs/documents/api.html +163 -35
- package/docs/documents/features_3dtile.html +1 -1
- package/docs/documents/features_camera-animation.html +18 -2
- package/docs/documents/features_clipper.html +2 -2
- package/docs/documents/features_coordinate-system.html +52 -3
- package/docs/documents/features_event.html +44 -8
- package/docs/documents/features_five.html +17 -17
- package/docs/documents/features_flowing-light-2d-pass.html +176 -41
- package/docs/documents/features_flowing-light-3d-pass.html +160 -40
- package/docs/documents/features_gaussian-blur-pass.html +6 -6
- package/docs/documents/features_gesture.html +2 -1
- package/docs/documents/features_get-screen-pixels.html +2 -2
- package/docs/documents/features_image-options.html +2 -2
- package/docs/documents/features_load-external-model.html +6 -2
- package/docs/documents/features_load-progress.html +1 -1
- package/docs/documents/features_material.html +11 -4
- package/docs/documents/features_mode.html +1 -1
- package/docs/documents/features_model.html +1 -1
- package/docs/documents/features_move-pano-effect.html +1 -1
- package/docs/documents/features_multi-work.html +1 -1
- package/docs/documents/features_pano-filter.html +123 -0
- package/docs/documents/features_pano-tile.html +1 -1
- package/docs/documents/features_pano-uv.html +1 -1
- package/docs/documents/features_parameter.html +11 -3
- package/docs/documents/features_plugin.html +1 -1
- package/docs/documents/features_postprocessing.html +1 -1
- package/docs/documents/features_raycast.html +5 -2
- package/docs/documents/features_request-proxy.html +1 -1
- package/docs/documents/features_screen-project.html +2 -1
- package/docs/documents/features_state.html +9 -2
- package/docs/documents/features_view-layer.html +1 -1
- package/docs/documents/features_work.html +1 -1
- package/docs/documents/glossary.html +5 -5
- package/docs/documents/release_notes_6.8.html +164 -64
- package/docs/documents/template.html +9 -0
- package/docs/functions/five.createDebugBoundingMesh.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/plugins.CSS3DPlugin.html +1 -0
- package/docs/functions/plugins.GaussianSplattingEntranceAnimationPlugin.html +1 -0
- package/docs/functions/plugins.Object3DHelperPlugin.html +1 -0
- package/docs/functions/react.useFiveCurrentObserver.html +2 -2
- package/docs/functions/react.useFiveFloor.html +2 -2
- package/docs/functions/react.useFiveProject2d.html +2 -2
- package/docs/functions/vue.useFiveCurrentObserver.html +2 -2
- package/docs/functions/vue.useFiveFloor.html +2 -2
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +124 -3
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +7 -2
- package/docs/interfaces/five.BaseExtendableEvent.html +11 -0
- package/docs/interfaces/five.EventCallback.html +58 -54
- package/docs/interfaces/five.FiveInitArgs.html +2 -2
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +21 -2
- package/docs/interfaces/five.GesturePointer.html +20 -0
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +10 -2
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +1 -1
- package/docs/interfaces/five.LooseWorkObserver.html +2 -2
- package/docs/interfaces/five.LooseWorkPanorama.html +2 -2
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +10 -10
- package/docs/interfaces/five.ModeChangeEvent.html +9 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +7 -2
- package/docs/interfaces/five.ModelSceneEvent.html +7 -2
- package/docs/interfaces/five.ModelTileEvent.html +7 -2
- package/docs/interfaces/five.MovePanoOptions.html +8 -8
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +7 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +7 -2
- package/docs/interfaces/five.PBMClipperParameter.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
- package/docs/interfaces/five.PBMPanoDepth.html +5 -5
- package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
- package/docs/interfaces/five.PBMPanoPicture.html +8 -6
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
- package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
- package/docs/interfaces/five.PanoCircleMeshInterface.html +2 -2
- package/docs/interfaces/five.PanoEvent.html +15 -2
- package/docs/interfaces/five.PanoPrepareEvent.html +15 -0
- package/docs/interfaces/five.PanoTextureEvent.html +11 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +40 -38
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +54 -52
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +7 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +55 -54
- package/docs/interfaces/five.RgbaData.html +7 -0
- package/docs/interfaces/five.SplatData.html +2 -2
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +9 -2
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DOptions.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +24 -24
- package/docs/interfaces/five.WorkCubeImage.html +3 -2
- package/docs/interfaces/five.WorkImage.html +6 -5
- package/docs/interfaces/five.WorkInitial.html +8 -8
- package/docs/interfaces/five.WorkModel.html +8 -8
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +29 -29
- package/docs/interfaces/five.WorkObserverJson.html +2 -2
- package/docs/interfaces/five.WorkObserverProto.html +26 -0
- package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
- package/docs/interfaces/five.WorkTile.html +6 -5
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +7 -2
- package/docs/interfaces/five.XRControllerEvent.html +10 -2
- package/docs/interfaces/five.XRControllerState.html +8 -0
- package/docs/interfaces/five.XRGestureEvent.html +13 -2
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +9 -2
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
- package/docs/interfaces/plugins.CSS3DPluginController.html +52 -0
- package/docs/interfaces/plugins.CSS3DPluginType.Config.html +2 -0
- package/docs/interfaces/plugins.CSS3DPluginType.CreateCSS3DObjectType.html +10 -0
- package/docs/interfaces/plugins.CSS3DPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.CSS3DPluginType.Params.html +4 -0
- package/docs/interfaces/plugins.CSS3DPluginType.State.html +8 -0
- package/docs/interfaces/plugins.CSS3DRendererParameters.html +2 -0
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +3 -3
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationController.html +44 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.BoundingAABB2D.html +3 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Config.html +8 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.EventMap.html +10 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Keyframe.html +3 -0
- package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.State.html +8 -0
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +2 -2
- package/docs/interfaces/plugins.Object3DHelperPluginType.BaseController.html +30 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.BaseHelper.html +22 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.BoundingBoxController.html +30 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.HelperOffset.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.MoveController.html +36 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.MoveHelperAbstract.html +32 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelper.html +12 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelperPluginState.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Object3DHelperState.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.ObjectHelperControllers.html +4 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.RotateController.html +36 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.RotateHelperAbstract.html +28 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Scissor.html +5 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Vector2Position.html +3 -0
- package/docs/interfaces/plugins.Object3DHelperPluginType.Vector3Position.html +4 -0
- package/docs/interfaces/plugins.OrientationPluginController.html +6 -6
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PlayingState.html +2 -2
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +8 -8
- package/docs/interfaces/react.FiveInjectionTypes.html +21 -21
- package/docs/interfaces/sticker.IntersectionLike.html +2 -2
- package/docs/interfaces/vfx.ParticleArgs.html +4 -4
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +3 -3
- package/docs/modules/five.html +1 -1
- package/docs/modules/plugins.CSS3DPluginType.html +1 -0
- package/docs/modules/plugins.GaussianSplattingEntranceAnimationPluginType.html +1 -0
- package/docs/modules/plugins.Object3DHelperPluginType.html +1 -0
- package/docs/modules/plugins.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +30 -26
- package/docs/types/five.EasingFunction.html +1 -0
- package/docs/types/five.EventTypes.html +26 -26
- package/docs/types/five.LegacyEventType.html +7 -7
- package/docs/types/five.PBMAlphaMode.html +1 -1
- package/docs/types/five.PBMColorStyle.html +1 -1
- package/docs/types/five.PBMFloorStyle.html +1 -1
- package/docs/types/five.PBMMeshShaderType.html +1 -1
- package/docs/types/five.PBMPointBack.html +1 -1
- package/docs/types/five.PBMPointCloudShaderType.html +1 -1
- package/docs/types/five.PBMPointShape.html +1 -1
- package/docs/types/five.PBMPointSize.html +1 -1
- package/docs/types/five.PBMTransition.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/five.Works.html +1 -1
- package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
- package/docs/types/plugins.CSS3DPluginType.PluginData.html +1 -0
- package/docs/types/plugins.CSS3DPluginType.ServerData.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.AddObject3DHelperConfig.html +13 -0
- package/docs/types/plugins.Object3DHelperPluginType.Circle.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Color.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Direction.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Direction4.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.HelperConfig.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.HelperEventMap.html +17 -0
- package/docs/types/plugins.Object3DHelperPluginType.InternalHelperEventMap.html +8 -0
- package/docs/types/plugins.Object3DHelperPluginType.Object3DHelperEventMap.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Object3DHelperPluginEventMap.html +7 -0
- package/docs/types/plugins.Object3DHelperPluginType.PositionFrom.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.ScaleCallback.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.ScalePosition.html +4 -0
- package/docs/types/plugins.Object3DHelperPluginType.UseFaceNormalInterface.html +4 -0
- package/docs/types/plugins.Object3DHelperPluginType.Vector2WithArray.html +1 -0
- package/docs/types/plugins.Object3DHelperPluginType.Vector3WithArray.html +1 -0
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/five/application/events.d.ts +1 -1
- package/five/application/five.d.ts +6 -5
- package/five/bvh/bvhObject.d.ts +2 -2
- package/five/controllers/base.d.ts +1 -0
- package/five/controllers/events.d.ts +5 -1
- package/five/controllers/mapview.d.ts +1 -0
- package/five/controllers/model.d.ts +2 -2
- package/five/controllers/panorama.d.ts +3 -2
- package/five/controllers/xrPanorama.d.ts +1 -1
- package/five/core/camera.d.ts +1 -1
- package/five/gaussian-splatting/util/renderData.d.ts +66 -0
- package/five/index.d.ts +4 -1
- package/five/index.js +272 -748
- package/five/index.mjs +26894 -32055
- package/five/meshes/boundingMesh.d.ts +1 -0
- package/five/model/index.d.ts +2 -2
- package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +2 -2
- package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting.d.ts +26 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +8 -6
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +13 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +3 -1
- package/five/model/loaders/glTF-helpers/index.d.ts +4 -2
- package/five/model/loaders/glTF-helpers/parser.d.ts +16 -14
- package/five/model/loaders/spz.d.ts +2 -2
- package/five/model/materials/pbmMaterial.d.ts +54 -4
- package/five/model/materials/pbmMeshMaterial.d.ts +5 -3
- package/five/model/materials/pbmPointCloudMaterial.d.ts +0 -2
- package/five/model/objects/{pbmGSObject.d.ts → pbmGaussianSplattingObject.d.ts} +4 -1
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +59 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
- package/five/model/parameter.d.ts +11 -6
- package/five/model/tile3d/index.d.ts +5 -3
- package/five/model/tile3d/tile-node.d.ts +2 -2
- package/five/model/tile3d/tileset.d.ts +1 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +9 -7
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +16 -2
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +16 -2
- package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +1 -1
- package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
- package/five/renderer/tools/render-full-screen.d.ts +1 -1
- package/five/texture/histogram.d.ts +54 -0
- package/five/texture/loader.d.ts +1 -1
- package/five/texture/textureData.d.ts +11 -0
- package/five/thirdparty/hammer.d.ts +371 -255
- package/five/thirdparty/jsrsasign.d.ts +5 -20
- package/five/types/movePanoOptions.d.ts +4 -3
- package/five/utils/error.d.ts +1 -0
- package/five/utils/event.d.ts +98 -37
- package/five/utils/imageURL.d.ts +1 -1
- package/five/utils/memoryUsage.d.ts +2 -2
- package/five/utils/subscribe.d.ts +2 -2
- package/five/webxr/motionHelper.d.ts +1 -1
- package/five/work/index.d.ts +1 -0
- package/five/work/looseWorkType.d.ts +2 -2
- package/five/work/work.d.ts +5 -35
- package/five/work/workJsonType.d.ts +2 -2
- package/five/work/workObserverProto.d.ts +39 -0
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/llms.txt +40 -3
- package/package.json +4 -4
- package/plugins/CSS3DPlugin/Controller.d.ts +64 -0
- package/plugins/CSS3DPlugin/index.d.ts +5 -0
- package/plugins/CSS3DPlugin/typing.d.ts +32 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +30 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +5 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/typing.d.ts +28 -0
- package/plugins/Object3DHelperPlugin/Controller.d.ts +99 -0
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.d.ts +142 -0
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.d.ts +66 -0
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.d.ts +61 -0
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.d.ts +17 -0
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.d.ts +97 -0
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.d.ts +37 -0
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.d.ts +93 -0
- package/plugins/Object3DHelperPlugin/constant.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/index.d.ts +6 -0
- package/plugins/Object3DHelperPlugin/typing.d.ts +143 -0
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.d.ts +22 -0
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.d.ts +23 -0
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.d.ts +19 -0
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.d.ts +2 -0
- package/plugins/Object3DHelperPlugin/utils/direction.d.ts +14 -0
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/solidGuide.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/utils/tipsDom.d.ts +8 -0
- package/plugins/TrajectoryPlugin/Controller.d.ts +1 -1
- package/plugins/index.d.ts +4 -1
- package/plugins/index.js +35 -21
- package/plugins/index.mjs +5418 -4238
- package/plugins/thirdParty/CSS3DRenderer.d.ts +16 -3
- package/plugins/thirdParty/domevents.d.ts +36 -0
- package/plugins/utils/uuid.d.ts +1 -4
- package/react/context.d.ts +3 -2
- package/react/createProvider.d.ts +4 -4
- package/react/createStore.d.ts +3 -3
- package/react/hooks/useFiveProject2d.d.ts +1 -1
- package/react/index.js +3 -3
- package/react/index.mjs +572 -783
- package/react/rendererPool.d.ts +2 -2
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +35 -21
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +13 -14
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +21 -21
- package/umd/five-vue.js +3 -3
- package/umd/five.js +267 -743
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/vue/rendererPool.d.ts +5 -5
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +339 -556
- package/five/gs/util/renderData.d.ts +0 -32
- package/five/model/loaders/glTF-helpers/extensions/PBM_mesh.d.ts +0 -11
- package/five/model/objects/pbmGSRenderMesh.d.ts +0 -29
- package/five/work/workObserverUtils.d.ts +0 -36
- /package/five/assets/{realsee-pmg-data-url.d.ts → realsee-png-data-url.d.ts} +0 -0
- /package/five/{gs → gaussian-splatting}/wasm/data.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/wasm/sort.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/dataWorker.d.ts +0 -0
- /package/five/{gs → gaussian-splatting}/worker/sortWorker.d.ts +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# Flowing Light 3D Pass (流光 3D 通道)
|
|
2
2
|
|
|
3
|
-
- **Summary**: `FlowingLight3DPass` 基于 3D
|
|
3
|
+
- **Summary**: `FlowingLight3DPass` 基于 3D 世界坐标绘制流光效果,使用 InstancedMesh 实例化渲染优化性能,自动投影到屏幕空间,适合沿模型表面、路径或空间轨迹演示动态流动光带。
|
|
4
4
|
- **Schema**: `FlowingLight3DPass` 类及 Line 数据结构。
|
|
5
|
-
- **Concepts**: 基于相机投影的 3D
|
|
6
|
-
- **Configuration**: 3D
|
|
7
|
-
- **Examples**: 空间轨迹演示、结合相机动画、多条 3D
|
|
5
|
+
- **Concepts**: 基于相机投影的 3D 光带、InstancedMesh 实例化渲染、世界坐标到屏幕坐标映射、头尾追逐动画。
|
|
6
|
+
- **Configuration**: 3D 路径点、颜色、不透明度、线宽、动画周期、延迟。
|
|
7
|
+
- **Examples**: 空间轨迹演示、结合相机动画、多条 3D 路径、高 DPR 场景优化。
|
|
8
8
|
|
|
9
9
|
## Schema
|
|
10
10
|
|
|
11
11
|
> **Definition**: [FlowingLight3DPass](../../five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts)
|
|
12
12
|
|
|
13
|
-
`FlowingLight3DPass` 继承自 `FivePass
|
|
13
|
+
`FlowingLight3DPass` 继承自 `FivePass`,支持投影到当前相机视锥。核心接口如下:
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
import * as THREE from 'three';
|
|
@@ -18,11 +18,15 @@ import { FivePass } from './pass';
|
|
|
18
18
|
import { type Camera } from '../../../core/camera';
|
|
19
19
|
|
|
20
20
|
type Line = {
|
|
21
|
+
id?: string; // 可选的唯一标识符,不传则自动生成 UUID
|
|
21
22
|
points: THREE.Vector3[]; // 世界坐标系路径点
|
|
22
|
-
totalLength: number; //
|
|
23
|
+
totalLength: number; // 路径总长度(世界单位)
|
|
23
24
|
color: THREE.Color; // 光带颜色
|
|
24
|
-
opacity?: number; //
|
|
25
|
-
duration?: number; //
|
|
25
|
+
opacity?: number; // 光带不透明度(0-1)
|
|
26
|
+
duration?: number; // 动画周期(毫秒)
|
|
27
|
+
delay?: number; // 动画延迟(毫秒)
|
|
28
|
+
lineWidth?: number; // 线宽(像素)
|
|
29
|
+
tailLengthRatio?: number; // 尾巴长度比例(0-1),默认 0.2
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
export class FlowingLight3DPass extends FivePass {
|
|
@@ -31,6 +35,9 @@ export class FlowingLight3DPass extends FivePass {
|
|
|
31
35
|
// 设置要渲染的路径列表
|
|
32
36
|
public setLines(lines: Line[]): void;
|
|
33
37
|
|
|
38
|
+
// 修改单条线的参数(通过 id)
|
|
39
|
+
public setLine(params: { id: string } & Partial<Omit<Line, 'id'>>): void;
|
|
40
|
+
|
|
34
41
|
public render(
|
|
35
42
|
renderer: THREE.WebGLRenderer,
|
|
36
43
|
writeBuffer: THREE.WebGLRenderTarget,
|
|
@@ -42,17 +49,28 @@ export class FlowingLight3DPass extends FivePass {
|
|
|
42
49
|
public dispose(): void;
|
|
43
50
|
}
|
|
44
51
|
```
|
|
45
|
-
|
|
46
52
|
## Concepts
|
|
47
53
|
|
|
54
|
+
### InstancedMesh 实例化渲染 (Instanced Rendering)
|
|
55
|
+
为了优化高 DPR(Device Pixel Ratio)场景下的性能,该 Pass 使用 InstancedMesh 代替全屏着色器。每个线段作为一个实例,只渲染线段覆盖的区域,避免了对每个像素的全屏检查,显著提升了渲染效率。
|
|
56
|
+
|
|
48
57
|
### 世界空间路径与投影 (World-space Projection)
|
|
49
|
-
路径点定义在 3D 世界坐标系中。Pass 内部自动根据当前相机投影矩阵将 3D
|
|
58
|
+
路径点定义在 3D 世界坐标系中。Pass 内部自动根据当前相机投影矩阵将 3D 点映射到屏幕空间,从而实现"随相机变化"的动态光带效果。
|
|
59
|
+
|
|
60
|
+
### 头尾追逐动画 (Head-Tail Chase Animation)
|
|
61
|
+
流光效果采用"头尾追逐"模式:
|
|
62
|
+
- **头部(Head)**: 光流的前端,沿路径循环移动
|
|
63
|
+
- **尾部(Tail)**: 光流的后端,跟随头部移动
|
|
64
|
+
- **渐变**: 从尾部(透明度 0)到头部(透明度 1)线性渐变
|
|
65
|
+
- **尾长**: 尾部长度由 `tailLengthRatio` 参数控制(默认 0.2,即路径总长的 20%)
|
|
50
66
|
|
|
51
|
-
|
|
52
|
-
默认使用循环模式(`LOOP = true`),光头在路径上循环流动,无起点/终点的区分。尾部长度为路径总长的 1/4。
|
|
67
|
+
光头在路径上循环流动,通过 `gl_FragCoord` 投影到线段上计算每个像素的渐变位置,确保渐变效果准确。尾巴长度会在动画开始时逐渐增长,直到达到 `tailLengthRatio * totalLength`。
|
|
53
68
|
|
|
54
69
|
### 相机同步
|
|
55
|
-
Pass
|
|
70
|
+
Pass 自动同步相机的投影矩阵和视图矩阵,无需手动管理。支持相机运动时光带跟随。
|
|
71
|
+
|
|
72
|
+
### DPR 处理
|
|
73
|
+
自动处理高 DPR 场景,渲染目标尺寸根据 `readBuffer` 自动调整,确保在 Retina 等高分辨率屏幕上位置准确且性能优化。
|
|
56
74
|
|
|
57
75
|
## Configuration
|
|
58
76
|
|
|
@@ -60,25 +78,32 @@ Pass 自动同步相机的投影矩阵和视图矩阵,无需手动管理。支
|
|
|
60
78
|
|
|
61
79
|
| Parameter | Type | Required | Default | Description |
|
|
62
80
|
| :--- | :--- | :--- | :--- | :--- |
|
|
81
|
+
| `id` | `string` | | 自动生成 UUID | 唯一标识符,用于 `setLine` 方法更新单条线。 |
|
|
63
82
|
| `points` | `THREE.Vector3[]` | ✓ | - | 世界坐标系路径点数组。至少 2 个点。 |
|
|
64
|
-
| `totalLength` | `number` | ✓ | - |
|
|
65
|
-
| `color` | `THREE.Color` | ✓ | - |
|
|
66
|
-
| `opacity` | `number` | | `1` |
|
|
67
|
-
| `duration` | `number` | | `1000` |
|
|
83
|
+
| `totalLength` | `number` | ✓ | - | 路径总长度(世界单位)。通常为所有相邻点间距离之和。 |
|
|
84
|
+
| `color` | `THREE.Color` | ✓ | - | 光带颜色(RGB)。 |
|
|
85
|
+
| `opacity` | `number` | | `1.0` | 光带不透明度(0-1)。控制与背景的混合强度。 |
|
|
86
|
+
| `duration` | `number` | | `1000` | 动画周期(毫秒)。光头完成一个循环所需时长。 |
|
|
87
|
+
| `delay` | `number` | | `0` | 动画延迟(毫秒)。延迟后才开始播放动画。 |
|
|
88
|
+
| `lineWidth` | `number` | | `3.0` | 线宽(像素)。控制光带在屏幕上的宽度。 |
|
|
89
|
+
| `tailLengthRatio` | `number` | | `0.2` | 尾巴长度比例(0-1)。控制流光尾巴相对于路径总长的比例。 |
|
|
68
90
|
|
|
69
|
-
> **注意**: `totalLength`
|
|
91
|
+
> **注意**: `totalLength` 应为世界坐标单位。若不准确,流速会偏差。
|
|
70
92
|
|
|
71
93
|
## Instance Methods
|
|
72
94
|
|
|
73
95
|
### `constructor(camera: Camera)`
|
|
74
|
-
初始化 Pass
|
|
96
|
+
初始化 Pass,需传入相机以获取投影矩阵和视图矩阵。
|
|
75
97
|
|
|
76
98
|
### `setLines(lines: Line[])`
|
|
77
99
|
更新要渲染的路径列表。支持运行时动态更改。
|
|
78
100
|
|
|
79
|
-
|
|
101
|
+
**自动生成 ID**: 如果 line 没有提供 `id`,会自动生成 UUID。
|
|
102
|
+
|
|
103
|
+
**示例**:
|
|
80
104
|
```ts
|
|
81
105
|
const pathLine: Line = {
|
|
106
|
+
id: 'my-3d-line', // 可选,不传则自动生成
|
|
82
107
|
points: [
|
|
83
108
|
new THREE.Vector3(0, 0, 0),
|
|
84
109
|
new THREE.Vector3(5, 2, 3),
|
|
@@ -88,21 +113,74 @@ const pathLine: Line = {
|
|
|
88
113
|
color: new THREE.Color(0xff6600),
|
|
89
114
|
opacity: 0.85,
|
|
90
115
|
duration: 3000,
|
|
116
|
+
delay: 500,
|
|
117
|
+
lineWidth: 4.0,
|
|
91
118
|
};
|
|
92
119
|
pass.setLines([pathLine]);
|
|
93
120
|
```
|
|
94
121
|
|
|
122
|
+
### `setLine(params: { id: string } & Partial<Omit<Line, 'id'>>)`
|
|
123
|
+
通过 `id` 修改单条线的参数。支持部分更新,只更新传入的字段。
|
|
124
|
+
|
|
125
|
+
**性能优化**:
|
|
126
|
+
- 如果 `points` 数量不变,只更新 GPU 的 instance attributes,性能极高
|
|
127
|
+
- 如果 `points` 数量改变,会重建整个 mesh,性能开销较大
|
|
128
|
+
|
|
129
|
+
**示例**:
|
|
130
|
+
```ts
|
|
131
|
+
// 只修改颜色 - 高性能
|
|
132
|
+
pass.setLine({
|
|
133
|
+
id: 'my-3d-line',
|
|
134
|
+
color: new THREE.Color(0xff0000),
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// 修改多个属性 - 高性能
|
|
138
|
+
pass.setLine({
|
|
139
|
+
id: 'my-3d-line',
|
|
140
|
+
color: new THREE.Color(0x00ff00),
|
|
141
|
+
opacity: 0.5,
|
|
142
|
+
duration: 3000,
|
|
143
|
+
lineWidth: 5.0,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// 修改 points (相同数量) - 高性能
|
|
147
|
+
pass.setLine({
|
|
148
|
+
id: 'my-3d-line',
|
|
149
|
+
points: [
|
|
150
|
+
new THREE.Vector3(0, 0, 0),
|
|
151
|
+
new THREE.Vector3(6, 3, 4),
|
|
152
|
+
new THREE.Vector3(12, 2, 8),
|
|
153
|
+
], // 仍是 3 个点
|
|
154
|
+
totalLength: 15,
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// 修改 points (不同数量) - 会重建 mesh
|
|
158
|
+
pass.setLine({
|
|
159
|
+
id: 'my-3d-line',
|
|
160
|
+
points: [
|
|
161
|
+
new THREE.Vector3(0, 0, 0),
|
|
162
|
+
new THREE.Vector3(10, 5, 5),
|
|
163
|
+
], // 从 3 个点变为 2 个点
|
|
164
|
+
totalLength: 12,
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**注意事项**:
|
|
169
|
+
- 如果 `id` 不存在,会在控制台输出警告
|
|
170
|
+
- 动画时间(`uTime`)不会被重置,流光继续从当前位置播放
|
|
171
|
+
- 建议修改 `points` 时同时更新 `totalLength`
|
|
172
|
+
|
|
95
173
|
### `render(...)`
|
|
96
|
-
由 EffectComposer
|
|
174
|
+
由 EffectComposer 自动调用,无需手动调用。自动同步相机矩阵和渲染目标尺寸。
|
|
97
175
|
|
|
98
176
|
### `dispose()`
|
|
99
|
-
|
|
177
|
+
释放 InstancedMesh、着色材质和渲染目标资源,销毁 Pass 时必须调用。
|
|
100
178
|
|
|
101
179
|
## Examples
|
|
102
180
|
|
|
103
181
|
### 快速上手 (Quick Example)
|
|
104
182
|
|
|
105
|
-
```
|
|
183
|
+
```typescript
|
|
106
184
|
import { Five } from '@realsee/five';
|
|
107
185
|
import { FlowingLight3DPass } from '../../lib/five/renderer/postprocessing';
|
|
108
186
|
import * as THREE from 'three';
|
|
@@ -112,7 +190,7 @@ const five = new Five();
|
|
|
112
190
|
// 创建 3D 流光通道
|
|
113
191
|
const flowing3D = new FlowingLight3DPass(five.camera);
|
|
114
192
|
|
|
115
|
-
// 定义一条 3D
|
|
193
|
+
// 定义一条 3D 路径(世界坐标)
|
|
116
194
|
const path = [
|
|
117
195
|
new THREE.Vector3(-5, 0, 0),
|
|
118
196
|
new THREE.Vector3(-2, 3, 2),
|
|
@@ -127,6 +205,7 @@ flowing3D.setLines([{
|
|
|
127
205
|
color: new THREE.Color(0x00ff88),
|
|
128
206
|
opacity: 0.8,
|
|
129
207
|
duration: 4000,
|
|
208
|
+
lineWidth: 3.0,
|
|
130
209
|
}]);
|
|
131
210
|
|
|
132
211
|
five.addPass(flowing3D);
|
|
@@ -138,9 +217,10 @@ function animate() {
|
|
|
138
217
|
animate();
|
|
139
218
|
```
|
|
140
219
|
|
|
220
|
+
|
|
141
221
|
### 多条 3D 路径
|
|
142
222
|
|
|
143
|
-
```
|
|
223
|
+
```typescript
|
|
144
224
|
const pass = new FlowingLight3DPass(camera);
|
|
145
225
|
|
|
146
226
|
const paths = [
|
|
@@ -152,6 +232,7 @@ const paths = [
|
|
|
152
232
|
totalLength: 11,
|
|
153
233
|
color: new THREE.Color(0xff0000),
|
|
154
234
|
duration: 2000,
|
|
235
|
+
lineWidth: 3.0,
|
|
155
236
|
},
|
|
156
237
|
{
|
|
157
238
|
points: [
|
|
@@ -161,6 +242,8 @@ const paths = [
|
|
|
161
242
|
totalLength: 12,
|
|
162
243
|
color: new THREE.Color(0x00ff00),
|
|
163
244
|
duration: 2500,
|
|
245
|
+
delay: 500,
|
|
246
|
+
lineWidth: 4.0,
|
|
164
247
|
},
|
|
165
248
|
{
|
|
166
249
|
points: [
|
|
@@ -170,15 +253,18 @@ const paths = [
|
|
|
170
253
|
totalLength: 11,
|
|
171
254
|
color: new THREE.Color(0x0000ff),
|
|
172
255
|
duration: 2200,
|
|
256
|
+
delay: 1000,
|
|
257
|
+
lineWidth: 2.5,
|
|
173
258
|
},
|
|
174
259
|
];
|
|
175
260
|
|
|
176
261
|
pass.setLines(paths);
|
|
177
262
|
```
|
|
178
263
|
|
|
264
|
+
|
|
179
265
|
### 计算 3D 路径长度
|
|
180
266
|
|
|
181
|
-
```
|
|
267
|
+
```typescript
|
|
182
268
|
function calculatePath3DLength(points: THREE.Vector3[]): number {
|
|
183
269
|
let length = 0;
|
|
184
270
|
for (let i = 1; i < points.length; i++) {
|
|
@@ -187,25 +273,38 @@ function calculatePath3DLength(points: THREE.Vector3[]): number {
|
|
|
187
273
|
return length;
|
|
188
274
|
}
|
|
189
275
|
|
|
276
|
+
const points = [
|
|
277
|
+
new THREE.Vector3(0, 0, 0),
|
|
278
|
+
new THREE.Vector3(5, 2, 3),
|
|
279
|
+
new THREE.Vector3(10, 1, 6),
|
|
280
|
+
];
|
|
281
|
+
|
|
190
282
|
const pathLine = {
|
|
191
|
-
points:
|
|
283
|
+
points: points,
|
|
192
284
|
totalLength: calculatePath3DLength(points),
|
|
193
285
|
color: new THREE.Color(0x00ccff),
|
|
194
286
|
duration: 3000,
|
|
287
|
+
lineWidth: 3.0,
|
|
195
288
|
};
|
|
196
289
|
```
|
|
197
290
|
|
|
291
|
+
|
|
198
292
|
### 结合相机动画
|
|
199
293
|
|
|
200
|
-
```
|
|
294
|
+
```typescript
|
|
201
295
|
// 光带路径随相机移动自动投影
|
|
202
296
|
const pass = new FlowingLight3DPass(camera);
|
|
203
297
|
|
|
204
298
|
pass.setLines([{
|
|
205
|
-
points: [
|
|
299
|
+
points: [
|
|
300
|
+
new THREE.Vector3(-10, 0, 0),
|
|
301
|
+
new THREE.Vector3(0, 5, 0),
|
|
302
|
+
new THREE.Vector3(10, 0, 0),
|
|
303
|
+
],
|
|
206
304
|
totalLength: 20,
|
|
207
305
|
color: new THREE.Color(0xffff00),
|
|
208
306
|
duration: 3000,
|
|
307
|
+
lineWidth: 4.0,
|
|
209
308
|
}]);
|
|
210
309
|
|
|
211
310
|
// 相机动画过程中光带自动跟随投影
|
|
@@ -215,18 +314,105 @@ five.setState({
|
|
|
215
314
|
});
|
|
216
315
|
```
|
|
217
316
|
|
|
317
|
+
|
|
318
|
+
### 高 DPR 场景优化
|
|
319
|
+
|
|
320
|
+
```typescript
|
|
321
|
+
// InstancedMesh 实现自动优化高 DPR 性能
|
|
322
|
+
// 在 DPR=2 的 Retina 屏幕上,性能显著优于全屏着色器方案
|
|
323
|
+
|
|
324
|
+
const pass = new FlowingLight3DPass(camera);
|
|
325
|
+
|
|
326
|
+
// 多条路径在高 DPR 下仍能保持流畅
|
|
327
|
+
const paths = Array.from({ length: 10 }, (_, i) => ({
|
|
328
|
+
points: [
|
|
329
|
+
new THREE.Vector3(i * 2, 0, 0),
|
|
330
|
+
new THREE.Vector3(i * 2, 5, 5),
|
|
331
|
+
],
|
|
332
|
+
totalLength: 7,
|
|
333
|
+
color: new THREE.Color(Math.random() * 0xffffff),
|
|
334
|
+
duration: 2000 + i * 100,
|
|
335
|
+
delay: i * 200,
|
|
336
|
+
lineWidth: 3.0,
|
|
337
|
+
}));
|
|
338
|
+
|
|
339
|
+
pass.setLines(paths);
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
|
|
218
343
|
## Debugging
|
|
219
344
|
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
345
|
+
- **光带不可见**: 检查路径点是否在相机视锥内;验证 `color` 和 `opacity` 非全透明。
|
|
346
|
+
- **光带抖动或消失**: 确认路径在相机背面时自动丢弃(3D 投影的预期行为)。
|
|
347
|
+
- **流速不对**: 检查 `totalLength` 计算是否为世界单位;调整 `duration` 以改变流速。
|
|
348
|
+
- **位置偏移**: 确认在高 DPR 场景下渲染目标尺寸正确,Pass 会自动同步 `readBuffer` 尺寸。
|
|
349
|
+
- **性能问题**: InstancedMesh 实现已优化,但过多路径点仍会影响性能。建议单条路径不超过 20 个点。
|
|
350
|
+
|
|
351
|
+
## Performance
|
|
352
|
+
|
|
353
|
+
### 与全屏着色器对比
|
|
354
|
+
- **全屏着色器**: 每帧检查所有像素,DPR=2 时像素数增加 4 倍,性能下降明显
|
|
355
|
+
- **InstancedMesh**: 仅渲染线段覆盖区域,DPR=2 时性能影响较小
|
|
356
|
+
- **实测**: 在 DPR=2 场景下,InstancedMesh 方案 FPS 提升约 3-5 倍
|
|
357
|
+
|
|
358
|
+
### setLine 性能优化
|
|
359
|
+
`setLine` 方法根据修改类型自动选择最优更新策略:
|
|
360
|
+
|
|
361
|
+
| 修改类型 | 性能 | 说明 |
|
|
362
|
+
|---------|------|------|
|
|
363
|
+
| 只修改颜色/透明度 | ⚡️ 极快 (~100x) | 只更新 instanceColor attribute |
|
|
364
|
+
| 只修改 duration/delay | ⚡️ 极快 (~100x) | 只更新 instanceMeta attribute |
|
|
365
|
+
| 只修改 lineWidth | ⚡️ 极快 (~100x) | 只更新 instanceData attribute |
|
|
366
|
+
| 修改 points (相同数量) | ⚡️ 快 (~50x) | 只更新 instanceStart/End attributes |
|
|
367
|
+
| 修改 points (不同数量) | ⚠️ 慢 | 重建整个 mesh |
|
|
368
|
+
|
|
369
|
+
**最佳实践**:
|
|
370
|
+
```ts
|
|
371
|
+
// ✅ 高性能 - 频繁修改颜色
|
|
372
|
+
requestAnimationFrame(() => {
|
|
373
|
+
pass.setLine({
|
|
374
|
+
id: lineId,
|
|
375
|
+
color: new THREE.Color(Math.random(), Math.random(), Math.random())
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// ✅ 高性能 - 动画路径(保持点数)
|
|
380
|
+
function animatePath(t: number) {
|
|
381
|
+
pass.setLine({
|
|
382
|
+
id: lineId,
|
|
383
|
+
points: [
|
|
384
|
+
new THREE.Vector3(0, 0, 0),
|
|
385
|
+
new THREE.Vector3(5 + Math.sin(t) * 2, 2, 3),
|
|
386
|
+
new THREE.Vector3(10, 0, 0),
|
|
387
|
+
] // 始终 3 个点
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// ⚠️ 低性能 - 避免频繁改变点数
|
|
392
|
+
setInterval(() => {
|
|
393
|
+
const pointCount = Math.floor(Math.random() * 5) + 2;
|
|
394
|
+
pass.setLine({
|
|
395
|
+
id: lineId,
|
|
396
|
+
points: generateRandomPoints(pointCount) // 点数不固定
|
|
397
|
+
});
|
|
398
|
+
}, 100);
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### 优化建议
|
|
402
|
+
1. 减少路径点数量,使用更简化的路径
|
|
403
|
+
2. 降低 `lineWidth`,减少渲染区域
|
|
404
|
+
3. 控制同时渲染的路径数量
|
|
405
|
+
4. 使用 `setLine` 而非 `setLines` 来更新单条线
|
|
406
|
+
5. 保持 points 数量不变,只修改坐标
|
|
407
|
+
6. 在低端设备上可通过 `pass.enabled = false` 禁用
|
|
223
408
|
|
|
224
409
|
## Common Pitfalls
|
|
225
410
|
|
|
226
|
-
1. **totalLength
|
|
227
|
-
2.
|
|
228
|
-
3.
|
|
229
|
-
4. **未调用 dispose()
|
|
411
|
+
1. **totalLength 单位混淆**: 必须使用世界坐标单位,不能混用屏幕像素或其他单位。
|
|
412
|
+
2. **投影失败**: 确保相机矩阵有效,相机在构造时已初始化。
|
|
413
|
+
3. **路径在背面**: 相机背后的点自动投影到屏幕外,无需手动处理。
|
|
414
|
+
4. **未调用 dispose()**: 销毁 Pass 时必须调用 `dispose()`,避免 GPU 资源泄漏。
|
|
415
|
+
5. **DPR 不匹配**: 确保渲染目标尺寸与实际屏幕 DPR 匹配,Pass 会自动处理。
|
|
230
416
|
|
|
231
417
|
## Related
|
|
232
418
|
|
|
@@ -235,6 +421,5 @@ five.setState({
|
|
|
235
421
|
|
|
236
422
|
---
|
|
237
423
|
|
|
238
|
-
|
|
239
|
-
tags: [postprocessing, effect, flowing, light, pass, rendering, worldspace, projection]
|
|
240
|
-
```
|
|
424
|
+
|
|
425
|
+
tags: [流光, 光带, 空间轨迹, 模型表面, 特效, postprocessing, effect, flowing, light, pass, rendering, worldspace, projection, instanced, performance, 3d, world-space]
|
|
@@ -198,5 +198,5 @@ console.log('Resolution:', blurPass['material'].uniforms.resolution.value);
|
|
|
198
198
|
---
|
|
199
199
|
|
|
200
200
|
```yaml
|
|
201
|
-
tags: [postprocessing, shader, effect, blur, pass, rendering]
|
|
201
|
+
tags: [模糊, 高斯模糊, 毛玻璃, 背景虚化, postprocessing, shader, effect, blur, pass, rendering, gaussian, blur-effect]
|
|
202
202
|
```
|
|
@@ -44,6 +44,7 @@ interface GestureEvent {
|
|
|
44
44
|
|
|
45
45
|
Five 的手势系统基于 Hammer.js 封装,主要包含以下几种手势:
|
|
46
46
|
|
|
47
|
+
* **gesture.fire**: 任意事件被触发。
|
|
47
48
|
* **gesture.pan**: 拖拽/平移。
|
|
48
49
|
* **gesture.pinch**: 双指缩放。
|
|
49
50
|
* **gesture.tap**: 点击。
|
|
@@ -176,5 +177,5 @@ five.on("gesture.pinch", (event) => {
|
|
|
176
177
|
---
|
|
177
178
|
|
|
178
179
|
```yaml
|
|
179
|
-
tags: [gesture, event, interaction, tap, pan, pinch]
|
|
180
|
+
tags: [手势, 点击, 拖拽, 缩放, 长按, 鼠标, 触摸, 交互控制, 自定义交互, gesture, event, interaction, tap, pan, pinch, preventDefault]
|
|
180
181
|
```
|
|
@@ -173,10 +173,10 @@ function getCenterColor(five: Five) {
|
|
|
173
173
|
|
|
174
174
|
## Related
|
|
175
175
|
|
|
176
|
-
* [
|
|
176
|
+
* [API Reference](../api.md): Five 核心 API 说明。
|
|
177
177
|
|
|
178
178
|
---
|
|
179
179
|
|
|
180
180
|
```yaml
|
|
181
|
-
tags: [getPixels, magnifier, screenshot, pixel, canvas]
|
|
181
|
+
tags: [截图, 放大镜, 取色器, 颜色拾取, 像素数据, getPixels, magnifier, screenshot, pixel, canvas, screen-capture, color-picker]
|
|
182
182
|
```
|
|
@@ -155,10 +155,10 @@ console.log(cutUrl);
|
|
|
155
155
|
|
|
156
156
|
## Related
|
|
157
157
|
|
|
158
|
-
* [
|
|
158
|
+
* [Pano Tile](./pano-tile.md): 全景图瓦片加载策略与 WorkTile 数据结构说明。
|
|
159
159
|
|
|
160
160
|
---
|
|
161
161
|
|
|
162
162
|
```yaml
|
|
163
|
-
tags: [imageOptions, configuration, optimization, cdn, private-deployment]
|
|
163
|
+
tags: [图片配置, 图片格式, 域名映射, 多云部署, 私有化, 图片质量, 流量优化, imageOptions, configuration, optimization, cdn, private-deployment, avif, webp]
|
|
164
164
|
```
|
|
@@ -78,7 +78,9 @@ Five 使用 **Z-up** (Z 轴向上) 的右手坐标系。
|
|
|
78
78
|
* `EXT_texture_webp`
|
|
79
79
|
* `CESIUM_RTC`
|
|
80
80
|
* `REALSEE_materials_lightmap`
|
|
81
|
+
* `KHR_gaussian_splatting`
|
|
81
82
|
* `KHR_gaussian_splatting_compression_spz`
|
|
83
|
+
* `KHR_gaussian_splatting_compression_spz_2`
|
|
82
84
|
|
|
83
85
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
84
86
|
| --- | --- | --- | --- |
|
|
@@ -341,10 +343,12 @@ loadAt3d('https://example.com/model.at3d', {
|
|
|
341
343
|
|
|
342
344
|
## Related
|
|
343
345
|
|
|
344
|
-
* [
|
|
346
|
+
* [Model](./model.md): 关于 Five 内部模型加载机制的说明。
|
|
347
|
+
* [Coordinate System](./coordinate-system.md): 坐标系定义,理解 Y-up 与 Z-up 的转换。
|
|
348
|
+
* [Request Proxy](./request-proxy.md): 自定义请求拦截(鉴权、CDN),与 fetcher 配合使用。
|
|
345
349
|
|
|
346
350
|
---
|
|
347
351
|
|
|
348
352
|
```yaml
|
|
349
|
-
tags: [loader, gltf, ply, splat, fbx, external-model]
|
|
353
|
+
tags: [加载模型, 导入模型, 点云, 内存泄漏, loader, gltf, ply, splat, fbx, external-model, glb, obj, 3d-model, gaussian-splatting, point-cloud, draco, dispose]
|
|
350
354
|
```
|
|
@@ -82,6 +82,7 @@ Five 支持高性能的点云渲染(PBM),并提供灵活的样式配置:
|
|
|
82
82
|
| `receiveShadow` | `boolean` | `false` | 模型是否接收阴影。 |
|
|
83
83
|
| `useAddBlend` | `boolean` | `false` | 是否使用半透明叠加渲染。 |
|
|
84
84
|
| `customShaders` | `PBMCustomShader[]` | `[]` | 自定义 Shader 配置。 |
|
|
85
|
+
| `panoFilter` | `PBMPanoFilter` | `null` | 全景图滤镜 (亮度、对比度、色温等)。详情见 [Pano Filter](./pano-filter.md)。 |
|
|
85
86
|
| `clippers` | `PBMClipperParameter[]` | `[]` | 模型裁切参数。 |
|
|
86
87
|
| `boundingBox` | `THREE.Box3` | `Infinity` | 模型包围盒。 |
|
|
87
88
|
|
|
@@ -97,7 +98,7 @@ Five 支持高性能的点云渲染(PBM),并提供灵活的样式配置:
|
|
|
97
98
|
| `constantColor` | `THREE.Vector3` | `(0.6, 0.6, 0.6)` | 模型纯色模式下的颜色值。 |
|
|
98
99
|
| `outlineGain` | `number` | `0.0` | 轮廓线增益。 |
|
|
99
100
|
| `distanceGain` | `number` | `0.0` | 距离增益。 |
|
|
100
|
-
| `
|
|
101
|
+
| `gaussianSplattingSHDegree` | `number` | `0` | 3D Gaussian Splatting 的球谐阶数。 |
|
|
101
102
|
|
|
102
103
|
### Internal & Low-Level (内部与底层配置)
|
|
103
104
|
|
|
@@ -122,30 +123,37 @@ Five 支持高性能的点云渲染(PBM),并提供灵活的样式配置:
|
|
|
122
123
|
### 1. Adjusting Model Transparency and Style (调整模型透明度与样式)
|
|
123
124
|
|
|
124
125
|
```typescript
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
// 设置半透明
|
|
127
|
+
five.modelScene.parameter.set('opacity', 0.5);
|
|
128
|
+
|
|
129
|
+
// 仅显示原始 UV 贴图
|
|
130
|
+
five.modelScene.parameter.set('modelAlpha', 0.0);
|
|
131
|
+
|
|
132
|
+
// 设置楼层样式
|
|
133
|
+
five.modelScene.parameter.set('floorStyle', 'wireframe');
|
|
130
134
|
```
|
|
131
135
|
|
|
132
136
|
### 2. Configuring Point Cloud Appearance (配置点云外观)
|
|
133
137
|
|
|
134
138
|
```typescript
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
// 大小随距离衰减
|
|
140
|
+
five.modelScene.parameter.set('pointSize', 'ATTENUATION');
|
|
141
|
+
|
|
142
|
+
// 基础大小
|
|
143
|
+
five.modelScene.parameter.set('pointScale', 0.05);
|
|
144
|
+
|
|
145
|
+
// 最大像素限制
|
|
146
|
+
five.modelScene.parameter.set('pointMaxPixel', 20);
|
|
140
147
|
```
|
|
141
148
|
|
|
142
149
|
## Related
|
|
143
150
|
|
|
144
151
|
* [Parameter](./parameter.md): 配置系统入口与继承逻辑。
|
|
152
|
+
* [Pano Filter](./pano-filter.md): 了解全景图滤镜的详细用法。
|
|
145
153
|
* [3DTile Params](./3dtile.md): 性能与加载相关参数。
|
|
146
154
|
|
|
147
155
|
---
|
|
148
156
|
|
|
149
157
|
```yaml
|
|
150
|
-
tags: [material, appearance, pointcloud, parameter, roof, ceiling, config]
|
|
158
|
+
tags: [材质, 透明度, 点云, 楼层, 阴影, 亮度, 天花板, 开盖, 顶点标记, 渲染样式, material, appearance, pointcloud, parameter, roof, ceiling, config, opacity]
|
|
151
159
|
```
|