@realsee/five 6.8.0-alpha.0 → 6.8.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_READ_ME.md +4 -0
- package/AI_CONTEXT.md +4 -0
- package/README.md +50 -389
- package/ai_guides/README.md +122 -0
- package/ai_guides/ai-doc-guidelines.md +102 -0
- package/ai_guides/api.md +274 -0
- package/ai_guides/features/3dtile.md +172 -0
- package/ai_guides/features/camera-animation.md +205 -0
- package/ai_guides/features/clipper.md +135 -0
- package/ai_guides/features/coordinate-system.md +128 -0
- package/ai_guides/features/event.md +154 -0
- package/ai_guides/features/five.md +184 -0
- package/ai_guides/features/flowing-light-2d-pass.md +438 -0
- package/ai_guides/features/flowing-light-3d-pass.md +420 -0
- package/ai_guides/features/gaussian-blur-pass.md +202 -0
- package/ai_guides/features/gesture.md +180 -0
- package/ai_guides/features/get-screen-pixels.md +182 -0
- package/ai_guides/features/image-options.md +164 -0
- package/ai_guides/features/load-external-model.md +350 -0
- package/ai_guides/features/load-progress.md +140 -0
- package/ai_guides/features/material.md +151 -0
- package/ai_guides/features/mode.md +269 -0
- package/ai_guides/features/model.md +186 -0
- package/ai_guides/features/move-pano-effect.md +145 -0
- package/ai_guides/features/multi-work.md +146 -0
- package/ai_guides/features/pano-tile.md +132 -0
- package/ai_guides/features/pano-uv.md +131 -0
- package/ai_guides/features/parameter.md +153 -0
- package/ai_guides/features/plugin.md +210 -0
- package/ai_guides/features/postprocessing.md +259 -0
- package/ai_guides/features/raycast.md +175 -0
- package/ai_guides/features/request-proxy.md +112 -0
- package/ai_guides/features/screen-project.md +165 -0
- package/ai_guides/features/state.md +101 -0
- package/ai_guides/features/view-layer.md +187 -0
- package/ai_guides/features/work.md +303 -0
- package/ai_guides/glossary.md +93 -0
- package/ai_guides/intro.md +23 -0
- package/ai_guides/quick-start.md +69 -0
- package/ai_guides/release_notes/6.6.md +86 -0
- package/ai_guides/release_notes/6.7.md +401 -0
- package/ai_guides/release_notes/6.8.md +90 -0
- package/ai_guides/support.md +23 -0
- package/ai_guides/template.md +70 -0
- package/docs/00_FOR_AI_AGENTS.md +11 -0
- package/docs/README.md +11 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +29 -29
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +3 -3
- package/docs/classes/five.AdaptiveLuminancePass.html +2 -2
- package/docs/classes/five.AnimationFrameLoop.html +5 -5
- package/docs/classes/five.BoundingMesh.html +1 -1
- package/docs/classes/five.Camera.html +5 -5
- package/docs/classes/five.EffectComposer.html +1 -1
- package/docs/classes/five.EyeDomeLightingPass.html +2 -2
- package/docs/classes/five.Five.html +134 -134
- package/docs/classes/five.FivePass.html +2 -2
- package/docs/classes/five.FullScreenQuad.html +2 -2
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +36 -36
- package/docs/classes/five.ModelScene.html +12 -12
- package/docs/classes/five.Motion.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +23 -23
- package/docs/classes/five.PBMContainer.html +3 -3
- package/docs/classes/five.PBMGSObject.html +24 -0
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +15 -6
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +3 -3
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PanoCircleMesh.html +4 -4
- package/docs/classes/five.PanoCircleMeshCustom.html +4 -4
- package/docs/classes/five.PanoCircleMeshSolid.html +4 -4
- package/docs/classes/five.Parameter.html +55 -51
- package/docs/classes/five.Scene.html +3 -3
- package/docs/classes/five.Subscribe.html +26 -25
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +30 -26
- package/docs/classes/five.TileNode.html +2 -2
- package/docs/classes/five.Tileset.html +11 -11
- package/docs/classes/five.Trajectory.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +19 -19
- package/docs/classes/five.WorkResolvedObserver.html +41 -16
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFLoader.html +6 -6
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +4 -4
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +4 -4
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +16 -16
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/react.Store.html +12 -11
- package/docs/classes/sticker.Sticker.html +11 -11
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +31 -31
- package/docs/classes/vfx.ParticleGPU.html +7 -7
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +138 -0
- package/docs/documents/ai-doc-guidelines.html +117 -0
- package/docs/documents/api.html +337 -0
- package/docs/documents/features_3dtile.html +216 -0
- package/docs/documents/features_camera-animation.html +157 -0
- package/docs/documents/features_clipper.html +80 -0
- package/docs/documents/features_coordinate-system.html +127 -0
- package/docs/documents/features_event.html +104 -0
- package/docs/documents/features_five.html +147 -0
- package/docs/documents/features_flowing-light-2d-pass.html +356 -0
- package/docs/documents/features_flowing-light-3d-pass.html +351 -0
- package/docs/documents/features_gaussian-blur-pass.html +182 -0
- package/docs/documents/features_gesture.html +120 -0
- package/docs/documents/features_get-screen-pixels.html +88 -0
- package/docs/documents/features_image-options.html +108 -0
- package/docs/documents/features_load-external-model.html +600 -0
- package/docs/documents/features_load-progress.html +110 -0
- package/docs/documents/features_material.html +334 -0
- package/docs/documents/features_mode.html +114 -0
- package/docs/documents/features_model.html +141 -0
- package/docs/documents/features_move-pano-effect.html +110 -0
- package/docs/documents/features_multi-work.html +97 -0
- package/docs/documents/features_pano-tile.html +100 -0
- package/docs/documents/features_pano-uv.html +82 -0
- package/docs/documents/features_parameter.html +101 -0
- package/docs/documents/features_plugin.html +105 -0
- package/docs/documents/features_postprocessing.html +109 -0
- package/docs/documents/features_raycast.html +98 -0
- package/docs/documents/features_request-proxy.html +78 -0
- package/docs/documents/features_screen-project.html +112 -0
- package/docs/documents/features_state.html +71 -0
- package/docs/documents/features_view-layer.html +158 -0
- package/docs/documents/features_work.html +129 -0
- package/docs/documents/glossary.html +94 -0
- package/docs/documents/intro.html +24 -0
- package/docs/documents/quick-start.html +32 -0
- package/docs/documents/release_notes_6.6.html +79 -0
- package/docs/documents/release_notes_6.7.html +209 -0
- package/docs/documents/release_notes_6.8.html +103 -0
- package/docs/documents/support.html +49 -0
- package/docs/documents/template.html +80 -0
- package/docs/functions/five.coordinatesToVector.html +1 -1
- package/docs/functions/five.defaultImageURLTransform.html +3 -3
- package/docs/functions/five.headingToLongitude.html +1 -1
- package/docs/functions/five.loadAt3d.html +1 -1
- package/docs/functions/five.loadB3dm.html +1 -1
- package/docs/functions/five.loadDome.html +1 -1
- package/docs/functions/five.loadDomez.html +1 -1
- package/docs/functions/five.loadFbx.html +1 -1
- package/docs/functions/five.loadGltf.html +1 -1
- package/docs/functions/five.loadPbm.html +1 -1
- package/docs/functions/five.loadPly.html +1 -1
- package/docs/functions/five.loadPnts.html +1 -1
- package/docs/functions/five.loadSplat.html +1 -0
- package/docs/functions/five.loadSpz.html +1 -0
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.longitudeToHeading.html +1 -1
- package/docs/functions/five.parseWork.html +3 -3
- package/docs/functions/five.vectorToCoordinates.html +1 -1
- package/docs/functions/react.createFiveProvider.html +2 -2
- package/docs/functions/react.createStore.html +8 -8
- package/docs/functions/react.useFiveAction.html +6 -6
- package/docs/functions/react.useFiveCameraDirection.html +1 -1
- package/docs/functions/react.useFiveCameraRaycaster.html +1 -1
- package/docs/functions/react.useFiveCurrentObserver.html +1 -1
- package/docs/functions/react.useFiveCurrentState.html +1 -1
- package/docs/functions/react.useFiveEventCallback.html +1 -1
- package/docs/functions/react.useFiveFloor.html +1 -1
- package/docs/functions/react.useFiveHelper.html +1 -1
- package/docs/functions/react.useFiveModelIntersectRaycaster.html +2 -2
- package/docs/functions/react.useFiveModelReadyState.html +1 -1
- package/docs/functions/react.useFiveProject2d.html +2 -2
- package/docs/functions/react.useFiveSceneEffect.html +1 -1
- package/docs/functions/react.useFiveWork.html +2 -2
- package/docs/functions/vue.useFiveAction.html +8 -8
- package/docs/functions/vue.useFiveCameraDirection.html +1 -1
- package/docs/functions/vue.useFiveCameraRaycaster.html +1 -1
- package/docs/functions/vue.useFiveCurrentObserver.html +1 -1
- package/docs/functions/vue.useFiveCurrentState.html +1 -1
- package/docs/functions/vue.useFiveEventCallback.html +1 -1
- package/docs/functions/vue.useFiveFloor.html +1 -1
- package/docs/functions/vue.useFiveHelper.html +1 -1
- package/docs/functions/vue.useFiveModel.html +1 -1
- package/docs/functions/vue.useFiveModelBounding.html +1 -1
- package/docs/functions/vue.useFiveModelIntersectRaycaster.html +2 -2
- package/docs/functions/vue.useFiveModelReadyState.html +1 -1
- package/docs/functions/vue.useFiveProject2d.html +2 -2
- package/docs/functions/vue.useFiveScene.html +1 -1
- package/docs/functions/vue.useFiveState.html +1 -1
- package/docs/functions/vue.useFiveWorks.html +4 -4
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +115 -187
- package/docs/interfaces/five.AddableObject.html +5 -5
- package/docs/interfaces/five.AjaxOptions.html +5 -5
- package/docs/interfaces/five.BaseEvent.html +2 -2
- package/docs/interfaces/five.EventCallback.html +198 -194
- package/docs/interfaces/five.FiveInitArgs.html +18 -18
- package/docs/interfaces/five.FiveLoadOptions.html +3 -3
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.GestureEvent.html +2 -2
- package/docs/interfaces/five.ImageOptions.html +11 -11
- package/docs/interfaces/five.ImageURLOptions.html +8 -8
- package/docs/interfaces/five.IntersectEvent.html +2 -2
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +4 -3
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.ModeChangeEvent.html +2 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModelEvent.html +2 -2
- package/docs/interfaces/five.ModelOptions.html +3 -3
- package/docs/interfaces/five.ModelSceneEvent.html +2 -2
- package/docs/interfaces/five.ModelTileEvent.html +8 -0
- package/docs/interfaces/five.MovePanoOptions.html +10 -10
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +4 -4
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
- package/docs/interfaces/five.PBMPanoDepth.html +4 -4
- package/docs/interfaces/five.PBMPanoPicture.html +5 -5
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
- package/docs/interfaces/five.PanoCircleMeshInterface.html +4 -4
- package/docs/interfaces/five.PanoEvent.html +2 -2
- package/docs/interfaces/five.PanoTextureEvent.html +2 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +15 -15
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ParameterMaterialValue.html +40 -36
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +54 -50
- package/docs/interfaces/five.Pass.html +1 -1
- package/docs/interfaces/five.Pose.html +6 -7
- package/docs/interfaces/five.RenderEvent.html +2 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +54 -50
- package/docs/interfaces/five.SplatData.html +10 -0
- package/docs/interfaces/five.State.html +9 -9
- package/docs/interfaces/five.StateEvent.html +2 -2
- package/docs/interfaces/five.TextureOptions.html +12 -12
- package/docs/interfaces/five.Tile3DOptions.html +2 -2
- package/docs/interfaces/five.TileCoordinateSystem.html +2 -2
- package/docs/interfaces/five.TilesetHeader.html +12 -12
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +13 -13
- package/docs/interfaces/five.ViewLayer.html +30 -26
- package/docs/interfaces/five.Viewport.html +4 -4
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +4 -4
- package/docs/interfaces/five.WorkInitial.html +8 -8
- package/docs/interfaces/five.WorkModel.html +8 -8
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +41 -16
- package/docs/interfaces/five.WorkTile.html +4 -4
- package/docs/interfaces/five.WorkVideo.html +4 -4
- package/docs/interfaces/five.WorksEvent.html +2 -2
- package/docs/interfaces/five.XRControllerEvent.html +2 -2
- package/docs/interfaces/five.XRGestureEvent.html +2 -2
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +13 -13
- package/docs/interfaces/five.XRSessionEvent.html +2 -2
- package/docs/interfaces/plugins.BackgroundPluginController.html +11 -11
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +8 -8
- package/docs/interfaces/plugins.BasePlugin.BaseOptions.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.Config.html +2 -2
- package/docs/interfaces/plugins.BasePlugin.State.html +4 -4
- package/docs/interfaces/plugins.BasePlugin.StateChangeParams.html +3 -3
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +45 -45
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +18 -18
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +13 -13
- package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +2 -2
- package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +14 -14
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +5 -5
- package/docs/interfaces/plugins.ItemMaskController.html +12 -12
- package/docs/interfaces/plugins.ItemMaskPluginType.Config.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +5 -5
- package/docs/interfaces/plugins.ItemMaskPluginType.Params.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +7 -7
- package/docs/interfaces/plugins.OrientationPluginController.html +12 -12
- package/docs/interfaces/plugins.OrientationPluginType.Config.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +5 -5
- package/docs/interfaces/plugins.OrientationPluginType.Params.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +5 -5
- package/docs/interfaces/plugins.PanoAnimeController.html +14 -14
- package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.ConfigChangeEvent.html +3 -3
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +6 -6
- package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +4 -4
- package/docs/interfaces/plugins.PluginTemplateType.Config.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +5 -5
- package/docs/interfaces/plugins.PluginTemplateType.Params.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +4 -4
- package/docs/interfaces/plugins.TrajectoryController.html +30 -15
- package/docs/interfaces/react.FiveActionReactCallbacks.html +23 -23
- package/docs/interfaces/react.FiveCanvasProps.html +2 -2
- package/docs/interfaces/react.FiveInjectionTypes.html +76 -76
- package/docs/interfaces/sticker.IntersectionLike.html +2 -2
- package/docs/interfaces/vfx.ParticleArgs.html +26 -26
- package/docs/interfaces/vfx.ParticleGPUArgs.html +30 -30
- package/docs/interfaces/vue.FiveActionVueCallbacks.html +23 -23
- package/docs/modules/five.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +32 -32
- package/docs/types/five.EventTypes.html +26 -24
- package/docs/types/five.FivePlugin.html +2 -2
- package/docs/types/five.FivePluginInit.html +1 -1
- package/docs/types/five.FivePluginInstance.html +1 -1
- package/docs/types/five.LegacyEventType.html +142 -142
- package/docs/types/five.LoadResultType.html +2 -2
- package/docs/types/five.Mode.html +1 -1
- package/docs/types/five.MotionCircle.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/plugins.BasePlugin.EventMap.html +5 -5
- package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +1 -1
- package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +1 -1
- package/docs/variables/react.FiveCanvas.html +1 -1
- package/docs/variables/react.useFiveScene.html +1 -1
- package/docs/variables/vue.FiveCanvas.html +1 -1
- package/docs/variables/vue.FiveProvider.html +1 -1
- package/five/application/analysis.d.ts +40 -0
- package/five/application/controllers.d.ts +41 -0
- package/five/application/events-legacy.d.ts +454 -0
- package/five/application/events.d.ts +69 -0
- package/five/application/five.d.ts +518 -0
- package/five/application/fiveInitArgs.d.ts +176 -0
- package/five/application/fiveLoadOptions.d.ts +21 -0
- package/five/application/generateDefaultVideoElement.d.ts +2 -0
- package/five/application/getViewportScale.d.ts +2 -0
- package/five/application/initLights.d.ts +3 -0
- package/five/application/mode.d.ts +28 -0
- package/five/application/renderPoweredByRealsee.d.ts +3 -0
- package/five/assets/cardboard-png-data-url.d.ts +2 -0
- package/five/assets/gradient-png-data-url.d.ts +2 -0
- package/five/assets/loading-png-data-url.d.ts +2 -0
- package/five/assets/phone-png-data-url.d.ts +2 -0
- package/five/assets/realsee-pmg-data-url.d.ts +2 -0
- package/five/bvh/bvhMath.d.ts +33 -0
- package/five/bvh/bvhMesh.d.ts +7 -0
- package/five/bvh/bvhNode.d.ts +29 -0
- package/five/bvh/bvhObject.d.ts +18 -0
- package/five/bvh/bvhPoints.d.ts +6 -0
- package/five/bvh/index.d.ts +10 -0
- package/five/bvh/worker.d.ts +35 -0
- package/five/cardboard/helper.d.ts +2 -0
- package/five/cardboard/index.d.ts +13 -0
- package/five/cardboard/sensor.d.ts +158 -0
- package/five/certificates/hardware.d.ts +1 -0
- package/five/controllers/base.d.ts +166 -0
- package/five/controllers/events.d.ts +69 -0
- package/five/controllers/floorplan.d.ts +119 -0
- package/five/controllers/mapview.d.ts +138 -0
- package/five/controllers/model.d.ts +57 -0
- package/five/controllers/panorama.d.ts +143 -0
- package/five/controllers/panoramaLike.d.ts +87 -0
- package/five/controllers/topview.d.ts +42 -0
- package/five/controllers/vrPanorama.d.ts +56 -0
- package/five/controllers/xrPanorama.d.ts +81 -0
- package/five/core/camera.d.ts +65 -0
- package/five/core/internalWebGLRenderer.d.ts +14 -0
- package/five/core/panoVideo.d.ts +18 -0
- package/five/core/scene.d.ts +10 -0
- package/five/core/tiling.d.ts +43 -0
- package/five/declare.d.ts +2 -1
- package/five/gs/util/renderData.d.ts +32 -0
- package/five/gs/wasm/data.d.ts +20 -0
- package/five/gs/wasm/sort.d.ts +18 -0
- package/five/gs/worker/dataWorker.d.ts +1 -0
- package/five/gs/worker/sortWorker.d.ts +1 -0
- package/five/index.d.ts +57 -4582
- package/five/index.js +605 -92
- package/five/index.mjs +9661 -7537
- package/five/meshes/boundingMesh.d.ts +12 -0
- package/five/meshes/intersectMesh.d.ts +8 -0
- package/five/meshes/panoCircleMesh.d.ts +35 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
- package/five/meshes/panoSphereMesh.d.ts +27 -0
- package/five/model/helpers/coordinate-transform.d.ts +3 -0
- package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
- package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
- package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
- package/five/model/index.d.ts +70 -0
- package/five/model/intersection.d.ts +18 -0
- package/five/model/loaders/at3d.d.ts +12 -0
- package/five/model/loaders/b3dm.d.ts +9 -0
- package/five/model/loaders/dome.d.ts +22 -0
- package/five/model/loaders/domez.d.ts +11 -0
- package/five/model/loaders/fbx.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
- package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
- package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
- package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
- package/five/model/loaders/gltf.d.ts +10 -0
- package/five/model/loaders/obj.d.ts +9 -0
- package/five/model/loaders/pbm.d.ts +26 -0
- package/five/model/loaders/ply.d.ts +24 -0
- package/five/model/loaders/pnts.d.ts +8 -0
- package/five/model/loaders/protobuf/dome.d.ts +540 -0
- package/five/model/loaders/protobuf/pbm.d.ts +203 -0
- package/five/model/loaders/shared.d.ts +16 -0
- package/five/model/loaders/splat.d.ts +8 -0
- package/five/model/loaders/spz.d.ts +14 -0
- package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
- package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
- package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
- package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
- package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
- package/five/model/loaders/x3p.d.ts +22 -0
- package/five/model/materials/pbmMaterial.d.ts +87 -0
- package/five/model/materials/pbmMeshMaterial.d.ts +124 -0
- package/five/model/materials/pbmPointCloudMaterial.d.ts +72 -0
- package/five/model/model-scene.d.ts +172 -0
- package/five/model/model.d.ts +209 -0
- package/five/model/objects/pbmContainer.d.ts +28 -0
- package/five/model/objects/pbmGSObject.d.ts +40 -0
- package/five/model/objects/pbmGSRenderMesh.d.ts +32 -0
- package/five/model/objects/pbmGroup.d.ts +8 -0
- package/five/model/objects/pbmMesh.d.ts +10 -0
- package/five/model/objects/pbmPointCloud.d.ts +7 -0
- package/five/model/parameter.d.ts +136 -0
- package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
- package/five/model/tile3d/header.d.ts +88 -0
- package/five/model/tile3d/index.d.ts +214 -0
- package/five/model/tile3d/tile-cache.d.ts +18 -0
- package/five/model/tile3d/tile-content.d.ts +10 -0
- package/five/model/tile3d/tile-node.d.ts +24 -0
- package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
- package/five/model/tile3d/tile.d.ts +79 -0
- package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
- package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
- package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
- package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
- package/five/model/tile3d/tileset.d.ts +69 -0
- package/five/model/tile3d/trajectory-content.d.ts +9 -0
- package/five/model/tile3d/trajectory-node.d.ts +15 -0
- package/five/model/tile3d/trajectory.d.ts +30 -0
- package/five/model/tile3d/types.d.ts +33 -0
- package/five/model/view-layer.d.ts +20 -0
- package/five/renderer/five-renderer.d.ts +17 -0
- package/five/renderer/index.d.ts +3 -0
- package/five/renderer/postprocessing/composer.d.ts +37 -0
- package/five/renderer/postprocessing/index.d.ts +7 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +15 -0
- package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
- package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
- package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
- package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
- package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
- package/five/renderer/tools/full-screen-quad.d.ts +15 -0
- package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
- package/five/renderer/tools/render-full-screen.d.ts +2 -0
- package/five/texture/imageBitmap.d.ts +13 -0
- package/five/texture/initTexture.d.ts +3 -0
- package/five/texture/loader.d.ts +39 -0
- package/five/thirdparty/fflate.d.ts +1407 -0
- package/five/thirdparty/hammer.d.ts +259 -0
- package/five/thirdparty/jsrsasign.d.ts +768 -0
- package/five/thirdparty/meshopt_decoder.d.ts +15 -0
- package/five/three-version-check.d.ts +1 -0
- package/five/types/addableObject.d.ts +12 -0
- package/five/types/cube.d.ts +1 -0
- package/five/types/gestureInput.d.ts +24 -0
- package/five/types/imageOptions.d.ts +20 -0
- package/five/types/intersectMeshInterface.d.ts +8 -0
- package/five/types/movePanoEffect.d.ts +13 -0
- package/five/types/movePanoOptions.d.ts +35 -0
- package/five/types/panoCircleMeshInterface.d.ts +34 -0
- package/five/types/plugin.d.ts +25 -0
- package/five/types/pose.d.ts +17 -0
- package/five/types/state.d.ts +20 -0
- package/five/types/viewport.d.ts +22 -0
- package/five/utils/ajax.d.ts +66 -0
- package/five/utils/animationFrameLoop.d.ts +45 -0
- package/five/utils/array.d.ts +31 -0
- package/five/utils/asyncTaskQueue.d.ts +8 -0
- package/five/utils/bufferGeometry.d.ts +33 -0
- package/five/utils/calculateProgress.d.ts +39 -0
- package/five/utils/calculateThreeMouse.d.ts +13 -0
- package/five/utils/canplayVideo.d.ts +2 -0
- package/five/utils/clamp.d.ts +2 -0
- package/five/utils/clock.d.ts +17 -0
- package/five/utils/createSymbol.d.ts +5 -0
- package/five/utils/decodeText.d.ts +2 -0
- package/five/utils/deepEqual.d.ts +2 -0
- package/five/utils/deepFreeze.d.ts +2 -0
- package/five/utils/defineProperty.d.ts +9 -0
- package/five/utils/detector.d.ts +14 -0
- package/five/utils/distance.d.ts +10 -0
- package/five/utils/draco.d.ts +26 -0
- package/five/utils/easing.d.ts +63 -0
- package/five/utils/event.d.ts +149 -0
- package/five/utils/formatRad.d.ts +7 -0
- package/five/utils/imageSupport.d.ts +6 -0
- package/five/utils/imageURL.d.ts +42 -0
- package/five/utils/isEmptyObject.d.ts +2 -0
- package/five/utils/isNil.d.ts +6 -0
- package/five/utils/isNumber.d.ts +2 -0
- package/five/utils/isPowerOfTwo.d.ts +2 -0
- package/five/utils/isPromise.d.ts +2 -0
- package/five/utils/isSimilar.d.ts +6 -0
- package/five/utils/json.d.ts +7 -0
- package/five/utils/ktx2.d.ts +30 -0
- package/five/utils/lzma/index.d.ts +2 -0
- package/five/utils/lzma/lzma.d.ts +3 -0
- package/five/utils/lzma/lzmaWASM.d.ts +2 -0
- package/five/utils/lzma/lzmaWorker.d.ts +14 -0
- package/five/utils/memoryUsage.d.ts +29 -0
- package/five/utils/motion.d.ts +38 -0
- package/five/utils/noop.d.ts +6 -0
- package/five/utils/now.d.ts +7 -0
- package/five/utils/pano.d.ts +9 -0
- package/five/utils/pick.d.ts +3 -0
- package/five/utils/poseUtils.d.ts +5 -0
- package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
- package/five/utils/renderDepth.d.ts +2 -0
- package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
- package/five/utils/requestPermission.d.ts +3 -0
- package/five/utils/shaderContentFix.d.ts +7 -0
- package/five/utils/shaderMaterial.d.ts +20 -0
- package/five/utils/stateUtils.d.ts +5 -0
- package/five/utils/string-pattern.d.ts +8 -0
- package/five/utils/subscribe.d.ts +67 -0
- package/five/utils/tileCube.d.ts +19 -0
- package/five/utils/toFastProperties.d.ts +1 -0
- package/five/utils/typedCache.d.ts +10 -0
- package/five/utils/uniform.d.ts +15 -0
- package/five/utils/url.d.ts +35 -0
- package/five/utils/uuid.d.ts +5 -0
- package/five/utils/values.d.ts +2 -0
- package/five/utils/vectorCoordinates.d.ts +29 -0
- package/five/utils/volume.d.ts +111 -0
- package/five/utils/webglError.d.ts +7 -0
- package/five/utils/worker.d.ts +26 -0
- package/five/webxr/XRControllerModelFactory.d.ts +28 -0
- package/five/webxr/motionHelper.d.ts +68 -0
- package/five/webxr/xrButton.d.ts +4 -0
- package/five/webxr/xrController.d.ts +24 -0
- package/five/webxr/xrManager.d.ts +84 -0
- package/five/work/_ALLOW_HOST.d.ts +2 -0
- package/five/work/index.d.ts +6 -0
- package/five/work/keychain.d.ts +5 -0
- package/five/work/looseWorkType.d.ts +121 -0
- package/five/work/verify.d.ts +7 -0
- package/five/work/work.d.ts +236 -0
- package/five/work/workFetcher.d.ts +4 -0
- package/five/work/workJson.d.ts +3 -0
- package/five/work/workJsonType.d.ts +73 -0
- package/five/work/workObserverUtils.d.ts +36 -0
- package/five/work/workParser.d.ts +6 -0
- package/five/work/workResolvedObserver.d.ts +12 -0
- package/five/work/workVerify.d.ts +2 -0
- package/five/work/works.d.ts +10 -0
- package/gltf-loader/gltf-object.d.ts +17 -0
- package/gltf-loader/index.d.ts +60 -160
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
- package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
- package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
- package/line/circle_png.d.ts +1 -0
- package/line/index.d.ts +19 -69
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/line/utils/Line2.d.ts +7 -0
- package/line/utils/LineGeometry.d.ts +10 -0
- package/line/utils/LineMaterial.d.ts +20 -0
- package/line/utils/LineSegments2.d.ts +11 -0
- package/line/utils/LineSegmentsGeometry.d.ts +15 -0
- package/llms.txt +65 -0
- package/package.json +10 -1
- package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
- package/plugins/BackgroundPlugin/index.d.ts +5 -0
- package/plugins/BackgroundPlugin/typings.d.ts +44 -0
- package/plugins/BasePlugin/index.d.ts +119 -0
- package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
- package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
- package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
- package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
- package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
- package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
- package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
- package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
- package/plugins/ItemMaskPlugin/index.d.ts +5 -0
- package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
- package/plugins/OrientationPlugin/Controller.d.ts +82 -0
- package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
- package/plugins/OrientationPlugin/index.d.ts +6 -0
- package/plugins/OrientationPlugin/typing.d.ts +25 -0
- package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
- package/plugins/PanoAnimePlugin/index.d.ts +5 -0
- package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
- package/plugins/PluginTemplate/Controller.d.ts +27 -0
- package/plugins/PluginTemplate/index.d.ts +5 -0
- package/plugins/PluginTemplate/typing.d.ts +21 -0
- package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
- package/plugins/TrajectoryPlugin/index.d.ts +6 -0
- package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
- package/plugins/index.d.ts +9 -1078
- package/plugins/index.js +17 -17
- package/plugins/index.mjs +1518 -1370
- package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
- package/plugins/thirdParty/OrbitControls.d.ts +78 -0
- package/plugins/utils/absoluteUrl.d.ts +5 -0
- package/plugins/utils/clamp.d.ts +2 -0
- package/plugins/utils/loadImage.d.ts +1 -0
- package/plugins/utils/motion.d.ts +38 -0
- package/plugins/utils/now.d.ts +6 -0
- package/plugins/utils/uuid.d.ts +5 -0
- package/react/canvas.d.ts +19 -0
- package/react/context.d.ts +11 -0
- package/react/createProvider.d.ts +95 -0
- package/react/createStore.d.ts +144 -0
- package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
- package/react/hooks/useFiveAction.d.ts +147 -0
- package/react/hooks/useFiveCameraDirection.d.ts +7 -0
- package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
- package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
- package/react/hooks/useFiveCurrentState.d.ts +15 -0
- package/react/hooks/useFiveEventCallback.d.ts +12 -0
- package/react/hooks/useFiveFloor.d.ts +15 -0
- package/react/hooks/useFiveHelper.d.ts +14 -0
- package/react/hooks/useFiveModelBounding.d.ts +5 -0
- package/react/hooks/useFiveModelEffect.d.ts +14 -0
- package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
- package/react/hooks/useFiveModelReadyState.d.ts +8 -0
- package/react/hooks/useFiveProject2d.d.ts +20 -0
- package/react/hooks/useFiveSceneEffect.d.ts +21 -0
- package/react/hooks/useFiveState.d.ts +6 -0
- package/react/hooks/useFiveWork.d.ts +29 -0
- package/react/index.d.ts +24 -830
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/react/rendererPool.d.ts +7 -0
- package/react/withFive.d.ts +213 -0
- package/shader-lib/EvenessPlane/index.d.ts +10 -0
- package/shader-lib/PointCloudExpand/index.d.ts +59 -0
- package/shader-lib/PolygonCuter/index.d.ts +52 -0
- package/shader-lib/PolygonCuter/worker.d.ts +14 -0
- package/shader-lib/ShineModel/index.d.ts +7 -0
- package/shader-lib/SweepModel/index.d.ts +7 -0
- package/shader-lib/index.d.ts +5 -86
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/geometry.d.ts +3 -0
- package/sticker/index.d.ts +68 -71
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +16 -16
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +605 -92
- package/vfx/airflow/airflow.d.ts +18 -0
- package/vfx/airflow/fragment-shader.d.ts +2 -0
- package/vfx/airflow/vertex-shader.d.ts +2 -0
- package/vfx/common/scale-shader.d.ts +2 -0
- package/vfx/common/simplex-noise-shader.d.ts +2 -0
- package/vfx/frame/fragment-shader.d.ts +2 -0
- package/vfx/frame/frame.d.ts +22 -0
- package/vfx/frame/vertex-shader.d.ts +2 -0
- package/vfx/index.d.ts +7 -363
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vfx/particle/fragment-shader.d.ts +2 -0
- package/vfx/particle/instance.d.ts +36 -0
- package/vfx/particle/particle.d.ts +205 -0
- package/vfx/particle/utils.d.ts +11 -0
- package/vfx/particle/vertex-shader.d.ts +2 -0
- package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
- package/vfx/particle-gpu/instance.d.ts +36 -0
- package/vfx/particle-gpu/particle.d.ts +95 -0
- package/vfx/particle-gpu/utils.d.ts +11 -0
- package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
- package/vfx/spotLight/fragment-shader.d.ts +2 -0
- package/vfx/spotLight/spotLight.d.ts +15 -0
- package/vfx/spotLight/vertex-shader.d.ts +2 -0
- package/vue/context.d.ts +7 -0
- package/vue/hooks/FiveCanvas.d.ts +36 -0
- package/vue/hooks/FiveProvider.d.ts +35 -0
- package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
- package/vue/hooks/useFiveAction.d.ts +178 -0
- package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
- package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
- package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
- package/vue/hooks/useFiveCurrentState.d.ts +16 -0
- package/vue/hooks/useFiveEventCallback.d.ts +11 -0
- package/vue/hooks/useFiveFloor.d.ts +16 -0
- package/vue/hooks/useFiveHelper.d.ts +15 -0
- package/vue/hooks/useFiveModel.d.ts +7 -0
- package/vue/hooks/useFiveModelBounding.d.ts +7 -0
- package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
- package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
- package/vue/hooks/useFiveProject2d.d.ts +26 -0
- package/vue/hooks/useFiveScene.d.ts +6 -0
- package/vue/hooks/useFiveState.d.ts +16 -0
- package/vue/hooks/useFiveWork.d.ts +30 -0
- package/vue/index.d.ts +23 -467
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/vue/rendererPool.d.ts +10 -0
- package/work-downloader/components/model-3d-tile.d.ts +2 -0
- package/work-downloader/components/model.d.ts +3 -0
- package/work-downloader/components/observer.d.ts +7 -0
- package/work-downloader/download.d.ts +16 -0
- package/work-downloader/index.d.ts +2 -33
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
- package/work-downloader/type.d.ts +28 -0
- package/work-downloader/utils/download-to-file.d.ts +1 -0
- package/work-downloader/utils/image-processing.d.ts +7 -0
- package/work-downloader/utils/join-url.d.ts +2 -0
- package/work-downloader/utils/log.d.ts +1 -0
- package/work-downloader/utils/relative-url.d.ts +1 -0
- package/docs/documents/coordinate.html +0 -9
- package/docs/documents/five.FivePlugin.plugins.html +0 -77
- package/docs/documents/five.Pose.coordinate.html +0 -9
- package/docs/documents/plugins.html +0 -77
- package/docs/documents/react-component.html +0 -32
- package/docs/media/coordinate.jpg +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Request Proxy (请求代理)
|
|
2
|
+
|
|
3
|
+
- **Summary**: `requestProxy` 是 Five 初始化时的关键参数,用于在发起网络请求前对 URL 进行拦截和修改,常用于鉴权、资源重定向或 CDN 域名替换。
|
|
4
|
+
- **Schema**: `(url: string) => string | Promise<string>`
|
|
5
|
+
- **Concepts**: 请求拦截、资源重定向、鉴权签名。
|
|
6
|
+
- **Configuration**: `FiveInitArgs.requestProxy`。
|
|
7
|
+
- **Examples**: CDN 替换、私有化部署鉴权、调试模式。
|
|
8
|
+
|
|
9
|
+
## Schema
|
|
10
|
+
|
|
11
|
+
> **Definition**: [FiveInitArgs](../../five/application/fiveInitArgs.d.ts)
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
interface FiveInitArgs {
|
|
15
|
+
/**
|
|
16
|
+
* 请求代理函数
|
|
17
|
+
* @description 在 Five 内部发起任何网络请求(如加载图片、模型、配置)之前调用。
|
|
18
|
+
* @param url - 原始请求 URL
|
|
19
|
+
* @returns 修改后的 URL (string) 或异步返回修改后的 URL (Promise<string>)
|
|
20
|
+
*/
|
|
21
|
+
requestProxy?: (url: string) => string | Promise<string>;
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Concepts
|
|
26
|
+
|
|
27
|
+
### 拦截时机
|
|
28
|
+
Five 内部加载资源(全景图瓦片、3D 模型、纹理贴图等)时,会通过统一的 Fetcher 层发起请求。`requestProxy` 钩子函数会在每次请求发起**前**被触发。
|
|
29
|
+
|
|
30
|
+
### 核心用途
|
|
31
|
+
1. **域名替换 (CDN Domain Sharding)**: 将资源请求分散到多个 CDN 域名以突破浏览器并发限制。
|
|
32
|
+
2. **鉴权签名 (Authentication)**: 针对私有化部署或受保护资源,在 URL 后追加鉴权 Token (如 SAS Token)。
|
|
33
|
+
3. **资源重定向 (Redirection)**: 在开发环境下将线上资源重定向到本地或测试环境。
|
|
34
|
+
4. **协议适配**: 强制将 `http` 协议升级为 `https`。
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
`requestProxy` 是 `Five` 构造函数的配置项之一。
|
|
39
|
+
|
|
40
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
41
|
+
| :--- | :--- | :--- | :--- |
|
|
42
|
+
| `requestProxy` | `(url: string) => string \| Promise<string>` | `undefined` | 代理函数,返回修改后的 URL。支持同步或异步返回。 |
|
|
43
|
+
|
|
44
|
+
## Examples
|
|
45
|
+
|
|
46
|
+
### 1. 基础用法:CDN 域名替换
|
|
47
|
+
|
|
48
|
+
将图片资源请求分散到不同的 CDN 节点,加速加载。
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
const five = new Five({
|
|
52
|
+
requestProxy: (url) => {
|
|
53
|
+
// 简单的字符串替换示例
|
|
54
|
+
return url.replace('//vrlab-public.ljcdn.com/', '//vr-public.realsee-cdn.cn/');
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2. 进阶用法:异步鉴权 (Async Auth)
|
|
60
|
+
|
|
61
|
+
对于需要动态获取 Token 的场景,可以使用 `Promise` 异步返回 URL。
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const five = new Five({
|
|
65
|
+
requestProxy: async (url) => {
|
|
66
|
+
// 仅对私有桶资源进行签名
|
|
67
|
+
if (url.includes('private-bucket')) {
|
|
68
|
+
const token = await fetchToken(); // 假设 fetchToken 是一个获取鉴权的异步函数
|
|
69
|
+
const separator = url.includes('?') ? '&' : '?';
|
|
70
|
+
return `${url}${separator}token=${token}`;
|
|
71
|
+
}
|
|
72
|
+
return url;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 3. 开发调试:本地资源代理
|
|
78
|
+
|
|
79
|
+
在开发阶段,将特定资源重定向到本地文件。
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
const proxyMap: Record<string, string> = {};
|
|
83
|
+
|
|
84
|
+
const five = new Five({
|
|
85
|
+
requestProxy: (url) => {
|
|
86
|
+
// 如果该 URL 在映射表中存在(例如通过 <input type="file"> 加载的本地 Blob URL),则使用映射值
|
|
87
|
+
if (proxyMap[url]) {
|
|
88
|
+
console.log(`[Proxy] Redirecting ${url} -> ${proxyMap[url]}`);
|
|
89
|
+
return proxyMap[url];
|
|
90
|
+
}
|
|
91
|
+
return url;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Common Pitfalls
|
|
97
|
+
|
|
98
|
+
1. **死循环风险**: 不要在 `requestProxy` 内部再次发起会导致 `requestProxy` 触发的 Five 资源请求,否则可能导致递归调用。
|
|
99
|
+
2. **性能损耗**: `requestProxy` 会在**所有**资源请求前触发(包括成百上千个瓦片请求)。请确保该函数执行效率极高,避免进行耗时的同步操作。如果是异步操作,应做好缓存。
|
|
100
|
+
3. **URL 格式**: 确保返回的 URL 格式正确。如果原 URL 包含 Query 参数,拼接 Token 时要注意判断是使用 `?` 还是 `&`。
|
|
101
|
+
4. **缓存一致性**: 如果修改了 URL(例如加了 Token),可能会影响浏览器的缓存命中策略。
|
|
102
|
+
|
|
103
|
+
## Related
|
|
104
|
+
|
|
105
|
+
* [Parameter](./parameter.md): Five 初始化参数总览。
|
|
106
|
+
* [Load External Model](./load-external-model.md): 加载外部模型时也会触发 requestProxy。
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
tags: [configuration, network, proxy, authentication]
|
|
112
|
+
```
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Screen & Space Projection (屏幕与空间坐标转换)
|
|
2
|
+
|
|
3
|
+
- **Summary**: 详解屏幕二维坐标与三维空间坐标/射线之间的相互转换关系,以及如何在 DOM 层与 3D 场景进行联动(如显示标签)。
|
|
4
|
+
- **Schema**: `five.project2d` 接口定义。
|
|
5
|
+
- **Concepts**: World Space, Screen Space, NDC, Raycasting.
|
|
6
|
+
- **Examples**: 空间点位转屏幕坐标 (标签功能)、屏幕坐标转空间射线。
|
|
7
|
+
|
|
8
|
+
## Schema
|
|
9
|
+
|
|
10
|
+
> **Definition**: [Five](../../five/application/five.d.ts)
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
// defined in Five class
|
|
14
|
+
interface Five {
|
|
15
|
+
/**
|
|
16
|
+
* 计算三维坐标对应到屏幕的二维坐标
|
|
17
|
+
* @param vector - 三维空间坐标 (World Space)
|
|
18
|
+
* @param testModel - 是否进行模型遮挡检测 (默认 false)。如果为 true,且该点被模型遮挡,则返回 null。
|
|
19
|
+
* @returns 二维屏幕坐标 (相对于 Canvas 左上角) 或 null (如果点在视野外或被遮挡)
|
|
20
|
+
*/
|
|
21
|
+
project2d(vector: THREE.Vector3, testModel?: boolean): THREE.Vector2 | null;
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Concepts
|
|
26
|
+
|
|
27
|
+
### 1. 坐标系转换流程
|
|
28
|
+
|
|
29
|
+
在 Five (Three.js) 中,坐标转换通常遵循以下流程:
|
|
30
|
+
|
|
31
|
+
* **World Space (世界坐标)**: 三维场景中的绝对坐标 (x, y, z),单位通常为米。
|
|
32
|
+
* **Camera Space (相机坐标)**: 相对于相机的坐标。
|
|
33
|
+
* **NDC (Normalized Device Coordinates)**: 归一化设备坐标,x, y, z 范围均为 [-1, 1]。
|
|
34
|
+
* **Screen Space (屏幕坐标)**: 对应 Canvas 画布的像素坐标。原点 (0, 0) 在左上角,x 向右增加,y 向下增加。
|
|
35
|
+
|
|
36
|
+
### 2. 转换关系
|
|
37
|
+
|
|
38
|
+
| 方向 | 方法 | 核心逻辑 | 用途 |
|
|
39
|
+
| :--- | :--- | :--- | :--- |
|
|
40
|
+
| **3D ➔ 2D** | `five.project2d(vector)` | World ➔ NDC ➔ Screen | 标签 (Tag)、HUD、跟随 3D 物体的 UI |
|
|
41
|
+
| **2D ➔ 3D** | `Raycaster` | Screen ➔ NDC ➔ Ray | 点击拾取 (Picking)、地面检测、放置物体 |
|
|
42
|
+
|
|
43
|
+
### 3. five.project2d
|
|
44
|
+
|
|
45
|
+
`five.project2d` 是 Five 提供的便捷方法,它封装了以下逻辑:
|
|
46
|
+
1. 将世界坐标投影 (Project) 到相机的 NDC 空间。
|
|
47
|
+
2. 判断点是否在视锥体 (Frustum) 内(即是否在视野范围内)。
|
|
48
|
+
3. (可选) 发射射线检测该点与相机之间是否有模型遮挡。
|
|
49
|
+
4. 将 NDC 坐标转换为相对于 Canvas 左上角的像素坐标 (px)。
|
|
50
|
+
|
|
51
|
+
## Examples
|
|
52
|
+
|
|
53
|
+
### 1. 空间标签 (3D Point to DOM Label)
|
|
54
|
+
|
|
55
|
+
最典型的应用场景是在 3D 场景中的某个物体上方显示一个 HTML 标签。
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { Five, Mode } from "@realsee/five";
|
|
59
|
+
import * as THREE from "three";
|
|
60
|
+
|
|
61
|
+
const five = new Five();
|
|
62
|
+
// ... 初始化 five ...
|
|
63
|
+
|
|
64
|
+
// 1. 创建标签 DOM 元素
|
|
65
|
+
const label = document.createElement("div");
|
|
66
|
+
label.textContent = "Living Room";
|
|
67
|
+
label.style.position = "absolute";
|
|
68
|
+
label.style.padding = "4px 8px";
|
|
69
|
+
label.style.background = "rgba(0, 0, 0, 0.6)";
|
|
70
|
+
label.style.color = "white";
|
|
71
|
+
label.style.borderRadius = "4px";
|
|
72
|
+
label.style.pointerEvents = "none"; // 避免阻挡鼠标事件
|
|
73
|
+
label.style.transform = "translate(-50%, -100%)"; // 居中并显示在点上方
|
|
74
|
+
label.style.display = "none"; // 默认隐藏
|
|
75
|
+
document.body.appendChild(label); // 添加到 container (注意 container 的定位 context)
|
|
76
|
+
|
|
77
|
+
// 2. 定义目标空间坐标 (例如客厅中心)
|
|
78
|
+
const targetPosition = new THREE.Vector3(1.5, 2.0, -3.0);
|
|
79
|
+
|
|
80
|
+
// 3. 在每一帧渲染时更新标签位置
|
|
81
|
+
five.on("render.prepare", () => {
|
|
82
|
+
// 计算屏幕坐标
|
|
83
|
+
// 参数2: false 表示不检测遮挡 (性能更好);true 表示如果被墙挡住则隐藏
|
|
84
|
+
const screenPos = five.project2d(targetPosition, true);
|
|
85
|
+
|
|
86
|
+
if (screenPos === null) {
|
|
87
|
+
// 如果返回 null,说明点在相机背面,或者被遮挡(如果开启了 testModel)
|
|
88
|
+
label.style.display = "none";
|
|
89
|
+
} else {
|
|
90
|
+
label.style.display = "block";
|
|
91
|
+
// 更新 DOM 位置
|
|
92
|
+
// 注意:screenPos 是相对于 Canvas 的坐标。
|
|
93
|
+
// 如果 Canvas 占满全屏,直接使用即可。
|
|
94
|
+
// 如果 Canvas 有偏移,需加上 Canvas 的 offset。
|
|
95
|
+
label.style.left = `${screenPos.x}px`;
|
|
96
|
+
label.style.top = `${screenPos.y}px`;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 2. 屏幕点击转射线 (Screen to Ray)
|
|
102
|
+
|
|
103
|
+
将鼠标点击的屏幕坐标转换为 3D 射线,用于检测物体。
|
|
104
|
+
|
|
105
|
+
> **注意**: 更多射线检测细节请参考 [Raycast](./raycast.md)。
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
import * as THREE from "three";
|
|
109
|
+
|
|
110
|
+
// 假设 container 是 five 的容器元素
|
|
111
|
+
const container = five.getElement()!.parentElement!;
|
|
112
|
+
|
|
113
|
+
container.addEventListener("click", (event) => {
|
|
114
|
+
const raycaster = new THREE.Raycaster();
|
|
115
|
+
const mouse = new THREE.Vector2();
|
|
116
|
+
|
|
117
|
+
// 1. 计算 NDC 坐标 (x, y 范围 [-1, 1])
|
|
118
|
+
// event.clientX/Y 是相对于视口的坐标
|
|
119
|
+
// getBoundingClientRect 用于获取容器的位置
|
|
120
|
+
const rect = container.getBoundingClientRect();
|
|
121
|
+
|
|
122
|
+
mouse.x = ((event.clientX - rect.left) / rect.width) * 2 - 1;
|
|
123
|
+
mouse.y = -((event.clientY - rect.top) / rect.height) * 2 + 1; // 注意 Y 轴翻转
|
|
124
|
+
|
|
125
|
+
// 2. 从相机发射射线
|
|
126
|
+
raycaster.setFromCamera(mouse, five.camera);
|
|
127
|
+
|
|
128
|
+
// 3. 进行相交检测
|
|
129
|
+
const intersects = five.model.intersectRaycaster(raycaster);
|
|
130
|
+
|
|
131
|
+
if (intersects.length > 0) {
|
|
132
|
+
console.log("Hit point:", intersects[0].point);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Common Pitfalls
|
|
138
|
+
|
|
139
|
+
1. **坐标系原点**:
|
|
140
|
+
* DOM/CSS 坐标系原点在左上角,Y 轴向下。
|
|
141
|
+
* NDC/WebGL 坐标系原点在中心,Y 轴向上。
|
|
142
|
+
* `project2d` 返回的是 **DOM 风格** 的坐标 (左上角原点),可以直接赋给 CSS `left`/`top`。
|
|
143
|
+
* 但在进行 Raycaster 转换时,需要手动将 DOM 坐标转换为 NDC (Y 轴翻转)。
|
|
144
|
+
|
|
145
|
+
2. **性能开销**:
|
|
146
|
+
* `project2d(pos, true)` 开启 `testModel` 会进行射线检测,性能开销较大。如果在 `render.prepare` 中对大量点进行检测,可能会导致掉帧。
|
|
147
|
+
* 建议:对于大量标签,默认使用 `false`;或者仅对可视范围内的关键标签进行遮挡检测;或者限制检测频率(如每 10 帧检测一次)。
|
|
148
|
+
|
|
149
|
+
3. **Canvas 尺寸**:
|
|
150
|
+
* `project2d` 内部使用 `five.renderer.getSize()` 和 `five.viewport` 计算。确保 Canvas 尺寸与 DOM 显示尺寸一致 (通常 Five 会自动处理,但如果使用了 CSS 缩放需注意)。
|
|
151
|
+
|
|
152
|
+
4. **Null 返回值**:
|
|
153
|
+
* 务必检查 `project2d` 的返回值是否为 `null`。点在相机背面、超出视锥体裁剪范围、或被遮挡(开启 testModel 时)都会返回 `null`。
|
|
154
|
+
|
|
155
|
+
## Related
|
|
156
|
+
|
|
157
|
+
* [Raycast](./raycast.md): 详细的射线检测文档。
|
|
158
|
+
* [Five](./five.md): Five 核心类说明。
|
|
159
|
+
* [State](./state.md): 了解相机位姿 (Pose)。
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
tags: [coordinate, screen, project, label, ui]
|
|
165
|
+
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# State (状态)
|
|
2
|
+
|
|
3
|
+
- **Summary**: State 是 Five 的核心状态对象,描述了当前的显示模式、观察点位以及相机的空间姿态。
|
|
4
|
+
- **Schema**: 包含 Pose (相机姿态) 和 Mode (模式) 等属性的接口。
|
|
5
|
+
- **Concepts**: Camera Pose, Coordinate System, Mode Specifics。
|
|
6
|
+
- **Examples**: 状态获取与更新。
|
|
7
|
+
|
|
8
|
+
## Schema
|
|
9
|
+
|
|
10
|
+
> **Definition**: [State](../../five/types/state.d.ts)
|
|
11
|
+
|
|
12
|
+
**State** 类型定义如下(继承自 `Pose`):
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import * as THREE from "three";
|
|
16
|
+
import { Mode } from "@realsee/five";
|
|
17
|
+
|
|
18
|
+
interface Pose {
|
|
19
|
+
/** 相机偏航角 (水平方向),单位:弧度 */
|
|
20
|
+
longitude: number;
|
|
21
|
+
/** 相机俯仰角 (垂直方向),单位:弧度 */
|
|
22
|
+
latitude: number;
|
|
23
|
+
/** 相机垂直视场角,单位:度 */
|
|
24
|
+
fov: number;
|
|
25
|
+
/** 相机看向的目标中心点坐标 */
|
|
26
|
+
offset: THREE.Vector3;
|
|
27
|
+
/** 相机距离目标中心点的距离 */
|
|
28
|
+
distance: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface State extends Pose {
|
|
32
|
+
/** 显示模式 */
|
|
33
|
+
mode: Mode;
|
|
34
|
+
/** 当前点位的唯一标识 (workCode) */
|
|
35
|
+
workCode: string;
|
|
36
|
+
/** 当前点位在列表中的索引 */
|
|
37
|
+
panoIndex: number;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Concepts
|
|
42
|
+
|
|
43
|
+
* **Camera Pose (相机姿态)**: Five 使用球坐标系 (Spherical) + 笛卡尔偏移 (Cartesian Offset) 来描述相机位置。
|
|
44
|
+
* 相机始终位于以 `offset` 为中心、`distance` 为半径的球面上。
|
|
45
|
+
* **longitude**: 球面上的经度(水平旋转)。
|
|
46
|
+
* **latitude**: 球面上的纬度(垂直旋转)。
|
|
47
|
+
* **offset**: 相机“看向”的点,也是球心。
|
|
48
|
+
* **distance**: 相机到 `offset` 的距离。
|
|
49
|
+
* **Coordinate System (坐标系)**:
|
|
50
|
+
* 采用 Y-Up 右手坐标系(与 Three.js 默认一致)。
|
|
51
|
+
* 单位长度为米。
|
|
52
|
+
* **Mode Specifics (模式特性)**:
|
|
53
|
+
* **Panorama**: `distance` 通常为 0,即相机位置与 `offset` 重合(第一人称视角)。
|
|
54
|
+
* **Floorplan/Mapview**: `offset` 通常位于模型中心,`distance` 大于模型包围盒半径(第三人称上帝视角)。
|
|
55
|
+
* **State vs CurrentState**:
|
|
56
|
+
* **five.state**: **目标状态**。表示相机最终应该到达的状态。当调用 `setState` 或用户交互结束时,此值即为最终结果。通常用于 UI 同步(如高亮当前模式按钮)。
|
|
57
|
+
* **five.getCurrentState()**: **瞬时状态**。表示当前渲染帧相机的实际状态。在动画过渡过程中,`currentState` 会不断变化直至追赶上 `state`。通常用于需要实时反馈的场景(如罗盘旋转)。
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
### 快速上手 (Quick Example)
|
|
62
|
+
|
|
63
|
+
使用 `setState` 更新状态:
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
// 切换到户型图模式,并旋转相机到 45 度
|
|
67
|
+
five.setState({
|
|
68
|
+
mode: 'Floorplan',
|
|
69
|
+
longitude: Math.PI / 4
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 详细示例 (Detailed Example)
|
|
74
|
+
|
|
75
|
+
获取当前状态并基于此修改:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const state = five.state;
|
|
79
|
+
|
|
80
|
+
// 在当前状态基础上,向右旋转 90 度,并略微拉远距离
|
|
81
|
+
five.setState({
|
|
82
|
+
longitude: tate.longitude + Math.PI / 2,
|
|
83
|
+
distance: tate.distance + 2.0
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Common Pitfalls
|
|
88
|
+
|
|
89
|
+
1. **单位混淆**: `longitude` 和 `latitude` 使用**弧度**,而 `fov` 使用**角度**(度)。
|
|
90
|
+
2. **Offset 类型**: `offset` 必须是 `THREE.Vector3` 实例。如果在 React 等框架中使用纯对象(Plain Object),Five 内部会自动转换,但在 TypeScript 中需注意类型匹配。
|
|
91
|
+
3. **异步更新**: `setState` 触发的相机运动是异步动画过程。如果需要立即无动画跳转,可传递第二个参数 `immediately: true`。
|
|
92
|
+
|
|
93
|
+
## Related
|
|
94
|
+
|
|
95
|
+
* [Mode - 模式](./mode.md): 详细了解各种 Mode 的区别。
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
tags: [camera, state, pose, interaction]
|
|
101
|
+
```
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# ViewLayer (视图层)
|
|
2
|
+
|
|
3
|
+
- **Summary**: ViewLayer 是 Model 的组成部分,负责管理具体的 3D 资源(如 Mesh 或 PointCloud),支持独立的渲染配置和可见性控制。
|
|
4
|
+
- **Schema**: 继承自 `Tile3D`,由 `Model` 统一管理。
|
|
5
|
+
- **Concepts**: Layer Fallback, 3DTile Integration, Parameter Inheritance.
|
|
6
|
+
- **Examples**: 可见性控制、参数配置、事件监听。
|
|
7
|
+
|
|
8
|
+
## Schema
|
|
9
|
+
|
|
10
|
+
> **Definition**: [ViewLayer](../../five/model/view-layer.d.ts), [ViewLayerInit](../../five/model/view-layer.d.ts)
|
|
11
|
+
|
|
12
|
+
ViewLayer 是一个具体的渲染图层,它对应一个具体的 3D 数据源(通常是一个 `.gltf` / `.b3dm` / `.pnts` 等 Tileset 入口)。
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
// 简化定义
|
|
16
|
+
interface ViewLayer extends Tile3D {
|
|
17
|
+
/** 图层名称 (如 'mesh', 'point_cloud') */
|
|
18
|
+
name: string;
|
|
19
|
+
/** 图层类型 */
|
|
20
|
+
type: "point_cloud" | "mesh" | "gaussian_splatting";
|
|
21
|
+
/** 独立的参数配置对象 */
|
|
22
|
+
parameter: Parameter;
|
|
23
|
+
/** 是否可见 */
|
|
24
|
+
visible: boolean;
|
|
25
|
+
/** 对应的 Tileset URL */
|
|
26
|
+
tilesetUrl: string;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Concepts
|
|
31
|
+
|
|
32
|
+
### 1. ViewLayer vs Work.Model
|
|
33
|
+
|
|
34
|
+
`ViewLayer` 的生成逻辑严格依赖于 `Work` 数据中的定义,但也包含了向后兼容的 Fallback 机制。
|
|
35
|
+
|
|
36
|
+
#### 数据来源 (Data Source)
|
|
37
|
+
|
|
38
|
+
1. **优先使用 `work.model.layers`**:
|
|
39
|
+
这是标准的定义方式。`work.model.layers` 是一个数组,每个元素显式定义了一个 Layer 的 `name`, `type`, `tileset` (URL) 等信息。
|
|
40
|
+
Five 会遍历这个数组,为每一项创建一个 `ViewLayer` 实例。
|
|
41
|
+
|
|
42
|
+
2. **Fallback to `work.model.file`**:
|
|
43
|
+
如果 `work.model.layers` 中没有定义 `mesh` 类型的层,且 `work.model.file` 存在(旧版数据字段),Five 会自动创建一个 **虚拟的 Mesh Layer**。
|
|
44
|
+
* **Name**: 默认为 `model` (或其他内部标识)。
|
|
45
|
+
* **Type**: `mesh`。
|
|
46
|
+
* **URL**: 指向 `work.model.file`。
|
|
47
|
+
* **UpAxis**: 根据文件后缀自动推断 (如 `.obj` 可能需要特殊处理)。
|
|
48
|
+
|
|
49
|
+
> **总结**: `ViewLayer` 是 `work.model` 数据的运行时表现。`layers` 字段提供了精细的控制,而 `file` 字段提供了旧数据的兼容支持。
|
|
50
|
+
|
|
51
|
+
### 2. ViewLayer vs 3DTile
|
|
52
|
+
|
|
53
|
+
`ViewLayer` 本质上是一个 **3DTile** 加载器实例(继承自 `Tile3D`)。
|
|
54
|
+
|
|
55
|
+
* **加载机制**: 每个 ViewLayer 独立维护一个 3DTiles 的遍历器 (Traverser) 和调度器 (Scheduler)。这意味着 Mesh 层、PointCloud 层和 GaussianSplatting 层是独立加载、独立计算 LOD (Level of Detail) 的。
|
|
56
|
+
* **空间变换**: ViewLayer 负责处理数据的坐标系转换 (如 ECEF 转 ENU,Y-Up 转 Z-Up),确保不同格式的数据在 Five 场景中正确对齐。
|
|
57
|
+
|
|
58
|
+
### 3. ViewLayer, Model, ModelScene & Parameter
|
|
59
|
+
|
|
60
|
+
这是 Five 渲染架构的核心层级关系,`Parameter` 在其中起到了“胶水”的作用。
|
|
61
|
+
|
|
62
|
+
#### 层级关系 (Hierarchy)
|
|
63
|
+
|
|
64
|
+
```mermaid
|
|
65
|
+
graph TD
|
|
66
|
+
Scene[ModelScene] -->|包含| Model[Model]
|
|
67
|
+
Model -->|包含| LayerA[ViewLayer (Mesh)]
|
|
68
|
+
Model -->|包含| LayerB[ViewLayer (PointCloud)]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Parameter 的作用 (Inheritance)
|
|
72
|
+
|
|
73
|
+
`Parameter` 系统贯穿了上述三层,实现了**“配置继承与覆盖”**。
|
|
74
|
+
|
|
75
|
+
1. **ModelScene (全局配置)**:
|
|
76
|
+
* 持有 `five.modelScene.parameter`。
|
|
77
|
+
* 定义了场景级的默认值(如:默认显存上限 `512MB`)。
|
|
78
|
+
2. **Model (模型级配置)**:
|
|
79
|
+
* 持有 `model.parameter`。
|
|
80
|
+
* 可以覆盖全局配置(如:特定模型需要 `1024MB` 显存)。
|
|
81
|
+
3. **ViewLayer (图层级配置)**:
|
|
82
|
+
* 持有 `viewLayer.parameter`。
|
|
83
|
+
* **最具体的控制点**。它在计算最终值时,会依次继承 `Model` 和 `ModelScene` 的配置。
|
|
84
|
+
|
|
85
|
+
**示例场景**:
|
|
86
|
+
* 如果你想让**整个场景**变暗,设置 `modelScene.parameter.set('opacity', 0.5)`。
|
|
87
|
+
* 如果你只想让**点云层**变暗,保留模型层亮度,设置 `pointCloudLayer.parameter.set('opacity', 0.5)`。
|
|
88
|
+
|
|
89
|
+
### 4. Visibility Control (可见性控制)
|
|
90
|
+
|
|
91
|
+
默认情况下,Five **不会**加载所有图层,而是根据优先级**仅加载一个**图层,以节省资源。
|
|
92
|
+
优先级顺序:`mesh` > `point_cloud` > 其他类型。
|
|
93
|
+
|
|
94
|
+
**可见性与内存管理 (Visibility & Memory)**:
|
|
95
|
+
* **显示 (Show)**: 当图层设置为可见 (`visible = true`) 时,Five 会开始加载该图层的资源。
|
|
96
|
+
* **隐藏 (Hide)**: 当图层设置为隐藏 (`visible = false`) 时,Five 会**释放该图层占用的所有内存资源** (Geometry, Texture 等)。这意味着“隐藏”等同于“卸载”。
|
|
97
|
+
|
|
98
|
+
Five 提供了两种层级的可见性控制方式:
|
|
99
|
+
|
|
100
|
+
1. **初始化配置 (Load Options)**:
|
|
101
|
+
在 `five.load` 时,通过 `model["3d-tiles"].showLayers` 参数指定初始显示的图层。
|
|
102
|
+
* `true` (默认): 使用上述的默认优先级策略(仅加载一个最佳图层)。
|
|
103
|
+
* `string[]`: 仅显示名称在数组中的图层(例如 `['mesh', 'point_cloud']` 可以强制同时显示模型和点云)。
|
|
104
|
+
|
|
105
|
+
2. **运行时控制 (Runtime Control)**:
|
|
106
|
+
加载完成后,可以直接修改 `viewLayer.visible` 属性来切换可见性。
|
|
107
|
+
|
|
108
|
+
## Configuration
|
|
109
|
+
|
|
110
|
+
ViewLayer 的配置主要通过其 `parameter` 属性进行。
|
|
111
|
+
|
|
112
|
+
### Common Configuration
|
|
113
|
+
|
|
114
|
+
| Parameter | Type | Description |
|
|
115
|
+
| :--- | :--- | :--- |
|
|
116
|
+
| `visible` | `boolean` | 控制图层的可见性 (也可直接修改 `viewLayer.visible`)。 |
|
|
117
|
+
| `opacity` | `number` | 图层透明度 (0.0 - 1.0)。 |
|
|
118
|
+
| `pointSize` | `number` | (仅点云) 点的大小。 |
|
|
119
|
+
|
|
120
|
+
> 更多配置项请参考 [Parameter](./parameter.md) 和 [3DTile Params](./3dtile.md)。
|
|
121
|
+
|
|
122
|
+
## Examples
|
|
123
|
+
|
|
124
|
+
### 1. 访问 ViewLayer
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
// 获取当前模型
|
|
128
|
+
const model = five.model;
|
|
129
|
+
|
|
130
|
+
// 遍历所有图层
|
|
131
|
+
model.viewLayers.forEach(layer => {
|
|
132
|
+
console.log(`Layer Name: ${layer.name}, Type: ${layer.type}`);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// 查找特定的图层 (例如点云层)
|
|
136
|
+
const pointCloudLayer = model.viewLayers.find(layer => layer.type === 'point_cloud');
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 2. 独立控制图层可见性
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
// 方式 A: 运行时控制
|
|
143
|
+
const meshLayer = five.model.viewLayers.find(layer => layer.type === 'mesh');
|
|
144
|
+
|
|
145
|
+
if (meshLayer) {
|
|
146
|
+
// 隐藏模型层,只看点云
|
|
147
|
+
meshLayer.visible = false;
|
|
148
|
+
// 或者通过 parameter 设置
|
|
149
|
+
// meshLayer.parameter.set('visible', false);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// 方式 B: 加载时控制 (初始化时仅显示 mesh)
|
|
153
|
+
five.load(work, {
|
|
154
|
+
model: {
|
|
155
|
+
"3d-tiles": {
|
|
156
|
+
showLayers: ['mesh'] // 仅显示 mesh 层,隐藏 point_cloud 等其他层
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 3. 修改特定图层的渲染参数
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
const pointCloudLayer = five.model.viewLayers.find(layer => layer.type === 'point_cloud');
|
|
166
|
+
|
|
167
|
+
if (pointCloudLayer) {
|
|
168
|
+
// 仅修改点云层的点大小,不影响其他模型
|
|
169
|
+
pointCloudLayer.parameter.set('pointSize', 2.0);
|
|
170
|
+
|
|
171
|
+
// 仅修改点云层的最大显存占用
|
|
172
|
+
pointCloudLayer.parameter.set('maxMemoryUsage', 128);
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Related
|
|
177
|
+
|
|
178
|
+
* [Model](./model.md): ViewLayer 的父级容器。
|
|
179
|
+
* [Work](./work.md): 定义 ViewLayer 数据结构的数据源。
|
|
180
|
+
* [Parameter](./parameter.md): 控制 ViewLayer 渲染表现的配置系统。
|
|
181
|
+
* [3DTile](./3dtile.md): ViewLayer 的底层技术实现。
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
```yaml
|
|
186
|
+
tags: [viewlayer, model, 3dtile, parameter, layer]
|
|
187
|
+
```
|