@realsee/five 6.8.0-alpha.9 → 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 +29 -0
- 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 +11 -7
- package/ai_guides/features/flowing-light-3d-pass.md +12 -7
- 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 +122 -1
- 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 +19 -116
- package/docs/documents/features_flowing-light-3d-pass.html +22 -124
- 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 +122 -1
- 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 -782
- package/five/index.mjs +26894 -32056
- package/five/meshes/boundingMesh.d.ts +1 -0
- package/five/model/index.d.ts +2 -2
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.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 +7 -5
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +13 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +2 -1
- package/five/model/loaders/glTF-helpers/index.d.ts +4 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +2 -1
- 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/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 +37 -1
- 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 -777
- 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/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
|
@@ -125,16 +125,16 @@
|
|
|
125
125
|
<p><strong>注意</strong>: <code>totalLength</code> 和 <code>lineWidth</code> 使用归一化单位,与屏幕实际像素无关。</p>
|
|
126
126
|
</blockquote>
|
|
127
127
|
<h2 id="instance-methods" class="tsd-anchor-link">Instance Methods<a href="#instance-methods" 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>
|
|
128
|
-
<h3 id="" class="tsd-anchor-link"><code>constructor(camera: Camera)</code></h3>
|
|
128
|
+
<h3 id="_" class="tsd-anchor-link"><code>constructor(camera: Camera)</code><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>
|
|
129
129
|
<p>初始化 Pass,需传入相机以获取屏幕分辨率。</p>
|
|
130
|
-
<h3 id="-1" class="tsd-anchor-link"><code>setLines(lines: Line[])</code><a href="
|
|
130
|
+
<h3 id="_-1" class="tsd-anchor-link"><code>setLines(lines: Line[])</code><a href="#_-1" 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>
|
|
131
131
|
<p>更新要渲染的路径列表。可随时调用以修改或新增路径。</p>
|
|
132
132
|
<p><strong>自动生成 ID</strong>: 如果 line 没有提供 <code>id</code>,会自动生成 UUID。</p>
|
|
133
133
|
<p><strong>示例</strong>:</p>
|
|
134
134
|
<pre><code class="ts"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pathLine</span><span class="hl-1">: </span><span class="hl-7">Line</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-6">id:</span><span class="hl-1"> </span><span class="hl-9">'my-line-1'</span><span class="hl-1">, </span><span class="hl-8">// 可选,不传则自动生成</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.3</span><span class="hl-1">),</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-11">0.8</span><span class="hl-1">, </span><span class="hl-8">// 归一化单位</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">0x00c2ff</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">opacity:</span><span class="hl-1"> </span><span class="hl-11">0.8</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">2000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">delay:</span><span class="hl-1"> </span><span class="hl-11">500</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1">};</span><br/><span class="hl-6">pass</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">([</span><span class="hl-6">pathLine</span><span class="hl-1">]);</span>
|
|
135
135
|
</code><button type="button">Copy</button></pre>
|
|
136
136
|
|
|
137
|
-
<h3 id="-2" class="tsd-anchor-link"><code>setLine(params: { id: string } & Partial<Omit<Line, 'id'>>)</code><a href="
|
|
137
|
+
<h3 id="_-2" class="tsd-anchor-link"><code>setLine(params: { id: string } & Partial<Omit<Line, 'id'>>)</code><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>
|
|
138
138
|
<p>通过 <code>id</code> 修改单条线的参数。支持部分更新,只更新传入的字段。</p>
|
|
139
139
|
<p><strong>性能优化</strong>:</p>
|
|
140
140
|
<ul>
|
|
@@ -151,128 +151,31 @@
|
|
|
151
151
|
<li>动画时间(<code>uTime</code>)不会被重置,流光继续从当前位置播放</li>
|
|
152
152
|
<li>建议修改 <code>points</code> 时同时更新 <code>totalLength</code></li>
|
|
153
153
|
</ul>
|
|
154
|
-
<h3 id="-3" class="tsd-anchor-link"><code>render(...)</code><a href="
|
|
154
|
+
<h3 id="_-3" class="tsd-anchor-link"><code>render(...)</code><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>
|
|
155
155
|
<p>由 EffectComposer 自动调用,无需手动调用。自动同步渲染目标尺寸。</p>
|
|
156
|
-
<h3 id="-4" class="tsd-anchor-link"><code>dispose()</code><a href="
|
|
156
|
+
<h3 id="_-4" class="tsd-anchor-link"><code>dispose()</code><a href="#_-4" 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>
|
|
157
157
|
<p>释放 InstancedMesh、着色材质和渲染目标资源,避免内存泄漏。销毁 Pass 时必须调用。</p>
|
|
158
158
|
<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>
|
|
159
159
|
<h3 id="快速上手-quick-example" class="tsd-anchor-link">快速上手 (Quick Example)<a href="#快速上手-quick-example" 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>
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<p>const five = new Five();</p>
|
|
164
|
-
<p>// 创建 2D 流光通道
|
|
165
|
-
const flowing2D = new FlowingLight2DPass(five.camera);</p>
|
|
166
|
-
<p>// 定义一条屏幕空间的路径(归一化坐标)
|
|
167
|
-
const path = [
|
|
168
|
-
new THREE.Vector2(0.2, 0.2),
|
|
169
|
-
new THREE.Vector2(0.5, 0.8),
|
|
170
|
-
new THREE.Vector2(0.8, 0.2),
|
|
171
|
-
];
|
|
172
|
-
const totalLen = 1.2; // 归一化单位</p>
|
|
173
|
-
<p>flowing2D.setLines([{
|
|
174
|
-
points: path,
|
|
175
|
-
totalLength: totalLen,
|
|
176
|
-
color: new THREE.Color(0x00ff00),
|
|
177
|
-
opacity: 0.9,
|
|
178
|
-
duration: 2000,
|
|
179
|
-
lineWidth: 0.01,
|
|
180
|
-
}]);</p>
|
|
181
|
-
<p>five.addPass(flowing2D);</p>
|
|
182
|
-
<p>function animate() {
|
|
183
|
-
requestAnimationFrame(animate);
|
|
184
|
-
five.render();
|
|
185
|
-
}
|
|
186
|
-
animate();</p>
|
|
160
|
+
<pre><code class="typescript"><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">Five</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/><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">FlowingLight2DPass</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">'../../lib/five/renderer/postprocessing'</span><span class="hl-1">;</span><br/><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/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">five</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">Five</span><span class="hl-1">();</span><br/><br/><span class="hl-8">// 创建 2D 流光通道</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">flowing2D</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">FlowingLight2DPass</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">// 定义一条屏幕空间的路径(归一化坐标)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">path</span><span class="hl-1"> = [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.2</span><span class="hl-1">, </span><span class="hl-11">0.2</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.5</span><span class="hl-1">, </span><span class="hl-11">0.8</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.8</span><span class="hl-1">, </span><span class="hl-11">0.2</span><span class="hl-1">),</span><br/><span class="hl-1">];</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">totalLen</span><span class="hl-1"> = </span><span class="hl-11">1.2</span><span class="hl-1">; </span><span class="hl-8">// 归一化单位</span><br/><br/><span class="hl-6">flowing2D</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">([{</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> </span><span class="hl-6">path</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-6">totalLen</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">0x00ff00</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">opacity:</span><span class="hl-1"> </span><span class="hl-11">0.9</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">2000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1">}]);</span><br/><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">flowing2D</span><span class="hl-1">);</span><br/><br/><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-5">animate</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-5">requestAnimationFrame</span><span class="hl-1">(</span><span class="hl-6">animate</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-5">render</span><span class="hl-1">();</span><br/><span class="hl-1">}</span><br/><span class="hl-5">animate</span><span class="hl-1">();</span>
|
|
161
|
+
</code><button type="button">Copy</button></pre>
|
|
162
|
+
|
|
187
163
|
<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>
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
points: [
|
|
193
|
-
new THREE.Vector2(0.1, 0.1),
|
|
194
|
-
new THREE.Vector2(0.9, 0.1),
|
|
195
|
-
],
|
|
196
|
-
totalLength: 0.8,
|
|
197
|
-
color: new THREE.Color(0xff6600),
|
|
198
|
-
duration: 1500,
|
|
199
|
-
lineWidth: 0.01,
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
points: [
|
|
203
|
-
new THREE.Vector2(0.1, 0.5),
|
|
204
|
-
new THREE.Vector2(0.9, 0.5),
|
|
205
|
-
],
|
|
206
|
-
totalLength: 0.8,
|
|
207
|
-
color: new THREE.Color(0x0066ff),
|
|
208
|
-
opacity: 0.7,
|
|
209
|
-
duration: 2000,
|
|
210
|
-
delay: 500,
|
|
211
|
-
lineWidth: 0.015,
|
|
212
|
-
},
|
|
213
|
-
];</p>
|
|
214
|
-
<p>pass.setLines(paths);
|
|
215
|
-
five.addPass(pass);</p>
|
|
216
|
-
<p>// 响应用户交互动态更新路径
|
|
217
|
-
document.addEventListener('click', (e) => {
|
|
218
|
-
const rect = five.canvas.getBoundingClientRect();
|
|
219
|
-
const x = (e.clientX - rect.left) / rect.width;
|
|
220
|
-
const y = (e.clientY - rect.top) / rect.height; // 左上角为原点,无需翻转</p>
|
|
221
|
-
<p>const newPath = {
|
|
222
|
-
points: [
|
|
223
|
-
new THREE.Vector2(0.5, 0.5),
|
|
224
|
-
new THREE.Vector2(x, y),
|
|
225
|
-
],
|
|
226
|
-
totalLength: Math.hypot(x - 0.5, y - 0.5),
|
|
227
|
-
color: new THREE.Color(Math.random() * 0xffffff),
|
|
228
|
-
duration: 1200,
|
|
229
|
-
lineWidth: 0.01,
|
|
230
|
-
};
|
|
231
|
-
pass.setLines([...paths, newPath]);
|
|
232
|
-
});</p>
|
|
164
|
+
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pass</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">FlowingLight2DPass</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">// 初始路径集合</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">paths</span><span class="hl-1"> = [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.1</span><span class="hl-1">, </span><span class="hl-11">0.1</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.9</span><span class="hl-1">, </span><span class="hl-11">0.1</span><span class="hl-1">),</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-11">0.8</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">0xff6600</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">1500</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.1</span><span class="hl-1">, </span><span class="hl-11">0.5</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.9</span><span class="hl-1">, </span><span class="hl-11">0.5</span><span class="hl-1">),</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-11">0.8</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">0x0066ff</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">opacity:</span><span class="hl-1"> </span><span class="hl-11">0.7</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">2000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">delay:</span><span class="hl-1"> </span><span class="hl-11">500</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.015</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-6">pass</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">(</span><span class="hl-6">paths</span><span class="hl-1">);</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">pass</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 响应用户交互动态更新路径</span><br/><span class="hl-6">document</span><span class="hl-1">.</span><span class="hl-5">addEventListener</span><span class="hl-1">(</span><span class="hl-9">'click'</span><span class="hl-1">, (</span><span class="hl-6">e</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-3">const</span><span class="hl-1"> </span><span class="hl-4">rect</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">canvas</span><span class="hl-1">.</span><span class="hl-5">getBoundingClientRect</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">x</span><span class="hl-1"> = (</span><span class="hl-6">e</span><span class="hl-1">.</span><span class="hl-6">clientX</span><span class="hl-1"> - </span><span class="hl-6">rect</span><span class="hl-1">.</span><span class="hl-6">left</span><span class="hl-1">) / </span><span class="hl-6">rect</span><span class="hl-1">.</span><span class="hl-6">width</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">y</span><span class="hl-1"> = (</span><span class="hl-6">e</span><span class="hl-1">.</span><span class="hl-6">clientY</span><span class="hl-1"> - </span><span class="hl-6">rect</span><span class="hl-1">.</span><span class="hl-6">top</span><span class="hl-1">) / </span><span class="hl-6">rect</span><span class="hl-1">.</span><span class="hl-6">height</span><span class="hl-1">; </span><span class="hl-8">// 左上角为原点,无需翻转</span><br/><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">newPath</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.5</span><span class="hl-1">, </span><span class="hl-11">0.5</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-6">x</span><span class="hl-1">, </span><span class="hl-6">y</span><span class="hl-1">),</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-6">Math</span><span class="hl-1">.</span><span class="hl-5">hypot</span><span class="hl-1">(</span><span class="hl-6">x</span><span class="hl-1"> - </span><span class="hl-11">0.5</span><span class="hl-1">, </span><span class="hl-6">y</span><span class="hl-1"> - </span><span class="hl-11">0.5</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-6">Math</span><span class="hl-1">.</span><span class="hl-5">random</span><span class="hl-1">() * </span><span class="hl-11">0xffffff</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">1200</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1"> };</span><br/><span class="hl-1"> </span><span class="hl-6">pass</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">([...</span><span class="hl-6">paths</span><span class="hl-1">, </span><span class="hl-6">newPath</span><span class="hl-1">]);</span><br/><span class="hl-1">});</span>
|
|
165
|
+
</code><button type="button">Copy</button></pre>
|
|
166
|
+
|
|
233
167
|
<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>
|
|
234
|
-
<
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
length += points[i].distanceTo(points[i - 1]);
|
|
238
|
-
}
|
|
239
|
-
return length;
|
|
240
|
-
}</p>
|
|
241
|
-
<p>const points = [
|
|
242
|
-
new THREE.Vector2(0.3, 0.7),
|
|
243
|
-
new THREE.Vector2(0.7, 0.7),
|
|
244
|
-
new THREE.Vector2(0.7, 0.3),
|
|
245
|
-
new THREE.Vector2(0.3, 0.3),
|
|
246
|
-
new THREE.Vector2(0.3, 0.7),
|
|
247
|
-
];</p>
|
|
248
|
-
<p>const pathLine = {
|
|
249
|
-
points: points,
|
|
250
|
-
totalLength: calculatePathLength(points),
|
|
251
|
-
color: new THREE.Color(0x00ffff),
|
|
252
|
-
duration: 2000,
|
|
253
|
-
lineWidth: 0.01,
|
|
254
|
-
};</p>
|
|
168
|
+
<pre><code class="typescript"><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-5">calculatePathLength</span><span class="hl-1">(</span><span class="hl-6">points</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">number</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-6">length</span><span class="hl-1"> = </span><span class="hl-11">0</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-10">for</span><span class="hl-1"> (</span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-6">i</span><span class="hl-1"> = </span><span class="hl-11">1</span><span class="hl-1">; </span><span class="hl-6">i</span><span class="hl-1"> < </span><span class="hl-6">points</span><span class="hl-1">.</span><span class="hl-6">length</span><span class="hl-1">; </span><span class="hl-6">i</span><span class="hl-1">++) {</span><br/><span class="hl-1"> </span><span class="hl-6">length</span><span class="hl-1"> += </span><span class="hl-6">points</span><span class="hl-1">[</span><span class="hl-6">i</span><span class="hl-1">].</span><span class="hl-5">distanceTo</span><span class="hl-1">(</span><span class="hl-6">points</span><span class="hl-1">[</span><span class="hl-6">i</span><span class="hl-1"> - </span><span class="hl-11">1</span><span class="hl-1">]);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-10">return</span><span class="hl-1"> </span><span class="hl-6">length</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">points</span><span class="hl-1"> = [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.3</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.3</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">),</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pathLine</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> </span><span class="hl-6">points</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-5">calculatePathLength</span><span class="hl-1">(</span><span class="hl-6">points</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">0x00ffff</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">2000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1">};</span>
|
|
169
|
+
</code><button type="button">Copy</button></pre>
|
|
170
|
+
|
|
255
171
|
<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>
|
|
256
172
|
<pre><code class="ts"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pass</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">FlowingLight2DPass</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">// 创建一个矩形路径(注意:左上角为原点)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">rectPath</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-6">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.3</span><span class="hl-1">), </span><span class="hl-8">// 左上</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.3</span><span class="hl-1">), </span><span class="hl-8">// 右上</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.7</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">), </span><span class="hl-8">// 右下</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.7</span><span class="hl-1">), </span><span class="hl-8">// 左下</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.3</span><span class="hl-1">, </span><span class="hl-11">0.3</span><span class="hl-1">), </span><span class="hl-8">// 闭合路径</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-11">1.6</span><span class="hl-1">, </span><span class="hl-8">// 矩形周长</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-11">1.0</span><span class="hl-1">, </span><span class="hl-11">1.0</span><span class="hl-1">, </span><span class="hl-11">1.0</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">opacity:</span><span class="hl-1"> </span><span class="hl-11">1.0</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">4000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">delay:</span><span class="hl-1"> </span><span class="hl-11">2000</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-6">pass</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">([</span><span class="hl-6">rectPath</span><span class="hl-1">]);</span>
|
|
257
173
|
</code><button type="button">Copy</button></pre>
|
|
258
174
|
|
|
259
175
|
<h3 id="高-dpr-场景优化" class="tsd-anchor-link">高 DPR 场景优化<a href="#高-dpr-场景优化" 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>
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
<p>// 多条路径在高 DPR 下仍能保持流畅
|
|
264
|
-
const paths = Array.from({ length: 10 }, (_, i) => ({
|
|
265
|
-
points: [
|
|
266
|
-
new THREE.Vector2(0.1, 0.1 + i * 0.08),
|
|
267
|
-
new THREE.Vector2(0.9, 0.1 + i * 0.08),
|
|
268
|
-
],
|
|
269
|
-
totalLength: 0.8,
|
|
270
|
-
color: new THREE.Color(Math.random() * 0xffffff),
|
|
271
|
-
duration: 2000 + i * 100,
|
|
272
|
-
delay: i * 200,
|
|
273
|
-
lineWidth: 0.01,
|
|
274
|
-
}));</p>
|
|
275
|
-
<p>pass.setLines(paths);</p>
|
|
176
|
+
<pre><code class="typescript"><span class="hl-8">// InstancedMesh 实现自动优化高 DPR 性能</span><br/><span class="hl-8">// 在 DPR=2 的 Retina 屏幕上,性能显著优于全屏着色器方案</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">pass</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">FlowingLight2DPass</span><span class="hl-1">(</span><span class="hl-6">camera</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 多条路径在高 DPR 下仍能保持流畅</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">paths</span><span class="hl-1"> = </span><span class="hl-6">Array</span><span class="hl-1">.</span><span class="hl-5">from</span><span class="hl-1">({ </span><span class="hl-6">length:</span><span class="hl-1"> </span><span class="hl-11">10</span><span class="hl-1"> }, (</span><span class="hl-6">_</span><span class="hl-1">, </span><span class="hl-6">i</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">points:</span><span class="hl-1"> [</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.1</span><span class="hl-1">, </span><span class="hl-11">0.1</span><span class="hl-1"> + </span><span class="hl-6">i</span><span class="hl-1"> * </span><span class="hl-11">0.08</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Vector2</span><span class="hl-1">(</span><span class="hl-11">0.9</span><span class="hl-1">, </span><span class="hl-11">0.1</span><span class="hl-1"> + </span><span class="hl-6">i</span><span class="hl-1"> * </span><span class="hl-11">0.08</span><span class="hl-1">),</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> </span><span class="hl-6">totalLength:</span><span class="hl-1"> </span><span class="hl-11">0.8</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">color:</span><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-4">THREE</span><span class="hl-1">.</span><span class="hl-5">Color</span><span class="hl-1">(</span><span class="hl-6">Math</span><span class="hl-1">.</span><span class="hl-5">random</span><span class="hl-1">() * </span><span class="hl-11">0xffffff</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">duration:</span><span class="hl-1"> </span><span class="hl-11">2000</span><span class="hl-1"> + </span><span class="hl-6">i</span><span class="hl-1"> * </span><span class="hl-11">100</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">delay:</span><span class="hl-1"> </span><span class="hl-6">i</span><span class="hl-1"> * </span><span class="hl-11">200</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">lineWidth:</span><span class="hl-1"> </span><span class="hl-11">0.01</span><span class="hl-1">,</span><br/><span class="hl-1">}));</span><br/><br/><span class="hl-6">pass</span><span class="hl-1">.</span><span class="hl-5">setLines</span><span class="hl-1">(</span><span class="hl-6">paths</span><span class="hl-1">);</span>
|
|
177
|
+
</code><button type="button">Copy</button></pre>
|
|
178
|
+
|
|
276
179
|
<h2 id="debugging" class="tsd-anchor-link">Debugging<a href="#debugging" 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>
|
|
277
180
|
<ul>
|
|
278
181
|
<li><strong>光带不出现</strong>: 检查 <code>color</code> 和 <code>opacity</code>,确保非全透明;验证 <code>points</code> 至少 2 个;确认坐标在 [0, 1] 范围内。</li>
|
|
@@ -352,5 +255,5 @@ lineWidth: 0.01,
|
|
|
352
255
|
<li><a href="features_flowing-light-3d-pass.html">Flowing Light 3D Pass</a>: 基于 3D 世界坐标的流光效果。</li>
|
|
353
256
|
</ul>
|
|
354
257
|
<hr>
|
|
355
|
-
<p>tags: [postprocessing, effect, flowing, light, pass, rendering, screenspace, instanced, performance]</p>
|
|
356
|
-
</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="#flowing-light-2d-pass-流光-2d-通道"><span>Flowing <wbr/>Light 2<wbr/>D <wbr/>Pass (流光 2<wbr/>D 通道)</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="#instancedmesh-实例化渲染-instanced-rendering"><span>Instanced<wbr/>Mesh 实例化渲染 (<wbr/>Instanced <wbr/>Rendering)</span></a></li><li><a href="#归一化坐标系统-normalized-coordinates"><span>归一化坐标系统 (<wbr/>Normalized <wbr/>Coordinates)</span></a></li><li><a href="#头尾追逐动画-head-tail-chase-animation"><span>头尾追逐动画 (<wbr/>Head-<wbr/>Tail <wbr/>Chase <wbr/>Animation)</span></a></li><li><a href="#ndc-坐标转换"><span>NDC 坐标转换</span></a></li><li><a href="#dpr-处理与宽高比适配"><span>DPR 处理与宽高比适配</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#line-配置参数"><span>Line 配置参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <wbr/>Methods</span></a></li><li><ul><li><a href="#"><span></span></a></li><li><a href="
|
|
258
|
+
<p>tags: [流光, 光带, 导航路径, 指示线, 动态路径, 特效, postprocessing, effect, flowing, light, pass, rendering, screenspace, instanced, performance, 2d, screen-space]</p>
|
|
259
|
+
</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="#flowing-light-2d-pass-流光-2d-通道"><span>Flowing <wbr/>Light 2<wbr/>D <wbr/>Pass (流光 2<wbr/>D 通道)</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="#instancedmesh-实例化渲染-instanced-rendering"><span>Instanced<wbr/>Mesh 实例化渲染 (<wbr/>Instanced <wbr/>Rendering)</span></a></li><li><a href="#归一化坐标系统-normalized-coordinates"><span>归一化坐标系统 (<wbr/>Normalized <wbr/>Coordinates)</span></a></li><li><a href="#头尾追逐动画-head-tail-chase-animation"><span>头尾追逐动画 (<wbr/>Head-<wbr/>Tail <wbr/>Chase <wbr/>Animation)</span></a></li><li><a href="#ndc-坐标转换"><span>NDC 坐标转换</span></a></li><li><a href="#dpr-处理与宽高比适配"><span>DPR 处理与宽高比适配</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#line-配置参数"><span>Line 配置参数</span></a></li></ul></li><li><a href="#instance-methods"><span>Instance <wbr/>Methods</span></a></li><li><ul><li><a href="#_"><span></span></a></li><li><a href="#_-1"><span></span></a></li><li><a href="#_-2"><span></span></a></li><li><a href="#_-3"><span></span></a></li><li><a href="#_-4"><span></span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#快速上手-quick-example"><span>快速上手 (<wbr/>Quick <wbr/>Example)</span></a></li><li><a href="#多条路径-动态更新"><span>多条路径 & 动态更新</span></a></li><li><a href="#计算路径总长度"><span>计算路径总长度</span></a></li><li><a href="#矩形路径示例"><span>矩形路径示例</span></a></li><li><a href="#高-dpr-场景优化"><span>高 <wbr/>DPR 场景优化</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#performance"><span>Performance</span></a></li><li><ul><li><a href="#与全屏着色器对比"><span>与全屏着色器对比</span></a></li><li><a href="#setline-性能优化"><span>set<wbr/>Line 性能优化</span></a></li><li><a href="#优化建议"><span>优化建议</span></a></li></ul></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>
|