@realsee/five 6.8.0-alpha.3 → 6.8.0-alpha.30
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 -6
- package/ai_guides/README.md +40 -2
- package/ai_guides/ai-doc-guidelines.md +31 -1
- package/ai_guides/api.md +107 -13
- package/ai_guides/features/3dtile.md +49 -141
- package/ai_guides/features/camera-animation.md +42 -4
- package/ai_guides/features/clipper.md +4 -2
- package/ai_guides/features/{coordnate-system.md → coordinate-system.md} +22 -2
- package/ai_guides/features/event.md +108 -10
- package/ai_guides/features/five.md +20 -16
- package/ai_guides/features/flowing-light-2d-pass.md +442 -0
- package/ai_guides/features/flowing-light-3d-pass.md +425 -0
- package/ai_guides/features/gaussian-blur-pass.md +202 -0
- package/ai_guides/features/gesture.md +4 -1
- package/ai_guides/features/get-screen-pixels.md +4 -2
- package/ai_guides/features/image-options.md +5 -2
- package/ai_guides/features/load-external-model.md +27 -2
- package/ai_guides/features/load-progress.md +140 -0
- package/ai_guides/features/material.md +159 -0
- package/ai_guides/features/mode.md +5 -1
- package/ai_guides/features/model.md +5 -2
- package/ai_guides/features/move-pano-effect.md +3 -1
- package/ai_guides/features/multi-work.md +3 -1
- package/ai_guides/features/pano-filter.md +149 -0
- package/ai_guides/features/pano-tile.md +8 -15
- package/ai_guides/features/pano-uv.md +131 -0
- package/ai_guides/features/parameter.md +117 -118
- package/ai_guides/features/plugin.md +210 -0
- package/ai_guides/features/postprocessing.md +40 -5
- package/ai_guides/features/raycast.md +16 -2
- package/ai_guides/features/request-proxy.md +3 -1
- package/ai_guides/features/screen-project.md +4 -1
- package/ai_guides/features/state.md +25 -3
- package/ai_guides/features/view-layer.md +187 -0
- package/ai_guides/features/work.md +64 -3
- package/ai_guides/glossary.md +28 -7
- package/ai_guides/intro.md +1 -1
- package/ai_guides/quick-start.md +1 -0
- package/ai_guides/release_notes/6.8.md +222 -0
- package/ai_guides/template.md +28 -3
- 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 +32 -32
- 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 +16 -7
- package/docs/classes/five.PBMPanoFilter.html +61 -0
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PBMUpdateable.html +41 -0
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.Parameter.html +59 -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 +30 -26
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Tileset.html +3 -2
- package/docs/classes/five.Trajectory.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +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 +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 +7 -0
- package/docs/classes/plugins.CSS3DSprite.html +7 -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 +132 -3
- package/docs/documents/ai-doc-guidelines.html +48 -3
- package/docs/documents/api.html +179 -26
- package/docs/documents/features_3dtile.html +143 -46
- package/docs/documents/features_camera-animation.html +79 -6
- package/docs/documents/features_clipper.html +5 -2
- package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +56 -4
- package/docs/documents/features_event.html +47 -8
- package/docs/documents/features_five.html +20 -16
- package/docs/documents/features_flowing-light-2d-pass.html +259 -0
- package/docs/documents/features_flowing-light-3d-pass.html +249 -0
- package/docs/documents/features_gaussian-blur-pass.html +182 -0
- package/docs/documents/features_gesture.html +5 -1
- package/docs/documents/features_get-screen-pixels.html +5 -2
- package/docs/documents/features_image-options.html +5 -2
- package/docs/documents/features_load-external-model.html +31 -4
- package/docs/documents/features_load-progress.html +110 -0
- package/docs/documents/features_material.html +341 -0
- package/docs/documents/features_mode.html +6 -1
- package/docs/documents/features_model.html +6 -2
- package/docs/documents/features_move-pano-effect.html +4 -1
- package/docs/documents/features_multi-work.html +4 -1
- package/docs/documents/features_pano-filter.html +123 -0
- package/docs/documents/features_pano-tile.html +35 -20
- package/docs/documents/features_pano-uv.html +82 -0
- package/docs/documents/features_parameter.html +84 -56
- package/docs/documents/features_plugin.html +105 -0
- package/docs/documents/features_postprocessing.html +23 -6
- package/docs/documents/features_raycast.html +9 -3
- package/docs/documents/features_request-proxy.html +4 -1
- package/docs/documents/features_screen-project.html +5 -1
- package/docs/documents/features_state.html +12 -2
- package/docs/documents/features_view-layer.html +158 -0
- package/docs/documents/features_work.html +64 -3
- package/docs/documents/glossary.html +33 -8
- package/docs/documents/intro.html +1 -1
- package/docs/documents/quick-start.html +1 -0
- package/docs/documents/release_notes_6.8.html +203 -0
- package/docs/documents/template.html +54 -4
- package/docs/functions/five.createDebugBoundingMesh.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 -1
- package/docs/functions/five.loadSpz.html +1 -1
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/plugins.CSS3DPlugin.html +1 -0
- package/docs/functions/plugins.GaussianSplattingEntranceAnimationPlugin.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 +132 -3
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +7 -2
- package/docs/interfaces/five.BaseExtendableEvent.html +11 -0
- package/docs/interfaces/five.EventCallback.html +60 -52
- 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 +4 -3
- 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 +13 -0
- 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 +42 -38
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +56 -52
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +7 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +57 -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 +30 -26
- 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 +42 -17
- 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 +50 -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.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.OrientationPluginController.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.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.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 +27 -25
- package/docs/types/five.LegacyEventType.html +7 -7
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.PBMAlphaMode.html +1 -1
- package/docs/types/five.PBMColorStyle.html +1 -1
- package/docs/types/five.PBMFloorStyle.html +1 -1
- package/docs/types/five.PBMMeshShaderType.html +1 -1
- package/docs/types/five.PBMPointBack.html +1 -1
- package/docs/types/five.PBMPointCloudShaderType.html +1 -1
- package/docs/types/five.PBMPointShape.html +1 -1
- package/docs/types/five.PBMPointSize.html +1 -1
- package/docs/types/five.PBMTransition.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/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/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/five/application/analysis.d.ts +40 -0
- package/five/application/controllers.d.ts +41 -0
- package/five/application/events-legacy.d.ts +454 -0
- package/five/application/events.d.ts +69 -0
- package/five/application/five.d.ts +519 -0
- package/five/application/fiveInitArgs.d.ts +176 -0
- package/five/application/fiveLoadOptions.d.ts +21 -0
- package/five/application/generateDefaultVideoElement.d.ts +2 -0
- package/five/application/getViewportScale.d.ts +2 -0
- package/five/application/initLights.d.ts +3 -0
- package/five/application/mode.d.ts +28 -0
- package/five/application/renderPoweredByRealsee.d.ts +3 -0
- package/five/assets/cardboard-png-data-url.d.ts +2 -0
- package/five/assets/gradient-png-data-url.d.ts +2 -0
- package/five/assets/loading-png-data-url.d.ts +2 -0
- package/five/assets/phone-png-data-url.d.ts +2 -0
- package/five/assets/realsee-png-data-url.d.ts +2 -0
- package/five/bvh/bvhMath.d.ts +33 -0
- package/five/bvh/bvhMesh.d.ts +7 -0
- package/five/bvh/bvhNode.d.ts +29 -0
- package/five/bvh/bvhObject.d.ts +18 -0
- package/five/bvh/bvhPoints.d.ts +6 -0
- package/five/bvh/index.d.ts +10 -0
- package/five/bvh/worker.d.ts +35 -0
- package/five/cardboard/helper.d.ts +2 -0
- package/five/cardboard/index.d.ts +13 -0
- package/five/cardboard/sensor.d.ts +158 -0
- package/five/certificates/hardware.d.ts +1 -0
- package/five/controllers/base.d.ts +167 -0
- package/five/controllers/events.d.ts +73 -0
- package/five/controllers/floorplan.d.ts +119 -0
- package/five/controllers/mapview.d.ts +139 -0
- package/five/controllers/model.d.ts +57 -0
- package/five/controllers/panorama.d.ts +144 -0
- package/five/controllers/panoramaLike.d.ts +87 -0
- package/five/controllers/topview.d.ts +42 -0
- package/five/controllers/vrPanorama.d.ts +56 -0
- package/five/controllers/xrPanorama.d.ts +81 -0
- package/five/core/camera.d.ts +65 -0
- package/five/core/internalWebGLRenderer.d.ts +14 -0
- package/five/core/panoVideo.d.ts +18 -0
- package/five/core/scene.d.ts +10 -0
- package/five/core/tiling.d.ts +43 -0
- package/five/declare.d.ts +2 -1
- package/five/gaussian-splatting/util/renderData.d.ts +66 -0
- package/five/gaussian-splatting/wasm/data.d.ts +20 -0
- package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
- package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
- package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
- package/five/index.d.ts +60 -4636
- package/five/index.js +272 -392
- package/five/index.mjs +26890 -31013
- package/five/meshes/boundingMesh.d.ts +13 -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.d.ts +26 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +13 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +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 +25 -0
- package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
- package/five/model/loaders/glTF-helpers/index.d.ts +51 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +115 -0
- package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
- package/five/model/loaders/gltf.d.ts +10 -0
- package/five/model/loaders/obj.d.ts +9 -0
- package/five/model/loaders/pbm.d.ts +26 -0
- package/five/model/loaders/ply.d.ts +24 -0
- package/five/model/loaders/pnts.d.ts +8 -0
- package/five/model/loaders/protobuf/dome.d.ts +540 -0
- package/five/model/loaders/protobuf/pbm.d.ts +203 -0
- package/five/model/loaders/shared.d.ts +16 -0
- package/five/model/loaders/splat.d.ts +8 -0
- package/five/model/loaders/spz.d.ts +14 -0
- package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
- package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
- package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
- package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
- package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
- package/five/model/loaders/x3p.d.ts +22 -0
- package/five/model/materials/pbmMaterial.d.ts +137 -0
- package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
- package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
- package/five/model/model-scene.d.ts +172 -0
- package/five/model/model.d.ts +209 -0
- package/five/model/objects/pbmContainer.d.ts +28 -0
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +59 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
- package/five/model/objects/pbmGroup.d.ts +8 -0
- package/five/model/objects/pbmMesh.d.ts +10 -0
- package/five/model/objects/pbmPointCloud.d.ts +7 -0
- package/five/model/parameter.d.ts +141 -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 +216 -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 +70 -0
- package/five/model/tile3d/trajectory-content.d.ts +9 -0
- package/five/model/tile3d/trajectory-node.d.ts +15 -0
- package/five/model/tile3d/trajectory.d.ts +30 -0
- package/five/model/tile3d/types.d.ts +33 -0
- package/five/model/view-layer.d.ts +20 -0
- package/five/renderer/five-renderer.d.ts +17 -0
- package/five/renderer/index.d.ts +3 -0
- package/five/renderer/postprocessing/composer.d.ts +37 -0
- package/five/renderer/postprocessing/index.d.ts +7 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
- package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
- package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
- package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
- package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
- package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
- package/five/renderer/tools/full-screen-quad.d.ts +15 -0
- package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
- package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
- package/five/renderer/tools/render-full-screen.d.ts +2 -0
- package/five/texture/histogram.d.ts +54 -0
- package/five/texture/imageBitmap.d.ts +13 -0
- package/five/texture/initTexture.d.ts +3 -0
- package/five/texture/loader.d.ts +39 -0
- package/five/texture/textureData.d.ts +11 -0
- package/five/thirdparty/fflate.d.ts +1407 -0
- package/five/thirdparty/hammer.d.ts +375 -0
- package/five/thirdparty/jsrsasign.d.ts +753 -0
- package/five/thirdparty/meshopt_decoder.d.ts +15 -0
- package/five/three-version-check.d.ts +1 -0
- package/five/types/addableObject.d.ts +12 -0
- package/five/types/cube.d.ts +1 -0
- package/five/types/gestureInput.d.ts +24 -0
- package/five/types/imageOptions.d.ts +20 -0
- package/five/types/intersectMeshInterface.d.ts +8 -0
- package/five/types/movePanoEffect.d.ts +13 -0
- package/five/types/movePanoOptions.d.ts +36 -0
- package/five/types/panoCircleMeshInterface.d.ts +34 -0
- package/five/types/plugin.d.ts +25 -0
- package/five/types/pose.d.ts +17 -0
- package/five/types/state.d.ts +20 -0
- package/five/types/viewport.d.ts +22 -0
- package/five/utils/ajax.d.ts +66 -0
- package/five/utils/animationFrameLoop.d.ts +45 -0
- package/five/utils/array.d.ts +31 -0
- package/five/utils/asyncTaskQueue.d.ts +8 -0
- package/five/utils/bufferGeometry.d.ts +33 -0
- package/five/utils/calculateProgress.d.ts +39 -0
- package/five/utils/calculateThreeMouse.d.ts +13 -0
- package/five/utils/canplayVideo.d.ts +2 -0
- package/five/utils/clamp.d.ts +2 -0
- package/five/utils/clock.d.ts +17 -0
- package/five/utils/createSymbol.d.ts +5 -0
- package/five/utils/decodeText.d.ts +2 -0
- package/five/utils/deepEqual.d.ts +2 -0
- package/five/utils/deepFreeze.d.ts +2 -0
- package/five/utils/defineProperty.d.ts +9 -0
- package/five/utils/detector.d.ts +14 -0
- package/five/utils/distance.d.ts +10 -0
- package/five/utils/draco.d.ts +26 -0
- package/five/utils/easing.d.ts +63 -0
- package/five/utils/error.d.ts +1 -0
- package/five/utils/event.d.ts +210 -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 +7 -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 +206 -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/workObserverProto.d.ts +39 -0
- package/five/work/workParser.d.ts +6 -0
- package/five/work/workResolvedObserver.d.ts +12 -0
- package/five/work/workVerify.d.ts +2 -0
- package/five/work/works.d.ts +10 -0
- package/gltf-loader/gltf-object.d.ts +17 -0
- package/gltf-loader/index.d.ts +60 -160
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
- package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
- package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
- package/line/circle_png.d.ts +1 -0
- package/line/index.d.ts +19 -69
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/line/utils/Line2.d.ts +7 -0
- package/line/utils/LineGeometry.d.ts +10 -0
- package/line/utils/LineMaterial.d.ts +20 -0
- package/line/utils/LineSegments2.d.ts +11 -0
- package/line/utils/LineSegmentsGeometry.d.ts +15 -0
- package/llms.txt +48 -3
- package/package.json +4 -4
- 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/CSS3DPlugin/Controller.d.ts +60 -0
- package/plugins/CSS3DPlugin/index.d.ts +5 -0
- package/plugins/CSS3DPlugin/typing.d.ts +32 -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/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +30 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +5 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/typing.d.ts +28 -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 +11 -1102
- package/plugins/index.js +37 -21
- package/plugins/index.mjs +3630 -4247
- 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 +2 -0
- package/react/canvas.d.ts +19 -0
- package/react/context.d.ts +12 -0
- package/react/createProvider.d.ts +95 -0
- package/react/createStore.d.ts +144 -0
- package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
- package/react/hooks/useFiveAction.d.ts +147 -0
- package/react/hooks/useFiveCameraDirection.d.ts +7 -0
- package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
- package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
- package/react/hooks/useFiveCurrentState.d.ts +15 -0
- package/react/hooks/useFiveEventCallback.d.ts +12 -0
- package/react/hooks/useFiveFloor.d.ts +15 -0
- package/react/hooks/useFiveHelper.d.ts +14 -0
- package/react/hooks/useFiveModelBounding.d.ts +5 -0
- package/react/hooks/useFiveModelEffect.d.ts +14 -0
- package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
- package/react/hooks/useFiveModelReadyState.d.ts +8 -0
- package/react/hooks/useFiveProject2d.d.ts +20 -0
- package/react/hooks/useFiveSceneEffect.d.ts +21 -0
- package/react/hooks/useFiveState.d.ts +6 -0
- package/react/hooks/useFiveWork.d.ts +29 -0
- package/react/index.d.ts +24 -830
- package/react/index.js +3 -3
- package/react/index.mjs +572 -783
- package/react/rendererPool.d.ts +7 -0
- package/react/withFive.d.ts +213 -0
- package/shader-lib/EvenessPlane/index.d.ts +10 -0
- package/shader-lib/PointCloudExpand/index.d.ts +59 -0
- package/shader-lib/PolygonCuter/index.d.ts +52 -0
- package/shader-lib/PolygonCuter/worker.d.ts +14 -0
- package/shader-lib/ShineModel/index.d.ts +7 -0
- package/shader-lib/SweepModel/index.d.ts +7 -0
- package/shader-lib/index.d.ts +5 -86
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/geometry.d.ts +3 -0
- package/sticker/index.d.ts +68 -71
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +37 -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 -387
- package/vfx/airflow/airflow.d.ts +18 -0
- package/vfx/airflow/fragment-shader.d.ts +2 -0
- package/vfx/airflow/vertex-shader.d.ts +2 -0
- package/vfx/common/scale-shader.d.ts +2 -0
- package/vfx/common/simplex-noise-shader.d.ts +2 -0
- package/vfx/frame/fragment-shader.d.ts +2 -0
- package/vfx/frame/frame.d.ts +22 -0
- package/vfx/frame/vertex-shader.d.ts +2 -0
- package/vfx/index.d.ts +7 -363
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vfx/particle/fragment-shader.d.ts +2 -0
- package/vfx/particle/instance.d.ts +36 -0
- package/vfx/particle/particle.d.ts +205 -0
- package/vfx/particle/utils.d.ts +11 -0
- package/vfx/particle/vertex-shader.d.ts +2 -0
- package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
- package/vfx/particle-gpu/instance.d.ts +36 -0
- package/vfx/particle-gpu/particle.d.ts +95 -0
- package/vfx/particle-gpu/utils.d.ts +11 -0
- package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
- package/vfx/spotLight/fragment-shader.d.ts +2 -0
- package/vfx/spotLight/spotLight.d.ts +15 -0
- package/vfx/spotLight/vertex-shader.d.ts +2 -0
- package/vue/context.d.ts +7 -0
- package/vue/hooks/FiveCanvas.d.ts +36 -0
- package/vue/hooks/FiveProvider.d.ts +35 -0
- package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
- package/vue/hooks/useFiveAction.d.ts +178 -0
- package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
- package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
- package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
- package/vue/hooks/useFiveCurrentState.d.ts +16 -0
- package/vue/hooks/useFiveEventCallback.d.ts +11 -0
- package/vue/hooks/useFiveFloor.d.ts +16 -0
- package/vue/hooks/useFiveHelper.d.ts +15 -0
- package/vue/hooks/useFiveModel.d.ts +7 -0
- package/vue/hooks/useFiveModelBounding.d.ts +7 -0
- package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
- package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
- package/vue/hooks/useFiveProject2d.d.ts +26 -0
- package/vue/hooks/useFiveScene.d.ts +6 -0
- package/vue/hooks/useFiveState.d.ts +16 -0
- package/vue/hooks/useFiveWork.d.ts +30 -0
- package/vue/index.d.ts +23 -467
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/vue/rendererPool.d.ts +10 -0
- package/work-downloader/components/model-3d-tile.d.ts +2 -0
- package/work-downloader/components/model.d.ts +3 -0
- package/work-downloader/components/observer.d.ts +7 -0
- package/work-downloader/download.d.ts +16 -0
- package/work-downloader/index.d.ts +2 -33
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +317 -556
- package/work-downloader/type.d.ts +28 -0
- package/work-downloader/utils/download-to-file.d.ts +1 -0
- package/work-downloader/utils/image-processing.d.ts +7 -0
- package/work-downloader/utils/join-url.d.ts +2 -0
- package/work-downloader/utils/log.d.ts +1 -0
- package/work-downloader/utils/relative-url.d.ts +1 -0
- package/ai_guides/plugin.md +0 -206
- package/docs/documents/plugin.html +0 -60
- package/docs/media/five.ts +0 -2881
- package/docs/media/pass.ts +0 -64
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/pano-uv | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">features/pano-uv</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="全景图-uv-与方向转换-panorama-uv-conversion" class="tsd-anchor-link">全景图 UV 与方向转换 (Panorama UV Conversion)<a href="#全景图-uv-与方向转换-panorama-uv-conversion" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1>
|
|
2
|
+
<ul>
|
|
3
|
+
<li><strong>Summary</strong>: 提供了一组工具方法,用于在<strong>全景图 UV 坐标</strong> (Equirectangular UV / Cubemap UV) 与<strong>三维空间方向向量</strong> (Vector3) 之间进行转换。</li>
|
|
4
|
+
<li><strong>Schema</strong>: 依赖 <code>WorkObserver</code> 实例,提供四个核心转换方法。</li>
|
|
5
|
+
<li><strong>Concepts</strong>: Equirectangular Projection, Cubemap Projection, UV Origin, Coordinate Systems.</li>
|
|
6
|
+
<li><strong>Configuration</strong>: <code>uvOrigin</code> (UV 原点设置).</li>
|
|
7
|
+
<li><strong>Examples</strong>: 向量转全景 UV、UV 转向量、Cubemap 转换。</li>
|
|
8
|
+
</ul>
|
|
9
|
+
<h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
10
|
+
<blockquote>
|
|
11
|
+
<p><strong>Definition</strong>: <a href="../../five/work/work.d.ts">WorkObserver</a></p>
|
|
12
|
+
</blockquote>
|
|
13
|
+
<p>这些方法挂载在 <code>WorkObserver</code> 实例上,依赖当前观察点 (Observer) 的位姿信息 (Position & Quaternion) 以及 <code>work.transform</code> 进行计算。</p>
|
|
14
|
+
<pre><code class="typescript"><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">WorkObserver</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 将方向向量转化为全景图 uv</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">vector</span><span class="hl-8"> - 全局方向向量 (World Space)</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">uvOrigin</span><span class="hl-8"> - UV 原点位置,默认为 'top-left'</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">vectorToEquirectangularUv</span><span class="hl-1">(</span><span class="hl-6">vector</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector3</span><span class="hl-1">, </span><span class="hl-6">uvOrigin</span><span class="hl-1">?: </span><span class="hl-9">'top-left'</span><span class="hl-1"> | </span><span class="hl-9">'bottom-left'</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><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 将全景图 uv 转化为方向向量</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">uv</span><span class="hl-8"> - 全景图 UV 坐标 [0, 1]</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">uvOrigin</span><span class="hl-8"> - UV 原点位置,默认为 'top-left'</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">equirectangularUvToVector</span><span class="hl-1">(</span><span class="hl-6">uv</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-6">uvOrigin</span><span class="hl-1">?: </span><span class="hl-9">'top-left'</span><span class="hl-1"> | </span><span class="hl-9">'bottom-left'</span><span class="hl-1">): </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector3</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 将方向向量转化为六视图 uv</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">vector</span><span class="hl-8"> - 全局方向向量 (World Space)</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">uvOrigin</span><span class="hl-8"> - UV 原点位置,默认为 'top-left'</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">vectorToCubemapUv</span><span class="hl-1">(</span><span class="hl-6">vector</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector3</span><span class="hl-1">, </span><span class="hl-6">uvOrigin</span><span class="hl-1">?: </span><span class="hl-9">'top-left'</span><span class="hl-1"> | </span><span class="hl-9">'bottom-left'</span><span class="hl-1">): [</span><span class="hl-13">cubeFace</span><span class="hl-1">: </span><span class="hl-7">CubeFace</span><span class="hl-1">, </span><span class="hl-13">cubemapUv</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><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 将六视图 uv 转化为方向向量</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">cubeFace</span><span class="hl-8"> - 立方体面 ('up' | 'down' | 'left' | 'right' | 'front' | 'back')</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">uv</span><span class="hl-8"> - 该面上的 UV 坐标 [0, 1]</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">uvOrigin</span><span class="hl-8"> - UV 原点位置,默认为 'top-left'</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">cubemapUvToVector</span><span class="hl-1">(</span><span class="hl-6">cubeFace</span><span class="hl-1">: </span><span class="hl-7">CubeFace</span><span class="hl-1">, </span><span class="hl-6">uv</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-6">uvOrigin</span><span class="hl-1">?: </span><span class="hl-9">'top-left'</span><span class="hl-1"> | </span><span class="hl-9">'bottom-left'</span><span class="hl-1">): </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector3</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-3">type</span><span class="hl-1"> </span><span class="hl-7">CubeFace</span><span class="hl-1"> = </span><span class="hl-9">'up'</span><span class="hl-1"> | </span><span class="hl-9">'down'</span><span class="hl-1"> | </span><span class="hl-9">'left'</span><span class="hl-1"> | </span><span class="hl-9">'right'</span><span class="hl-1"> | </span><span class="hl-9">'front'</span><span class="hl-1"> | </span><span class="hl-9">'back'</span><span class="hl-1">;</span>
|
|
15
|
+
</code><button type="button">Copy</button></pre>
|
|
16
|
+
|
|
17
|
+
<h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
18
|
+
<h3 id="1-坐标系转换-coordinate-transformation" class="tsd-anchor-link">1. 坐标系转换 (Coordinate Transformation)<a href="#1-坐标系转换-coordinate-transformation" 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>
|
|
19
|
+
<p>转换过程会自动处理以下坐标空间的变换:</p>
|
|
20
|
+
<ol>
|
|
21
|
+
<li><strong>World Space (世界坐标系)</strong>: <code>vector</code> 参数所处的坐标系。</li>
|
|
22
|
+
<li><strong>Work Space (Work 坐标系)</strong>: 考虑 <code>work.transform</code> 带来的整体旋转。</li>
|
|
23
|
+
<li><strong>Observer Space (观察者坐标系)</strong>: 考虑 <code>observer.quaternion</code> 带来的观察点旋转。</li>
|
|
24
|
+
<li><strong>Panorama Space (全景图空间)</strong>: 最终映射到 2D 图片上的 UV 坐标。</li>
|
|
25
|
+
</ol>
|
|
26
|
+
<h3 id="2-投影方式-projection-types" class="tsd-anchor-link">2. 投影方式 (Projection Types)<a href="#2-投影方式-projection-types" 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>
|
|
27
|
+
<ul>
|
|
28
|
+
<li><strong>Equirectangular (等距柱状投影)</strong>: 将球体展开为 2:1 的矩形图片。常用于全景图预览。</li>
|
|
29
|
+
<li><strong>Cubemap (立方体贴图)</strong>: 将球体投影到立方体的六个面上。常用于高清全景浏览。</li>
|
|
30
|
+
</ul>
|
|
31
|
+
<h3 id="3-uv-原点-uv-origin" class="tsd-anchor-link">3. UV 原点 (UV Origin)<a href="#3-uv-原点-uv-origin" 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>
|
|
32
|
+
<ul>
|
|
33
|
+
<li><strong>top-left (默认)</strong>: 原点 <code>(0, 0)</code> 在图片<strong>左上角</strong>。U 轴向右,V 轴向下。符合大多数 Web 图片处理习惯 (Canvas, DOM)。</li>
|
|
34
|
+
<li><strong>bottom-left</strong>: 原点 <code>(0, 0)</code> 在图片<strong>左下角</strong>。U 轴向右,V 轴向上。符合 WebGL / OpenGL 纹理坐标习惯。</li>
|
|
35
|
+
</ul>
|
|
36
|
+
<h2 id="configuration" class="tsd-anchor-link">Configuration<a href="#configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
37
|
+
<p>所有方法均包含可选参数 <code>uvOrigin</code>。</p>
|
|
38
|
+
<h3 id="common-configuration" class="tsd-anchor-link">Common Configuration<a href="#common-configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
39
|
+
<table>
|
|
40
|
+
<thead>
|
|
41
|
+
<tr>
|
|
42
|
+
<th style="text-align:left">Parameter</th>
|
|
43
|
+
<th style="text-align:left">Type</th>
|
|
44
|
+
<th style="text-align:left">Default</th>
|
|
45
|
+
<th style="text-align:left">Description</th>
|
|
46
|
+
</tr>
|
|
47
|
+
</thead>
|
|
48
|
+
<tbody>
|
|
49
|
+
<tr>
|
|
50
|
+
<td style="text-align:left"><code>uvOrigin</code></td>
|
|
51
|
+
<td style="text-align:left"><code>'top-left' | 'bottom-left'</code></td>
|
|
52
|
+
<td style="text-align:left"><code>'top-left'</code></td>
|
|
53
|
+
<td style="text-align:left">指定 UV 坐标系的原点位置。</td>
|
|
54
|
+
</tr>
|
|
55
|
+
</tbody>
|
|
56
|
+
</table>
|
|
57
|
+
<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>
|
|
58
|
+
<h3 id="1-点击全景图获取空间方向-click-to-vector" class="tsd-anchor-link">1. 点击全景图获取空间方向 (Click to Vector)<a href="#1-点击全景图获取空间方向-click-to-vector" 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>
|
|
59
|
+
<p>假设你有一个全景图的点击事件,获取到了点击位置的 UV:</p>
|
|
60
|
+
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">observer</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">work</span><span class="hl-1">.</span><span class="hl-6">observers</span><span class="hl-1">[</span><span class="hl-11">0</span><span class="hl-1">];</span><br/><span class="hl-8">// 假设这是用户点击全景图后归一化得到的 UV (0~1)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">clickUv</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">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/><br/><span class="hl-8">// 转换为世界空间的方向向量</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">direction</span><span class="hl-1"> = </span><span class="hl-6">observer</span><span class="hl-1">.</span><span class="hl-5">equirectangularUvToVector</span><span class="hl-1">(</span><span class="hl-6">clickUv</span><span class="hl-1">);</span><br/><br/><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-9">'点击方向:'</span><span class="hl-1">, </span><span class="hl-6">direction</span><span class="hl-1">);</span>
|
|
61
|
+
</code><button type="button">Copy</button></pre>
|
|
62
|
+
|
|
63
|
+
<h3 id="2-将空间点映射到全景图上-world-point-to-uv" class="tsd-anchor-link">2. 将空间点映射到全景图上 (World Point to UV)<a href="#2-将空间点映射到全景图上-world-point-to-uv" 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>
|
|
64
|
+
<p>假设场景中有一个 3D 物体,你想知道它在当前全景图上的位置(例如打标签):</p>
|
|
65
|
+
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">observer</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">work</span><span class="hl-1">.</span><span class="hl-6">observers</span><span class="hl-1">[</span><span class="hl-11">0</span><span class="hl-1">];</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">objectPosition</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">Vector3</span><span class="hl-1">(</span><span class="hl-11">10</span><span class="hl-1">, </span><span class="hl-11">2</span><span class="hl-1">, </span><span class="hl-11">5</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">direction</span><span class="hl-1"> = </span><span class="hl-6">objectPosition</span><span class="hl-1">.</span><span class="hl-5">clone</span><span class="hl-1">().</span><span class="hl-5">sub</span><span class="hl-1">(</span><span class="hl-6">observer</span><span class="hl-1">.</span><span class="hl-6">position</span><span class="hl-1">).</span><span class="hl-5">normalize</span><span class="hl-1">();</span><br/><br/><span class="hl-8">// 获取全景图 UV</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">uv</span><span class="hl-1"> = </span><span class="hl-6">observer</span><span class="hl-1">.</span><span class="hl-5">vectorToEquirectangularUv</span><span class="hl-1">(</span><span class="hl-6">direction</span><span class="hl-1">);</span><br/><br/><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-9">`物体在全景图上的位置: u=</span><span class="hl-3">${</span><span class="hl-6">uv</span><span class="hl-12">.</span><span class="hl-6">x</span><span class="hl-3">}</span><span class="hl-9">, v=</span><span class="hl-3">${</span><span class="hl-6">uv</span><span class="hl-12">.</span><span class="hl-6">y</span><span class="hl-3">}</span><span class="hl-9">`</span><span class="hl-1">);</span>
|
|
66
|
+
</code><button type="button">Copy</button></pre>
|
|
67
|
+
|
|
68
|
+
<h3 id="3-处理-cubemap-坐标-cubemap-conversion" class="tsd-anchor-link">3. 处理 Cubemap 坐标 (Cubemap Conversion)<a href="#3-处理-cubemap-坐标-cubemap-conversion" 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>
|
|
69
|
+
<p>如果你使用的是六面体全景图资源:</p>
|
|
70
|
+
<pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">observer</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">work</span><span class="hl-1">.</span><span class="hl-6">observers</span><span class="hl-1">[</span><span class="hl-11">0</span><span class="hl-1">];</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">direction</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">Vector3</span><span class="hl-1">(</span><span class="hl-11">0</span><span class="hl-1">, </span><span class="hl-11">0</span><span class="hl-1">, -</span><span class="hl-11">1</span><span class="hl-1">); </span><span class="hl-8">// 正前方</span><br/><br/><span class="hl-8">// 获取对应的面和 UV</span><br/><span class="hl-3">const</span><span class="hl-1"> [</span><span class="hl-4">face</span><span class="hl-1">, </span><span class="hl-4">uv</span><span class="hl-1">] = </span><span class="hl-6">observer</span><span class="hl-1">.</span><span class="hl-5">vectorToCubemapUv</span><span class="hl-1">(</span><span class="hl-6">direction</span><span class="hl-1">);</span><br/><br/><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-9">`正前方对应 Cubemap 的 </span><span class="hl-3">${</span><span class="hl-6">face</span><span class="hl-3">}</span><span class="hl-9"> 面,UV 为`</span><span class="hl-1">, </span><span class="hl-6">uv</span><span class="hl-1">);</span>
|
|
71
|
+
</code><button type="button">Copy</button></pre>
|
|
72
|
+
|
|
73
|
+
<h2 id="related" class="tsd-anchor-link">Related<a href="#related" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
74
|
+
<ul>
|
|
75
|
+
<li><a href="features_work.html">Work</a>: 了解 WorkObserver 的数据结构。</li>
|
|
76
|
+
<li><a href="features_coordinate-system.html">Coordinate System</a>: 了解 Five 的坐标系定义。</li>
|
|
77
|
+
</ul>
|
|
78
|
+
<hr>
|
|
79
|
+
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">全景UV</span><span class="hl-1">, </span><span class="hl-2">方向转换</span><span class="hl-1">, </span><span class="hl-2">全景坐标</span><span class="hl-1">, </span><span class="hl-2">像素映射</span><span class="hl-1">, </span><span class="hl-2">全景标注</span><span class="hl-1">, </span><span class="hl-2">work</span><span class="hl-1">, </span><span class="hl-2">observer</span><span class="hl-1">, </span><span class="hl-2">uv</span><span class="hl-1">, </span><span class="hl-2">projection</span><span class="hl-1">, </span><span class="hl-2">math</span><span class="hl-1">, </span><span class="hl-2">equirectangular</span><span class="hl-1">, </span><span class="hl-2">cubemap</span><span class="hl-1">]</span>
|
|
80
|
+
</code><button type="button">Copy</button></pre>
|
|
81
|
+
|
|
82
|
+
</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="#全景图-uv-与方向转换-panorama-uv-conversion"><span>全景图 <wbr/>UV 与方向转换 (<wbr/>Panorama <wbr/>UV <wbr/>Conversion)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#1-坐标系转换-coordinate-transformation"><span>1. 坐标系转换 (<wbr/>Coordinate <wbr/>Transformation)</span></a></li><li><a href="#2-投影方式-projection-types"><span>2. 投影方式 (<wbr/>Projection <wbr/>Types)</span></a></li><li><a href="#3-uv-原点-uv-origin"><span>3. <wbr/>UV 原点 (<wbr/>UV <wbr/>Origin)</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#common-configuration"><span>Common <wbr/>Configuration</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-点击全景图获取空间方向-click-to-vector"><span>1. 点击全景图获取空间方向 (<wbr/>Click to <wbr/>Vector)</span></a></li><li><a href="#2-将空间点映射到全景图上-world-point-to-uv"><span>2. 将空间点映射到全景图上 (<wbr/>World <wbr/>Point to <wbr/>UV)</span></a></li><li><a href="#3-处理-cubemap-坐标-cubemap-conversion"><span>3. 处理 <wbr/>Cubemap 坐标 (<wbr/>Cubemap <wbr/>Conversion)</span></a></li></ul></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,81 +1,109 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/parameter | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">features/parameter</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="parameter
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/parameter | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">features/parameter</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="parameter-配置系统" class="tsd-anchor-link">Parameter (配置系统)<a href="#parameter-配置系统" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1>
|
|
2
2
|
<ul>
|
|
3
3
|
<li><strong>Summary</strong>: Five 用于控制三维模型渲染表现的核心配置系统,采用树形继承设计。</li>
|
|
4
|
-
<li><strong>Schema</strong>:
|
|
5
|
-
<li><strong>Concepts</strong>: Hierarchy (树形继承),
|
|
6
|
-
<li><strong>Examples</strong>:
|
|
4
|
+
<li><strong>Schema</strong>: 是所有配置项的容器,通过继承机制管理 Material 和 3DTile 等子配置。</li>
|
|
5
|
+
<li><strong>Concepts</strong>: Hierarchy (树形继承), Override (覆盖), Resolution (解析)。</li>
|
|
6
|
+
<li><strong>Examples</strong>: 全局配置、局部覆盖、参数重置。</li>
|
|
7
7
|
</ul>
|
|
8
8
|
<h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
9
|
-
<
|
|
10
|
-
<p><
|
|
11
|
-
|
|
9
|
+
<blockquote>
|
|
10
|
+
<p><strong>Definition</strong>: <a href="../../five/model/parameter.d.ts">Parameter</a></p>
|
|
11
|
+
</blockquote>
|
|
12
|
+
<p><code>Parameter</code> 类是配置的入口。它并不直接包含所有配置字段的定义,而是将它们组织在不同的接口中。</p>
|
|
13
|
+
<h3 id="parameter-categories-参数分类" class="tsd-anchor-link">Parameter Categories (参数分类)<a href="#parameter-categories-参数分类" 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>
|
|
14
|
+
<p>为了便于理解,我们将参数分为两大类:</p>
|
|
15
|
+
<table>
|
|
16
|
+
<thead>
|
|
17
|
+
<tr>
|
|
18
|
+
<th style="text-align:left">Category</th>
|
|
19
|
+
<th style="text-align:left">Description</th>
|
|
20
|
+
<th style="text-align:left">Link</th>
|
|
21
|
+
</tr>
|
|
22
|
+
</thead>
|
|
23
|
+
<tbody>
|
|
24
|
+
<tr>
|
|
25
|
+
<td style="text-align:left"><strong>Material & Appearance</strong></td>
|
|
26
|
+
<td style="text-align:left">控制“长什么样”。包括材质、颜色、楼层显示、阴影、点云样式等。</td>
|
|
27
|
+
<td style="text-align:left"><a href="features_material.html">Material Params</a></td>
|
|
28
|
+
</tr>
|
|
29
|
+
<tr>
|
|
30
|
+
<td style="text-align:left"><strong>3DTile & Performance</strong></td>
|
|
31
|
+
<td style="text-align:left">控制“怎么加载”。包括 LOD (细节层级)、显存配额、网络并发、SSE 阈值等。</td>
|
|
32
|
+
<td style="text-align:left"><a href="features_3dtile.html">3DTile Params</a></td>
|
|
33
|
+
</tr>
|
|
34
|
+
</tbody>
|
|
35
|
+
</table>
|
|
36
|
+
<h3 id="parameter-class-api" class="tsd-anchor-link">Parameter Class API<a href="#parameter-class-api" 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>
|
|
37
|
+
<h4 id="1-getting-values-获取值" class="tsd-anchor-link">1. Getting Values (获取值)<a href="#1-getting-values-获取值" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
38
|
+
<p>获取参数值<strong>不使用</strong> <code>get()</code> 方法,而是直接访问属性。</p>
|
|
39
|
+
<ul>
|
|
40
|
+
<li><strong>Direct Access (直接访问)</strong>: 获取当前 <code>Parameter</code> 实例上设置的值。如果未设置,返回 <code>undefined</code>。</li>
|
|
41
|
+
<li><strong>Resolve Value (计算最终值)</strong>: 获取经过树形继承计算后的最终生效值。
|
|
42
|
+
<ul>
|
|
43
|
+
<li>如果不传参,则基于默认值计算 (Default -> Current)。</li>
|
|
44
|
+
<li>如果传入上游 Parameter,则基于默认值 + 上游 Parameter 计算 (Default -> Upstream -> Current)。</li>
|
|
45
|
+
</ul>
|
|
46
|
+
</li>
|
|
47
|
+
</ul>
|
|
48
|
+
<pre><code class="typescript"><span class="hl-8">// 方式 A: 直接访问 (获取当前层级配置)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">currentVal</span><span class="hl-1"> = </span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-6">maxMemoryUsage</span><span class="hl-1">;</span><br/><br/><span class="hl-8">// 方式 B: 计算最终值 (包含继承逻辑)</span><br/><br/><span class="hl-8">// 1. 基础用法:仅继承默认值</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">finalVal</span><span class="hl-1"> = </span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">resolveValue</span><span class="hl-1">().</span><span class="hl-6">maxMemoryUsage</span><span class="hl-1">;</span><br/><br/><span class="hl-8">// 2. 进阶用法:指定继承源 (例如 ViewLayer 继承自 Model)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">inheritedVal</span><span class="hl-1"> = </span><span class="hl-6">viewLayerParam</span><span class="hl-1">.</span><span class="hl-5">resolveValue</span><span class="hl-1">(</span><span class="hl-6">parentParameter</span><span class="hl-1">).</span><span class="hl-6">maxMemoryUsage</span><span class="hl-1">;</span>
|
|
49
|
+
</code><button type="button">Copy</button></pre>
|
|
50
|
+
|
|
51
|
+
<h4 id="2-methods-方法" class="tsd-anchor-link">2. Methods (方法)<a href="#2-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></h4>
|
|
52
|
+
<p><code>Parameter</code> 实例提供了以下核心方法来管理配置:</p>
|
|
53
|
+
<pre><code class="typescript"><span class="hl-3">class</span><span class="hl-1"> </span><span class="hl-7">Parameter</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 设置配置项</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">key</span><span class="hl-8"> 参数名 (如 'opacity', 'maxMemoryUsage')</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">value</span><span class="hl-8"> 参数值</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-6">key</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">, </span><span class="hl-6">value</span><span class="hl-1">: </span><span class="hl-7">any</span><span class="hl-1">): </span><span class="hl-7">void</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 重置配置项(移除当前层级的设置,恢复继承上游的值)</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">keys</span><span class="hl-8"> 要重置的参数名列表</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">reset</span><span class="hl-1">(...</span><span class="hl-6">keys</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">[]): </span><span class="hl-7">void</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 获取经过继承计算后的最终值(每次调用创建新对象)</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">upstream</span><span class="hl-8"> 上游 Parameter 对象列表(通常由引擎自动传入)</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">resolveValue</span><span class="hl-1">(...</span><span class="hl-6">upstream</span><span class="hl-1">: </span><span class="hl-7">Parameter</span><span class="hl-1">[]): </span><span class="hl-7">ResolvedParameterValue</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 获取经过继承计算后的最终值(复用 target 对象,避免重复创建)</span><br/><span class="hl-8"> * 适用于高频调用场景(如逐帧更新),可显著减少 GC 压力。</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">target</span><span class="hl-8"> 用于写入结果的已有对象,其属性会被重置为默认值后重新赋值</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">upstream</span><span class="hl-8"> 上游 Parameter 对象列表</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-3">static</span><span class="hl-1"> </span><span class="hl-5">resolveValueTo</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-6">target</span><span class="hl-1">: </span><span class="hl-7">Partial</span><span class="hl-1"><</span><span class="hl-7">ResolvedParameterValue</span><span class="hl-1">>,</span><br/><span class="hl-1"> ...</span><span class="hl-6">upstream</span><span class="hl-1">: </span><span class="hl-7">Partial</span><span class="hl-1"><</span><span class="hl-7">ParameterValue</span><span class="hl-1">>[]</span><br/><span class="hl-1"> ): </span><span class="hl-7">ResolvedParameterValue</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
|
|
12
54
|
</code><button type="button">Copy</button></pre>
|
|
13
55
|
|
|
14
|
-
<
|
|
15
|
-
<p
|
|
16
|
-
|
|
56
|
+
<blockquote>
|
|
57
|
+
<p><code>resolveValue()</code> 内部已委托给 <code>resolveValueTo({}, ...)</code>,两者计算逻辑一致,区别仅在于是否复用对象。</p>
|
|
58
|
+
</blockquote>
|
|
59
|
+
<h4 id="3-version-版本标识" class="tsd-anchor-link">3. Version (版本标识)<a href="#3-version-版本标识" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
60
|
+
<p><code>ResolvedParameterValue</code> 通过 <code>versionNumber: number</code> 标识当前配置的版本。引擎内部使用整数哈希(而非字符串拼接)计算版本号,用于高效的脏检查。</p>
|
|
61
|
+
<pre><code class="typescript"><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">ResolvedParameterValue</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-7">ParameterValue</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** 整数哈希,输入参数变化时值会改变,用于脏检查 */</span><br/><span class="hl-1"> </span><span class="hl-6">versionNumber</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
|
|
17
62
|
</code><button type="button">Copy</button></pre>
|
|
18
63
|
|
|
19
64
|
<h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
20
|
-
<h3 id="
|
|
21
|
-
<p>Parameter 遵循 <strong>“就近原则” (Override)</strong>
|
|
65
|
+
<h3 id="树形继承关系-hierarchy" class="tsd-anchor-link">树形继承关系 (Hierarchy)<a href="#树形继承关系-hierarchy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
66
|
+
<p>Parameter 遵循 <strong>“就近原则” (Override)</strong> 的继承逻辑。</p>
|
|
22
67
|
<ol>
|
|
23
|
-
<li><strong>ViewLayer Parameter</strong>:
|
|
24
|
-
<li><strong>Model Parameter</strong>: 覆盖该 Model 下的所有 ViewLayer。</li>
|
|
25
|
-
<li><strong>ModelScene Parameter</strong>:
|
|
68
|
+
<li><strong>ViewLayer Parameter</strong>: 最具体,优先级最高。通常对应一个具体的 <code>.gltf</code> 文件或数据块。</li>
|
|
69
|
+
<li><strong>Model Parameter</strong>: 覆盖该 Model 下的所有 ViewLayer。一个 Model 可能包含多个 ViewLayer (如 Mesh 层和 PointCloud 层)。</li>
|
|
70
|
+
<li><strong>ModelScene Parameter</strong>: 全局默认值,优先级最低。影响整个场景。</li>
|
|
26
71
|
</ol>
|
|
27
72
|
<pre><code class="mermaid"><span class="hl-1">graph TD</span><br/><span class="hl-1"> Scene[ModelScene.parameter] -->|Inherit| Model[Model.parameter]</span><br/><span class="hl-1"> Model -->|Inherit| Layer1[ViewLayer.parameter]</span><br/><span class="hl-1"> Model -->|Inherit| Layer2[ViewLayer.parameter]</span>
|
|
28
73
|
</code><button type="button">Copy</button></pre>
|
|
29
74
|
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
</
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<p>控制模型“长什么样”。比如:</p>
|
|
38
|
-
<ul>
|
|
39
|
-
<li><strong><code>modelAlpha</code></strong>: 核心参数。Five 的模型纹理通常来自全景图投影。该值控制是显示原始模型 UV 贴图,还是显示全景投影贴图。</li>
|
|
40
|
-
<li><strong><code>shownFloorIndex</code></strong>: 实现“分层拆解”效果。</li>
|
|
41
|
-
<li><strong><code>floorStyle</code></strong>: 控制楼层隐藏的表现形式。</li>
|
|
42
|
-
</ul>
|
|
43
|
-
<h4 id="3dtile-性能-lod" class="tsd-anchor-link">3DTile & 性能 (LOD)<a href="#3dtile-性能-lod" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
44
|
-
<p>控制模型“怎么加载”。比如:</p>
|
|
45
|
-
<ul>
|
|
46
|
-
<li><strong><code>maxMemoryUsage</code></strong>: 显存控制。当加载的模型块超过此限制时,会自动卸载不可见的块。</li>
|
|
47
|
-
<li><strong><code>maxScreenSpaceError</code></strong>: 画质控制。值越小,加载的模型精度越高(允许的屏幕空间误差越小),但网络和渲染开销越大。</li>
|
|
48
|
-
<li><strong><code>minGeometricError</code></strong>: 几何误差阈值。值越小,加载的模型精度越高(允许的几何误差越小),但网络和渲染开销越大。</li>
|
|
49
|
-
<li><strong><code>maxRequests</code></strong>: 最大并发请求数。控制同时加载的模型块数量,避免对服务器压力过大。</li>
|
|
50
|
-
</ul>
|
|
51
|
-
<h4 id="点云-point-cloud" class="tsd-anchor-link">点云 (Point Cloud)<a href="#点云-point-cloud" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
|
|
52
|
-
<p>专用于 <code>type: point_cloud</code> 的 ViewLayer。比如:</p>
|
|
53
|
-
<ul>
|
|
54
|
-
<li><strong><code>pointSize</code></strong>: 控制点的像素大小。</li>
|
|
55
|
-
<li><strong><code>pointScale</code></strong>: 点云整体缩放。</li>
|
|
56
|
-
</ul>
|
|
75
|
+
<blockquote>
|
|
76
|
+
<p><strong>Global Configuration (全局设置)</strong>:
|
|
77
|
+
若需修改所有模型的默认表现(如统一调暗亮度、统一设置显存上限),<strong>请直接配置 <code>five.modelScene.parameter</code></strong>。它是继承链的根节点,其设置会向下传递给所有 Model 和 ViewLayer。</p>
|
|
78
|
+
<p><strong>Why modelScene? (生命周期优势)</strong>:
|
|
79
|
+
<code>Model</code> 实例是跟随 Work 加载生命周期的(需 <code>five.load(work)</code> 后才能访问,且切换 Work 会销毁重建)。
|
|
80
|
+
相比之下,<code>ModelScene</code> 是常驻对象。因此,<strong>使用 <code>modelScene</code> 进行配置更安全且持久</strong>,既无需等待 Work 加载完成,也无需担心切换 Work 导致配置丢失。</p>
|
|
81
|
+
</blockquote>
|
|
57
82
|
<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>
|
|
58
|
-
<h3 id="
|
|
59
|
-
<pre><code class="typescript"><span class="hl-8">//
|
|
83
|
+
<h3 id="1-基础配置-basic-usage" class="tsd-anchor-link">1. 基础配置 (Basic Usage)<a href="#1-基础配置-basic-usage" 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>
|
|
84
|
+
<pre><code class="typescript"><span class="hl-8">// 1. 设置全局最大显存 (影响所有模型)</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">'maxMemoryUsage'</span><span class="hl-1">, </span><span class="hl-11">512</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 2. 设置全局半透明</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">'opacity'</span><span class="hl-1">, </span><span class="hl-11">0.5</span><span class="hl-1">);</span>
|
|
60
85
|
</code><button type="button">Copy</button></pre>
|
|
61
86
|
|
|
62
|
-
<h3 id="
|
|
63
|
-
<pre><code class="typescript"><span class="hl-8">//
|
|
87
|
+
<h3 id="2-局部覆盖-override" class="tsd-anchor-link">2. 局部覆盖 (Override)<a href="#2-局部覆盖-override" 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>
|
|
88
|
+
<pre><code class="typescript"><span class="hl-8">// 场景中大部分模型不产生阴影</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">'castShadow'</span><span class="hl-1">, </span><span class="hl-3">false</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">heroModel</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">models</span><span class="hl-1">[</span><span class="hl-11">0</span><span class="hl-1">];</span><br/><span class="hl-6">heroModel</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">'castShadow'</span><span class="hl-1">, </span><span class="hl-3">true</span><span class="hl-1">);</span>
|
|
89
|
+
</code><button type="button">Copy</button></pre>
|
|
90
|
+
|
|
91
|
+
<h3 id="3-重置配置-reset" class="tsd-anchor-link">3. 重置配置 (Reset)<a href="#3-重置配置-reset" 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>
|
|
92
|
+
<pre><code class="typescript"><span class="hl-8">// 假设之前设置了 opacity</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">set</span><span class="hl-1">(</span><span class="hl-9">'opacity'</span><span class="hl-1">, </span><span class="hl-11">0.5</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// ... 一段时间后 ...</span><br/><br/><span class="hl-8">// 移除该设置,恢复默认值 (或继承值)</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">reset</span><span class="hl-1">(</span><span class="hl-9">'opacity'</span><span class="hl-1">);</span>
|
|
93
|
+
</code><button type="button">Copy</button></pre>
|
|
94
|
+
|
|
95
|
+
<h3 id="4-获取配置-get-value" class="tsd-anchor-link">4. 获取配置 (Get Value)<a href="#4-获取配置-get-value" 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>
|
|
96
|
+
<pre><code class="typescript"><span class="hl-8">// 获取当前对象上的配置(如果未设置,则为 undefined)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ownOpacity</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-6">opacity</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">finalOpacity</span><span class="hl-1"> = </span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">modelScene</span><span class="hl-1">.</span><span class="hl-6">parameter</span><span class="hl-1">.</span><span class="hl-5">resolveValue</span><span class="hl-1">().</span><span class="hl-6">opacity</span><span class="hl-1">;</span>
|
|
64
97
|
</code><button type="button">Copy</button></pre>
|
|
65
98
|
|
|
66
|
-
<h2 id="common-pitfalls" class="tsd-anchor-link">Common Pitfalls<a href="#common-pitfalls" 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>
|
|
67
|
-
<ol>
|
|
68
|
-
<li><strong>拼写错误</strong>: <code>parameter.set()</code> 的 key 是字符串,拼写错误不会报错(除非使用 TypeScript),但配置不会生效。</li>
|
|
69
|
-
<li><strong>层级混淆</strong>: 在 <code>ModelScene</code> 上设置了 <code>shownFloorIndex</code>,却期望只影响某个 Model。请务必确认操作的 <code>parameter</code> 对象所属的层级。</li>
|
|
70
|
-
<li><strong>类型错误</strong>: 某些数值参数(如 <code>opacity</code>)需要 <code>number</code> 类型,传入字符串可能导致渲染计算 NaN 错误。</li>
|
|
71
|
-
</ol>
|
|
72
99
|
<h2 id="related" class="tsd-anchor-link">Related<a href="#related" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
73
100
|
<ul>
|
|
74
|
-
<li><a href="
|
|
75
|
-
<li><a href="features_3dtile.html">3DTile</a>:
|
|
101
|
+
<li><a href="features_material.html">Material Parameters</a>: 材质与外观参数详情。</li>
|
|
102
|
+
<li><a href="features_3dtile.html">3DTile Parameters</a>: 性能与加载参数详情。</li>
|
|
103
|
+
<li><a href="features_model.html">Model</a>: Parameter 的宿主。</li>
|
|
76
104
|
</ul>
|
|
77
105
|
<hr>
|
|
78
|
-
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">parameter</span><span class="hl-1">, </span><span class="hl-2">config</span><span class="hl-1">, </span><span class="hl-2">
|
|
106
|
+
<pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">配置</span><span class="hl-1">, </span><span class="hl-2">参数</span><span class="hl-1">, </span><span class="hl-2">继承</span><span class="hl-1">, </span><span class="hl-2">覆盖</span><span class="hl-1">, </span><span class="hl-2">全局配置</span><span class="hl-1">, </span><span class="hl-2">局部配置</span><span class="hl-1">, </span><span class="hl-2">parameter</span><span class="hl-1">, </span><span class="hl-2">config</span><span class="hl-1">, </span><span class="hl-2">hierarchy</span><span class="hl-1">, </span><span class="hl-2">api</span><span class="hl-1">, </span><span class="hl-2">set</span><span class="hl-1">, </span><span class="hl-2">reset</span><span class="hl-1">, </span><span class="hl-2">modelScene</span><span class="hl-1">]</span>
|
|
79
107
|
</code><button type="button">Copy</button></pre>
|
|
80
108
|
|
|
81
|
-
</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="#parameter
|
|
109
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#parameter-配置系统"><span>Parameter (配置系统)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><ul><li><a href="#parameter-categories-参数分类"><span>Parameter <wbr/>Categories (参数分类)</span></a></li><li><a href="#parameter-class-api"><span>Parameter <wbr/>Class <wbr/>API</span></a></li><li><ul><li><a href="#1-getting-values-获取值"><span>1. <wbr/>Getting <wbr/>Values (获取值)</span></a></li><li><a href="#2-methods-方法"><span>2. <wbr/>Methods (方法)</span></a></li><li><a href="#3-version-版本标识"><span>3. <wbr/>Version (版本标识)</span></a></li></ul></li></ul></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#树形继承关系-hierarchy"><span>树形继承关系 (<wbr/>Hierarchy)</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-基础配置-basic-usage"><span>1. 基础配置 (<wbr/>Basic <wbr/>Usage)</span></a></li><li><a href="#2-局部覆盖-override"><span>2. 局部覆盖 (<wbr/>Override)</span></a></li><li><a href="#3-重置配置-reset"><span>3. 重置配置 (<wbr/>Reset)</span></a></li><li><a href="#4-获取配置-get-value"><span>4. 获取配置 (<wbr/>Get <wbr/>Value)</span></a></li></ul></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|