@realsee/five 6.8.0-alpha.2 → 6.8.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_READ_ME.md +4 -0
- package/AI_CONTEXT.md +4 -0
- package/README.md +9 -6
- package/{guides → ai_guides}/README.md +12 -2
- package/ai_guides/ai-doc-guidelines.md +102 -0
- package/{guides → ai_guides}/api.md +24 -1
- package/ai_guides/features/3dtile.md +172 -0
- package/{guides → ai_guides}/features/camera-animation.md +24 -3
- package/{guides → ai_guides}/features/clipper.md +2 -0
- package/{guides/features/coordnate-system.md → ai_guides/features/coordinate-system.md} +2 -0
- package/{guides → ai_guides}/features/event.md +2 -0
- package/{guides → ai_guides}/features/five.md +4 -0
- package/ai_guides/features/flowing-light-2d-pass.md +438 -0
- package/ai_guides/features/flowing-light-3d-pass.md +420 -0
- package/ai_guides/features/gaussian-blur-pass.md +202 -0
- package/{guides → ai_guides}/features/gesture.md +3 -0
- package/{guides → ai_guides}/features/get-screen-pixels.md +2 -0
- package/{guides → ai_guides}/features/image-options.md +3 -0
- package/{guides → ai_guides}/features/load-external-model.md +21 -0
- package/ai_guides/features/load-progress.md +140 -0
- package/ai_guides/features/material.md +153 -0
- package/{guides → ai_guides}/features/mode.md +4 -0
- package/{guides → ai_guides}/features/model.md +4 -1
- package/{guides → ai_guides}/features/move-pano-effect.md +2 -0
- package/{guides → ai_guides}/features/multi-work.md +2 -0
- package/ai_guides/features/pano-filter.md +148 -0
- package/{guides → ai_guides}/features/pano-tile.md +7 -14
- package/ai_guides/features/pano-uv.md +131 -0
- package/ai_guides/features/parameter.md +153 -0
- package/ai_guides/features/plugin.md +210 -0
- package/{guides → ai_guides}/features/postprocessing.md +39 -4
- package/{guides → ai_guides}/features/raycast.md +11 -0
- package/{guides → ai_guides}/features/request-proxy.md +2 -0
- package/{guides → ai_guides}/features/screen-project.md +2 -0
- package/{guides → ai_guides}/features/state.md +2 -0
- package/ai_guides/features/view-layer.md +187 -0
- package/{guides → ai_guides}/features/work.md +63 -2
- package/{guides → ai_guides}/glossary.md +26 -5
- package/{guides → ai_guides}/intro.md +1 -1
- package/{guides → ai_guides}/quick-start.md +1 -0
- package/ai_guides/release_notes/6.8.md +208 -0
- package/{guides → ai_guides}/template.md +17 -3
- package/docs/00_FOR_AI_AGENTS.md +11 -0
- package/docs/README.md +4 -7
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
- package/docs/classes/five.BoundingMesh.html +2 -2
- package/docs/classes/five.Camera.html +1 -1
- package/docs/classes/five.EyeDomeLightingPass.html +1 -1
- package/docs/classes/five.Five.html +73 -72
- package/docs/classes/five.FivePass.html +1 -1
- package/docs/classes/five.Histogram.html +19 -0
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +31 -31
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMCustomShader.html +42 -3
- package/docs/classes/five.PBMGSObject.html +5 -3
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +16 -7
- package/docs/classes/five.PBMPanoFilter.html +61 -0
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.PBMUpdateable.html +41 -0
- package/docs/classes/five.PanoCircleMesh.html +1 -1
- package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/five.Parameter.html +57 -53
- package/docs/classes/five.Scene.html +1 -1
- package/docs/classes/five.Subscribe.html +1 -1
- package/docs/classes/five.Tile.html +1 -1
- package/docs/classes/five.Tile3D.html +30 -26
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.Trajectory.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.Work.html +16 -16
- package/docs/classes/five.WorkResolvedObserver.html +27 -2
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.GLTFParser.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.Line.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/sticker.Sticker.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.ParticleGPU.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/documents/README.html +11 -2
- package/docs/documents/ai-doc-guidelines.html +60 -15
- package/docs/documents/api.html +40 -15
- package/docs/documents/features_3dtile.html +142 -45
- package/docs/documents/features_camera-animation.html +62 -5
- package/docs/documents/features_clipper.html +3 -0
- package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +4 -1
- package/docs/documents/features_event.html +3 -0
- package/docs/documents/features_five.html +4 -0
- package/docs/documents/features_flowing-light-2d-pass.html +356 -0
- package/docs/documents/features_flowing-light-3d-pass.html +351 -0
- package/docs/documents/features_gaussian-blur-pass.html +182 -0
- package/docs/documents/features_gesture.html +4 -0
- package/docs/documents/features_get-screen-pixels.html +3 -0
- package/docs/documents/features_image-options.html +3 -0
- package/docs/documents/features_load-external-model.html +25 -2
- package/docs/documents/features_load-progress.html +110 -0
- package/docs/documents/features_material.html +341 -0
- package/docs/documents/features_mode.html +5 -0
- package/docs/documents/features_model.html +5 -1
- package/docs/documents/features_move-pano-effect.html +3 -0
- package/docs/documents/features_multi-work.html +3 -0
- package/docs/documents/features_pano-filter.html +122 -0
- package/docs/documents/features_pano-tile.html +34 -19
- package/docs/documents/features_pano-uv.html +82 -0
- package/docs/documents/features_parameter.html +76 -56
- package/docs/documents/features_plugin.html +105 -0
- package/docs/documents/features_postprocessing.html +22 -5
- package/docs/documents/features_raycast.html +4 -1
- package/docs/documents/features_request-proxy.html +3 -0
- package/docs/documents/features_screen-project.html +3 -0
- package/docs/documents/features_state.html +3 -0
- package/docs/documents/features_view-layer.html +158 -0
- package/docs/documents/features_work.html +63 -2
- package/docs/documents/glossary.html +31 -6
- package/docs/documents/intro.html +1 -1
- package/docs/documents/quick-start.html +1 -0
- package/docs/documents/release_notes_6.8.html +189 -0
- package/docs/documents/template.html +45 -4
- package/docs/functions/five.loadAt3d.html +1 -1
- package/docs/functions/five.loadB3dm.html +1 -1
- package/docs/functions/five.loadDome.html +1 -1
- package/docs/functions/five.loadDomez.html +1 -1
- package/docs/functions/five.loadFbx.html +1 -1
- package/docs/functions/five.loadGltf.html +1 -1
- package/docs/functions/five.loadPbm.html +1 -1
- package/docs/functions/five.loadPly.html +1 -1
- package/docs/functions/five.loadPnts.html +1 -1
- package/docs/functions/five.loadSplat.html +1 -1
- package/docs/functions/five.loadSpz.html +1 -1
- package/docs/functions/five.loadX3p.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/functions/vue.useFiveWorks.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +11 -2
- package/docs/interfaces/five.AddableObject.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +1 -1
- package/docs/interfaces/five.BaseEvent.html +2 -2
- package/docs/interfaces/five.EventCallback.html +53 -47
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.GestureEvent.html +2 -2
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.IntersectEvent.html +2 -2
- package/docs/interfaces/five.IntersectMesh.html +1 -1
- package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/five.Intersection.html +4 -3
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModeChangeEvent.html +2 -2
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ModelEvent.html +2 -2
- package/docs/interfaces/five.ModelSceneEvent.html +2 -2
- package/docs/interfaces/five.ModelTileEvent.html +8 -0
- package/docs/interfaces/five.MovePanoOptions.html +7 -7
- package/docs/interfaces/five.NetworkAbortError.html +1 -1
- package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +1 -1
- package/docs/interfaces/five.NetworkProxyError.html +1 -1
- package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
- package/docs/interfaces/five.NetworkResponseError.html +1 -1
- package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/five.ObjectEvent.html +2 -2
- package/docs/interfaces/five.PBMClipperParameter.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
- package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
- package/docs/interfaces/five.PBMPanoDepth.html +5 -5
- package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
- package/docs/interfaces/five.PBMPanoPicture.html +8 -6
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
- package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
- package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/five.PanoEvent.html +2 -2
- package/docs/interfaces/five.PanoTextureEvent.html +2 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +56 -52
- package/docs/interfaces/five.Pose.html +1 -1
- package/docs/interfaces/five.RenderEvent.html +2 -2
- package/docs/interfaces/five.ResolvedParameterValue.html +56 -52
- package/docs/interfaces/five.RgbaData.html +7 -0
- package/docs/interfaces/five.SplatData.html +2 -2
- package/docs/interfaces/five.State.html +1 -1
- package/docs/interfaces/five.StateEvent.html +2 -2
- package/docs/interfaces/five.TextureOptions.html +1 -1
- package/docs/interfaces/five.Tile3DOptions.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +30 -26
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkModel.html +8 -8
- package/docs/interfaces/five.WorkModelLayer.html +6 -6
- package/docs/interfaces/five.WorkObserver.html +27 -2
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.WorksEvent.html +2 -2
- package/docs/interfaces/five.XRControllerEvent.html +2 -2
- package/docs/interfaces/five.XRGestureEvent.html +2 -2
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.XRSessionEvent.html +2 -2
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +13 -13
- package/docs/modules/five.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/five.ControllerEventTypes.html +27 -25
- package/docs/types/five.EasingFunction.html +1 -0
- package/docs/types/five.EventTypes.html +27 -25
- package/docs/types/five.FivePlugin.html +1 -1
- package/docs/types/five.FivePluginInit.html +1 -1
- package/docs/types/five.FivePluginInstance.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.PBMAlphaMode.html +1 -1
- package/docs/types/five.PBMColorStyle.html +1 -1
- package/docs/types/five.PBMFloorStyle.html +1 -1
- package/docs/types/five.PBMMeshShaderType.html +1 -1
- package/docs/types/five.PBMPointBack.html +1 -1
- package/docs/types/five.PBMPointCloudShaderType.html +1 -1
- package/docs/types/five.PBMPointShape.html +1 -1
- package/docs/types/five.PBMPointSize.html +1 -1
- package/docs/types/five.PBMTransition.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -6
- package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
- package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/five/application/analysis.d.ts +40 -0
- package/five/application/controllers.d.ts +41 -0
- package/five/application/events-legacy.d.ts +454 -0
- package/five/application/events.d.ts +69 -0
- package/five/application/five.d.ts +519 -0
- package/five/application/fiveInitArgs.d.ts +176 -0
- package/five/application/fiveLoadOptions.d.ts +21 -0
- package/five/application/generateDefaultVideoElement.d.ts +2 -0
- package/five/application/getViewportScale.d.ts +2 -0
- package/five/application/initLights.d.ts +3 -0
- package/five/application/mode.d.ts +28 -0
- package/five/application/renderPoweredByRealsee.d.ts +3 -0
- package/five/assets/cardboard-png-data-url.d.ts +2 -0
- package/five/assets/gradient-png-data-url.d.ts +2 -0
- package/five/assets/loading-png-data-url.d.ts +2 -0
- package/five/assets/phone-png-data-url.d.ts +2 -0
- package/five/assets/realsee-png-data-url.d.ts +2 -0
- package/five/bvh/bvhMath.d.ts +33 -0
- package/five/bvh/bvhMesh.d.ts +7 -0
- package/five/bvh/bvhNode.d.ts +29 -0
- package/five/bvh/bvhObject.d.ts +18 -0
- package/five/bvh/bvhPoints.d.ts +6 -0
- package/five/bvh/index.d.ts +10 -0
- package/five/bvh/worker.d.ts +35 -0
- package/five/cardboard/helper.d.ts +2 -0
- package/five/cardboard/index.d.ts +13 -0
- package/five/cardboard/sensor.d.ts +158 -0
- package/five/certificates/hardware.d.ts +1 -0
- package/five/controllers/base.d.ts +167 -0
- package/five/controllers/events.d.ts +71 -0
- package/five/controllers/floorplan.d.ts +119 -0
- package/five/controllers/mapview.d.ts +139 -0
- package/five/controllers/model.d.ts +57 -0
- package/five/controllers/panorama.d.ts +143 -0
- package/five/controllers/panoramaLike.d.ts +87 -0
- package/five/controllers/topview.d.ts +42 -0
- package/five/controllers/vrPanorama.d.ts +56 -0
- package/five/controllers/xrPanorama.d.ts +81 -0
- package/five/core/camera.d.ts +65 -0
- package/five/core/internalWebGLRenderer.d.ts +14 -0
- package/five/core/panoVideo.d.ts +18 -0
- package/five/core/scene.d.ts +10 -0
- package/five/core/tiling.d.ts +43 -0
- package/five/declare.d.ts +2 -1
- package/five/gaussian-splatting/util/renderData.d.ts +52 -0
- package/five/gaussian-splatting/wasm/data.d.ts +20 -0
- package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
- package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
- package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
- package/five/index.d.ts +60 -4637
- package/five/index.js +193 -341
- package/five/index.mjs +26455 -31011
- package/five/meshes/boundingMesh.d.ts +12 -0
- package/five/meshes/intersectMesh.d.ts +8 -0
- package/five/meshes/panoCircleMesh.d.ts +35 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
- package/five/meshes/panoSphereMesh.d.ts +27 -0
- package/five/model/helpers/coordinate-transform.d.ts +3 -0
- package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
- package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
- package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
- package/five/model/index.d.ts +70 -0
- package/five/model/intersection.d.ts +18 -0
- package/five/model/loaders/at3d.d.ts +12 -0
- package/five/model/loaders/b3dm.d.ts +9 -0
- package/five/model/loaders/dome.d.ts +22 -0
- package/five/model/loaders/domez.d.ts +11 -0
- package/five/model/loaders/fbx.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
- package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
- package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
- package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
- package/five/model/loaders/gltf.d.ts +10 -0
- package/five/model/loaders/obj.d.ts +9 -0
- package/five/model/loaders/pbm.d.ts +26 -0
- package/five/model/loaders/ply.d.ts +24 -0
- package/five/model/loaders/pnts.d.ts +8 -0
- package/five/model/loaders/protobuf/dome.d.ts +540 -0
- package/five/model/loaders/protobuf/pbm.d.ts +203 -0
- package/five/model/loaders/shared.d.ts +16 -0
- package/five/model/loaders/splat.d.ts +8 -0
- package/five/model/loaders/spz.d.ts +14 -0
- package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
- package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
- package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
- package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
- package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
- package/five/model/loaders/x3p.d.ts +22 -0
- package/five/model/materials/pbmMaterial.d.ts +137 -0
- package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
- package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
- package/five/model/model-scene.d.ts +172 -0
- package/five/model/model.d.ts +209 -0
- package/five/model/objects/pbmContainer.d.ts +28 -0
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
- package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
- package/five/model/objects/pbmGroup.d.ts +8 -0
- package/five/model/objects/pbmMesh.d.ts +10 -0
- package/five/model/objects/pbmPointCloud.d.ts +7 -0
- package/five/model/parameter.d.ts +140 -0
- package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
- package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
- package/five/model/tile3d/header.d.ts +88 -0
- package/five/model/tile3d/index.d.ts +214 -0
- package/five/model/tile3d/tile-cache.d.ts +18 -0
- package/five/model/tile3d/tile-content.d.ts +10 -0
- package/five/model/tile3d/tile-node.d.ts +24 -0
- package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
- package/five/model/tile3d/tile.d.ts +79 -0
- package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
- package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
- package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
- package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
- package/five/model/tile3d/tileset.d.ts +69 -0
- package/five/model/tile3d/trajectory-content.d.ts +9 -0
- package/five/model/tile3d/trajectory-node.d.ts +15 -0
- package/five/model/tile3d/trajectory.d.ts +30 -0
- package/five/model/tile3d/types.d.ts +33 -0
- package/five/model/view-layer.d.ts +20 -0
- package/five/renderer/five-renderer.d.ts +17 -0
- package/five/renderer/index.d.ts +3 -0
- package/five/renderer/postprocessing/composer.d.ts +37 -0
- package/five/renderer/postprocessing/index.d.ts +7 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
- package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
- package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
- package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
- package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
- package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
- package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
- package/five/renderer/tools/full-screen-quad.d.ts +15 -0
- package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
- package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
- package/five/renderer/tools/render-full-screen.d.ts +2 -0
- package/five/texture/histogram.d.ts +54 -0
- package/five/texture/imageBitmap.d.ts +13 -0
- package/five/texture/initTexture.d.ts +3 -0
- package/five/texture/loader.d.ts +39 -0
- package/five/texture/textureData.d.ts +11 -0
- package/five/thirdparty/fflate.d.ts +1407 -0
- package/five/thirdparty/hammer.d.ts +375 -0
- package/five/thirdparty/jsrsasign.d.ts +753 -0
- package/five/thirdparty/meshopt_decoder.d.ts +15 -0
- package/five/three-version-check.d.ts +1 -0
- package/five/types/addableObject.d.ts +12 -0
- package/five/types/cube.d.ts +1 -0
- package/five/types/gestureInput.d.ts +24 -0
- package/five/types/imageOptions.d.ts +20 -0
- package/five/types/intersectMeshInterface.d.ts +8 -0
- package/five/types/movePanoEffect.d.ts +13 -0
- package/five/types/movePanoOptions.d.ts +36 -0
- package/five/types/panoCircleMeshInterface.d.ts +34 -0
- package/five/types/plugin.d.ts +25 -0
- package/five/types/pose.d.ts +17 -0
- package/five/types/state.d.ts +20 -0
- package/five/types/viewport.d.ts +22 -0
- package/five/utils/ajax.d.ts +66 -0
- package/five/utils/animationFrameLoop.d.ts +45 -0
- package/five/utils/array.d.ts +31 -0
- package/five/utils/asyncTaskQueue.d.ts +8 -0
- package/five/utils/bufferGeometry.d.ts +33 -0
- package/five/utils/calculateProgress.d.ts +39 -0
- package/five/utils/calculateThreeMouse.d.ts +13 -0
- package/five/utils/canplayVideo.d.ts +2 -0
- package/five/utils/clamp.d.ts +2 -0
- package/five/utils/clock.d.ts +17 -0
- package/five/utils/createSymbol.d.ts +5 -0
- package/five/utils/decodeText.d.ts +2 -0
- package/five/utils/deepEqual.d.ts +2 -0
- package/five/utils/deepFreeze.d.ts +2 -0
- package/five/utils/defineProperty.d.ts +9 -0
- package/five/utils/detector.d.ts +14 -0
- package/five/utils/distance.d.ts +10 -0
- package/five/utils/draco.d.ts +26 -0
- package/five/utils/easing.d.ts +63 -0
- package/five/utils/event.d.ts +159 -0
- package/five/utils/formatRad.d.ts +7 -0
- package/five/utils/imageSupport.d.ts +6 -0
- package/five/utils/imageURL.d.ts +42 -0
- package/five/utils/isEmptyObject.d.ts +2 -0
- package/five/utils/isNil.d.ts +6 -0
- package/five/utils/isNumber.d.ts +2 -0
- package/five/utils/isPowerOfTwo.d.ts +2 -0
- package/five/utils/isPromise.d.ts +2 -0
- package/five/utils/isSimilar.d.ts +6 -0
- package/five/utils/json.d.ts +7 -0
- package/five/utils/ktx2.d.ts +30 -0
- package/five/utils/lzma/index.d.ts +2 -0
- package/five/utils/lzma/lzma.d.ts +3 -0
- package/five/utils/lzma/lzmaWASM.d.ts +2 -0
- package/five/utils/lzma/lzmaWorker.d.ts +14 -0
- package/five/utils/memoryUsage.d.ts +29 -0
- package/five/utils/motion.d.ts +38 -0
- package/five/utils/noop.d.ts +6 -0
- package/five/utils/now.d.ts +7 -0
- package/five/utils/pano.d.ts +9 -0
- package/five/utils/pick.d.ts +3 -0
- package/five/utils/poseUtils.d.ts +5 -0
- package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
- package/five/utils/renderDepth.d.ts +2 -0
- package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
- package/five/utils/requestPermission.d.ts +3 -0
- package/five/utils/shaderContentFix.d.ts +7 -0
- package/five/utils/shaderMaterial.d.ts +20 -0
- package/five/utils/stateUtils.d.ts +5 -0
- package/five/utils/string-pattern.d.ts +8 -0
- package/five/utils/subscribe.d.ts +67 -0
- package/five/utils/tileCube.d.ts +19 -0
- package/five/utils/toFastProperties.d.ts +1 -0
- package/five/utils/typedCache.d.ts +10 -0
- package/five/utils/uniform.d.ts +15 -0
- package/five/utils/url.d.ts +35 -0
- package/five/utils/uuid.d.ts +5 -0
- package/five/utils/values.d.ts +2 -0
- package/five/utils/vectorCoordinates.d.ts +29 -0
- package/five/utils/volume.d.ts +111 -0
- package/five/utils/webglError.d.ts +7 -0
- package/five/utils/worker.d.ts +26 -0
- package/five/webxr/XRControllerModelFactory.d.ts +28 -0
- package/five/webxr/motionHelper.d.ts +68 -0
- package/five/webxr/xrButton.d.ts +4 -0
- package/five/webxr/xrController.d.ts +24 -0
- package/five/webxr/xrManager.d.ts +84 -0
- package/five/work/_ALLOW_HOST.d.ts +2 -0
- package/five/work/index.d.ts +6 -0
- package/five/work/keychain.d.ts +5 -0
- package/five/work/looseWorkType.d.ts +121 -0
- package/five/work/verify.d.ts +7 -0
- package/five/work/work.d.ts +236 -0
- package/five/work/workFetcher.d.ts +4 -0
- package/five/work/workJson.d.ts +3 -0
- package/five/work/workJsonType.d.ts +73 -0
- package/five/work/workObserverUtils.d.ts +36 -0
- package/five/work/workParser.d.ts +6 -0
- package/five/work/workResolvedObserver.d.ts +12 -0
- package/five/work/workVerify.d.ts +2 -0
- package/five/work/works.d.ts +10 -0
- package/gltf-loader/gltf-object.d.ts +17 -0
- package/gltf-loader/index.d.ts +60 -160
- package/gltf-loader/index.js +9 -9
- package/gltf-loader/index.mjs +1351 -1451
- package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
- package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
- package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
- package/line/circle_png.d.ts +1 -0
- package/line/index.d.ts +19 -69
- package/line/index.js +4 -4
- package/line/index.mjs +334 -513
- package/line/utils/Line2.d.ts +7 -0
- package/line/utils/LineGeometry.d.ts +10 -0
- package/line/utils/LineMaterial.d.ts +20 -0
- package/line/utils/LineSegments2.d.ts +11 -0
- package/line/utils/LineSegmentsGeometry.d.ts +15 -0
- package/llms.txt +43 -31
- package/package.json +11 -2
- package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
- package/plugins/BackgroundPlugin/index.d.ts +5 -0
- package/plugins/BackgroundPlugin/typings.d.ts +44 -0
- package/plugins/BasePlugin/index.d.ts +119 -0
- package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
- package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
- package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
- package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
- package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
- package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
- package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
- package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
- package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
- package/plugins/ItemMaskPlugin/index.d.ts +5 -0
- package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
- package/plugins/OrientationPlugin/Controller.d.ts +82 -0
- package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
- package/plugins/OrientationPlugin/index.d.ts +6 -0
- package/plugins/OrientationPlugin/typing.d.ts +25 -0
- package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
- package/plugins/PanoAnimePlugin/index.d.ts +5 -0
- package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
- package/plugins/PluginTemplate/Controller.d.ts +27 -0
- package/plugins/PluginTemplate/index.d.ts +5 -0
- package/plugins/PluginTemplate/typing.d.ts +21 -0
- package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
- package/plugins/TrajectoryPlugin/index.d.ts +6 -0
- package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
- package/plugins/index.d.ts +9 -1102
- package/plugins/index.js +17 -21
- package/plugins/index.mjs +3342 -4245
- package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
- package/plugins/thirdParty/OrbitControls.d.ts +78 -0
- package/plugins/utils/absoluteUrl.d.ts +5 -0
- package/plugins/utils/clamp.d.ts +2 -0
- package/plugins/utils/loadImage.d.ts +1 -0
- package/plugins/utils/motion.d.ts +38 -0
- package/plugins/utils/now.d.ts +6 -0
- package/plugins/utils/uuid.d.ts +5 -0
- package/react/canvas.d.ts +19 -0
- package/react/context.d.ts +11 -0
- package/react/createProvider.d.ts +95 -0
- package/react/createStore.d.ts +144 -0
- package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
- package/react/hooks/useFiveAction.d.ts +147 -0
- package/react/hooks/useFiveCameraDirection.d.ts +7 -0
- package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
- package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
- package/react/hooks/useFiveCurrentState.d.ts +15 -0
- package/react/hooks/useFiveEventCallback.d.ts +12 -0
- package/react/hooks/useFiveFloor.d.ts +15 -0
- package/react/hooks/useFiveHelper.d.ts +14 -0
- package/react/hooks/useFiveModelBounding.d.ts +5 -0
- package/react/hooks/useFiveModelEffect.d.ts +14 -0
- package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
- package/react/hooks/useFiveModelReadyState.d.ts +8 -0
- package/react/hooks/useFiveProject2d.d.ts +20 -0
- package/react/hooks/useFiveSceneEffect.d.ts +21 -0
- package/react/hooks/useFiveState.d.ts +6 -0
- package/react/hooks/useFiveWork.d.ts +29 -0
- package/react/index.d.ts +24 -830
- package/react/index.js +3 -3
- package/react/index.mjs +572 -783
- package/react/rendererPool.d.ts +7 -0
- package/react/withFive.d.ts +213 -0
- package/shader-lib/EvenessPlane/index.d.ts +10 -0
- package/shader-lib/PointCloudExpand/index.d.ts +59 -0
- package/shader-lib/PolygonCuter/index.d.ts +52 -0
- package/shader-lib/PolygonCuter/worker.d.ts +14 -0
- package/shader-lib/ShineModel/index.d.ts +7 -0
- package/shader-lib/SweepModel/index.d.ts +7 -0
- package/shader-lib/index.d.ts +5 -86
- package/shader-lib/index.js +13 -14
- package/shader-lib/index.mjs +424 -824
- package/sticker/geometry.d.ts +3 -0
- package/sticker/index.d.ts +68 -71
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +102 -142
- package/umd/five-gltf-loader.js +9 -9
- package/umd/five-line.js +4 -4
- package/umd/five-plugins.js +17 -21
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +13 -14
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +21 -21
- package/umd/five-vue.js +3 -3
- package/umd/five.js +188 -336
- package/vfx/airflow/airflow.d.ts +18 -0
- package/vfx/airflow/fragment-shader.d.ts +2 -0
- package/vfx/airflow/vertex-shader.d.ts +2 -0
- package/vfx/common/scale-shader.d.ts +2 -0
- package/vfx/common/simplex-noise-shader.d.ts +2 -0
- package/vfx/frame/fragment-shader.d.ts +2 -0
- package/vfx/frame/frame.d.ts +22 -0
- package/vfx/frame/vertex-shader.d.ts +2 -0
- package/vfx/index.d.ts +7 -363
- package/vfx/index.js +21 -21
- package/vfx/index.mjs +454 -910
- package/vfx/particle/fragment-shader.d.ts +2 -0
- package/vfx/particle/instance.d.ts +36 -0
- package/vfx/particle/particle.d.ts +205 -0
- package/vfx/particle/utils.d.ts +11 -0
- package/vfx/particle/vertex-shader.d.ts +2 -0
- package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
- package/vfx/particle-gpu/instance.d.ts +36 -0
- package/vfx/particle-gpu/particle.d.ts +95 -0
- package/vfx/particle-gpu/utils.d.ts +11 -0
- package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
- package/vfx/spotLight/fragment-shader.d.ts +2 -0
- package/vfx/spotLight/spotLight.d.ts +15 -0
- package/vfx/spotLight/vertex-shader.d.ts +2 -0
- package/vue/context.d.ts +7 -0
- package/vue/hooks/FiveCanvas.d.ts +36 -0
- package/vue/hooks/FiveProvider.d.ts +35 -0
- package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
- package/vue/hooks/useFiveAction.d.ts +178 -0
- package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
- package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
- package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
- package/vue/hooks/useFiveCurrentState.d.ts +16 -0
- package/vue/hooks/useFiveEventCallback.d.ts +11 -0
- package/vue/hooks/useFiveFloor.d.ts +16 -0
- package/vue/hooks/useFiveHelper.d.ts +15 -0
- package/vue/hooks/useFiveModel.d.ts +7 -0
- package/vue/hooks/useFiveModelBounding.d.ts +7 -0
- package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
- package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
- package/vue/hooks/useFiveProject2d.d.ts +26 -0
- package/vue/hooks/useFiveScene.d.ts +6 -0
- package/vue/hooks/useFiveState.d.ts +16 -0
- package/vue/hooks/useFiveWork.d.ts +30 -0
- package/vue/index.d.ts +23 -467
- package/vue/index.js +3 -3
- package/vue/index.mjs +309 -301
- package/vue/rendererPool.d.ts +10 -0
- package/work-downloader/components/model-3d-tile.d.ts +2 -0
- package/work-downloader/components/model.d.ts +3 -0
- package/work-downloader/components/observer.d.ts +7 -0
- package/work-downloader/download.d.ts +16 -0
- package/work-downloader/index.d.ts +2 -33
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +317 -556
- package/work-downloader/type.d.ts +28 -0
- package/work-downloader/utils/download-to-file.d.ts +1 -0
- package/work-downloader/utils/image-processing.d.ts +7 -0
- package/work-downloader/utils/join-url.d.ts +2 -0
- package/work-downloader/utils/log.d.ts +1 -0
- package/work-downloader/utils/relative-url.d.ts +1 -0
- package/docs/documents/five.FivePlugin.plugin.html +0 -60
- package/docs/documents/plugin.html +0 -60
- package/docs/media/five.ts +0 -2881
- package/docs/media/pass.ts +0 -64
- package/guides/ai-doc-guidelines.md +0 -72
- package/guides/features/3dtile.md +0 -264
- package/guides/features/parameter.md +0 -178
- package/guides/plugin.md +0 -206
- /package/{guides → ai_guides}/release_notes/6.6.md +0 -0
- /package/{guides → ai_guides}/release_notes/6.7.md +0 -0
- /package/{guides → ai_guides}/support.md +0 -0
package/five/index.d.ts
CHANGED
|
@@ -1,4639 +1,62 @@
|
|
|
1
1
|
/// <reference types="./declare" />
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
start(): void;
|
|
64
|
-
stop(): void;
|
|
65
|
-
setContext(context: AnimationFrameContext | null): void;
|
|
66
|
-
getContext<T extends AnimationFrameContext = AnimationFrameContext>(): T | null;
|
|
67
|
-
setLoopType(type: AnimationFrameLoopType): void;
|
|
68
|
-
getLoopType(): AnimationFrameLoopType;
|
|
69
|
-
private requestAnimationFrame;
|
|
70
|
-
private cancelAnimationFrame;
|
|
71
|
-
private remove;
|
|
72
|
-
/**
|
|
73
|
-
* 添加到动画循环
|
|
74
|
-
* @param callback - 动画循环回调
|
|
75
|
-
* @param once - 是否只回调一次
|
|
76
|
-
* @param delay - 延迟多少个动画循环回调
|
|
77
|
-
* @param order - 优先级,数字越小越早被调用
|
|
78
|
-
* @returns 移除动画循环函数
|
|
79
|
-
*/
|
|
80
|
-
add(callback: AnimationFrame["callback"], once?: boolean, delay?: number, order?: number): () => void;
|
|
81
|
-
clear(): void;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export declare type AnimationFrameLoopType = 'raf' | 'sto';
|
|
85
|
-
|
|
86
|
-
export declare interface BaseEvent {
|
|
87
|
-
type: string;
|
|
88
|
-
timeStamp: number;
|
|
89
|
-
preventDefault(): void;
|
|
90
|
-
defaultPrevented: boolean;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export declare class BoundingMesh extends PBMMesh {
|
|
94
|
-
constructor(options?: {
|
|
95
|
-
name?: string;
|
|
96
|
-
});
|
|
97
|
-
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene): boolean;
|
|
98
|
-
dispose(): void;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export declare interface BoundingVolume {
|
|
102
|
-
type: 'box' | 'sphere' | 'regin';
|
|
103
|
-
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
104
|
-
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
105
|
-
toGeometry(): THREE_2.BufferGeometry;
|
|
106
|
-
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
107
|
-
distanceSquaredToPoint(point: THREE_2.Vector3): number;
|
|
108
|
-
distanceToPoint(point: THREE_2.Vector3): number;
|
|
109
|
-
distanceToPlane(plane: THREE_2.Plane): number;
|
|
110
|
-
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
111
|
-
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
112
|
-
clone(): BoundingVolume;
|
|
113
|
-
copy(boundingVolume: this): this;
|
|
114
|
-
fromJson(json: any): this;
|
|
115
|
-
toJson(): BoundingVolumeJson;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export declare type BoundingVolumeJson = RegionBoundingVolumeJson | BoxBoundingVolumeJson | SphereBoundingVolumeJson;
|
|
119
|
-
|
|
120
|
-
export declare class BoxBoundingVolume implements BoundingVolume {
|
|
121
|
-
type: "box";
|
|
122
|
-
center: THREE_2.Vector3;
|
|
123
|
-
halfSize: THREE_2.Vector3;
|
|
124
|
-
rotation: THREE_2.Matrix3;
|
|
125
|
-
constructor();
|
|
126
|
-
fromJson({ box }: BoxBoundingVolumeJson): this;
|
|
127
|
-
toJson(): BoxBoundingVolumeJson;
|
|
128
|
-
copy(boxBoundingVolume: BoxBoundingVolume): this;
|
|
129
|
-
clone(): BoxBoundingVolume;
|
|
130
|
-
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
131
|
-
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
132
|
-
distanceSquaredToPoint(point: THREE_2.Vector3): number;
|
|
133
|
-
distanceToPoint(point: THREE_2.Vector3): number;
|
|
134
|
-
distanceToPlane(plane: THREE_2.Plane): number;
|
|
135
|
-
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
136
|
-
toGeometry(): THREE_2.BufferGeometry;
|
|
137
|
-
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
138
|
-
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export declare type BoxBoundingVolumeJson = {
|
|
142
|
-
box: number[];
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/** Five 相机 */
|
|
146
|
-
export declare class Camera extends THREE_2.Camera {
|
|
147
|
-
fov: number;
|
|
148
|
-
aspect: number;
|
|
149
|
-
near: number;
|
|
150
|
-
far: number;
|
|
151
|
-
perspToOrtho: THREE_2.Vector2;
|
|
152
|
-
resolution: THREE_2.Vector2;
|
|
153
|
-
pixelRatio: number;
|
|
154
|
-
/** 相机姿态 */
|
|
155
|
-
pose: CameraPose;
|
|
156
|
-
private perspectiveCamera;
|
|
157
|
-
private orthographicCamera;
|
|
158
|
-
autoNearFar: boolean;
|
|
159
|
-
needsRender: boolean;
|
|
160
|
-
refineModel: boolean;
|
|
161
|
-
time: number;
|
|
162
|
-
controllerMode: Mode | null;
|
|
163
|
-
private lastValues;
|
|
164
|
-
constructor(fov: number, aspect?: number, near?: number, far?: number, perspToOrtho?: THREE_2.Vector2, resolution?: THREE_2.Vector2, pixelRatio?: number);
|
|
165
|
-
get orthoDistance(): number;
|
|
166
|
-
get zoom(): number;
|
|
167
|
-
get top(): number;
|
|
168
|
-
get bottom(): number;
|
|
169
|
-
get left(): number;
|
|
170
|
-
get right(): number;
|
|
171
|
-
getDirection(target: THREE_2.Vector3): THREE_2.Vector3;
|
|
172
|
-
/** 通过相机参数反算姿态 */
|
|
173
|
-
computePose(distance?: number): this;
|
|
174
|
-
/** 设置相机姿态 */
|
|
175
|
-
setFromPose(pose: Partial<CameraPose>): this;
|
|
176
|
-
/** 拷贝相机姿态 */
|
|
177
|
-
copyPose(): CameraPose;
|
|
178
|
-
private computeProjectionMatrix;
|
|
179
|
-
setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void;
|
|
180
|
-
get view(): {
|
|
181
|
-
enabled: boolean;
|
|
182
|
-
fullWidth: number;
|
|
183
|
-
fullHeight: number;
|
|
184
|
-
offsetX: number;
|
|
185
|
-
offsetY: number;
|
|
186
|
-
width: number;
|
|
187
|
-
height: number;
|
|
188
|
-
};
|
|
189
|
-
clearViewOffset(): void;
|
|
190
|
-
updateProjectionMatrix(): void;
|
|
191
|
-
get perspectiveProjectionMatrix(): THREE_2.Matrix4;
|
|
192
|
-
get perspectiveProjectionMatrixInverse(): THREE_2.Matrix4;
|
|
193
|
-
get orthographicProjectionMatrix(): THREE_2.Matrix4;
|
|
194
|
-
get orthographicProjectionMatrixInverse(): THREE_2.Matrix4;
|
|
195
|
-
updateTime(time: number): void;
|
|
196
|
-
get isPerspectiveCamera(): boolean;
|
|
197
|
-
get isOrthographicCamera(): boolean;
|
|
198
|
-
copy(source: this, recursive?: boolean): this;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export declare interface CameraPose {
|
|
202
|
-
longitude: number;
|
|
203
|
-
latitude: number;
|
|
204
|
-
fov: number;
|
|
205
|
-
distance: number;
|
|
206
|
-
offset: THREE_2.Vector3;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export declare type ControllerCustomInitTypes = {
|
|
210
|
-
Floorplan: FloorplanControllerCustomInitArgs;
|
|
211
|
-
Topview: TopviewControllerCustomInitArgs;
|
|
212
|
-
Panorama: PanoramaControllerCustomInitArgs;
|
|
213
|
-
VRPanorama: VRPanoramaControllerCustomInitArgs;
|
|
214
|
-
Model: ModelControllerCustomInitArgs;
|
|
215
|
-
Mapview: MapviewControllerCustomInitArgs;
|
|
216
|
-
XRPanorama: XRPanoramaControllerCustomInitArgs;
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
export declare type ControllerEventTypes = {
|
|
220
|
-
/** 手势 滑动屏幕 */
|
|
221
|
-
"gesture.pan"(event: GestureEvent): void;
|
|
222
|
-
/** 手势 点击屏幕 */
|
|
223
|
-
"gesture.tap"(event: GestureEvent): void;
|
|
224
|
-
/** 手势 双击屏幕 */
|
|
225
|
-
"gesture.dbltap"(event: GestureEvent): void;
|
|
226
|
-
/** 手势 长按屏幕 */
|
|
227
|
-
"gesture.press"(event: GestureEvent): void;
|
|
228
|
-
/** 手势 双指缩放 */
|
|
229
|
-
"gesture.pinch"(event: GestureEvent): void;
|
|
230
|
-
/** 手势 鼠标滚轮 */
|
|
231
|
-
"gesture.mousewheel"(event: GestureEvent): void;
|
|
232
|
-
/** 手势 鼠标移动 */
|
|
233
|
-
"gesture.mousemove"(event: GestureEvent): void;
|
|
234
|
-
/** 手势 惯性 */
|
|
235
|
-
"gesture.momentum"(event: GestureEvent): void;
|
|
236
|
-
/** 模态切换动画 开始 */
|
|
237
|
-
"initAnimation.start"(event: StateEvent): void;
|
|
238
|
-
/** 模态切换动画 结束 */
|
|
239
|
-
"initAnimation.end"(event: StateEvent): void;
|
|
240
|
-
/** 相机改变 */
|
|
241
|
-
"camera.update"(event: StateEvent): void;
|
|
242
|
-
"intersect.update"(event: IntersectEvent): void;
|
|
243
|
-
/** 选择 */
|
|
244
|
-
"pano.select"(event: PanoEvent): void;
|
|
245
|
-
/** 请求点位 */
|
|
246
|
-
"pano.request"(event: PanoEvent): void;
|
|
247
|
-
/** 运动去点位 */
|
|
248
|
-
"pano.moveTo"(event: PanoEvent): void;
|
|
249
|
-
/** 运动点位过程 */
|
|
250
|
-
"pano.moving"(event: PanoEvent): void;
|
|
251
|
-
/** 运动到达点位 */
|
|
252
|
-
"pano.arrived"(event: PanoEvent): void;
|
|
253
|
-
/** 取消运动点位 */
|
|
254
|
-
"pano.cancel"(event: PanoEvent): void;
|
|
255
|
-
/** 运动点位出错 */
|
|
256
|
-
"pano.error"(event: PanoEvent): void;
|
|
257
|
-
/** 加载全景材质 */
|
|
258
|
-
"pano.texture.load"(event: PanoTextureEvent): void;
|
|
259
|
-
/** 加载全景材质进度 */
|
|
260
|
-
"pano.texture.progress"(event: PanoTextureEvent): void;
|
|
261
|
-
/** 加载全景材质成功 */
|
|
262
|
-
"pano.texture.success"(event: PanoTextureEvent): void;
|
|
263
|
-
/** 加载全景材质失败 */
|
|
264
|
-
"pano.texture.error"(event: PanoTextureEvent): void;
|
|
265
|
-
/** 加载全景材质中止 */
|
|
266
|
-
"pano.texture.abort"(event: PanoTextureEvent): void;
|
|
267
|
-
/** VRPanorama 请求退出 */
|
|
268
|
-
"vr.requestExit"(event: BaseEvent): void;
|
|
269
|
-
/** XR 退出 */
|
|
270
|
-
"xr.session.end"(event: XRSessionEvent_2): void;
|
|
271
|
-
/** XR 进入 */
|
|
272
|
-
"xr.session.start"(event: XRSessionEvent_2): void;
|
|
273
|
-
/** XR 手势(按钮) */
|
|
274
|
-
"xr.gesture.tap"(event: XRGestureEvent): void;
|
|
275
|
-
/** XR 手势(按钮) */
|
|
276
|
-
"xr.gesture.press"(event: XRGestureEvent): void;
|
|
277
|
-
/** XR 手势(按钮) */
|
|
278
|
-
"xr.gesture.buttonUp"(event: XRGestureEvent): void;
|
|
279
|
-
/** XR 手势(按钮) */
|
|
280
|
-
"xr.gesture.buttonDown"(event: XRGestureEvent): void;
|
|
281
|
-
/** XR手柄更新*/
|
|
282
|
-
"xr.controller.update"(event: XRControllerEvent): void;
|
|
283
|
-
/** 抛出错误 */
|
|
284
|
-
"error"(error: Error): void;
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
export declare const controllersDefaultInitArgs: {
|
|
288
|
-
Floorplan: Required<FloorplanControllerCustomInitArgs>;
|
|
289
|
-
Topview: Required<TopviewControllerCustomInitArgs>;
|
|
290
|
-
Panorama: Required<PanoramaControllerCustomInitArgs>;
|
|
291
|
-
VRPanorama: Required<VRPanoramaControllerCustomInitArgs>;
|
|
292
|
-
Model: Required<ModelControllerCustomInitArgs>;
|
|
293
|
-
Mapview: Required<MapviewControllerCustomInitArgs>;
|
|
294
|
-
XRPanorama: Required<XRPanoramaControllerCustomInitArgs>;
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
/** 坐标转换成单位向量 */
|
|
298
|
-
export declare function coordinatesToVector(coordinates: {
|
|
299
|
-
longitude: number;
|
|
300
|
-
latitude: number;
|
|
301
|
-
}, target?: THREE_2.Vector3): THREE_2.Vector3;
|
|
302
|
-
|
|
303
|
-
export declare function createDebugBoundingMesh(boundingVolume: BoundingVolume, level?: number): THREE_2.LineSegments<THREE_2.BufferGeometry, THREE_2.LineBasicMaterial> | null;
|
|
304
|
-
|
|
305
|
-
export declare function createWorks(workArray: Work[]): Works;
|
|
306
|
-
|
|
307
|
-
export declare type CubeFace = 'right' | 'left' | 'up' | 'down' | 'front' | 'back';
|
|
308
|
-
|
|
309
|
-
export declare class CullingVolume {
|
|
310
|
-
static get MASK_OUTSIDE(): number;
|
|
311
|
-
static get MASK_INSIDE(): number;
|
|
312
|
-
static get MASK_INDETERMINATE(): number;
|
|
313
|
-
planes: THREE_2.Plane[];
|
|
314
|
-
constructor(planes?: THREE_2.Plane[]);
|
|
315
|
-
setFromFrustum(frustum: THREE_2.Frustum): this;
|
|
316
|
-
setFromCamera(camera: THREE_2.Camera): this;
|
|
317
|
-
applyMatrix4(matrix: THREE_2.Matrix4): void;
|
|
318
|
-
copy(cullingVolume: CullingVolume): this;
|
|
319
|
-
clone(): CullingVolume;
|
|
320
|
-
computeVisibility(boundingVolume: BoundingVolume): VolumePlaneIntersect;
|
|
321
|
-
computeVisibilityWithPlaneMask(boundingVolume: BoundingVolume, parentPlaneMask: number): number;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* URL 地址的转换
|
|
326
|
-
* @param source - url 原地址
|
|
327
|
-
* @param options - url 转换参数
|
|
328
|
-
* @returns url 转换结果
|
|
329
|
-
*/
|
|
330
|
-
export declare function defaultImageURLTransform(source: string, options: ImageURLOptions): string;
|
|
331
|
-
|
|
332
|
-
export declare class Draco {
|
|
333
|
-
decoderPath: string;
|
|
334
|
-
private decoderPending;
|
|
335
|
-
private decoderConfig;
|
|
336
|
-
private workerLimit;
|
|
337
|
-
private workerNextTaskID;
|
|
338
|
-
private workerSourceURL;
|
|
339
|
-
private workerPool;
|
|
340
|
-
constructor();
|
|
341
|
-
setDecoderPath(decoderPath: string): void;
|
|
342
|
-
setDecoderConfig(config: any): this;
|
|
343
|
-
setWorkerLimit(workerLimit: number): this;
|
|
344
|
-
decodeDracoFile(buffer: ArrayBuffer, callback: (geometry: THREE_2.BufferGeometry) => void, attributeIDs: Record<string, string>, attributeTypes: Record<string, any>): void;
|
|
345
|
-
decodeGeometry(buffer: ArrayBuffer, taskConfig?: {
|
|
346
|
-
attributeIDs: Record<string, string>;
|
|
347
|
-
attributeTypes: Record<string, any>;
|
|
348
|
-
useUniqueIDs: boolean;
|
|
349
|
-
}): Promise<THREE_2.BufferGeometry>;
|
|
350
|
-
_createGeometry(geometryData: any): THREE_2.BufferGeometry;
|
|
351
|
-
_initDecoder(): Promise<void>;
|
|
352
|
-
_getWorker(taskID: number, taskCost: number): Promise<Worker>;
|
|
353
|
-
_releaseTask(worker: Worker, taskID: number): void;
|
|
354
|
-
dispose(): this;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
export declare const draco: Draco;
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* EffectComposer
|
|
361
|
-
*
|
|
362
|
-
* 基于three.js的EffectComposer,用于管理后处理pass的渲染流程
|
|
363
|
-
*/
|
|
364
|
-
export declare class EffectComposer {
|
|
365
|
-
renderTarget1: THREE_2.WebGLRenderTarget;
|
|
366
|
-
renderTarget2: THREE_2.WebGLRenderTarget;
|
|
367
|
-
writeBuffer: THREE_2.WebGLRenderTarget;
|
|
368
|
-
readBuffer: THREE_2.WebGLRenderTarget;
|
|
369
|
-
passes: Pass[];
|
|
370
|
-
normalMaterial: THREE_2.MeshNormalMaterial;
|
|
371
|
-
clock: THREE_2.Clock;
|
|
372
|
-
renderToScreen: boolean;
|
|
373
|
-
status: {
|
|
374
|
-
endabledPassNumber: number;
|
|
375
|
-
needsColorGBuffer: boolean;
|
|
376
|
-
needsDepthGBuffer: boolean;
|
|
377
|
-
needsNormalGBuffer: boolean;
|
|
378
|
-
version: string;
|
|
379
|
-
};
|
|
380
|
-
gbuffer: Map<'depth' | 'normal' | 'color', THREE_2.Texture>;
|
|
381
|
-
constructor();
|
|
382
|
-
swapBuffers(): void;
|
|
383
|
-
addPass(pass: Pass): void;
|
|
384
|
-
insertPass(pass: Pass, index: number): void;
|
|
385
|
-
render(renderer: THREE_2.WebGLRenderer): boolean;
|
|
386
|
-
setSize(width: number, height: number): void;
|
|
387
|
-
updateStatus(): void;
|
|
388
|
-
dispose(): void;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Five 事件列表
|
|
393
|
-
* @description
|
|
394
|
-
* 可以通过 `five.on(METHOD_NAME, METHOD)` 调用
|
|
395
|
-
*/
|
|
396
|
-
export declare interface EventCallback extends EventTypes {
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Five 事件列表
|
|
401
|
-
* @description
|
|
402
|
-
* 具体事件列表 请查看 {@link EventCallback}
|
|
403
|
-
*/
|
|
404
|
-
export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROLLER_EVENT_NAMES[number]> & LegacyEventType & {
|
|
405
|
-
/** 请求点位 */
|
|
406
|
-
"pano.request"(event: PanoEvent): void;
|
|
407
|
-
/** 内部错误 */
|
|
408
|
-
"error"(error: Error): void;
|
|
409
|
-
/** 请求 work数据 */
|
|
410
|
-
"works.request"(event: WorksEvent): void;
|
|
411
|
-
/** 加载 work */
|
|
412
|
-
"works.load"(event: WorksEvent): void;
|
|
413
|
-
/** 加载 work 并 controller ready */
|
|
414
|
-
"works.ready"(event: WorksEvent): void;
|
|
415
|
-
/** 设置 state */
|
|
416
|
-
"state.set"(event: StateEvent): void;
|
|
417
|
-
/** 当 state 变化 */
|
|
418
|
-
"state.change"(event: StateEvent): void;
|
|
419
|
-
/** 当 state 同步完成 */
|
|
420
|
-
"state.synced"(event: StateEvent): void;
|
|
421
|
-
/** 当前 state 变化 */
|
|
422
|
-
"currentState.change"(event: StateEvent): void;
|
|
423
|
-
/** 当模型加载 */
|
|
424
|
-
"model.request"(event: ModelEvent): void;
|
|
425
|
-
/** 当模型修改楼层 */
|
|
426
|
-
"model.load"(event: ModelEvent): void;
|
|
427
|
-
/** 当模型错误 */
|
|
428
|
-
"model.error"(event: ModelEvent): void;
|
|
429
|
-
/** 当模型修改楼层 */
|
|
430
|
-
"model.changeShownFloor"(event: ModelEvent): void;
|
|
431
|
-
/** 模型加载完成 */
|
|
432
|
-
"models.load"(event: ModelSceneEvent): void;
|
|
433
|
-
/** 模型细化完成 */
|
|
434
|
-
"models.refined"(event: ModelSceneEvent): void;
|
|
435
|
-
/** 渲染前 */
|
|
436
|
-
"render.prepare"(event: RenderEvent): void;
|
|
437
|
-
/** 渲染后 */
|
|
438
|
-
"render"(event: RenderEvent): void;
|
|
439
|
-
/** 请求改变 mode */
|
|
440
|
-
"mode.change.request"(event: ModeChangeEvent): void;
|
|
441
|
-
/** 改变 mode */
|
|
442
|
-
"mode.change"(event: ModeChangeEvent): void;
|
|
443
|
-
/** 改变 helpers 元素可见 */
|
|
444
|
-
"helpers.visible"(event: ObjectEvent): void;
|
|
445
|
-
/** 网络资源 */
|
|
446
|
-
"network.resource"(event: NetworkResourceEvent): void;
|
|
447
|
-
/** 当前 fps 变化 */
|
|
448
|
-
"fps"(fps: number): void;
|
|
449
|
-
/** five 被析构。 插件中请监听用于自身析构 */
|
|
450
|
-
"dispose"(): void;
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
export declare class EyeDomeLightingPass extends FivePass {
|
|
454
|
-
strength: number;
|
|
455
|
-
radius: number;
|
|
456
|
-
neighbours: number;
|
|
457
|
-
private camera;
|
|
458
|
-
private fsQuad;
|
|
459
|
-
private material;
|
|
460
|
-
constructor(camera: Camera);
|
|
461
|
-
render(renderer: THREE_2.WebGLRenderer, writeBuffer: THREE_2.WebGLRenderTarget, readBuffer: THREE_2.WebGLRenderTarget, deltaTime: number, maskActive?: boolean): void;
|
|
462
|
-
dispose(): void;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export declare class Fetcher {
|
|
466
|
-
private options;
|
|
467
|
-
constructor(options?: NetworkOptions);
|
|
468
|
-
ajax<T extends AjaxResponseType = "text">(source: string, options?: AjaxOptions<T>, onLoad?: NetworkSuccessCallback<AjaxResponseTypeMapping<T>>, onError?: NetworkErrorCallback, onProgress?: NetworkProgressCallback): Promise<NetworkResponse<AjaxResponseTypeMapping<T>>>;
|
|
469
|
-
loadImage<T extends HTMLImageElement = HTMLImageElement>(source: string, options?: NetworkOptions, onLoad?: NetworkSuccessCallback, onError?: NetworkErrorCallback, onProgress?: NetworkProgressCallback, target?: T): Promise<NetworkResponse<T>>;
|
|
470
|
-
preload(source: string, options?: NetworkOptions): Promise<void>;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* 如视 VR Web展示器
|
|
475
|
-
*
|
|
476
|
-
* @example
|
|
477
|
-
* ```
|
|
478
|
-
* // 初始化构造函数
|
|
479
|
-
* const five = new Five();
|
|
480
|
-
* // 将绘制区域添加到页面上
|
|
481
|
-
* five.appendTo(document.body);
|
|
482
|
-
* // 加载 Work 数据
|
|
483
|
-
* five.load({...});
|
|
484
|
-
* ```
|
|
485
|
-
*/
|
|
486
|
-
export declare class Five extends Subscribe<EventTypes> {
|
|
487
|
-
static get version(): string;
|
|
488
|
-
static get dracoPath(): string;
|
|
489
|
-
static set dracoPath(path: string);
|
|
490
|
-
static get ktx2Path(): string;
|
|
491
|
-
static set ktx2Path(path: string);
|
|
492
|
-
static get useNativeImageBitmap(): boolean;
|
|
493
|
-
static set useNativeImageBitmap(enable: boolean);
|
|
494
|
-
/**
|
|
495
|
-
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
496
|
-
* @description
|
|
497
|
-
* ```text
|
|
498
|
-
* Panorama 全景图游走模式
|
|
499
|
-
* Model 模型游走模式
|
|
500
|
-
* Floorplan 模型查看模式
|
|
501
|
-
* Topview 户型图模式
|
|
502
|
-
* VRPanorama VR眼镜模式
|
|
503
|
-
* XRPanorama VR硬件模式
|
|
504
|
-
* ```
|
|
505
|
-
*/
|
|
506
|
-
static Mode: {
|
|
507
|
-
readonly Panorama: "Panorama";
|
|
508
|
-
readonly Model: "Model";
|
|
509
|
-
readonly Floorplan: "Floorplan";
|
|
510
|
-
readonly Topview: "Topview";
|
|
511
|
-
readonly Mapview: "Mapview";
|
|
512
|
-
readonly VRPanorama: "VRPanorama";
|
|
513
|
-
readonly XRPanorama: "XRPanorama";
|
|
514
|
-
};
|
|
515
|
-
/**
|
|
516
|
-
* 自动播放状态是否暂停
|
|
517
|
-
* @description
|
|
518
|
-
* 可以通过 `five.play` `five.pause` 方法播放或暂停
|
|
519
|
-
*/
|
|
520
|
-
paused: boolean;
|
|
521
|
-
/** 当前点位序号 */
|
|
522
|
-
pano: Pano;
|
|
523
|
-
/** 当前展示的模式 */
|
|
524
|
-
currentMode: Mode;
|
|
525
|
-
/** 非模型部分使用的 `THREE.Scene` */
|
|
526
|
-
scene: Scene;
|
|
527
|
-
/** 内部模型部分使用的 `THREE.Scene` */
|
|
528
|
-
modelScene: ModelScene;
|
|
529
|
-
/** 供外部放置需要在xr场景下产生遮挡的物体们*/
|
|
530
|
-
xrCustomObjectsScene: THREE_2.Scene;
|
|
531
|
-
/** 内部使用的 `Camera` */
|
|
532
|
-
camera: Camera;
|
|
533
|
-
/**
|
|
534
|
-
* 当前设置的 `viewport`
|
|
535
|
-
* @description
|
|
536
|
-
* 可通过初始化,或者 setScissor 方式设置
|
|
537
|
-
* `viewport` 是将屏幕中的内容渲染到 `renderer` 的指定区域。
|
|
538
|
-
* 页面整体长宽均为 `1`。通过类似 css 的 `left` `bottom` `width` `height` 来确定区域。
|
|
539
|
-
* @example
|
|
540
|
-
* ```
|
|
541
|
-
* viewport: { left: 0.75, bottom: 0, width: 0.25, height: 1 }
|
|
542
|
-
* ```
|
|
543
|
-
*/
|
|
544
|
-
viewport: Viewport;
|
|
545
|
-
/**
|
|
546
|
-
* 当前使用的 THREE.WebGLRenderer。
|
|
547
|
-
* @description
|
|
548
|
-
* 如果初始化时传入了 `renderer` 则直接时该值
|
|
549
|
-
* 否则会通过 `preserveDrawingBuffer` `backgroundColor` `backgroundAlpha` `antialias` 创建一个 `THREE.WebGLRenderer`
|
|
550
|
-
*/
|
|
551
|
-
renderer?: THREE_2.WebGLRenderer;
|
|
552
|
-
/**
|
|
553
|
-
* 是否需要渲染
|
|
554
|
-
* @description
|
|
555
|
-
* 如果初始化设置了 `onlyRenderIfNeeds: true`, 则会激活按需渲染
|
|
556
|
-
* 可以通过设置 `five.needsRender = true` 来告知,five 会在下一帧渲染画面。
|
|
557
|
-
*/
|
|
558
|
-
needsRender: boolean;
|
|
559
|
-
/**
|
|
560
|
-
* 是否按需渲染
|
|
561
|
-
*/
|
|
562
|
-
onlyRenderIfNeeds: boolean;
|
|
563
|
-
/** 是否显示 Powered By Realsee */
|
|
564
|
-
poweredByRealsee: boolean;
|
|
565
|
-
/** 背景颜色 */
|
|
566
|
-
backgroundColor: THREE_2.Color;
|
|
567
|
-
/** 背景透明度 */
|
|
568
|
-
backgroundAlpha: number;
|
|
569
|
-
/**
|
|
570
|
-
* 全景图的配置参数
|
|
571
|
-
* @description
|
|
572
|
-
* 可以动态对配置在 `work` 数据中的全景图片在 runtime 做 url 调整。
|
|
573
|
-
* 平衡加载时间和图片质量
|
|
574
|
-
*/
|
|
575
|
-
imageOptions: ImageOptions;
|
|
576
|
-
/**
|
|
577
|
-
* 模型贴图的配置参数
|
|
578
|
-
* @description
|
|
579
|
-
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
580
|
-
* 平衡加载时间和图片质量
|
|
581
|
-
*/
|
|
582
|
-
textureOptions: TextureOptions;
|
|
583
|
-
/**
|
|
584
|
-
* 模型贴图的配置参数
|
|
585
|
-
* @description
|
|
586
|
-
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
587
|
-
* 平衡加载时间和图片质量
|
|
588
|
-
*/
|
|
589
|
-
videoTexture: THREE_2.VideoTexture;
|
|
590
|
-
/**
|
|
591
|
-
* 当前状态
|
|
592
|
-
* @description
|
|
593
|
-
* ```text
|
|
594
|
-
* five 设置了以下状态
|
|
595
|
-
*
|
|
596
|
-
* - mode: Mode
|
|
597
|
-
* - panoIndex: number
|
|
598
|
-
* - longitude: number
|
|
599
|
-
* - latitude: number
|
|
600
|
-
* - fov: number
|
|
601
|
-
* - offset: THREE.Vector3
|
|
602
|
-
*
|
|
603
|
-
* 可以通过 five.state 和 five.setState 来获取和设置。
|
|
604
|
-
* 通过 state 设置后,five 会通过合适的动画运动来达到设置的位置。
|
|
605
|
-
* 来迎合一些通过数据驱动的场景。
|
|
606
|
-
* ```
|
|
607
|
-
*/
|
|
608
|
-
state: State;
|
|
609
|
-
/** 插件暴露的方法 */
|
|
610
|
-
plugins: {
|
|
611
|
-
[key: string]: FivePluginInstance<any>;
|
|
612
|
-
};
|
|
613
|
-
readonly fiveId: string;
|
|
614
|
-
private stopAnimationLoop?;
|
|
615
|
-
private fps;
|
|
616
|
-
private helperGroup;
|
|
617
|
-
private modeChangeDuration;
|
|
618
|
-
private enableWheel;
|
|
619
|
-
private controller?;
|
|
620
|
-
private destroyed;
|
|
621
|
-
private stateSynced;
|
|
622
|
-
private controllerInits;
|
|
623
|
-
private extraElements;
|
|
624
|
-
private getPixelsRenderTarget;
|
|
625
|
-
private readyCallbacks;
|
|
626
|
-
private syncingState;
|
|
627
|
-
private loadWorkTask;
|
|
628
|
-
private requestProxy;
|
|
629
|
-
private networkSubscribe;
|
|
630
|
-
private analysis?;
|
|
631
|
-
private currentUpdateArgs;
|
|
632
|
-
private fiveRenderer;
|
|
633
|
-
private adaptiveLuminancePass;
|
|
634
|
-
private eyeDomeLightingPass;
|
|
635
|
-
private pbmGSRenderMesh;
|
|
636
|
-
constructor(initArgs?: FiveInitArgs);
|
|
637
|
-
get ident(): string;
|
|
638
|
-
get panoIndex(): number;
|
|
639
|
-
/**
|
|
640
|
-
* 析构 five 对象。
|
|
641
|
-
* @description
|
|
642
|
-
* 一旦调用了析构方法,则不能再使用当前 five 对象了。
|
|
643
|
-
* 你可以新建一个新的。
|
|
644
|
-
*/
|
|
645
|
-
dispose(): void;
|
|
646
|
-
/**
|
|
647
|
-
* 设置 `viewport`
|
|
648
|
-
* @param viewport - 指定区域
|
|
649
|
-
* `scissor` 是将屏幕中的内容渲染到 `renderer` 的指定区域。
|
|
650
|
-
* 请确保在 five 初始化时传入 `renderer` 对象
|
|
651
|
-
* 页面整体长宽均为 `1`。通过类似 css 的 `left` `bottom` `width` `height` 来确定区域。
|
|
652
|
-
* @example
|
|
653
|
-
* ```
|
|
654
|
-
* five.setViewport({ left: 0.75, bottom: 0, width: 0.25, height: 1 })
|
|
655
|
-
* ```
|
|
656
|
-
*/
|
|
657
|
-
setViewport(viewport: Viewport): void;
|
|
658
|
-
/**
|
|
659
|
-
* 获取 boundingMesh
|
|
660
|
-
*/
|
|
661
|
-
get boundingMesh(): BoundingMesh;
|
|
662
|
-
/**
|
|
663
|
-
* 帮助元素显示/隐藏
|
|
664
|
-
*/
|
|
665
|
-
get helperVisible(): boolean;
|
|
666
|
-
set helperVisible(visible: boolean);
|
|
667
|
-
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "mapview" | "vrPanorama" | "imageOptions" | "textureOptions">, refresh?: boolean): void;
|
|
668
|
-
/**
|
|
669
|
-
* 将显示区域加载到页面 DOM 中
|
|
670
|
-
* @description
|
|
671
|
-
* 如果你是传入的 `renderer`. 则你需要自行来方式显示区域该方法并不生效
|
|
672
|
-
*
|
|
673
|
-
* @param element - 加载到页面的 DOM 元素
|
|
674
|
-
* @param size - 显示区域尺寸 默认铺满这个 DOM 元素
|
|
675
|
-
*/
|
|
676
|
-
appendTo(element: HTMLElement, size?: {
|
|
677
|
-
width?: number;
|
|
678
|
-
height?: number;
|
|
679
|
-
}): void;
|
|
680
|
-
/**
|
|
681
|
-
* 设置显示区域尺寸
|
|
682
|
-
* @description
|
|
683
|
-
* 如果你是传入的 `renderer`. 则你需要自行来设置显示区域尺寸,该方法并不生效
|
|
684
|
-
*
|
|
685
|
-
* @param size - 显示区域尺寸 默认铺满这个 DOM 元素
|
|
686
|
-
* @param pixelRatio - 像素比 默认继承之前的设置
|
|
687
|
-
*/
|
|
688
|
-
refresh(size?: {
|
|
689
|
-
width?: number;
|
|
690
|
-
height?: number;
|
|
691
|
-
}, pixelRatio?: number): void;
|
|
692
|
-
/**
|
|
693
|
-
* 绑定一个额外 DOM 区域,接受触控/鼠标事件
|
|
694
|
-
* @returns 解除该绑定
|
|
695
|
-
*/
|
|
696
|
-
addExtraElement(element: HTMLElement): () => void;
|
|
697
|
-
/**
|
|
698
|
-
* 解除绑定的一个额外 DOM 区域
|
|
699
|
-
*/
|
|
700
|
-
removeExtraElement(element: HTMLElement): void;
|
|
701
|
-
getSize(target: THREE_2.Vector2): THREE_2.Vector2;
|
|
702
|
-
getDrawingBufferSize(target: THREE_2.Vector2): THREE_2.Vector2;
|
|
703
|
-
/**
|
|
704
|
-
* 移动相机。(不触发点位移动)
|
|
705
|
-
* @description
|
|
706
|
-
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
707
|
-
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
708
|
-
* @param pose - 相机目标位置
|
|
709
|
-
* @param duration - 动画触发的时常
|
|
710
|
-
* @param userAction - 是否用户触发
|
|
711
|
-
* @returns Promise 是否移动成功
|
|
712
|
-
*/
|
|
713
|
-
updateCamera(pose: Partial<Pose>, duration: number, userAction?: boolean): Promise<void>;
|
|
714
|
-
/**
|
|
715
|
-
* 通过帧动画移动相机。(不触发点位移动)
|
|
716
|
-
* @description
|
|
717
|
-
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
718
|
-
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
719
|
-
* @param keyframes - 动画帧
|
|
720
|
-
* @param duration - 动画触发的时常
|
|
721
|
-
* @param userAction - 是否用户触发
|
|
722
|
-
* @returns Promise 是否移动成功
|
|
723
|
-
*/
|
|
724
|
-
updateCameraWithKeyframes(keyframes: {
|
|
725
|
-
progress: number;
|
|
726
|
-
value: Pose;
|
|
727
|
-
key?: string;
|
|
728
|
-
}[], duration: number, userAction?: boolean): Promise<void>;
|
|
729
|
-
/** 当前加载的 work 数据 */
|
|
730
|
-
get works(): Works;
|
|
731
|
-
get work(): Work;
|
|
732
|
-
get observers(): readonly WorkObserver[];
|
|
733
|
-
get models(): Models;
|
|
734
|
-
get model(): Model;
|
|
735
|
-
/**
|
|
736
|
-
* 加载 Work 数据
|
|
737
|
-
* @param inputWork - Work 数据
|
|
738
|
-
* @param state - 初始化姿态
|
|
739
|
-
* - "inherit" 使用当前姿态
|
|
740
|
-
* - "initial" 使用 Work 数据中的 initial 姿态
|
|
741
|
-
* - State 自定义姿态
|
|
742
|
-
* @param options - 切换时间, 切换效果
|
|
743
|
-
*/
|
|
744
|
-
load(inputWork: string | Work | LooseWork | string[] | Work[] | LooseWork[] | LooseWorkWithExtrinsics[] | Promise<Work | LooseWork | Work[] | LooseWork[] | LooseWorkWithExtrinsics[]>, state?: "inherit" | "initial" | Partial<State>, options?: number | FiveLoadOptions, userAction?: boolean): Promise<void>;
|
|
745
|
-
private load_;
|
|
746
|
-
reset(): Promise<void>;
|
|
747
|
-
reset_(): Promise<void>;
|
|
748
|
-
/**
|
|
749
|
-
* 切换模态
|
|
750
|
-
* @param mode - 切换到的模态
|
|
751
|
-
* @param state - 切换完成时的姿态
|
|
752
|
-
* @param options - 模态切换动画用时
|
|
753
|
-
* @param userAction - 是否时用户动作触发 默认 true
|
|
754
|
-
* @param force - 必须重新初始化 controller
|
|
755
|
-
*/
|
|
756
|
-
changeMode<T extends Mode>(mode: T, state?: Partial<Omit<State, "mode">>, options?: number | {
|
|
757
|
-
duration?: number;
|
|
758
|
-
effect?: MovePanoEffect;
|
|
759
|
-
}, userAction?: boolean, force?: boolean): Promise<void>;
|
|
760
|
-
/**
|
|
761
|
-
* 获取画面中的像素颜色
|
|
762
|
-
* @param x - 获取像素区域的起始坐标 x
|
|
763
|
-
* @param y - 获取像素区域的起始坐标 y
|
|
764
|
-
* @param width - 获取像素区域的宽度
|
|
765
|
-
* @param height - 获取像素区域的高度
|
|
766
|
-
* @param pixelRatio - 获取区域的像素比
|
|
767
|
-
* @param flipY - 是否Y轴翻转
|
|
768
|
-
* @param buffer - 存储数组
|
|
769
|
-
* @returns rgba颜色平铺的 Uint8Array
|
|
770
|
-
*/
|
|
771
|
-
getPixels<T extends Uint8Array | Uint8ClampedArray = Uint8Array>(x: number, y: number, width: number, height: number, pixelRatio?: number, flipY?: boolean, buffer?: T): T;
|
|
772
|
-
/**
|
|
773
|
-
* 获取画面中的像素颜色
|
|
774
|
-
* @param options - 参数
|
|
775
|
-
* @returns
|
|
776
|
-
*/
|
|
777
|
-
getPixels<T extends Uint8Array | Uint8ClampedArray = Uint8Array>(options: {
|
|
778
|
-
/** 获取像素区域的起始坐标 x */
|
|
779
|
-
x: number;
|
|
780
|
-
/** 获取像素区域的起始坐标 y */
|
|
781
|
-
y: number;
|
|
782
|
-
/** 获取像素区域的宽度 */
|
|
783
|
-
width: number;
|
|
784
|
-
/** 获取像素区域的高度 */
|
|
785
|
-
height: number;
|
|
786
|
-
/** 获取区域的像素比 */
|
|
787
|
-
pixelRatio?: number;
|
|
788
|
-
helperVisible?: boolean;
|
|
789
|
-
skipPanorama?: boolean;
|
|
790
|
-
/** 是否Y轴翻转 */
|
|
791
|
-
flipY?: boolean;
|
|
792
|
-
/** 存储数组 */
|
|
793
|
-
buffer?: T;
|
|
794
|
-
}): T;
|
|
795
|
-
/**
|
|
796
|
-
* 获取显示用的画布(Canvas DOM节点)
|
|
797
|
-
*/
|
|
798
|
-
getElement(): HTMLCanvasElement | undefined;
|
|
799
|
-
/**
|
|
800
|
-
* 强制渲染
|
|
801
|
-
* @description
|
|
802
|
-
* 调用 `five.render()` 和设置 `five.needsRender = true` 均可在按需渲染时,使得画面渲染一次
|
|
803
|
-
* 区别在于:
|
|
804
|
-
* - `five.needsRender = true` 为在下帧渲染画面
|
|
805
|
-
* - `five.render()` 在当前帧渲染画面
|
|
806
|
-
* 推荐使用 `five.needsRender = true`, 可以更加流畅。但是如果需要截图等同步操作,可以使用 `five.render()`
|
|
807
|
-
*
|
|
808
|
-
* @param callback - 渲染完成回调
|
|
809
|
-
*/
|
|
810
|
-
render(callback?: () => void): void;
|
|
811
|
-
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
812
|
-
/**
|
|
813
|
-
* 暂停自动播放
|
|
814
|
-
*/
|
|
815
|
-
pause(): void;
|
|
816
|
-
play(): void;
|
|
817
|
-
/**
|
|
818
|
-
* 转化到 Panorama 模态,并移动到对应序号的观察点。
|
|
819
|
-
* @param pano - 观察点序号
|
|
820
|
-
* @param options - 移动点位参数
|
|
821
|
-
* @param userAction - 是否用户触犯
|
|
822
|
-
*/
|
|
823
|
-
moveToPano(pano: Pano | PanoId | number, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
824
|
-
/**
|
|
825
|
-
* 预加载点位图片资源
|
|
826
|
-
* @param pano - 观察点序号
|
|
827
|
-
* @param callback - 加载完成回调, 并传递加载用时。
|
|
828
|
-
* @returns 加载完成的 Promise 参数同 callback
|
|
829
|
-
*/
|
|
830
|
-
preloadPano(pano: Pano | PanoId | number, callback?: (costs: number) => void): Promise<number>;
|
|
831
|
-
/**
|
|
832
|
-
* 计算三维坐标对应到屏幕的二维坐标
|
|
833
|
-
* @description
|
|
834
|
-
* 如果三维坐标不在屏幕中,则返回 null
|
|
835
|
-
* @param vector - 三维坐标
|
|
836
|
-
* @param testModel - 是否计算模型遮挡
|
|
837
|
-
* @returns 二维坐标 或者 null
|
|
838
|
-
*/
|
|
839
|
-
project2d(vector: THREE_2.Vector3, testModel?: boolean): THREE_2.Vector2 | null;
|
|
840
|
-
getCurrentState(): State;
|
|
841
|
-
/**
|
|
842
|
-
* 设置 State
|
|
843
|
-
* @description
|
|
844
|
-
* ```text
|
|
845
|
-
* five 设置了以下状态
|
|
846
|
-
*
|
|
847
|
-
* - mode: Mode
|
|
848
|
-
* - panoIndex: number
|
|
849
|
-
* - longitude: number
|
|
850
|
-
* - latitude: number
|
|
851
|
-
* - distance: number
|
|
852
|
-
* - fov: number
|
|
853
|
-
* - offset: THREE.Vector3
|
|
854
|
-
*
|
|
855
|
-
* 可以通过 five.state 和 five.setState 来获取和设置。
|
|
856
|
-
* 通过 state 设置后,five 会通过合适的动画运动来达到设置的位置。
|
|
857
|
-
* 来迎合一些通过数据驱动的场景。
|
|
858
|
-
* ```
|
|
859
|
-
* @param state - 目标状态
|
|
860
|
-
* @param immediately - 是否马上转换,马上转换会尽快达到目标状态,尽量减少中间状态,更少动画。
|
|
861
|
-
* @param userAction - 是否是用户触发的动作
|
|
862
|
-
*/
|
|
863
|
-
setState(state: Partial<State>, immediately?: boolean, userAction?: boolean): void;
|
|
864
|
-
private syncState;
|
|
865
|
-
/**
|
|
866
|
-
* 当前页面静态
|
|
867
|
-
*/
|
|
868
|
-
ready(args?: {
|
|
869
|
-
tile?: boolean;
|
|
870
|
-
}): Promise<void>;
|
|
871
|
-
/**
|
|
872
|
-
* 请求全屏
|
|
873
|
-
*/
|
|
874
|
-
requestFullscreen(): void;
|
|
875
|
-
/**
|
|
876
|
-
* 退出全屏
|
|
877
|
-
*/
|
|
878
|
-
exitFullscreen(): void;
|
|
879
|
-
private throwError;
|
|
880
|
-
private bindModel;
|
|
881
|
-
private bindWorkFetcher;
|
|
882
|
-
private commonParams;
|
|
883
|
-
private applyController;
|
|
884
|
-
/** 移除事件绑定 */
|
|
885
|
-
private removeEventListeners;
|
|
886
|
-
get internalLightsEnabled(): boolean;
|
|
887
|
-
set internalLightsEnabled(value: boolean);
|
|
888
|
-
/**
|
|
889
|
-
* @deprecated
|
|
890
|
-
* use Viewport instead.
|
|
891
|
-
*/
|
|
892
|
-
get scissor(): Viewport;
|
|
893
|
-
/**
|
|
894
|
-
* @deprecated
|
|
895
|
-
* use setViewport instead.
|
|
896
|
-
*/
|
|
897
|
-
setScissor(scissor: Viewport): void;
|
|
898
|
-
/**
|
|
899
|
-
* @deprecated
|
|
900
|
-
* 获取当前相机姿态, 可以使用 getCurrentState 代替
|
|
901
|
-
*/
|
|
902
|
-
getPose(): Pose;
|
|
903
|
-
/**
|
|
904
|
-
* 获取当前相机经纬度
|
|
905
|
-
* @deprecated 请使用使用 getPose
|
|
906
|
-
*/
|
|
907
|
-
getLongitudeAndLatitude(): Pick<Pose, "longitude" | "latitude">;
|
|
908
|
-
/**
|
|
909
|
-
* 获取当前相机位置
|
|
910
|
-
* @deprecated 请使用使用 getPose
|
|
911
|
-
*/
|
|
912
|
-
getOffset(): Pose["offset"];
|
|
913
|
-
/**
|
|
914
|
-
* 获取当前相机的姿态(用于内部的 python 脚本截图)
|
|
915
|
-
* @deprecated 这是用于内部的 python 脚本截图
|
|
916
|
-
*/
|
|
917
|
-
getCameraLocal(): {
|
|
918
|
-
theta: number;
|
|
919
|
-
phi: number;
|
|
920
|
-
lookAtVector: THREE_2.Vector3;
|
|
921
|
-
};
|
|
922
|
-
/**
|
|
923
|
-
* 增加后处理PASS
|
|
924
|
-
* @param pass - 要添加的Pass实例
|
|
925
|
-
*/
|
|
926
|
-
addPass(pass: Pass): void;
|
|
927
|
-
/**
|
|
928
|
-
* 移除后处理Pass
|
|
929
|
-
* @param pass - 要移除的Pass实例
|
|
930
|
-
*/
|
|
931
|
-
removePass(pass: Pass): void;
|
|
932
|
-
/**
|
|
933
|
-
* 在指定位置插入后处理Pass
|
|
934
|
-
* @param pass - 要插入的Pass实例
|
|
935
|
-
* @param index - 插入位置的索引
|
|
936
|
-
*/
|
|
937
|
-
insertPass(pass: Pass, index: number): void;
|
|
938
|
-
/**
|
|
939
|
-
* 设置渲染模式
|
|
940
|
-
*/
|
|
941
|
-
get renderMode(): "default" | "ssaa" | "point-cloud-high-quality";
|
|
942
|
-
set renderMode(value: "default" | "ssaa" | "point-cloud-high-quality");
|
|
943
|
-
/** 开启 HQ */
|
|
944
|
-
get enableHQ(): boolean;
|
|
945
|
-
set enableHQ(enable: boolean);
|
|
946
|
-
/** 开启 edl */
|
|
947
|
-
get enableEDL(): boolean;
|
|
948
|
-
set enableEDL(enable: boolean);
|
|
949
|
-
/** 开启 AdaptiveLuminance */
|
|
950
|
-
get enableAdaptiveLuminance(): boolean;
|
|
951
|
-
set enableAdaptiveLuminance(enable: boolean);
|
|
952
|
-
/**
|
|
953
|
-
* @deprecated
|
|
954
|
-
* 不可用
|
|
955
|
-
*/
|
|
956
|
-
get enableIOSEDR(): boolean;
|
|
957
|
-
set enableIOSEDR(enable: boolean);
|
|
958
|
-
/**
|
|
959
|
-
* @deprecated
|
|
960
|
-
* 不可用
|
|
961
|
-
*/
|
|
962
|
-
get enablePostProcessing(): boolean;
|
|
963
|
-
set enablePostProcessing(enable: boolean);
|
|
964
|
-
/**
|
|
965
|
-
* @deprecated
|
|
966
|
-
* use five.modelScene.needsRender instead
|
|
967
|
-
*/
|
|
968
|
-
get modelSceneNeedsRender(): boolean;
|
|
969
|
-
set modelSceneNeedsRender(needsRender: boolean);
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
/** Five 初始化参数 */
|
|
973
|
-
export declare interface FiveInitArgs {
|
|
974
|
-
/**
|
|
975
|
-
* 外部传入的 `THREE.WebGLRenderer`。
|
|
976
|
-
* @description
|
|
977
|
-
* 如果需要使用 `scissor` 分割画布功能,则必须使用外部传入 renderer,
|
|
978
|
-
* 并且设置为 `preserveDrawingBuffer: false`。
|
|
979
|
-
* 如果设置了 `renderer`, 则 `preserveDrawingBuffer`
|
|
980
|
-
* `backgroundColor` `backgroundAlpha` `antialias`
|
|
981
|
-
* 均不再生效。
|
|
982
|
-
*/
|
|
983
|
-
renderer?: THREE_2.WebGLRenderer;
|
|
984
|
-
/**
|
|
985
|
-
* 内部 `THREE.WebGLRenderer` 是否通过像素拷贝的方式绘制。
|
|
986
|
-
* @description
|
|
987
|
-
* 当你想做屏幕截图等要确定取得屏幕像素时,请设置为 `true`。
|
|
988
|
-
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
989
|
-
* @default `false`
|
|
990
|
-
*/
|
|
991
|
-
preserveDrawingBuffer?: boolean;
|
|
992
|
-
/**
|
|
993
|
-
* 输出画面的背景颜色。
|
|
994
|
-
* @description
|
|
995
|
-
* 通过数字类型传入。
|
|
996
|
-
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
997
|
-
* @default `0x181A1C`
|
|
998
|
-
* @example
|
|
999
|
-
* ```
|
|
1000
|
-
* backgroundColor: 0xffffff // 白色
|
|
1001
|
-
* backgroundColor: 0xff0000 // 红色
|
|
1002
|
-
* ```
|
|
1003
|
-
*/
|
|
1004
|
-
backgroundColor?: number | THREE_2.Color;
|
|
1005
|
-
/**
|
|
1006
|
-
* 输出画面的背景透明度
|
|
1007
|
-
* @description
|
|
1008
|
-
* 通过数字类型传入。取值范围 [0-1]
|
|
1009
|
-
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
1010
|
-
* @default `1`
|
|
1011
|
-
*/
|
|
1012
|
-
backgroundAlpha?: number;
|
|
1013
|
-
/**
|
|
1014
|
-
* 是否开启 `THREE.WebGLRenderer` 的抗锯齿功能
|
|
1015
|
-
* @description
|
|
1016
|
-
* 这个抗锯齿功能是 `WEBGL` 自带的抗锯齿,并不是类似 fxaa taa 等后处理方式,比较吃性能。
|
|
1017
|
-
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
1018
|
-
* @default `false`
|
|
1019
|
-
*/
|
|
1020
|
-
antialias?: boolean;
|
|
1021
|
-
/**
|
|
1022
|
-
* 屏幕渲染区域
|
|
1023
|
-
* @description
|
|
1024
|
-
* 请确保设置了 `renderer` 参数,`viewport` 参数才可生效
|
|
1025
|
-
* `viewport` 是将屏幕中的内容渲染到 `renderer` 的指定区域。
|
|
1026
|
-
* 页面整体长宽均为 `1`。通过类似 css 的 `left` `bottom` `width` `height` 来确定区域。
|
|
1027
|
-
* @example
|
|
1028
|
-
* ```
|
|
1029
|
-
* viewport: { left: 0.75, bottom: 0, width: 0.25, height: 1 }
|
|
1030
|
-
* ```
|
|
1031
|
-
*/
|
|
1032
|
-
viewport?: Viewport;
|
|
1033
|
-
/**
|
|
1034
|
-
* 是否自动播放。
|
|
1035
|
-
* @description
|
|
1036
|
-
* 播放即把内存中计算的内容渲染到画面上。play则是进行每帧播放。
|
|
1037
|
-
* 如果 `play: false` 则不自动播放。屏幕不显示。
|
|
1038
|
-
* 你还可以通过 `five.play()` `five.pause()` 的方式来控制播放。
|
|
1039
|
-
* @default `true`
|
|
1040
|
-
*/
|
|
1041
|
-
play?: boolean;
|
|
1042
|
-
/**
|
|
1043
|
-
* 全景图的配置参数
|
|
1044
|
-
* @description
|
|
1045
|
-
* 可以动态对配置在 `work` 数据中的全景图片在 runtime 做 url 调整。
|
|
1046
|
-
* 平衡加载时间和图片质量
|
|
1047
|
-
*/
|
|
1048
|
-
imageOptions?: ImageOptions;
|
|
1049
|
-
/**
|
|
1050
|
-
* 模型贴图的配置参数
|
|
1051
|
-
* @description
|
|
1052
|
-
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
1053
|
-
* 平衡加载时间和图片质量
|
|
1054
|
-
*/
|
|
1055
|
-
textureOptions?: TextureOptions;
|
|
1056
|
-
/**
|
|
1057
|
-
* 是否按需渲染
|
|
1058
|
-
* @description
|
|
1059
|
-
* 按需渲染时,如果页面中的渲染有 `needsRender: true` 属性。或者 `five.needsRender: true` 时
|
|
1060
|
-
* 才会重新渲染屏幕,降低无用渲染产生的消耗。
|
|
1061
|
-
* @default `true`
|
|
1062
|
-
*/
|
|
1063
|
-
onlyRenderIfNeeds?: boolean;
|
|
1064
|
-
/**
|
|
1065
|
-
* 最高 fps 限制
|
|
1066
|
-
* @description
|
|
1067
|
-
* 如果为 `false`, 则不限制。最好也就是屏幕刷新率,不会再高了。
|
|
1068
|
-
* @default `false`
|
|
1069
|
-
*/
|
|
1070
|
-
maxFps?: number | false;
|
|
1071
|
-
/**
|
|
1072
|
-
* 外挂视频对象。
|
|
1073
|
-
* @description
|
|
1074
|
-
* 当点位中有视频元素,则会使用。如果不传入也会外部新建,
|
|
1075
|
-
* 加入传入的原因是,视频自动播放在不同浏览器或者 webview 中有不同的特性。
|
|
1076
|
-
* 给予更多外部操作的空间。
|
|
1077
|
-
*/
|
|
1078
|
-
videoInstance?: HTMLVideoElement;
|
|
1079
|
-
/** 全景图游走模式下的特定参数 */
|
|
1080
|
-
panorama?: ControllerCustomInitTypes["Panorama"];
|
|
1081
|
-
/** 模型游走模式下的特定参数 */
|
|
1082
|
-
model?: ControllerCustomInitTypes["Model"];
|
|
1083
|
-
/** 模型查看模式下的特定参数 */
|
|
1084
|
-
floorplan?: ControllerCustomInitTypes["Floorplan"];
|
|
1085
|
-
/** 户型图模式下的特定参数 */
|
|
1086
|
-
topview?: ControllerCustomInitTypes["Topview"];
|
|
1087
|
-
/** 地图模式下的特定参数 */
|
|
1088
|
-
mapview?: ControllerCustomInitTypes["Mapview"];
|
|
1089
|
-
/** VR眼镜模式下的特定参数 */
|
|
1090
|
-
vrPanorama?: ControllerCustomInitTypes["VRPanorama"];
|
|
1091
|
-
/** XR眼镜模式下的特定参数 */
|
|
1092
|
-
xrPanorama?: ControllerCustomInitTypes["XRPanorama"];
|
|
1093
|
-
/**
|
|
1094
|
-
* 模式间切换时的过度动画时间
|
|
1095
|
-
* @description
|
|
1096
|
-
* 单位毫秒
|
|
1097
|
-
* @default `800`
|
|
1098
|
-
*/
|
|
1099
|
-
modeChangeDuration?: number;
|
|
1100
|
-
/**
|
|
1101
|
-
* 是否支持滚轮
|
|
1102
|
-
*/
|
|
1103
|
-
enableWheel?: boolean;
|
|
1104
|
-
/**
|
|
1105
|
-
* 插件定义
|
|
1106
|
-
* @description
|
|
1107
|
-
* 详见插件部分。
|
|
1108
|
-
*/
|
|
1109
|
-
plugins?: (FivePlugin<void> | FivePluginInit<FivePlugin<any, any>> | FivePluginInit<FivePlugin<void, any>>)[];
|
|
1110
|
-
/**
|
|
1111
|
-
* 是否展示 powered by 如视
|
|
1112
|
-
*/
|
|
1113
|
-
poweredByRealsee?: boolean;
|
|
1114
|
-
/**
|
|
1115
|
-
* 是否使用对数深度缓存。如果要在单个场景中处理巨大的比例差异,就有必要使用
|
|
1116
|
-
*/
|
|
1117
|
-
logarithmicDepthBuffer?: boolean;
|
|
1118
|
-
/**
|
|
1119
|
-
* 着色器精度. 可以是 "highp", "mediump" 或者 "lowp". 如果设备支持
|
|
1120
|
-
*/
|
|
1121
|
-
precision?: 'highp' | 'mediump' | 'lowp';
|
|
1122
|
-
/**
|
|
1123
|
-
* 性能参数
|
|
1124
|
-
*/
|
|
1125
|
-
powerPreference?: 'high-performance' | 'low-power' | 'default';
|
|
1126
|
-
/**
|
|
1127
|
-
* 是否使用webgl2渲染执行环境, 默认值 false
|
|
1128
|
-
*/
|
|
1129
|
-
webgl2?: boolean;
|
|
1130
|
-
/**
|
|
1131
|
-
* 请求代理
|
|
1132
|
-
* @param url - 发起的请求
|
|
1133
|
-
* @returns 返回的请求
|
|
1134
|
-
*/
|
|
1135
|
-
requestProxy?(url: string): string | Promise<string>;
|
|
1136
|
-
/**
|
|
1137
|
-
* @deprecated
|
|
1138
|
-
* 无效
|
|
1139
|
-
*/
|
|
1140
|
-
enableLayeringRendering?: boolean;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
export declare interface FiveLoadOptions {
|
|
1144
|
-
/** 替换 / 追加 */
|
|
1145
|
-
mode?: 'replace' | "add";
|
|
1146
|
-
/** 切换运动时间 */
|
|
1147
|
-
duration?: number;
|
|
1148
|
-
/** 切换运动全景图效果 */
|
|
1149
|
-
effect?: MovePanoEffect;
|
|
1150
|
-
model?: ModelOptions;
|
|
1151
|
-
/**
|
|
1152
|
-
* @deprecated
|
|
1153
|
-
* 请通过 model.textureOptions 设置
|
|
1154
|
-
*/
|
|
1155
|
-
textureOptions?: ModelOptions['textureOptions'];
|
|
1156
|
-
/**
|
|
1157
|
-
* @deprecated
|
|
1158
|
-
* 请通过 model.textureOptions 设置
|
|
1159
|
-
*/
|
|
1160
|
-
"3d-tiles"?: ModelOptions['3d-tiles'];
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* FivePass
|
|
1165
|
-
*
|
|
1166
|
-
* Five 引擎优化的 Pass 基类
|
|
1167
|
-
* 支持 G-Buffer 注入,避免重复渲染场景
|
|
1168
|
-
*/
|
|
1169
|
-
export declare class FivePass implements Pass {
|
|
1170
|
-
static FullScreenQuad: typeof FullScreenQuad;
|
|
1171
|
-
enabled: boolean;
|
|
1172
|
-
needsSwap: boolean;
|
|
1173
|
-
clear: boolean;
|
|
1174
|
-
renderToScreen: boolean;
|
|
1175
|
-
dependencies: ('depth' | 'normal' | 'color')[];
|
|
1176
|
-
/**
|
|
1177
|
-
* G-Buffer 纹理集合
|
|
1178
|
-
* 包含 depth、normal、color 等纹理
|
|
1179
|
-
* 由 EffectComposer 在 render 时注入
|
|
1180
|
-
*/
|
|
1181
|
-
gbuffer: Map<'depth' | 'normal' | 'color', THREE_2.Texture>;
|
|
1182
|
-
constructor(dependencies?: ('depth' | 'normal' | 'color')[]);
|
|
1183
|
-
setSize(width: number, height: number): void;
|
|
1184
|
-
render(renderer: THREE_2.WebGLRenderer, writeBuffer: THREE_2.WebGLRenderTarget, readBuffer: THREE_2.WebGLRenderTarget, deltaTime?: number, maskActive?: boolean): void;
|
|
1185
|
-
dispose(): void;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
/**
|
|
1189
|
-
* Five 插件
|
|
1190
|
-
* @document ../../../guides/plugin.md
|
|
1191
|
-
* @template Parameters - 插件参数, 没有参数则为 void
|
|
1192
|
-
* @template Returns - 如果有参数则插件暴露的 api,没有参数则不传
|
|
1193
|
-
*/
|
|
1194
|
-
export declare type FivePlugin<Parameters = void, Returns = void> = Parameters extends void ? ((five: Five) => Returns) : ((five: Five, parameters: Parameters) => Returns);
|
|
1195
|
-
|
|
1196
|
-
/**
|
|
1197
|
-
* 获取插件在Five中的初始化结构
|
|
1198
|
-
* @template T - Five 插件
|
|
1199
|
-
*/
|
|
1200
|
-
export declare type FivePluginInit<T extends FivePlugin<any, any>> = Parameters<T>[1] extends undefined ? [
|
|
1201
|
-
Plugin: T,
|
|
1202
|
-
instanceName: null | string
|
|
1203
|
-
] : [
|
|
1204
|
-
Plugin: T,
|
|
1205
|
-
instanceName: null | string,
|
|
1206
|
-
parameters: Parameters<T>[1]
|
|
1207
|
-
];
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
* 获取插件暴露的 api
|
|
1211
|
-
* @template T - Five 插件
|
|
1212
|
-
*/
|
|
1213
|
-
export declare type FivePluginInstance<T extends FivePlugin<any, any>> = ReturnType<T>;
|
|
1214
|
-
|
|
1215
|
-
export declare class FiveRenderer {
|
|
1216
|
-
composer: EffectComposer;
|
|
1217
|
-
composerVersion: string;
|
|
1218
|
-
colorRenderTarget: THREE_2.WebGLRenderTarget;
|
|
1219
|
-
normalRenderTarget: THREE_2.WebGLRenderTarget;
|
|
1220
|
-
renderMode: 'default' | 'ssaa' | 'point-cloud-high-quality';
|
|
1221
|
-
private sceneRenders;
|
|
1222
|
-
constructor();
|
|
1223
|
-
private renderSceneToBuffers;
|
|
1224
|
-
render(renderer: THREE_2.WebGLRenderer, scene: Scene, modelScene: ModelScene, camera: Camera, sceneUpdated: boolean): boolean;
|
|
1225
|
-
dispose(): void;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
export declare interface FloorplanControllerCustomInitArgs {
|
|
1229
|
-
/** 默认水平角 */
|
|
1230
|
-
defaultLongitude?: number;
|
|
1231
|
-
/** 默认俯仰角 */
|
|
1232
|
-
defaultLatitude?: number;
|
|
1233
|
-
/** 最大俯仰角 */
|
|
1234
|
-
maxLatitude?: number | ((fov: number) => number);
|
|
1235
|
-
/** 最小俯仰角 */
|
|
1236
|
-
minLatitude?: number | ((fov: number) => number);
|
|
1237
|
-
/** 默认相机可视角度(垂直),可作为 `zoom` */
|
|
1238
|
-
defaultFov?: number;
|
|
1239
|
-
/** 最大相机可视角度 */
|
|
1240
|
-
maxFov?: number;
|
|
1241
|
-
/** 最小相机可视角度 */
|
|
1242
|
-
minFov?: number;
|
|
1243
|
-
/** 鼠标焦点环自定义创建器 */
|
|
1244
|
-
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* 用于全屏渲染的辅助类
|
|
1249
|
-
*/
|
|
1250
|
-
export declare class FullScreenQuad<T extends THREE_2.Material = THREE_2.Material> {
|
|
1251
|
-
private static camera;
|
|
1252
|
-
private static geometry;
|
|
1253
|
-
private _scene;
|
|
1254
|
-
private _mesh;
|
|
1255
|
-
constructor(material: T);
|
|
1256
|
-
get material(): T;
|
|
1257
|
-
set material(value: T);
|
|
1258
|
-
dispose(): void;
|
|
1259
|
-
render(renderer: THREE_2.WebGLRenderer): void;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
export declare interface GestureEvent extends StateEvent {
|
|
1263
|
-
target: EventTarget | null;
|
|
1264
|
-
pointerType: 'touch' | 'pen' | 'mouse' | 'kinect';
|
|
1265
|
-
srcEvent: MouseEvent | TouchEvent | PointerEvent;
|
|
1266
|
-
pointers: {
|
|
1267
|
-
x: number;
|
|
1268
|
-
y: number;
|
|
1269
|
-
delta: number;
|
|
1270
|
-
buttons: number;
|
|
1271
|
-
coords: THREE_2.Vector2;
|
|
1272
|
-
raycaster: THREE_2.Raycaster;
|
|
1273
|
-
}[];
|
|
1274
|
-
isFirst: boolean;
|
|
1275
|
-
isFinal: boolean;
|
|
1276
|
-
scale: number;
|
|
1277
|
-
center: {
|
|
1278
|
-
x: number;
|
|
1279
|
-
y: number;
|
|
1280
|
-
delta: number;
|
|
1281
|
-
buttons: number;
|
|
1282
|
-
coords: THREE_2.Vector2;
|
|
1283
|
-
raycaster: THREE_2.Raycaster;
|
|
1284
|
-
};
|
|
1285
|
-
velocityX: number;
|
|
1286
|
-
velocityY: number;
|
|
1287
|
-
overallVelocityX: number;
|
|
1288
|
-
overallVelocityY: number;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
export declare type GestureTypes = "pan" | "tap" | "dbltap" | "pinch" | "press" | "mouseWheel" | "mouseMove";
|
|
1292
|
-
|
|
1293
|
-
export declare function getViewportScale(): number;
|
|
1294
|
-
|
|
1295
|
-
/**
|
|
1296
|
-
* 通过 heading 计算 longitude
|
|
1297
|
-
*
|
|
1298
|
-
* @deprecated
|
|
1299
|
-
* 不再使用 heading 这种计算方式。
|
|
1300
|
-
*
|
|
1301
|
-
* @param heading - 方向
|
|
1302
|
-
*/
|
|
1303
|
-
export declare function headingToLongitude(heading: number): number;
|
|
1304
|
-
|
|
1305
|
-
/**
|
|
1306
|
-
* 图片参数
|
|
1307
|
-
*/
|
|
1308
|
-
export declare interface ImageOptions extends Omit<ImageURLOptions, 'key'> {
|
|
1309
|
-
/**
|
|
1310
|
-
* url 地址转化
|
|
1311
|
-
* @param url - 原始地址
|
|
1312
|
-
* @param options - 当前地址参数
|
|
1313
|
-
* @returns 转化后地址
|
|
1314
|
-
*/
|
|
1315
|
-
transform?: (url: string, options: ImageURLOptions) => string;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
export declare function imageSupport(): Promise<{
|
|
1319
|
-
webp: boolean;
|
|
1320
|
-
avif: boolean;
|
|
1321
|
-
heif: boolean;
|
|
1322
|
-
}>;
|
|
1323
|
-
|
|
1324
|
-
export declare interface ImageURLMappings {
|
|
1325
|
-
[publicDomain: string]: {
|
|
1326
|
-
"type"?: string;
|
|
1327
|
-
"pano": [string, string];
|
|
1328
|
-
"tile": [string, string];
|
|
1329
|
-
"model": [string, string];
|
|
1330
|
-
"texture": [string];
|
|
1331
|
-
"default": [string];
|
|
1332
|
-
};
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
export declare interface ImageURLOptions {
|
|
1336
|
-
/** 图片类型标识 */
|
|
1337
|
-
key: string;
|
|
1338
|
-
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
1339
|
-
size?: number;
|
|
1340
|
-
/** 图片质量参数(0-100) */
|
|
1341
|
-
quality?: number;
|
|
1342
|
-
/** 图片格式参数 */
|
|
1343
|
-
format?: "jpg" | "jpeg" | "png" | "heif" | "heic" | "webp" | "avif";
|
|
1344
|
-
/** 图片裁切 */
|
|
1345
|
-
cut?: [x: number, y: number, width: number, height: number];
|
|
1346
|
-
/** 锐化参数 海外不支持 */
|
|
1347
|
-
sharpen?: number;
|
|
1348
|
-
/** 腾讯云在做裁切, 旋转等操作时,需要此参数,应用 exif orientation */
|
|
1349
|
-
forceUseExifOrientation?: boolean;
|
|
1350
|
-
/** 域名匹配规则 */
|
|
1351
|
-
mappings?: ImageURLMappings;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
export declare class InternalWebGLRenderer extends THREE_2.WebGLRenderer {
|
|
1355
|
-
constructor({ preserveDrawingBuffer, premultipliedAlpha, stencil, antialias, webgl2, logarithmicDepthBuffer, precision, powerPreference, }: {
|
|
1356
|
-
preserveDrawingBuffer?: boolean;
|
|
1357
|
-
premultipliedAlpha?: boolean;
|
|
1358
|
-
stencil?: boolean;
|
|
1359
|
-
antialias?: boolean;
|
|
1360
|
-
webgl2?: boolean;
|
|
1361
|
-
logarithmicDepthBuffer?: boolean;
|
|
1362
|
-
precision?: 'highp' | 'mediump' | 'lowp';
|
|
1363
|
-
powerPreference?: 'high-performance' | 'low-power' | 'default';
|
|
1364
|
-
});
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
export declare interface IntersectEvent extends BaseEvent {
|
|
1368
|
-
object: THREE_2.Object3D;
|
|
1369
|
-
raycaster: THREE_2.Raycaster;
|
|
1370
|
-
intersection: Intersection | null;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
export declare interface Intersection extends THREE_2.Intersection {
|
|
1374
|
-
/** 楼层 */
|
|
1375
|
-
floorIndex: number;
|
|
1376
|
-
/**
|
|
1377
|
-
* 楼层
|
|
1378
|
-
* @deprecated
|
|
1379
|
-
* use floorIndex instead.
|
|
1380
|
-
*/
|
|
1381
|
-
floor: number;
|
|
1382
|
-
model?: Model;
|
|
1383
|
-
viewLayer?: ViewLayer;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
export declare class IntersectMesh extends THREE_2.Object3D implements IntersectMeshInterface {
|
|
1387
|
-
private ringMesh;
|
|
1388
|
-
constructor();
|
|
1389
|
-
dispose(): void;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
/**
|
|
1393
|
-
* 地面提示点位接口
|
|
1394
|
-
*/
|
|
1395
|
-
export declare interface IntersectMeshInterface extends THREE_2.Object3D {
|
|
1396
|
-
dispose(): void;
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
export declare function isBoundingVolume(obj: any): obj is BoundingVolume;
|
|
1400
|
-
|
|
1401
|
-
export declare function isPanoId(id: any): id is PanoId;
|
|
1402
|
-
|
|
1403
|
-
export declare class KTX2 {
|
|
1404
|
-
transcoderPath: string;
|
|
1405
|
-
private workerPool;
|
|
1406
|
-
private transcoderBinary;
|
|
1407
|
-
private transcoderPending;
|
|
1408
|
-
private workerSourceURL;
|
|
1409
|
-
private workerConfig;
|
|
1410
|
-
constructor();
|
|
1411
|
-
setTranscoderPath(transcoderPath: string): void;
|
|
1412
|
-
detectSupport(renderer: THREE_2.WebGLRenderer): this;
|
|
1413
|
-
init(): Promise<void>;
|
|
1414
|
-
parse(buffer: ArrayBuffer): Promise<THREE_2.CompressedTexture>;
|
|
1415
|
-
_createTextureFrom(transcodeResult: any): Promise<THREE_2.CompressedTexture>;
|
|
1416
|
-
_createTexture(buffers: ArrayBuffer[]): Promise<THREE_2.CompressedTexture>;
|
|
1417
|
-
dispose(): this;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
export declare const ktx2: KTX2;
|
|
1421
|
-
|
|
1422
|
-
/**
|
|
1423
|
-
* 过时的事件列表
|
|
1424
|
-
*/
|
|
1425
|
-
export declare type LegacyEventType = {
|
|
1426
|
-
/**
|
|
1427
|
-
* 模态间切换动画开始
|
|
1428
|
-
* @param panoIndex - 当前点位
|
|
1429
|
-
* @param pose - 相机姿态
|
|
1430
|
-
* @param userAction - 是否用户触发
|
|
1431
|
-
*/
|
|
1432
|
-
initAnimationWillStart(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1433
|
-
/**
|
|
1434
|
-
* 模态间切换动画结束
|
|
1435
|
-
* @param panoIndex - 当前点位
|
|
1436
|
-
* @param pose - 相机姿态
|
|
1437
|
-
* @param userAction - 是否用户触发
|
|
1438
|
-
*/
|
|
1439
|
-
initAnimationEnded(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1440
|
-
/**
|
|
1441
|
-
* 意图要触发手势, 可以通过 `return false` 阻止
|
|
1442
|
-
* @param type - 手势类型
|
|
1443
|
-
* @param pointers - 手指位置
|
|
1444
|
-
* @param final - 是否手势结束
|
|
1445
|
-
* @returns 可以通过 `return false` 阻止
|
|
1446
|
-
*/
|
|
1447
|
-
wantsGesture(type: GestureTypes, pointers: {
|
|
1448
|
-
x: number;
|
|
1449
|
-
y: number;
|
|
1450
|
-
delta?: number;
|
|
1451
|
-
}[], final: boolean): void | false;
|
|
1452
|
-
/**
|
|
1453
|
-
* 手势 触发
|
|
1454
|
-
* @param type - 手势类型
|
|
1455
|
-
* @param pointers - 手指位置
|
|
1456
|
-
* @param final - 是否手势结束
|
|
1457
|
-
*/
|
|
1458
|
-
gesture(type: GestureTypes, pointers: {
|
|
1459
|
-
x: number;
|
|
1460
|
-
y: number;
|
|
1461
|
-
delta?: number;
|
|
1462
|
-
}[], final: boolean): void;
|
|
1463
|
-
/**
|
|
1464
|
-
* 意图要触发 pan 手势(滑动屏幕), 可以通过 `return false` 阻止
|
|
1465
|
-
* @param pose - 意图的相机姿态
|
|
1466
|
-
* @param final - 是否手势结束
|
|
1467
|
-
* @returns 可以通过 `return false` 阻止
|
|
1468
|
-
*/
|
|
1469
|
-
wantsPanGesture(pose: Pose, final: boolean): void | false;
|
|
1470
|
-
/**
|
|
1471
|
-
* pan 手势(滑动屏幕) 被触发
|
|
1472
|
-
* @param pose - 相机姿态
|
|
1473
|
-
* @param final - 是否手势结束
|
|
1474
|
-
*/
|
|
1475
|
-
panGesture(pose: Pose, final: boolean): void;
|
|
1476
|
-
/**
|
|
1477
|
-
* 意图要触发 tap 手势(点击屏幕), 可以通过 `return false` 阻止
|
|
1478
|
-
* @param raycaster - 点击对应的三维射线
|
|
1479
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
1480
|
-
* @param final - 是否手势结束
|
|
1481
|
-
* @returns 可以通过 `return false` 阻止
|
|
1482
|
-
*/
|
|
1483
|
-
wantsTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void | false;
|
|
1484
|
-
/**
|
|
1485
|
-
* tap 手势(点击屏幕) 被触发
|
|
1486
|
-
* @param raycaster - 点击对应的三维射线
|
|
1487
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
1488
|
-
* @param final - 是否手势结束
|
|
1489
|
-
*/
|
|
1490
|
-
tapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void;
|
|
1491
|
-
/**
|
|
1492
|
-
* 意图要触发 dlbtap 手势(点击屏幕), 可以通过 `return false` 阻止
|
|
1493
|
-
* @param raycaster - 点击对应的三维射线
|
|
1494
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
1495
|
-
* @param final - 是否手势结束
|
|
1496
|
-
* @returns 可以通过 `return false` 阻止
|
|
1497
|
-
*/
|
|
1498
|
-
wantsDblTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void | false;
|
|
1499
|
-
/**
|
|
1500
|
-
* dbltap 手势(点击屏幕) 被触发
|
|
1501
|
-
* @param raycaster - 点击对应的三维射线
|
|
1502
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
1503
|
-
* @param final - 是否手势结束
|
|
1504
|
-
*/
|
|
1505
|
-
dblTapGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, final: boolean): void;
|
|
1506
|
-
/**
|
|
1507
|
-
* 意图要触发 pinch 手势(双指缩放),可以通过 `return false` 阻止
|
|
1508
|
-
* @param scale - 缩放数值
|
|
1509
|
-
* @param nextFov - 意图的fov变更
|
|
1510
|
-
* @param final - 是否手势结束
|
|
1511
|
-
* @returns 可以通过 `return false` 阻止
|
|
1512
|
-
*/
|
|
1513
|
-
wantsPinchGesture(scale: number, nextFov: number, final: boolean): void | false;
|
|
1514
|
-
/**
|
|
1515
|
-
* 意图要触发 press 手势(长按屏幕), 可以通过 `return false` 阻止
|
|
1516
|
-
* @param raycaster - 长按对应的三维射线
|
|
1517
|
-
* @param tapPosition - 长按对应的屏幕位置
|
|
1518
|
-
* @param duration - 长按持续时间
|
|
1519
|
-
* @param final - 是否手势结束
|
|
1520
|
-
* @returns 可以通过 `return false` 阻止
|
|
1521
|
-
*/
|
|
1522
|
-
wantsPressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, final: boolean): void | false;
|
|
1523
|
-
/**
|
|
1524
|
-
* tap 手势(点击屏幕) 被触发
|
|
1525
|
-
* @param raycaster - 点击对应的三维射线
|
|
1526
|
-
* @param tapPosition - 点击对应的屏幕位置
|
|
1527
|
-
* @param duration - 长按持续时间
|
|
1528
|
-
* @param final - 是否手势结束
|
|
1529
|
-
*/
|
|
1530
|
-
pressGesture(raycaster: THREE_2.Raycaster, tapPosition: THREE_2.Vector2, duration: number, final: boolean): void;
|
|
1531
|
-
/**
|
|
1532
|
-
* pinch 手势(双指缩放) 被触发
|
|
1533
|
-
* @param scale - 缩放数值
|
|
1534
|
-
* @param fov - 意图的fov变更
|
|
1535
|
-
* @param final - 是否手势结束
|
|
1536
|
-
*/
|
|
1537
|
-
pinchGesture(scale: number, fov: number, final: boolean): void;
|
|
1538
|
-
/**
|
|
1539
|
-
* 意图要触发 鼠标滚轮 可以通过 `return false` 阻止
|
|
1540
|
-
* @param delta - 滚轮数值
|
|
1541
|
-
* @param nextFov - 意图的fov变更
|
|
1542
|
-
* @param final - 是否手势结束
|
|
1543
|
-
* @returns 可以通过 `return false` 阻止
|
|
1544
|
-
*/
|
|
1545
|
-
wantsMouseWheel(delta: number, nextFov: number, final: boolean): void | false;
|
|
1546
|
-
/**
|
|
1547
|
-
* 鼠标滚轮被触发
|
|
1548
|
-
* @param delta - 滚轮数值
|
|
1549
|
-
* @param fov - 意图的fov变更
|
|
1550
|
-
* @param final - 是否手势结束
|
|
1551
|
-
*/
|
|
1552
|
-
mouseWheel(delta: number, fov: number, final: boolean): void;
|
|
1553
|
-
/**
|
|
1554
|
-
* 意图要触发 pan 手势(滑动屏幕) 的惯性运动, 可以通过 `return false` 阻止
|
|
1555
|
-
* @param pose - 意图的相机姿态
|
|
1556
|
-
* @returns 可以通过 `return false` 阻止
|
|
1557
|
-
*/
|
|
1558
|
-
wantsInteriaPan(pose: Pose): void | false;
|
|
1559
|
-
/**
|
|
1560
|
-
* pan 手势(滑动屏幕) 的惯性运动
|
|
1561
|
-
* @param pose - 意图的相机姿态
|
|
1562
|
-
* @param final - 是否手势结束
|
|
1563
|
-
*/
|
|
1564
|
-
interiaPan(pose: Pose, final: boolean): void;
|
|
1565
|
-
/**
|
|
1566
|
-
* 意图要变化相机的可视角度 可以通过 `return false` 阻止
|
|
1567
|
-
* @deprecated
|
|
1568
|
-
* 建议通过 初始化设置的 `defaultFov`, `maxFov`, `minFov` 来限制
|
|
1569
|
-
* @param fov - 意图要变化相机的可视角度
|
|
1570
|
-
* @returns 可以通过 `return false` 阻止
|
|
1571
|
-
*/
|
|
1572
|
-
wantsChangeCameraFov(fov: number): void | false;
|
|
1573
|
-
/**
|
|
1574
|
-
* 相机姿态变化
|
|
1575
|
-
* @param pose - 相机姿态
|
|
1576
|
-
* @param userAction - 是否用户触发
|
|
1577
|
-
*/
|
|
1578
|
-
cameraUpdate(pose: Pose, userAction: boolean): void;
|
|
1579
|
-
/**
|
|
1580
|
-
* 相机姿态中可视角度变化
|
|
1581
|
-
* @param fov - 相机的可视角度
|
|
1582
|
-
* @param userAction - 是否用户触发
|
|
1583
|
-
*/
|
|
1584
|
-
cameraFovUpdate(fov: Pose["fov"], userAction: boolean): void;
|
|
1585
|
-
/**
|
|
1586
|
-
* 相机姿态中相机位置变化
|
|
1587
|
-
* @param offset - 相机位置
|
|
1588
|
-
* @param userAction - 是否用户触发
|
|
1589
|
-
*/
|
|
1590
|
-
cameraPositionUpdate(offset: Pose["offset"], userAction: boolean): void;
|
|
1591
|
-
/**
|
|
1592
|
-
* 相机姿态中相机方向变化
|
|
1593
|
-
* @param coordinates - 相机姿态的俯仰角和偏航角
|
|
1594
|
-
* @param userAction - 是否用户触发
|
|
1595
|
-
*/
|
|
1596
|
-
cameraDirectionUpdate(coordinates: Pick<Pose, "longitude" | "latitude">, userAction: boolean): void;
|
|
1597
|
-
/**
|
|
1598
|
-
* 鼠标焦点环位置被重新计算
|
|
1599
|
-
* @param intersection - 焦点碰撞结果
|
|
1600
|
-
* @param mesh - 焦点环 mesh
|
|
1601
|
-
*/
|
|
1602
|
-
intersectionOnModelUpdate(intersection: Intersection, mesh: THREE_2.Object3D): void;
|
|
1603
|
-
/**
|
|
1604
|
-
* 意图要展示鼠标焦点环,可以通过 `return false` 阻止
|
|
1605
|
-
* @param raycaster - 射线
|
|
1606
|
-
* @returns 可以通过 `return false` 阻止
|
|
1607
|
-
*/
|
|
1608
|
-
wantsShowIntersectionOnModel(raycaster: THREE_2.Raycaster): void | false;
|
|
1609
|
-
/** 鼠标焦点环被隐藏 */
|
|
1610
|
-
intersectionHidden(): void;
|
|
1611
|
-
/**
|
|
1612
|
-
* 意图要移动到某个点时, 可以通过 return false 阻止
|
|
1613
|
-
* @param panoIndex - 意图要移动到点位
|
|
1614
|
-
* @param options - 移动参数
|
|
1615
|
-
* @param userAction - 是否用户触发
|
|
1616
|
-
* @returns 可以通过 return false 阻止
|
|
1617
|
-
*/
|
|
1618
|
-
wantsMoveToPano(panoIndex: number, options: MovePanoOptions, userAction: boolean): void | false;
|
|
1619
|
-
/**
|
|
1620
|
-
* 同 wantsMoveToPano
|
|
1621
|
-
* @description
|
|
1622
|
-
* @param panoIndex - 意图要移动到点位
|
|
1623
|
-
* @param options - 移动参数
|
|
1624
|
-
* @param userAction - 是否用户触发
|
|
1625
|
-
* @returns 可以通过 return false 阻止
|
|
1626
|
-
*/
|
|
1627
|
-
wantsToMoveToPano(panoIndex: number, options: MovePanoOptions, userAction: boolean): void;
|
|
1628
|
-
/**
|
|
1629
|
-
* 观察点位被选择
|
|
1630
|
-
* @param panoIndex - 选择的点位
|
|
1631
|
-
*/
|
|
1632
|
-
panoSelected(panoIndex: number | null): void;
|
|
1633
|
-
/**
|
|
1634
|
-
* 开始加载并移动到某个观察点位
|
|
1635
|
-
* @description
|
|
1636
|
-
* 可 panoWillArrive 相比
|
|
1637
|
-
* - moveToPano 在加载全景图资源前触发
|
|
1638
|
-
* - panoWillArrive 在加载全景图资源后触发
|
|
1639
|
-
* @param panoIndex - 移动到的点位
|
|
1640
|
-
* @param userAction - 是否用户触发
|
|
1641
|
-
*/
|
|
1642
|
-
moveToPano(panoIndex: number, userAction: boolean): void;
|
|
1643
|
-
/**
|
|
1644
|
-
* 移动中, 会告知移动状态(耗时百分比)
|
|
1645
|
-
* @param panoIndex - 将要移动到的点位下标
|
|
1646
|
-
* @param prevPanoIndex - 上一个点位下标
|
|
1647
|
-
* @param progress - 整个过程经度 [0-1]
|
|
1648
|
-
*/
|
|
1649
|
-
movingToPano(panoIndex: number, prevPanoIndex: number, progress: number): void;
|
|
1650
|
-
/**
|
|
1651
|
-
* 开始加载某个观察点的全景资源
|
|
1652
|
-
* @param panoIndex - 移动到的点位
|
|
1653
|
-
*/
|
|
1654
|
-
panoWillLoad(panoIndex: number): void;
|
|
1655
|
-
/**
|
|
1656
|
-
* 某个观察点的全景资源加载完成
|
|
1657
|
-
* @param panoIndex - 对应的点位
|
|
1658
|
-
*/
|
|
1659
|
-
panoLoaded(panoIndex: number): void;
|
|
1660
|
-
/**
|
|
1661
|
-
* 开始移动到某个观察点位
|
|
1662
|
-
* @description
|
|
1663
|
-
* 和 moveToPano 相比
|
|
1664
|
-
* - moveToPano 在加载全景图资源前触发
|
|
1665
|
-
* - panoWillArrive 在加载全景图资源后触发
|
|
1666
|
-
* @param panoIndex - 移动到点位
|
|
1667
|
-
* @param pose - 相机姿态
|
|
1668
|
-
* @param userAction - 是否用户触发
|
|
1669
|
-
*/
|
|
1670
|
-
panoWillArrive(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1671
|
-
/**
|
|
1672
|
-
* 移动到某个观察点位
|
|
1673
|
-
* @param panoIndex - 移动到点位
|
|
1674
|
-
* @param pose - 相机姿态
|
|
1675
|
-
* @param userAction - 是否用户触发
|
|
1676
|
-
*/
|
|
1677
|
-
panoArrived(panoIndex: number, pose: Pose, userAction: boolean): void;
|
|
1678
|
-
/**
|
|
1679
|
-
* 某个观察点的全景资源加载失败
|
|
1680
|
-
* @param error - 错误对象
|
|
1681
|
-
* @param panoIndex - 对应的点位
|
|
1682
|
-
*/
|
|
1683
|
-
panoLoadError(error: Error, panoIndex: number): void;
|
|
1684
|
-
/**
|
|
1685
|
-
* 移动到某个观察点位被取消
|
|
1686
|
-
* @description
|
|
1687
|
-
* 这个有一些情况会导致
|
|
1688
|
-
* - 移动过程中切换模态
|
|
1689
|
-
* - 移动过程中 five 被析构
|
|
1690
|
-
* - 移动过程点击切换到另一个点位
|
|
1691
|
-
* @param panoIndex - 对应的点位
|
|
1692
|
-
*/
|
|
1693
|
-
moveToPanoCanceled(panoIndex: number): void;
|
|
1694
|
-
/**
|
|
1695
|
-
* 观察点的全景资源开始加载
|
|
1696
|
-
* @param panoIndex - 加载点位
|
|
1697
|
-
*/
|
|
1698
|
-
textureStartLoad(panoIndex: number): void;
|
|
1699
|
-
/**
|
|
1700
|
-
* 观察点的全景资源加载中,可获取到进度
|
|
1701
|
-
* @param progress - 加载进度 [0-1]
|
|
1702
|
-
* @param panoIndex - 加载点位下标
|
|
1703
|
-
*/
|
|
1704
|
-
textureLoading(progress: number, panoIndex: number): void;
|
|
1705
|
-
/**
|
|
1706
|
-
* 观察点的全景资源加载被中止
|
|
1707
|
-
* @param panoIndex - 加载点位
|
|
1708
|
-
*/
|
|
1709
|
-
textureAbort(panoIndex: number): void;
|
|
1710
|
-
/**
|
|
1711
|
-
* 观察点的全景资源加载失败
|
|
1712
|
-
* @param error - 错误对象
|
|
1713
|
-
* @param panoIndex - 加载点位
|
|
1714
|
-
*/
|
|
1715
|
-
textureError(error: Error, panoIndex: number): void;
|
|
1716
|
-
/**
|
|
1717
|
-
* 观察点的全景资源加载完成
|
|
1718
|
-
* @param panoIndex - 加载点位
|
|
1719
|
-
*/
|
|
1720
|
-
textureLoaded(panoIndex: number, meta: (NetWorkMeta | null)[]): void;
|
|
1721
|
-
/**
|
|
1722
|
-
* webXR模式开始,webxr session完成坐标系矫正
|
|
1723
|
-
*/
|
|
1724
|
-
webXRSessionStart(): void;
|
|
1725
|
-
/**
|
|
1726
|
-
* webXR模式结束,webxr session销毁
|
|
1727
|
-
*/
|
|
1728
|
-
webXRSessionEnd(): void;
|
|
1729
|
-
/**
|
|
1730
|
-
* axes代表控制杆,axes数组的0-1元素分别代表左控制器的左(-1)右(1),左控制器的上(-1)下(1),axes数组的2-3元素同理
|
|
1731
|
-
*/
|
|
1732
|
-
webXRControllerEvent(type: WebXRControllerType, key: WebXRControllerKey, params: WebXRControllerParams): void;
|
|
1733
|
-
/**
|
|
1734
|
-
* xr控制器的Axes原始实时数据状态
|
|
1735
|
-
*/
|
|
1736
|
-
webXRAxesUpdate(type: 'left' | 'right', param: WebXRAxesParams): void;
|
|
1737
|
-
/**
|
|
1738
|
-
* xr控制器的控制器射线更新
|
|
1739
|
-
*/
|
|
1740
|
-
webXRControllerRayUpdate(raycaster: {
|
|
1741
|
-
leftRay?: THREE_2.Raycaster;
|
|
1742
|
-
rightRay?: THREE_2.Raycaster;
|
|
1743
|
-
}): void;
|
|
1744
|
-
/**
|
|
1745
|
-
* 准备加载 Work 数据
|
|
1746
|
-
* @param input - 输入的 work
|
|
1747
|
-
* @param work - 归一化的标准 work
|
|
1748
|
-
* @param state - 加载时的姿态
|
|
1749
|
-
*/
|
|
1750
|
-
willLoad(input: any, work: Work, state: Partial<State>): void;
|
|
1751
|
-
/**
|
|
1752
|
-
* 开始加载 Work 数据
|
|
1753
|
-
* @param input - 输入的 work
|
|
1754
|
-
* @param work - 归一化的标准 work
|
|
1755
|
-
* @param state - 加载时的姿态
|
|
1756
|
-
*/
|
|
1757
|
-
load(input: any, work: Work, state: Partial<State>): void;
|
|
1758
|
-
/**
|
|
1759
|
-
* 加载完 Work 数据
|
|
1760
|
-
* @param input - 输入的 work
|
|
1761
|
-
* @param work - 归一化的标准 work
|
|
1762
|
-
*/
|
|
1763
|
-
loaded(input: any, work: Work): void;
|
|
1764
|
-
/**
|
|
1765
|
-
* 当目标 state 变化时
|
|
1766
|
-
* @param state - 当前姿态状态
|
|
1767
|
-
* @param userAction - 是否用户触发
|
|
1768
|
-
*/
|
|
1769
|
-
stateChange(state: State, userAction: boolean): void;
|
|
1770
|
-
/**
|
|
1771
|
-
* 当前实时 state 变化时
|
|
1772
|
-
* @param state - 当前姿态状态
|
|
1773
|
-
* @param userAction - 是否用户触发
|
|
1774
|
-
*/
|
|
1775
|
-
currentStateChange(state: State, userAction: boolean): void;
|
|
1776
|
-
/**
|
|
1777
|
-
* 当 setState 方法被调用
|
|
1778
|
-
* @param state - 当前姿态状态
|
|
1779
|
-
*/
|
|
1780
|
-
setState(state: State): void;
|
|
1781
|
-
/**
|
|
1782
|
-
* 当 state 被同步完成时
|
|
1783
|
-
* @param state - 当前姿态状态
|
|
1784
|
-
*/
|
|
1785
|
-
stateSynced(state: State): void;
|
|
1786
|
-
/**
|
|
1787
|
-
* 模型开始加载
|
|
1788
|
-
* @param workModel - 归一化的标准 work 中的 model 值
|
|
1789
|
-
*/
|
|
1790
|
-
modelWillLoad(workModel: WorkModel): void;
|
|
1791
|
-
/**
|
|
1792
|
-
* 模型加载错误
|
|
1793
|
-
* @param error - 错误对象
|
|
1794
|
-
* @param model - 加载完的 model
|
|
1795
|
-
*/
|
|
1796
|
-
modelLoadError(error: Error, model: Model): void;
|
|
1797
|
-
/**
|
|
1798
|
-
* 模型加载完成
|
|
1799
|
-
* @param model - 加载完的 model
|
|
1800
|
-
*/
|
|
1801
|
-
modelLoaded(model: Model): void;
|
|
1802
|
-
/**
|
|
1803
|
-
* 模型楼层切换
|
|
1804
|
-
* @param shownFloor - 模型楼层
|
|
1805
|
-
*/
|
|
1806
|
-
modelShownFloorChange(shownFloor: number | null, floorLength: number): void;
|
|
1807
|
-
/**
|
|
1808
|
-
* 渲染循环
|
|
1809
|
-
* @param rendered - 是否渲染了
|
|
1810
|
-
*/
|
|
1811
|
-
renderFrame(rendered: boolean): void;
|
|
1812
|
-
/**
|
|
1813
|
-
* 意图要切换到某个模态, 可以通过 return false 阻止
|
|
1814
|
-
* @param mode - 意图要切换到的模态
|
|
1815
|
-
* @param prevMode - 当前模态
|
|
1816
|
-
* @returns 可以通过 return false 阻止
|
|
1817
|
-
*/
|
|
1818
|
-
wantsChangeMode(mode: Mode, prevMode: Mode): void | false;
|
|
1819
|
-
/**
|
|
1820
|
-
* 模态切换完成
|
|
1821
|
-
* @param mode - 切换到的模态
|
|
1822
|
-
* @param prevMode - 上本质是一个模态
|
|
1823
|
-
* @param panoIndex - 初始化动画结束后的点位下标
|
|
1824
|
-
* @param toPose - 初始化动画结束后的状态
|
|
1825
|
-
* @param userAction - 是否用户触发
|
|
1826
|
-
*/
|
|
1827
|
-
modeChange(mode: Mode, prevMode: Mode, panoIndex: number, toPose: Pose, userAction: boolean): void;
|
|
1828
|
-
/**
|
|
1829
|
-
* 帮助元素显应的变换
|
|
1830
|
-
* @param visible - 帮助元素的是否开启
|
|
1831
|
-
*/
|
|
1832
|
-
helpersVisibleChange(visible: boolean): void;
|
|
1833
|
-
/**
|
|
1834
|
-
* 网络资源分析
|
|
1835
|
-
* @param source - 资源地址
|
|
1836
|
-
* @param state - 状态
|
|
1837
|
-
* @param detail - 详情
|
|
1838
|
-
*/
|
|
1839
|
-
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
1840
|
-
};
|
|
1841
|
-
|
|
1842
|
-
export declare function loadAt3d(url: string, options?: {
|
|
1843
|
-
upAxis?: 'Y' | 'Z';
|
|
1844
|
-
light?: boolean;
|
|
1845
|
-
textureOptions?: TextureOptions;
|
|
1846
|
-
textureBaseUri?: string;
|
|
1847
|
-
textureArray?: string[];
|
|
1848
|
-
fetcher?: Fetcher;
|
|
1849
|
-
}): Promise<LoadResultType>;
|
|
1850
|
-
|
|
1851
|
-
export declare function loadB3dm(url: string, options?: {
|
|
1852
|
-
modelUpAxis?: 'Y' | 'Z';
|
|
1853
|
-
upAxis?: 'Y' | 'Z';
|
|
1854
|
-
light?: boolean;
|
|
1855
|
-
fetcher?: Fetcher;
|
|
1856
|
-
}): Promise<LoadResultType>;
|
|
1857
|
-
|
|
1858
|
-
export declare function loadDome(url: string, options?: {
|
|
1859
|
-
upAxis?: 'Y' | 'Z';
|
|
1860
|
-
light?: boolean;
|
|
1861
|
-
textureOptions?: TextureOptions;
|
|
1862
|
-
textureBaseUri?: string;
|
|
1863
|
-
fetcher?: Fetcher;
|
|
1864
|
-
}): Promise<LoadResultType>;
|
|
1865
|
-
|
|
1866
|
-
export declare function loadDomez(url: string, options?: {
|
|
1867
|
-
upAxis?: 'Y' | 'Z';
|
|
1868
|
-
light?: boolean;
|
|
1869
|
-
textureOptions?: TextureOptions;
|
|
1870
|
-
textureBaseUri?: string;
|
|
1871
|
-
fetcher?: Fetcher;
|
|
1872
|
-
}): Promise<LoadResultType>;
|
|
1873
|
-
|
|
1874
|
-
export declare function loadFbx(url: string, options?: {
|
|
1875
|
-
upAxis?: 'Y' | 'Z';
|
|
1876
|
-
light?: boolean;
|
|
1877
|
-
fetcher?: Fetcher;
|
|
1878
|
-
}): Promise<LoadResultType>;
|
|
1879
|
-
|
|
1880
|
-
export declare function loadGltf(url: string, options?: {
|
|
1881
|
-
modelUpAxis?: 'Y' | 'Z';
|
|
1882
|
-
upAxis?: 'Y' | 'Z';
|
|
1883
|
-
light?: boolean;
|
|
1884
|
-
fetcher?: Fetcher;
|
|
1885
|
-
}): Promise<LoadResultType>;
|
|
1886
|
-
|
|
1887
|
-
export declare function loadPbm(url: string, options?: {
|
|
1888
|
-
upAxis?: 'Y' | 'Z';
|
|
1889
|
-
light?: boolean;
|
|
1890
|
-
textureOptions?: TextureOptions;
|
|
1891
|
-
textureBaseUri?: string;
|
|
1892
|
-
textureArray?: string[];
|
|
1893
|
-
fetcher?: Fetcher;
|
|
1894
|
-
}): Promise<LoadResultType>;
|
|
1895
|
-
|
|
1896
|
-
export declare function loadPly<Type extends 'geometry' | 'line' | 'pbmMesh' | 'pbmPointCloud', ResultType = {
|
|
1897
|
-
'geometry': THREE_2.BufferGeometry;
|
|
1898
|
-
'line': THREE_2.Line<THREE_2.BufferGeometry>;
|
|
1899
|
-
'pbmMesh': PBMMesh;
|
|
1900
|
-
'pbmPointCloud': PBMPointCloud;
|
|
1901
|
-
}[Type]>(url: string, options?: {
|
|
1902
|
-
modelUpAxis?: 'Y' | 'Z';
|
|
1903
|
-
upAxis?: 'Y' | 'Z';
|
|
1904
|
-
light?: boolean;
|
|
1905
|
-
propertyNameMapping?: Record<string, string>;
|
|
1906
|
-
customPropertyMapping?: Record<string, {
|
|
1907
|
-
itemType: 'float32' | 'uint32' | 'int32' | 'uint16' | 'int16' | 'uint8' | 'int8';
|
|
1908
|
-
itemNames: string[];
|
|
1909
|
-
normalized?: boolean;
|
|
1910
|
-
}>;
|
|
1911
|
-
type?: Type;
|
|
1912
|
-
fetcher?: Fetcher;
|
|
1913
|
-
}): Promise<LoadResultType<ResultType>>;
|
|
1914
|
-
|
|
1915
|
-
export declare function loadPnts(url: string, options?: {
|
|
1916
|
-
upAxis?: 'Y' | 'Z';
|
|
1917
|
-
fetcher?: Fetcher;
|
|
1918
|
-
computeBoundingBox?: boolean;
|
|
1919
|
-
}): Promise<LoadResultType>;
|
|
1920
|
-
|
|
1921
|
-
export declare type LoadResultType<Scene = THREE_2.Object3D> = {
|
|
1922
|
-
type: 'unknown' | 'b3dm' | 'pnts' | 'at3d' | 'pbm' | 'dome' | 'domez' | 'gltf' | 'ply' | 'obj' | 'fbx' | 'x3p' | 'spz' | 'splat';
|
|
1923
|
-
modelUpAxis: 'Y' | 'Z';
|
|
1924
|
-
upAxis: 'Y' | 'Z';
|
|
1925
|
-
byteLength: number;
|
|
1926
|
-
memoryUsage: number;
|
|
1927
|
-
uri: string;
|
|
1928
|
-
scene: Scene;
|
|
1929
|
-
textures: THREE_2.Texture[];
|
|
1930
|
-
animations: THREE_2.AnimationClip[];
|
|
1931
|
-
rtcCenter?: THREE_2.Vector3;
|
|
1932
|
-
dispose: () => void;
|
|
1933
|
-
};
|
|
1934
|
-
|
|
1935
|
-
export declare function loadSplat(url: string, options?: {
|
|
1936
|
-
modelUpAxis?: 'Y' | 'Z';
|
|
1937
|
-
upAxis?: 'Y' | 'Z';
|
|
1938
|
-
fetcher?: Fetcher;
|
|
1939
|
-
}): Promise<LoadResultType>;
|
|
1940
|
-
|
|
1941
|
-
export declare function loadSpz(url: string, options?: {
|
|
1942
|
-
modelUpAxis?: 'Y' | 'Z';
|
|
1943
|
-
upAxis?: 'Y' | 'Z';
|
|
1944
|
-
fetcher?: Fetcher;
|
|
1945
|
-
}): Promise<LoadResultType>;
|
|
1946
|
-
|
|
1947
|
-
export declare function loadX3p(url: string, options?: {
|
|
1948
|
-
upAxis?: 'Y' | 'Z';
|
|
1949
|
-
color?: THREE_2.Color;
|
|
1950
|
-
light?: boolean;
|
|
1951
|
-
fetcher?: Fetcher;
|
|
1952
|
-
}): Promise<LoadResultType>;
|
|
1953
|
-
|
|
1954
|
-
/**
|
|
1955
|
-
* 通过经度计算 Heading, Heading 是个古老的参数,新的工程中请不要使用了
|
|
1956
|
-
*
|
|
1957
|
-
* @deprecated
|
|
1958
|
-
* 不再使用 heading 这种计算方式。
|
|
1959
|
-
*
|
|
1960
|
-
* @param longitude - 经度
|
|
1961
|
-
*/
|
|
1962
|
-
export declare function longitudeToHeading(longitude: number): number;
|
|
1963
|
-
|
|
1964
|
-
export declare interface LoosePanoWork {
|
|
1965
|
-
name?: string;
|
|
1966
|
-
code?: string;
|
|
1967
|
-
up: string;
|
|
1968
|
-
down: string;
|
|
1969
|
-
right: string;
|
|
1970
|
-
left: string;
|
|
1971
|
-
front: string;
|
|
1972
|
-
back: string;
|
|
1973
|
-
size: number;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
export declare interface LooseWork {
|
|
1977
|
-
work_code?: string;
|
|
1978
|
-
code?: string;
|
|
1979
|
-
resource_code?: string;
|
|
1980
|
-
basic_code?: string;
|
|
1981
|
-
vr_code?: string;
|
|
1982
|
-
workCode?: string;
|
|
1983
|
-
project_id?: string;
|
|
1984
|
-
name?: string;
|
|
1985
|
-
modelAsync?: boolean;
|
|
1986
|
-
initial?: LooseWorkInitial;
|
|
1987
|
-
base_url?: string;
|
|
1988
|
-
model?: LooseWorkModel;
|
|
1989
|
-
panorama?: {
|
|
1990
|
-
base_url?: string;
|
|
1991
|
-
pano_high_cube_base_url?: string;
|
|
1992
|
-
pano_cube_base_url?: string;
|
|
1993
|
-
pattern?: LooseWorkPanorama;
|
|
1994
|
-
info?: LooseWorkPanorama[];
|
|
1995
|
-
list?: LooseWorkPanorama[];
|
|
1996
|
-
};
|
|
1997
|
-
observers?: LooseWorkObserver[];
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
export declare interface LooseWorkInitial {
|
|
2001
|
-
mode?: string;
|
|
2002
|
-
pano_index?: number;
|
|
2003
|
-
panoIndex?: number;
|
|
2004
|
-
pano?: number;
|
|
2005
|
-
longitude?: number;
|
|
2006
|
-
latitude?: number;
|
|
2007
|
-
fov?: number;
|
|
2008
|
-
distance?: number;
|
|
2009
|
-
offset?: number[] | {
|
|
2010
|
-
x: number;
|
|
2011
|
-
y: number;
|
|
2012
|
-
z: number;
|
|
2013
|
-
};
|
|
2014
|
-
heading?: number;
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
export declare interface LooseWorkModel {
|
|
2018
|
-
file_url?: string;
|
|
2019
|
-
material_textures?: string[];
|
|
2020
|
-
material_base_url?: string;
|
|
2021
|
-
up_axis?: string;
|
|
2022
|
-
coordinate?: NonNullable<TilesetHeader['rootMeta']>['coordinate'];
|
|
2023
|
-
tiles?: {
|
|
2024
|
-
type?: 'point_cloud' | 'mesh' | string;
|
|
2025
|
-
name?: string;
|
|
2026
|
-
up_axis?: string;
|
|
2027
|
-
tileset_url: string;
|
|
2028
|
-
};
|
|
2029
|
-
layers?: [
|
|
2030
|
-
{
|
|
2031
|
-
type?: 'point_cloud' | 'mesh' | string;
|
|
2032
|
-
name?: string;
|
|
2033
|
-
up_axis?: string;
|
|
2034
|
-
tileset_url: string;
|
|
2035
|
-
}
|
|
2036
|
-
];
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
export declare interface LooseWorkObserver {
|
|
2040
|
-
active?: boolean;
|
|
2041
|
-
loadable?: boolean;
|
|
2042
|
-
index?: number;
|
|
2043
|
-
visible_nodes?: number[];
|
|
2044
|
-
visibleNodes?: number[];
|
|
2045
|
-
accessible_nodes?: number[];
|
|
2046
|
-
accessibleNodes?: number[];
|
|
2047
|
-
quaternion?: {
|
|
2048
|
-
y: number;
|
|
2049
|
-
x: number;
|
|
2050
|
-
z: number;
|
|
2051
|
-
w: number;
|
|
2052
|
-
};
|
|
2053
|
-
standing_position?: number[];
|
|
2054
|
-
standingPosition?: number[];
|
|
2055
|
-
position?: number[];
|
|
2056
|
-
floor?: number;
|
|
2057
|
-
floor_index?: number;
|
|
2058
|
-
floorIndex?: number;
|
|
2059
|
-
derived_id?: number;
|
|
2060
|
-
derived_id_str?: string;
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
export declare interface LooseWorkPanorama {
|
|
2064
|
-
active?: boolean;
|
|
2065
|
-
loadable?: boolean;
|
|
2066
|
-
index?: number;
|
|
2067
|
-
right?: string;
|
|
2068
|
-
left?: string;
|
|
2069
|
-
up?: string;
|
|
2070
|
-
down?: string;
|
|
2071
|
-
front?: string;
|
|
2072
|
-
back?: string;
|
|
2073
|
-
video?: LooseWorkVideo;
|
|
2074
|
-
tiles?: number[];
|
|
2075
|
-
size_list?: number[];
|
|
2076
|
-
derived_id?: number;
|
|
2077
|
-
derived_id_str?: string;
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
export declare interface LooseWorkVideo {
|
|
2081
|
-
source: string;
|
|
2082
|
-
matrix: number[];
|
|
2083
|
-
size: number[];
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
export declare interface LooseWorkWithExtrinsics extends ParseOptions {
|
|
2087
|
-
/** work 数据 */
|
|
2088
|
-
work: LooseWork;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
export declare function makeBoundingVolume(header: BoundingVolumeJson | BoundingVolume): BoundingVolume;
|
|
2092
|
-
|
|
2093
|
-
export declare interface MapviewControllerCustomInitArgs {
|
|
2094
|
-
/** 默认水平角 */
|
|
2095
|
-
defaultLongitude?: number;
|
|
2096
|
-
/** 默认俯仰角 */
|
|
2097
|
-
defaultLatitude?: number;
|
|
2098
|
-
/** 默认相机距离 */
|
|
2099
|
-
defaultDistance?: number;
|
|
2100
|
-
/** 最大俯仰角 */
|
|
2101
|
-
maxLatitude?: number | ((fov: number) => number);
|
|
2102
|
-
/** 最小俯仰角 */
|
|
2103
|
-
minLatitude?: number | ((fov: number) => number);
|
|
2104
|
-
/**
|
|
2105
|
-
* 相机类型
|
|
2106
|
-
* perspective 透视相机
|
|
2107
|
-
* orthographic 正交相机
|
|
2108
|
-
* auto 在俯视为正交相机, 斜视为透视相机(默认)
|
|
2109
|
-
*/
|
|
2110
|
-
cameraType?: "perspective" | "orthographic" | "auto";
|
|
2111
|
-
/**
|
|
2112
|
-
* 相机电子围栏
|
|
2113
|
-
*/
|
|
2114
|
-
cameraFence?: THREE_2.Box3 | THREE_2.Sphere | null;
|
|
2115
|
-
/** 鼠标焦点环自定义创建器 */
|
|
2116
|
-
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
/**
|
|
2120
|
-
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
2121
|
-
* - **Panorama**: 全景图游走模式
|
|
2122
|
-
* - **Model**: 模型游走模式
|
|
2123
|
-
* - **Floorplan**: 模型查看模式
|
|
2124
|
-
* - **Topview**: 户型图模式
|
|
2125
|
-
* - **Mapview**: 地图模式
|
|
2126
|
-
* - **VRPanorama**: VR眼镜模式
|
|
2127
|
-
*/
|
|
2128
|
-
export declare type Mode =
|
|
2129
|
-
/** 模型查看模式 */
|
|
2130
|
-
"Floorplan" |
|
|
2131
|
-
/** 户型图模式 */
|
|
2132
|
-
"Topview" |
|
|
2133
|
-
/** 地图模式 */
|
|
2134
|
-
"Mapview" |
|
|
2135
|
-
/** 全景图游走模式 */
|
|
2136
|
-
"Panorama" |
|
|
2137
|
-
/** VR眼镜模式 */
|
|
2138
|
-
"VRPanorama" |
|
|
2139
|
-
/** 模型游走模式 */
|
|
2140
|
-
"Model" |
|
|
2141
|
-
/** XR眼镜模式*/
|
|
2142
|
-
"XRPanorama";
|
|
2143
|
-
|
|
2144
|
-
export declare interface ModeChangeEvent extends StateEvent {
|
|
2145
|
-
prevMode: Mode;
|
|
2146
|
-
mode: Mode;
|
|
2147
|
-
}
|
|
2148
|
-
|
|
2149
|
-
export declare interface Model {
|
|
2150
|
-
dispatchEvent(event: {
|
|
2151
|
-
type: 'error';
|
|
2152
|
-
error: Error;
|
|
2153
|
-
}): void;
|
|
2154
|
-
dispatchEvent(event: {
|
|
2155
|
-
type: 'load';
|
|
2156
|
-
}): void;
|
|
2157
|
-
dispatchEvent(event: {
|
|
2158
|
-
type: 'dispose';
|
|
2159
|
-
}): void;
|
|
2160
|
-
dispatchEvent(event: {
|
|
2161
|
-
type: 'shownFloorChange';
|
|
2162
|
-
floorIndex: number | null;
|
|
2163
|
-
}): void;
|
|
2164
|
-
dispatchEvent(event: {
|
|
2165
|
-
type: string;
|
|
2166
|
-
[attachment: string]: any;
|
|
2167
|
-
}): void;
|
|
2168
|
-
addEventListener(type: 'error', listener: (event: THREE_2.Event & {
|
|
2169
|
-
type: 'error';
|
|
2170
|
-
error: Error;
|
|
2171
|
-
}) => void): void;
|
|
2172
|
-
addEventListener(type: 'load', listener: (event: THREE_2.Event & {
|
|
2173
|
-
type: 'load';
|
|
2174
|
-
}) => void): void;
|
|
2175
|
-
addEventListener(type: 'dispose', listener: (event: THREE_2.Event & {
|
|
2176
|
-
type: 'dispose';
|
|
2177
|
-
}) => void): void;
|
|
2178
|
-
addEventListener(type: 'changeShownFloor', listener: (event: THREE_2.Event & {
|
|
2179
|
-
type: 'changeShownFloor';
|
|
2180
|
-
floorIndex: number | null;
|
|
2181
|
-
}) => void): void;
|
|
2182
|
-
addEventListener(type: string, listener: (event: THREE_2.Event) => void): void;
|
|
2183
|
-
removeEventListener(type: 'error', listener: (event: THREE_2.Event & {
|
|
2184
|
-
type: 'error';
|
|
2185
|
-
error: Error;
|
|
2186
|
-
}) => void): void;
|
|
2187
|
-
removeEventListener(type: 'load', listener: (event: THREE_2.Event & {
|
|
2188
|
-
type: 'load';
|
|
2189
|
-
}) => void): void;
|
|
2190
|
-
removeEventListener(type: 'dispose', listener: (event: THREE_2.Event & {
|
|
2191
|
-
type: 'dispose';
|
|
2192
|
-
}) => void): void;
|
|
2193
|
-
removeEventListener(type: 'changeShownFloor', listener: (event: THREE_2.Event & {
|
|
2194
|
-
type: 'changeShownFloor';
|
|
2195
|
-
floorIndex: number | null;
|
|
2196
|
-
}) => void): void;
|
|
2197
|
-
removeEventListener(type: string, listener: (event: THREE_2.Event) => void): void;
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
/**
|
|
2201
|
-
* Five 模型
|
|
2202
|
-
* @description
|
|
2203
|
-
* 通过 work 数据加载, 适配 at3d、pbm、dome、domez 格式的文件
|
|
2204
|
-
* 可以通过 jsonp 解析 base64 的 dataURL 内容,
|
|
2205
|
-
* 需要满足 your/path/filename.at3d.json_xxxxxx,
|
|
2206
|
-
* 通过 json_xxxxxx(<dataURL>) 方式返回。
|
|
2207
|
-
*/
|
|
2208
|
-
export declare class Model extends THREE_2.Object3D {
|
|
2209
|
-
fiveId: string;
|
|
2210
|
-
parent: ModelScene | null;
|
|
2211
|
-
needsRender: boolean;
|
|
2212
|
-
children: ViewLayer[];
|
|
2213
|
-
add: (...object: ViewLayer[]) => this;
|
|
2214
|
-
private disposed;
|
|
2215
|
-
parameter: Parameter;
|
|
2216
|
-
/** work */
|
|
2217
|
-
work: Work;
|
|
2218
|
-
/** 是否过期 */
|
|
2219
|
-
outdated: boolean;
|
|
2220
|
-
/** 是否自动细化 */
|
|
2221
|
-
autoRefine: boolean;
|
|
2222
|
-
/** 是否在加载元信息 */
|
|
2223
|
-
metaPending: boolean;
|
|
2224
|
-
/** 模型已经加载 */
|
|
2225
|
-
loaded: boolean;
|
|
2226
|
-
/** 模型是否已经细化 */
|
|
2227
|
-
refined: boolean;
|
|
2228
|
-
/** 模型细化进度 */
|
|
2229
|
-
refineProgress: [number, number];
|
|
2230
|
-
/** 初始化完成 */
|
|
2231
|
-
initReady: Promise<Model>;
|
|
2232
|
-
/** 初次加载完成 */
|
|
2233
|
-
loadedReady: Promise<Model>;
|
|
2234
|
-
/** 外接盒子的大小 */
|
|
2235
|
-
boundingBox: THREE_2.Box3;
|
|
2236
|
-
/** 所有楼层 */
|
|
2237
|
-
floorLength: number;
|
|
2238
|
-
constructor(fiveId: string, work: Work, options?: {
|
|
2239
|
-
light?: boolean;
|
|
2240
|
-
textureOptions?: TextureOptions;
|
|
2241
|
-
});
|
|
2242
|
-
/** 析构函数 一旦析构,则不能使用 */
|
|
2243
|
-
dispose(): void;
|
|
2244
|
-
/** 模型内容是否为空 */
|
|
2245
|
-
get empty(): boolean;
|
|
2246
|
-
/** 模型的不同图层 */
|
|
2247
|
-
get viewLayers(): ViewLayer[];
|
|
2248
|
-
/**
|
|
2249
|
-
* 获取模型边界线
|
|
2250
|
-
* @param sphere - 获取区域
|
|
2251
|
-
* @param threshold - 面片间夹角阈值
|
|
2252
|
-
* @returns 所有模型边界线
|
|
2253
|
-
*/
|
|
2254
|
-
getEdgesBySphere(sphere: THREE_2.Sphere, threshold?: number): THREE_2.Line3[];
|
|
2255
|
-
/**
|
|
2256
|
-
* 计算模型射线碰撞检测
|
|
2257
|
-
* @param raycaster - THREE 射线对象
|
|
2258
|
-
* @param target - 返回碰撞
|
|
2259
|
-
* @returns 返回碰撞
|
|
2260
|
-
*/
|
|
2261
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
2262
|
-
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene): boolean;
|
|
2263
|
-
localToEnu(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
2264
|
-
enuToLocal(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
2265
|
-
worldToEnu(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
2266
|
-
enuToWorld(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
2267
|
-
/**
|
|
2268
|
-
* 当前显示的楼层
|
|
2269
|
-
*/
|
|
2270
|
-
get shownFloor(): number | null;
|
|
2271
|
-
set shownFloor(floor: number | null);
|
|
2272
|
-
/**
|
|
2273
|
-
* 显示某楼层
|
|
2274
|
-
* @example
|
|
2275
|
-
* ```
|
|
2276
|
-
* model.show() //显示全部楼层
|
|
2277
|
-
* model.show(1) //显示第一楼层
|
|
2278
|
-
* ```
|
|
2279
|
-
*/
|
|
2280
|
-
show(floor?: number | null): void;
|
|
2281
|
-
/**
|
|
2282
|
-
* @deprecated
|
|
2283
|
-
* Use `.boundingBox` instead
|
|
2284
|
-
*/
|
|
2285
|
-
get bounding(): THREE_2.Box3;
|
|
2286
|
-
/**
|
|
2287
|
-
* @deprecated
|
|
2288
|
-
* Use `.parameter.set` instead
|
|
2289
|
-
*/
|
|
2290
|
-
setMaterial(parameter: Partial<ParameterValue>): void;
|
|
2291
|
-
/**
|
|
2292
|
-
* @deprecated
|
|
2293
|
-
* Use `.parameter.get` instead
|
|
2294
|
-
*/
|
|
2295
|
-
getMaterial(): ParameterValue;
|
|
2296
|
-
/**
|
|
2297
|
-
* @deprecated
|
|
2298
|
-
* Use `.parameter.shownFloorIndex` `.parameter.set('brightness', brightness)` instead
|
|
2299
|
-
*/
|
|
2300
|
-
get shownFloorIndex(): ParameterValue['shownFloorIndex'];
|
|
2301
|
-
set shownFloorIndex(floorIndex: ParameterValue['shownFloorIndex']);
|
|
2302
|
-
/**
|
|
2303
|
-
* @deprecated
|
|
2304
|
-
* Use `.parameter.brightness` `.parameter.set('brightness', brightness)` instead
|
|
2305
|
-
*/
|
|
2306
|
-
get brightness(): ParameterValue['brightness'];
|
|
2307
|
-
set brightness(brightness: ParameterValue['brightness']);
|
|
2308
|
-
/**
|
|
2309
|
-
* @deprecated
|
|
2310
|
-
* Use `.parameter.clippers` `.parameter.set('clippers', clippers)` instead
|
|
2311
|
-
*/
|
|
2312
|
-
get clippers(): ParameterValue['clippers'];
|
|
2313
|
-
set clippers(clippers: ParameterValue['clippers']);
|
|
2314
|
-
/**
|
|
2315
|
-
* @deprecated
|
|
2316
|
-
* Use `.parameter.customShaders` `.parameter.set('customShaders', customShaders)` instead
|
|
2317
|
-
*/
|
|
2318
|
-
get customShaders(): ParameterValue['customShaders'];
|
|
2319
|
-
set customShaders(customShaders: ParameterValue['customShaders']);
|
|
2320
|
-
/**
|
|
2321
|
-
* @deprecated
|
|
2322
|
-
* Use `.parameter.reset('brightness')` instead
|
|
2323
|
-
*/
|
|
2324
|
-
resetBrightness(): void;
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
export declare interface ModelControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2330
|
-
export declare interface ModelEvent extends BaseEvent {
|
|
2331
|
-
model: Model;
|
|
2332
|
-
work: Work;
|
|
2333
|
-
error: Error | null;
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
export declare interface ModelOptions {
|
|
2337
|
-
/** 模型是否感光 */
|
|
2338
|
-
light?: boolean;
|
|
2339
|
-
/** 模型 3d-tile 参数 */
|
|
2340
|
-
"3d-tiles"?: (Partial<ParameterTilesetValue> & {
|
|
2341
|
-
viewerRequestVolume?: BoundingVolume | BoundingVolumeJson;
|
|
2342
|
-
showLayers?: boolean | string[];
|
|
2343
|
-
}) | ((viewLayer: ViewLayer, model: Model) => void | (Partial<ParameterTilesetValue> & {
|
|
2344
|
-
viewerRequestVolume?: BoundingVolume | BoundingVolumeJson;
|
|
2345
|
-
showLayers?: boolean | string[];
|
|
2346
|
-
}));
|
|
2347
|
-
/**
|
|
2348
|
-
* 模型贴图的配置参数
|
|
2349
|
-
* @description
|
|
2350
|
-
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
2351
|
-
* 平衡加载时间和图片质量
|
|
2352
|
-
*/
|
|
2353
|
-
textureOptions?: TextureOptions;
|
|
2354
|
-
/** 强制显示模型,不等待加载完 */
|
|
2355
|
-
forceReplaceImmediately?: boolean;
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
export declare type Models = Model[] & {
|
|
2359
|
-
/**
|
|
2360
|
-
* @deprecated
|
|
2361
|
-
* use `modelScene.autoRefine` instead
|
|
2362
|
-
*/
|
|
2363
|
-
autoUpdate: boolean;
|
|
2364
|
-
/**
|
|
2365
|
-
* @deprecated
|
|
2366
|
-
* use `modelScene.boundingBox` instead
|
|
2367
|
-
*/
|
|
2368
|
-
bounding: THREE_2.Box3;
|
|
2369
|
-
/**
|
|
2370
|
-
* @deprecated
|
|
2371
|
-
* use `modelScene.loaded` instead
|
|
2372
|
-
*/
|
|
2373
|
-
loaded: boolean;
|
|
2374
|
-
/**
|
|
2375
|
-
* @deprecated
|
|
2376
|
-
* use `modelScene.refined` instead
|
|
2377
|
-
*/
|
|
2378
|
-
refined: boolean;
|
|
2379
|
-
/**
|
|
2380
|
-
* @deprecated
|
|
2381
|
-
* use `modelScene.refineProgress` instead
|
|
2382
|
-
*/
|
|
2383
|
-
refineProgress: [number, number];
|
|
2384
|
-
/**
|
|
2385
|
-
* @deprecated
|
|
2386
|
-
* use `modelScene.parameter.cacheCameras` `modelScene.parameter.set('cacheCameras', cacheCameras)` instead
|
|
2387
|
-
*/
|
|
2388
|
-
cacheCameras: readonly (THREE_2.PerspectiveCamera | Camera)[];
|
|
2389
|
-
/**
|
|
2390
|
-
* @deprecated
|
|
2391
|
-
* use `modelScene.intersectRaycaster` instead
|
|
2392
|
-
*/
|
|
2393
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster): Intersection[];
|
|
2394
|
-
/**
|
|
2395
|
-
* @deprecated
|
|
2396
|
-
* Use `.parameter.set` instead
|
|
2397
|
-
*/
|
|
2398
|
-
setMaterial(values: Partial<ParameterValue>): void;
|
|
2399
|
-
/**
|
|
2400
|
-
* @deprecated
|
|
2401
|
-
* Use `.parameter.get` instead
|
|
2402
|
-
*/
|
|
2403
|
-
getMaterial(): ParameterValue;
|
|
2404
|
-
/**
|
|
2405
|
-
* @deprecated
|
|
2406
|
-
* Use `.parameter.reset('brightness')` instead
|
|
2407
|
-
*/
|
|
2408
|
-
resetBrightness(): void;
|
|
2409
|
-
};
|
|
2410
|
-
|
|
2411
|
-
export declare interface ModelScene {
|
|
2412
|
-
dispatchEvent(event: {
|
|
2413
|
-
type: 'model.create';
|
|
2414
|
-
model: Model;
|
|
2415
|
-
}): void;
|
|
2416
|
-
dispatchEvent(event: {
|
|
2417
|
-
type: 'model.dispose';
|
|
2418
|
-
model: Model;
|
|
2419
|
-
}): void;
|
|
2420
|
-
dispatchEvent(event: {
|
|
2421
|
-
type: string;
|
|
2422
|
-
[attachment: string]: any;
|
|
2423
|
-
}): void;
|
|
2424
|
-
addEventListener(type: 'model.create', listener: (event: THREE_2.Event & {
|
|
2425
|
-
type: 'model.create';
|
|
2426
|
-
model: Model;
|
|
2427
|
-
}) => void): void;
|
|
2428
|
-
addEventListener(type: 'model.dispose', listener: (event: THREE_2.Event & {
|
|
2429
|
-
type: 'model.dispose';
|
|
2430
|
-
model: Model;
|
|
2431
|
-
}) => void): void;
|
|
2432
|
-
addEventListener(type: string, listener: (event: THREE_2.Event) => void): void;
|
|
2433
|
-
removeEventListener(type: 'model.create', listener: (event: THREE_2.Event & {
|
|
2434
|
-
type: 'model.create';
|
|
2435
|
-
model: Model;
|
|
2436
|
-
}) => void): void;
|
|
2437
|
-
removeEventListener(type: 'model.dispose', listener: (event: THREE_2.Event & {
|
|
2438
|
-
type: 'model.dispose';
|
|
2439
|
-
model: Model;
|
|
2440
|
-
}) => void): void;
|
|
2441
|
-
removeEventListener(type: string, listener: (event: THREE_2.Event) => void): void;
|
|
2442
|
-
}
|
|
2443
|
-
|
|
2444
|
-
export declare class ModelScene extends THREE_2.Scene {
|
|
2445
|
-
fiveId: string;
|
|
2446
|
-
needsRender: boolean;
|
|
2447
|
-
/** 自动细化 */
|
|
2448
|
-
autoRefine: boolean;
|
|
2449
|
-
/** 包围盒 */
|
|
2450
|
-
boundingBox: THREE_2.Box3;
|
|
2451
|
-
/** 包围盒 Mesh */
|
|
2452
|
-
boundingMesh: BoundingMesh;
|
|
2453
|
-
/** 加载完成 */
|
|
2454
|
-
loaded: boolean;
|
|
2455
|
-
/** 细化完成 */
|
|
2456
|
-
refined: boolean;
|
|
2457
|
-
/** 细化进度 */
|
|
2458
|
-
refineProgress: [number, number];
|
|
2459
|
-
/** 参数 */
|
|
2460
|
-
parameter: Parameter;
|
|
2461
|
-
/** 模型列表 */
|
|
2462
|
-
readonly models: Models;
|
|
2463
|
-
private readonly shownModels;
|
|
2464
|
-
private updateModelMap;
|
|
2465
|
-
constructor(options: {
|
|
2466
|
-
fiveId: string;
|
|
2467
|
-
});
|
|
2468
|
-
setModels(works: Works, options: ModelOptions): Model[];
|
|
2469
|
-
get empty(): boolean;
|
|
2470
|
-
/**
|
|
2471
|
-
* 计算模型射线碰撞检测
|
|
2472
|
-
* @param raycaster - THREE 射线对象
|
|
2473
|
-
* @param target - 返回碰撞点
|
|
2474
|
-
* @returns 返回碰撞点
|
|
2475
|
-
*/
|
|
2476
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
2477
|
-
update(renderer: THREE_2.WebGLRenderer, camera: Camera): boolean;
|
|
2478
|
-
/**
|
|
2479
|
-
* @deprecated
|
|
2480
|
-
* Use `.boundingBox` instead
|
|
2481
|
-
*/
|
|
2482
|
-
get bounding(): THREE_2.Box3;
|
|
2483
|
-
/**
|
|
2484
|
-
* @deprecated
|
|
2485
|
-
* Use `.parameter.set` instead
|
|
2486
|
-
*/
|
|
2487
|
-
setMaterial(parameter: Partial<ParameterValue>): void;
|
|
2488
|
-
/**
|
|
2489
|
-
* @deprecated
|
|
2490
|
-
* Use `.parameter.get` instead
|
|
2491
|
-
*/
|
|
2492
|
-
getMaterial(): ParameterValue;
|
|
2493
|
-
/**
|
|
2494
|
-
* @deprecated
|
|
2495
|
-
* Use `.parameter.reset('brightness')` instead
|
|
2496
|
-
*/
|
|
2497
|
-
resetBrightness(): void;
|
|
2498
|
-
dispose(): void;
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
export declare interface ModelSceneEvent extends BaseEvent {
|
|
2502
|
-
modelScene: ModelScene;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
export declare class Motion<K extends string> {
|
|
2506
|
-
config: MotionConfig<K>;
|
|
2507
|
-
value: MotionValue<K>;
|
|
2508
|
-
progress: number;
|
|
2509
|
-
ended: boolean;
|
|
2510
|
-
startTime: number;
|
|
2511
|
-
startVelocity: number;
|
|
2512
|
-
duration: number;
|
|
2513
|
-
keyframes: MotionKeyframe<K>[];
|
|
2514
|
-
private callbacks?;
|
|
2515
|
-
constructor(initalValue: MotionInitalValue<K>);
|
|
2516
|
-
private getProgress;
|
|
2517
|
-
private getValue;
|
|
2518
|
-
getProgressVelocity(time: number): number;
|
|
2519
|
-
update(time: number): boolean;
|
|
2520
|
-
getKeyFrameSegment(time: number): [MotionKeyframe<K>, MotionKeyframe<K>];
|
|
2521
|
-
getTargetKeyframe(): MotionKeyframe<K>;
|
|
2522
|
-
set(value: Partial<MotionValue<K>>, duration: number, startProgressVelocity?: number, time?: number): Promise<void>;
|
|
2523
|
-
setKeyframes(keyframes: MotionKeyframe<K>[], duration: number, startProgressVelocity?: number, time?: number): Promise<void>;
|
|
2524
|
-
dispose(): void;
|
|
2525
|
-
}
|
|
2526
|
-
|
|
2527
|
-
/** 是否是循环变化,比如 [0, 2 * Math.PI], 前闭后开 */
|
|
2528
|
-
export declare type MotionCircle = [number, number];
|
|
2529
|
-
|
|
2530
|
-
export declare type MotionConfig<K extends string> = Record<K, {
|
|
2531
|
-
circle: MotionCircle | false;
|
|
2532
|
-
}>;
|
|
2533
|
-
|
|
2534
|
-
export declare type MotionInitalValue<K extends string> = Record<K, MotionValue<K>[K] | ({
|
|
2535
|
-
value: MotionValue<K>[K];
|
|
2536
|
-
} & MotionConfig<K>[K])>;
|
|
2537
|
-
|
|
2538
|
-
export declare interface MotionKeyframe<K extends string> {
|
|
2539
|
-
progress: number;
|
|
2540
|
-
value: MotionValue<K>;
|
|
2541
|
-
key?: string;
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
export declare type MotionValue<K extends string> = Record<K, number>;
|
|
2545
|
-
|
|
2546
|
-
/**
|
|
2547
|
-
* 动画模式
|
|
2548
|
-
* @description
|
|
2549
|
-
* - `fly` 通过相机移动方式变化
|
|
2550
|
-
* - `instant` 直接变化
|
|
2551
|
-
* - `fade` 通过渐变方式变化
|
|
2552
|
-
* - `montage` 通过渐变穿插到黑屏方式变化
|
|
2553
|
-
* - `spread` 通过扩散方式变化
|
|
2554
|
-
* - `zoomin` 通过放大变化
|
|
2555
|
-
* - `zoomout` 通过缩小变化
|
|
2556
|
-
* - `model` 通过过度到模型
|
|
2557
|
-
*/
|
|
2558
|
-
export declare type MovePanoEffect = "fly" | "instant" | "fade" | "montage" | "spread" | "zoomin" | "zoomout" | "model";
|
|
2559
|
-
|
|
2560
|
-
/**
|
|
2561
|
-
* 点位移动参数
|
|
2562
|
-
*/
|
|
2563
|
-
export declare interface MovePanoOptions extends Partial<Omit<State, "offset" | 'distance' | 'mode'>> {
|
|
2564
|
-
/**
|
|
2565
|
-
* 动画模式
|
|
2566
|
-
*/
|
|
2567
|
-
effect?: MovePanoEffect;
|
|
2568
|
-
/** 走点图片过度策略 */
|
|
2569
|
-
effectEasing?: (progress: number) => number;
|
|
2570
|
-
/**
|
|
2571
|
-
* 运动耗时
|
|
2572
|
-
* @description
|
|
2573
|
-
* - `数字或者字符串类型` 直接当作运动耗时
|
|
2574
|
-
* - `函数类型` 传入 距离和速度(速度为five初始化设置) 返回运动耗时
|
|
2575
|
-
* - `不传或者null` 通过距离和速度(速度为five初始化设置)
|
|
2576
|
-
*/
|
|
2577
|
-
duration?: number | ((distance: number, speed: number) => number) | string | null;
|
|
2578
|
-
/** 运动开始回调 */
|
|
2579
|
-
moveStartCallback?: (toState: State) => void;
|
|
2580
|
-
/** 运动结束回调 */
|
|
2581
|
-
moveEndCallback?: (state: State) => void;
|
|
2582
|
-
/**
|
|
2583
|
-
* 运动被取消回调
|
|
2584
|
-
* @description
|
|
2585
|
-
* 这个有一些情况会导致
|
|
2586
|
-
* - 移动过程中切换模态
|
|
2587
|
-
* - 移动过程中 five 被析构
|
|
2588
|
-
* - 移动过程点击切换到另一个点位
|
|
2589
|
-
*/
|
|
2590
|
-
moveCancelCallback?: () => void;
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
export declare class NetworkAbortError extends Error {
|
|
2594
|
-
constructor(source: string, type: NetworkType);
|
|
2595
|
-
}
|
|
2596
|
-
|
|
2597
|
-
export declare type NetworkError = NetworkResponseError | NetworkAbortError | NetworkTimeoutError | NetworkFirbiddenError;
|
|
2598
|
-
|
|
2599
|
-
export declare type NetworkErrorCallback = (error: NetworkError) => void;
|
|
2600
|
-
|
|
2601
|
-
export declare class NetworkFirbiddenError extends Error {
|
|
2602
|
-
constructor(source: string, type: NetworkType, reason: string);
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
export declare type NetWorkMeta = {
|
|
2606
|
-
origin: string;
|
|
2607
|
-
source: string;
|
|
2608
|
-
headers: {
|
|
2609
|
-
[name: string]: string;
|
|
2610
|
-
};
|
|
2611
|
-
requestTime: number;
|
|
2612
|
-
responseTime: number;
|
|
2613
|
-
costs: number;
|
|
2614
|
-
size?: number;
|
|
2615
|
-
};
|
|
2616
|
-
|
|
2617
|
-
export declare interface NetworkOptions {
|
|
2618
|
-
/** 超时时间 */
|
|
2619
|
-
timeout?: number;
|
|
2620
|
-
/** 请求代理 */
|
|
2621
|
-
requestProxy?: (url: string) => string | Promise<string>;
|
|
2622
|
-
/** 网络消息追踪 */
|
|
2623
|
-
networkSubscribe?: NetworkSubscribe;
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
|
-
export declare type NetworkProgressCallback = (percent: number) => void;
|
|
2627
|
-
|
|
2628
|
-
export declare class NetworkProxyError extends Error {
|
|
2629
|
-
constructor(source: string, type: NetworkType, reason: string);
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
export declare interface NetworkResourceEvent extends BaseEvent {
|
|
2633
|
-
source: string;
|
|
2634
|
-
requestType: NetworkType;
|
|
2635
|
-
requestState: NetworkState;
|
|
2636
|
-
detail: string;
|
|
2637
|
-
}
|
|
2638
|
-
|
|
2639
|
-
export declare type NetworkResponse<T = any, E extends NetWorkMeta | NetWorkMeta[] = NetWorkMeta> = {
|
|
2640
|
-
body: T;
|
|
2641
|
-
meta: E;
|
|
2642
|
-
};
|
|
2643
|
-
|
|
2644
|
-
export declare class NetworkResponseError extends Error {
|
|
2645
|
-
httpStatus: number;
|
|
2646
|
-
constructor(source: string, type: NetworkType, status: number);
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
export declare type NetworkState = "ok" | "preload" | "error" | "timeout" | "forbidden";
|
|
2650
|
-
|
|
2651
|
-
export declare class NetworkSubscribe extends Subscribe<{
|
|
2652
|
-
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
2653
|
-
}> {
|
|
2654
|
-
}
|
|
2655
|
-
|
|
2656
|
-
export declare type NetworkSuccessCallback<T = any> = (response: NetworkResponse<T>) => void;
|
|
2657
|
-
|
|
2658
|
-
export declare class NetworkTimeoutError extends Error {
|
|
2659
|
-
constructor(source: string, type: NetworkType, timeout: number);
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
export declare type NetworkType = "XMLHttpRequest" | "Image" | "Link";
|
|
2663
|
-
|
|
2664
|
-
export declare interface ObjectEvent extends BaseEvent {
|
|
2665
|
-
object: THREE_2.Object3D;
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2668
|
-
export declare type Pano = {
|
|
2669
|
-
workCode: string;
|
|
2670
|
-
panoIndex: number;
|
|
2671
|
-
};
|
|
2672
|
-
|
|
2673
|
-
export declare class PanoCircleMesh extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
2674
|
-
needsRender: boolean;
|
|
2675
|
-
private currentStartTime;
|
|
2676
|
-
private currentMotion;
|
|
2677
|
-
private ringMotion;
|
|
2678
|
-
private tapMotion;
|
|
2679
|
-
private loadingOpacityMotion;
|
|
2680
|
-
private progressMotion;
|
|
2681
|
-
private progressOpacityMotion;
|
|
2682
|
-
private opacityMotion;
|
|
2683
|
-
private disableMotion;
|
|
2684
|
-
progress: number;
|
|
2685
|
-
opacity: number;
|
|
2686
|
-
current: boolean;
|
|
2687
|
-
loading: boolean;
|
|
2688
|
-
disabled: boolean;
|
|
2689
|
-
private panoMesh;
|
|
2690
|
-
constructor(options?: PanoCircleMeshOptions);
|
|
2691
|
-
setProgress(progress: number): void;
|
|
2692
|
-
setOpacity(opacity: number): void;
|
|
2693
|
-
setCurrent(current: boolean): void;
|
|
2694
|
-
setLoading(loading: boolean): void;
|
|
2695
|
-
setDisabled(disabled: boolean): void;
|
|
2696
|
-
tap(): Promise<void>;
|
|
2697
|
-
updateTime(time: number, deltaTime: number): void;
|
|
2698
|
-
dispose(): void;
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
export declare class PanoCircleMeshCustom extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
2702
|
-
needsRender: boolean;
|
|
2703
|
-
private currentStartTime;
|
|
2704
|
-
private currentMotion;
|
|
2705
|
-
private tapMotion;
|
|
2706
|
-
private loadingOpacityMotion;
|
|
2707
|
-
private progressMotion;
|
|
2708
|
-
private progressOpacityMotion;
|
|
2709
|
-
private opacityMotion;
|
|
2710
|
-
private disableMotion;
|
|
2711
|
-
progress: number;
|
|
2712
|
-
opacity: number;
|
|
2713
|
-
current: boolean;
|
|
2714
|
-
loading: boolean;
|
|
2715
|
-
disabled: boolean;
|
|
2716
|
-
private panoMesh;
|
|
2717
|
-
constructor(options?: PanoCircleMeshCustomOptions);
|
|
2718
|
-
setProgress(progress: number): void;
|
|
2719
|
-
setOpacity(opacity: number): void;
|
|
2720
|
-
setCurrent(current: boolean): void;
|
|
2721
|
-
setLoading(loading: boolean): void;
|
|
2722
|
-
setDisabled(disabled: boolean): void;
|
|
2723
|
-
tap(): Promise<void>;
|
|
2724
|
-
updateTime(time: number, deltaTime: number): void;
|
|
2725
|
-
dispose(): void;
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
export declare interface PanoCircleMeshCustomOptions {
|
|
2729
|
-
scale?: number;
|
|
2730
|
-
color?: number;
|
|
2731
|
-
map?: THREE_2.Texture;
|
|
2732
|
-
mapAlpha?: number;
|
|
2733
|
-
borderWidth?: number;
|
|
2734
|
-
borderColor?: number;
|
|
2735
|
-
mapUseColor?: boolean;
|
|
2736
|
-
mapUseReverse?: boolean;
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
/**
|
|
2740
|
-
* 地面提示点位接口
|
|
2741
|
-
*
|
|
2742
|
-
* 点位状态
|
|
2743
|
-
* 1. 默认状态: 无任何操作的情况
|
|
2744
|
-
* 2. 高亮状态: 高亮,认为是合适的下一个点位,或者设备选中了某个点位
|
|
2745
|
-
* 3. 进度状态: 点位加载中,存在进度的情况
|
|
2746
|
-
* 4. 加载状态: 点位加载中,不存在进度的情况
|
|
2747
|
-
* 5. 不可用状态:点位不可用,存在点位,但是点位是个摆设
|
|
2748
|
-
* 6. 点击动画: 点位被选择,触发全景图切换
|
|
2749
|
-
* 7. 透明度改变: 一般会处理为近的点位透明度高,远的点位透明度低
|
|
2750
|
-
*/
|
|
2751
|
-
export declare interface PanoCircleMeshInterface extends THREE_2.Object3D {
|
|
2752
|
-
needsRender: boolean;
|
|
2753
|
-
hitTestMesh?: THREE_2.Mesh;
|
|
2754
|
-
/** 当前高亮 */
|
|
2755
|
-
current: boolean;
|
|
2756
|
-
/** 是否当前高亮 */
|
|
2757
|
-
setCurrent(current: boolean): void;
|
|
2758
|
-
loading: boolean;
|
|
2759
|
-
setLoading(loading: boolean): void;
|
|
2760
|
-
disabled: boolean;
|
|
2761
|
-
setDisabled(disabled: boolean): void;
|
|
2762
|
-
progress: number;
|
|
2763
|
-
setProgress(progress: number): void;
|
|
2764
|
-
opacity: number;
|
|
2765
|
-
setOpacity(opacity: number): void;
|
|
2766
|
-
updateTime?(time: number, deltaTime: number): void;
|
|
2767
|
-
/** 点击交互 */
|
|
2768
|
-
tap?(): Promise<void>;
|
|
2769
|
-
dispose(): void;
|
|
2770
|
-
}
|
|
2771
|
-
|
|
2772
|
-
export declare interface PanoCircleMeshOptions {
|
|
2773
|
-
scale?: number;
|
|
2774
|
-
color?: number;
|
|
2775
|
-
}
|
|
2776
|
-
|
|
2777
|
-
export declare class PanoCircleMeshSolid extends THREE_2.Object3D implements PanoCircleMeshInterface {
|
|
2778
|
-
needsRender: boolean;
|
|
2779
|
-
private currentStartTime;
|
|
2780
|
-
private currentMotion;
|
|
2781
|
-
private tapMotion;
|
|
2782
|
-
private loadingOpacityMotion;
|
|
2783
|
-
private progressMotion;
|
|
2784
|
-
private progressOpacityMotion;
|
|
2785
|
-
private opacityMotion;
|
|
2786
|
-
private disableMotion;
|
|
2787
|
-
progress: number;
|
|
2788
|
-
opacity: number;
|
|
2789
|
-
current: boolean;
|
|
2790
|
-
loading: boolean;
|
|
2791
|
-
disabled: boolean;
|
|
2792
|
-
private panoMesh;
|
|
2793
|
-
constructor(options?: PanoCircleMeshSolidOptions);
|
|
2794
|
-
setProgress(progress: number): void;
|
|
2795
|
-
setOpacity(opacity: number): void;
|
|
2796
|
-
setCurrent(current: boolean): void;
|
|
2797
|
-
setLoading(loading: boolean): void;
|
|
2798
|
-
setDisabled(disabled: boolean): void;
|
|
2799
|
-
tap(): Promise<void>;
|
|
2800
|
-
updateTime(time: number, deltaTime: number): void;
|
|
2801
|
-
dispose(): void;
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
export declare interface PanoCircleMeshSolidOptions {
|
|
2805
|
-
scale?: number;
|
|
2806
|
-
color?: number;
|
|
2807
|
-
}
|
|
2808
|
-
|
|
2809
|
-
export declare function panoEqual(a: Pano, b: Pano): boolean;
|
|
2810
|
-
|
|
2811
|
-
export declare interface PanoEvent extends StateEvent {
|
|
2812
|
-
prevPano: Pano;
|
|
2813
|
-
progress: number;
|
|
2814
|
-
options: MovePanoOptions;
|
|
2815
|
-
error: Error | null;
|
|
2816
|
-
}
|
|
2817
|
-
|
|
2818
|
-
export declare type PanoId = `${Pano['workCode']}[${number}]`;
|
|
2819
|
-
|
|
2820
|
-
export declare function panoParse(panoId: PanoId): Pano;
|
|
2821
|
-
|
|
2822
|
-
export declare interface PanoramaControllerCustomInitArgs extends PanoramaLikeControllerCustomInitArgs {
|
|
2823
|
-
/** 最远可移动观察点距离 */
|
|
2824
|
-
maxAccessibleDistance?: number;
|
|
2825
|
-
/**
|
|
2826
|
-
* 点击地面观察点标识的判定范围
|
|
2827
|
-
* @description
|
|
2828
|
-
* 如果在判定范围内则确定去到目标点,
|
|
2829
|
-
* 否则寻找点击位置方向最适合的点(可能会走到一个离相机更近的点)。
|
|
2830
|
-
*/
|
|
2831
|
-
panoTapTriggerRadius?: number;
|
|
2832
|
-
/** 地面观察点标识自定义创建器 */
|
|
2833
|
-
panoCircleMeshCreator?: (observer: WorkObserver, options: {
|
|
2834
|
-
aerialObserverMinHeight: number;
|
|
2835
|
-
}) => PanoCircleMeshInterface;
|
|
2836
|
-
/** 基于模型调整 地面观察点 的位置 */
|
|
2837
|
-
adjustPanoCircleMeshPositionBasedOnModel?: boolean;
|
|
2838
|
-
/**
|
|
2839
|
-
* 全景瓦片登记
|
|
2840
|
-
* @param fov - 当前 fov
|
|
2841
|
-
* @param viewSize - 当前绘制区域大小
|
|
2842
|
-
* @returns 返回瓦片等级
|
|
2843
|
-
*/
|
|
2844
|
-
tileLevelForFov?: false | ((fov: number, viewSize: THREE_2.Vector2) => number);
|
|
2845
|
-
/** 全景进入渐变时长 单位秒 */
|
|
2846
|
-
tileAppearDuration?: number;
|
|
2847
|
-
/** 全景瓦片并发数 */
|
|
2848
|
-
tileMaxRequest?: number;
|
|
2849
|
-
/** 是否使用深度信息干预全景图着色 */
|
|
2850
|
-
flyEffectUseDepthBuffer?: boolean;
|
|
2851
|
-
}
|
|
2852
|
-
|
|
2853
|
-
export declare interface PanoramaLikeControllerCustomInitArgs {
|
|
2854
|
-
/** 默认相机俯仰角 */
|
|
2855
|
-
defaultLatitude?: number;
|
|
2856
|
-
/** 最大相机俯仰角 */
|
|
2857
|
-
maxLatitude?: number | ((fov: number) => number);
|
|
2858
|
-
/** 最小相机俯仰角 */
|
|
2859
|
-
minLatitude?: number | ((fov: number) => number);
|
|
2860
|
-
/** 默认相机可视角度(垂直),可作为 `zoom` */
|
|
2861
|
-
defaultFov?: number;
|
|
2862
|
-
/** 最大默认相机可视角度(垂直) */
|
|
2863
|
-
maxFov?: number;
|
|
2864
|
-
/** 最小默认相机可视角度(垂直) */
|
|
2865
|
-
minFov?: number;
|
|
2866
|
-
/**
|
|
2867
|
-
* 点位间移动动画速度 单位 m/s
|
|
2868
|
-
* @description
|
|
2869
|
-
* 这边设置的是速度,整体耗时会通过距离除速度计算得到
|
|
2870
|
-
*/
|
|
2871
|
-
moveSpeed?: number;
|
|
2872
|
-
/** 鼠标焦点环自定义创建器 */
|
|
2873
|
-
intersectMeshCreator?: () => IntersectMeshInterface;
|
|
2874
|
-
/** 航拍点最小高度 */
|
|
2875
|
-
aerialObserverMinHeight?: number;
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
|
-
export declare function panoStringify(pano: Pano): PanoId;
|
|
2879
|
-
|
|
2880
|
-
export declare interface PanoTextureEvent extends BaseEvent {
|
|
2881
|
-
pano: Pano;
|
|
2882
|
-
progress: number;
|
|
2883
|
-
meta: NetWorkMeta[] | null;
|
|
2884
|
-
error: Error | null;
|
|
2885
|
-
}
|
|
2886
|
-
|
|
2887
|
-
export declare interface Parameter extends Readonly<Partial<ParameterValue>> {
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
export declare class Parameter {
|
|
2891
|
-
static createDefault(): Required<ParameterValue>;
|
|
2892
|
-
static resolveValue(...values: Partial<ParameterValue>[]): ResolvedParameterValue;
|
|
2893
|
-
id: string;
|
|
2894
|
-
versionNumber: number;
|
|
2895
|
-
private value;
|
|
2896
|
-
constructor(initialValue?: Partial<ParameterValue>);
|
|
2897
|
-
get version(): string;
|
|
2898
|
-
resolveValue(...baseValues: Partial<ParameterValue>[]): ResolvedParameterValue;
|
|
2899
|
-
set<T extends keyof ParameterValue>(name: T, value: ParameterValue[T]): this;
|
|
2900
|
-
set(values: Partial<ParameterValue>): this;
|
|
2901
|
-
reset(...names: (keyof ParameterValue)[]): this;
|
|
2902
|
-
resetAll(): this;
|
|
2903
|
-
copy(value: Partial<ParameterValue>): this;
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
|
-
declare interface ParameterMaterialValue {
|
|
2907
|
-
/** 自定义材质*/
|
|
2908
|
-
customShaders: readonly PBMCustomShader[];
|
|
2909
|
-
/** 是否生效标注 */
|
|
2910
|
-
vertexMarks: boolean;
|
|
2911
|
-
/** 起始点 */
|
|
2912
|
-
pano0: PBMPanoPicture | null;
|
|
2913
|
-
/** 结束点 */
|
|
2914
|
-
pano1: PBMPanoPicture | null;
|
|
2915
|
-
/** 起始点深度 */
|
|
2916
|
-
pano0Depth: PBMPanoDepth | null;
|
|
2917
|
-
/** 结束点深度 */
|
|
2918
|
-
pano1Depth: PBMPanoDepth | null;
|
|
2919
|
-
/** 细化瓦片的屏幕渲染 */
|
|
2920
|
-
refinedScreen: PBMRefinedScreen | null;
|
|
2921
|
-
/** 模型贴图和全景图的混合程度 [0-1] */
|
|
2922
|
-
modelAlpha: number;
|
|
2923
|
-
/** 全景图混合程度 [0-1] */
|
|
2924
|
-
progress: number;
|
|
2925
|
-
/** 全景图过度混合 */
|
|
2926
|
-
transition: PBMTransition;
|
|
2927
|
-
/** 模型透明度 */
|
|
2928
|
-
opacity: number;
|
|
2929
|
-
/** 楼层样式 */
|
|
2930
|
-
floorStyle: PBMFloorStyle;
|
|
2931
|
-
/** 颜色样式 */
|
|
2932
|
-
colorStyle: PBMColorStyle;
|
|
2933
|
-
/** 模型颜色*/
|
|
2934
|
-
constantColor: THREE_2.Vector3;
|
|
2935
|
-
/** 楼层参数*/
|
|
2936
|
-
shownFloorIndex: number;
|
|
2937
|
-
/** 模型裁切参数(工程侧调用)*/
|
|
2938
|
-
clippers: readonly PBMClipperParameter[];
|
|
2939
|
-
/** 亮度 */
|
|
2940
|
-
brightness: number;
|
|
2941
|
-
/** 是否使用HQ*/
|
|
2942
|
-
useHQWeight: boolean;
|
|
2943
|
-
/** 是否使用HQ_DEPTH_MASK*/
|
|
2944
|
-
useHQDepth: boolean;
|
|
2945
|
-
/** 点云形状*/
|
|
2946
|
-
pointShape: PBMPointShape;
|
|
2947
|
-
/** 点云大小绘制方式*/
|
|
2948
|
-
pointSize: PBMPointSize;
|
|
2949
|
-
/** 点云背面绘制方式*/
|
|
2950
|
-
pointBack: PBMPointBack;
|
|
2951
|
-
/** 点云基础大小*/
|
|
2952
|
-
pointScale: number;
|
|
2953
|
-
/** 点云最小尺寸*/
|
|
2954
|
-
pointMinPixel: number;
|
|
2955
|
-
/** 点云最大尺寸*/
|
|
2956
|
-
pointMaxPixel: number;
|
|
2957
|
-
/** 点云出现动画 */
|
|
2958
|
-
pointAppearAnimation: boolean;
|
|
2959
|
-
/** 饱和度调整值*/
|
|
2960
|
-
colorSaturation: number;
|
|
2961
|
-
/** 亮度调整值*/
|
|
2962
|
-
colorBrightness: number;
|
|
2963
|
-
/** outline增益*/
|
|
2964
|
-
outlineGain: number;
|
|
2965
|
-
/** distance增益*/
|
|
2966
|
-
distanceGain: number;
|
|
2967
|
-
/** 高程着色材质*/
|
|
2968
|
-
gradientTexture: THREE_2.Texture | null;
|
|
2969
|
-
/** 是否产生阴影 */
|
|
2970
|
-
castShadow: boolean;
|
|
2971
|
-
/** 是否接受阴影 */
|
|
2972
|
-
receiveShadow: boolean;
|
|
2973
|
-
/** 半透明叠加渲染*/
|
|
2974
|
-
useAddBlend: boolean;
|
|
2975
|
-
/** 包围盒 */
|
|
2976
|
-
boundingBox: THREE_2.Box3;
|
|
2977
|
-
/** 3dgs球谐阶数*/
|
|
2978
|
-
gsSHDegree: number;
|
|
2979
|
-
}
|
|
2980
|
-
export { ParameterMaterialValue as ModelMaterialValues }
|
|
2981
|
-
export { ParameterMaterialValue }
|
|
2982
|
-
|
|
2983
|
-
export declare interface ParameterTilesetValue {
|
|
2984
|
-
/** 模型显示最小细化层级 */
|
|
2985
|
-
minLevelOfDetail: number;
|
|
2986
|
-
/** 模型显示最大细化层级 */
|
|
2987
|
-
maxLevelOfDetail: number;
|
|
2988
|
-
/** 模型显示最小细化误差 */
|
|
2989
|
-
minGeometricError: number;
|
|
2990
|
-
/** 模型显示最大细化误差 */
|
|
2991
|
-
maxGeometricError: number;
|
|
2992
|
-
/** 全景态下模型显示最小细化误差 */
|
|
2993
|
-
panoramaMinGeometricError: number;
|
|
2994
|
-
/** 模型越层级加载 */
|
|
2995
|
-
skipLevelOfDetail: boolean;
|
|
2996
|
-
/** 模型是否最密 */
|
|
2997
|
-
mostDetail: boolean;
|
|
2998
|
-
/** 模型加载不在视野中的兄弟节点 */
|
|
2999
|
-
loadSiblings: boolean;
|
|
3000
|
-
/** 模型不加载在不在视野中的节点 */
|
|
3001
|
-
cameraCulling: boolean;
|
|
3002
|
-
/** 模型最大内存缓存 */
|
|
3003
|
-
maxMemoryUsage: number;
|
|
3004
|
-
/** 模型网络最大请求并发数 */
|
|
3005
|
-
maxRequests: number;
|
|
3006
|
-
/** 模型网络请求顺序 */
|
|
3007
|
-
requestOrder: TileRequestOrder;
|
|
3008
|
-
/** 模型屏幕空间误差计算最大值 */
|
|
3009
|
-
maxScreenSpaceError: number;
|
|
3010
|
-
memoryAdjustedScreenSpaceError: boolean;
|
|
3011
|
-
/** 缓存相机 */
|
|
3012
|
-
cacheCameras: readonly (Camera | THREE_2.PerspectiveCamera)[];
|
|
3013
|
-
}
|
|
3014
|
-
|
|
3015
|
-
declare interface ParameterValue extends ParameterMaterialValue, ParameterTilesetValue {
|
|
3016
|
-
}
|
|
3017
|
-
export { ParameterValue as PBMParameters }
|
|
3018
|
-
export { ParameterValue }
|
|
3019
|
-
|
|
3020
|
-
export declare type ParseOptions = {
|
|
3021
|
-
/** 位姿 */
|
|
3022
|
-
transform?: THREE_2.Matrix4 | number[];
|
|
3023
|
-
/** 重置 WorkCode */
|
|
3024
|
-
workCode?: string | ((input: any) => string);
|
|
3025
|
-
/** 重写资源前缀 */
|
|
3026
|
-
baseURL?: string;
|
|
3027
|
-
/** 资源地址使用短地址 */
|
|
3028
|
-
shortPath?: boolean;
|
|
3029
|
-
/** 资源使用 jsonp 方式发布 */
|
|
3030
|
-
jsonp?: boolean;
|
|
3031
|
-
};
|
|
3032
|
-
|
|
3033
|
-
/**
|
|
3034
|
-
* 解析 Work 数据
|
|
3035
|
-
* @param obj - work 数据,从如数开发者平台获取
|
|
3036
|
-
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
3037
|
-
* @returns - 签署过的 Work 数据结构
|
|
3038
|
-
*/
|
|
3039
|
-
export declare function parseWork(obj: Work | LoosePanoWork | LooseWork | string | any, options?: ParseOptions): Work;
|
|
3040
|
-
|
|
3041
|
-
/**
|
|
3042
|
-
* Pass基类
|
|
3043
|
-
* three.js 的 Pass 接口,用于 EffectComposer
|
|
3044
|
-
*/
|
|
3045
|
-
export declare interface Pass {
|
|
3046
|
-
enabled: boolean;
|
|
3047
|
-
needsSwap: boolean;
|
|
3048
|
-
clear: boolean;
|
|
3049
|
-
renderToScreen: boolean;
|
|
3050
|
-
setSize(width: number, height: number): void;
|
|
3051
|
-
render(renderer: THREE_2.WebGLRenderer, writeBuffer: THREE_2.WebGLRenderTarget, readBuffer: THREE_2.WebGLRenderTarget, deltaTime?: number, maskActive?: boolean): void;
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
export declare type PBMAlphaMode = 'OPAQUE' | 'MASK' | 'BLEND';
|
|
3055
|
-
|
|
3056
|
-
export declare interface PBMClipperParameter {
|
|
3057
|
-
clippingBoxMatrix: THREE_2.Matrix4;
|
|
3058
|
-
floorIndex?: number;
|
|
3059
|
-
}
|
|
3060
|
-
|
|
3061
|
-
export declare type PBMColorStyle = 'RGB' | 'ALTITUDE' | 'CONSTANT';
|
|
3062
|
-
|
|
3063
|
-
/**
|
|
3064
|
-
* PBM 模型组
|
|
3065
|
-
* @deprecated 弃用, 直接使用 THREE.Group
|
|
3066
|
-
*/
|
|
3067
|
-
export declare class PBMContainer extends THREE_2.Group {
|
|
3068
|
-
/** 当前样式参数 */
|
|
3069
|
-
parameter: Parameter;
|
|
3070
|
-
/** 是否需要更新按需渲染 */
|
|
3071
|
-
needsRender: boolean;
|
|
3072
|
-
/**
|
|
3073
|
-
* 更新版本
|
|
3074
|
-
* @deprecated
|
|
3075
|
-
* use this.parameter.resolveValue()
|
|
3076
|
-
*/
|
|
3077
|
-
get materialParameters(): ParameterValue;
|
|
3078
|
-
/**
|
|
3079
|
-
* 更新版本
|
|
3080
|
-
* @deprecated
|
|
3081
|
-
* use this.parameter.resolveValue().versions instead
|
|
3082
|
-
*/
|
|
3083
|
-
get pbmMaterialParametersVersion(): string;
|
|
3084
|
-
setMaterial(value: Partial<ParameterValue>): void;
|
|
3085
|
-
getMaterial(): ParameterValue;
|
|
3086
|
-
update(): void;
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
declare class PBMCustomShader {
|
|
3090
|
-
id: string;
|
|
3091
|
-
version: number;
|
|
3092
|
-
uniforms: {
|
|
3093
|
-
[key: string]: THREE_2.Uniform;
|
|
3094
|
-
};
|
|
3095
|
-
defines: {
|
|
3096
|
-
[key: string]: any;
|
|
3097
|
-
};
|
|
3098
|
-
type: PBMCustomShaderInitArgs['type'];
|
|
3099
|
-
vertex: PBMCustomShaderSlots['vertex'];
|
|
3100
|
-
fragment: PBMCustomShaderSlots['fragment'];
|
|
3101
|
-
constructor(initArgs: PBMCustomShaderInitArgs);
|
|
3102
|
-
get needsUpdate(): boolean;
|
|
3103
|
-
set needsUpdate(value: boolean);
|
|
3104
|
-
onBeforeCompile(shader: THREE_2.Shader, renderer: THREE_2.WebGLRenderer): void;
|
|
3105
|
-
}
|
|
3106
|
-
export { PBMCustomShader as CustomShader }
|
|
3107
|
-
export { PBMCustomShader }
|
|
3108
|
-
|
|
3109
|
-
declare interface PBMCustomShaderInitArgs {
|
|
3110
|
-
type: Array<'none' | 'basic' | 'phong' | 'standard' | 'pointcloud'>;
|
|
3111
|
-
vertex?: Partial<PBMCustomShaderSlots['vertex']>;
|
|
3112
|
-
fragment?: Partial<PBMCustomShaderSlots['fragment']>;
|
|
3113
|
-
uniforms?: {
|
|
3114
|
-
[key: string]: THREE_2.Uniform;
|
|
3115
|
-
};
|
|
3116
|
-
defines?: {
|
|
3117
|
-
[key: string]: any;
|
|
3118
|
-
};
|
|
3119
|
-
}
|
|
3120
|
-
export { PBMCustomShaderInitArgs as CustomShaderInitArgs }
|
|
3121
|
-
export { PBMCustomShaderInitArgs }
|
|
3122
|
-
|
|
3123
|
-
declare interface PBMCustomShaderSlots {
|
|
3124
|
-
vertex: {
|
|
3125
|
-
mainBefore: string;
|
|
3126
|
-
mainStart: string;
|
|
3127
|
-
mainEnd: string;
|
|
3128
|
-
};
|
|
3129
|
-
fragment: {
|
|
3130
|
-
mainBefore: string;
|
|
3131
|
-
mainStart: string;
|
|
3132
|
-
mainModelColor: string;
|
|
3133
|
-
mainEnd: string;
|
|
3134
|
-
};
|
|
3135
|
-
}
|
|
3136
|
-
export { PBMCustomShaderSlots as CustomShaderChunks }
|
|
3137
|
-
export { PBMCustomShaderSlots }
|
|
3138
|
-
|
|
3139
|
-
export declare type PBMFloorStyle = 'VISIBILITY' | 'OPACITY';
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* PBM 模型组
|
|
3143
|
-
* @deprecated 弃用, 直接使用 THREE.Group
|
|
3144
|
-
*/
|
|
3145
|
-
export declare class PBMGroup extends THREE_2.Group {
|
|
3146
|
-
}
|
|
3147
|
-
|
|
3148
|
-
export declare class PBMGSObject extends THREE_2.Points<THREE_2.BufferGeometry, THREE_2.ShaderMaterial> {
|
|
3149
|
-
static RowLength: number;
|
|
3150
|
-
transformChanged: boolean;
|
|
3151
|
-
selectedChanged: boolean;
|
|
3152
|
-
transferDetached: boolean;
|
|
3153
|
-
numPoints: number;
|
|
3154
|
-
maxSHDegree: number;
|
|
3155
|
-
usedSHDegree: number;
|
|
3156
|
-
private _selected;
|
|
3157
|
-
private _boundingBox;
|
|
3158
|
-
lastMatrixWorld: THREE_2.Matrix4 | null;
|
|
3159
|
-
get positions(): Float32Array;
|
|
3160
|
-
get rotations(): Float32Array;
|
|
3161
|
-
get scales(): Float32Array;
|
|
3162
|
-
get colors(): Uint8Array;
|
|
3163
|
-
get selection(): Uint8Array;
|
|
3164
|
-
get sh1(): Float32Array | undefined;
|
|
3165
|
-
get sh2(): Float32Array | undefined;
|
|
3166
|
-
get sh3(): Float32Array | undefined;
|
|
3167
|
-
constructor(splatData?: SplatData);
|
|
3168
|
-
serialize(): Uint8Array<ArrayBuffer>;
|
|
3169
|
-
reattach(positions: ArrayBufferLike, rotations: ArrayBufferLike, scales: ArrayBufferLike, colors: ArrayBufferLike, selection: ArrayBufferLike): void;
|
|
3170
|
-
get selected(): boolean;
|
|
3171
|
-
set selected(selected: boolean);
|
|
3172
|
-
get boundingBox(): THREE_2.Box3;
|
|
3173
|
-
dispose(): void;
|
|
3174
|
-
raycast(raycaster: THREE_2.Raycaster, intersects: THREE_2.Intersection[]): void;
|
|
3175
|
-
}
|
|
3176
|
-
|
|
3177
|
-
export declare class PBMMaterial extends THREE_2.Material {
|
|
3178
|
-
}
|
|
3179
|
-
|
|
3180
|
-
export declare class PBMMesh extends THREE_2.Mesh<THREE_2.BufferGeometry, PBMMeshMaterial[]> {
|
|
3181
|
-
constructor(geometry: THREE_2.BufferGeometry, materials: PBMMeshMaterial[]);
|
|
3182
|
-
}
|
|
3183
|
-
|
|
3184
|
-
export declare class PBMMeshMaterial extends PBMMaterial implements THREE_2.MeshBasicMaterial, THREE_2.MeshPhongMaterial, THREE_2.MeshStandardMaterial {
|
|
3185
|
-
readonly isPBMMeshMaterial: true;
|
|
3186
|
-
readonly isShaderMaterial: true;
|
|
3187
|
-
readonly isMeshBasicMaterial: boolean;
|
|
3188
|
-
readonly isMeshPhongMaterial: boolean;
|
|
3189
|
-
readonly isMeshStandardMaterial: boolean;
|
|
3190
|
-
shaderType: PBMMeshShaderType;
|
|
3191
|
-
vertexTangents: boolean;
|
|
3192
|
-
color: THREE_2.Color;
|
|
3193
|
-
map: THREE_2.Texture | null;
|
|
3194
|
-
lightMap: THREE_2.Texture | null;
|
|
3195
|
-
lightMapIntensity: number;
|
|
3196
|
-
aoMap: THREE_2.Texture | null;
|
|
3197
|
-
aoMapIntensity: number;
|
|
3198
|
-
specularMap: THREE_2.Texture | null;
|
|
3199
|
-
specular: THREE_2.Color;
|
|
3200
|
-
shininess: number;
|
|
3201
|
-
roughnessMap: THREE_2.Texture | null;
|
|
3202
|
-
roughness: number;
|
|
3203
|
-
metalnessMap: THREE_2.Texture | null;
|
|
3204
|
-
metalness: number;
|
|
3205
|
-
alphaMap: THREE_2.Texture | null;
|
|
3206
|
-
combine: THREE_2.Combine;
|
|
3207
|
-
envMap: THREE_2.Texture | THREE_2.CubeTexture | null;
|
|
3208
|
-
envMapIntensity: number;
|
|
3209
|
-
reflectivity: number;
|
|
3210
|
-
refractionRatio: number;
|
|
3211
|
-
emissiveMap: THREE_2.Texture | null;
|
|
3212
|
-
emissive: THREE_2.Color;
|
|
3213
|
-
emissiveIntensity: number;
|
|
3214
|
-
bumpMap: THREE_2.Texture | null;
|
|
3215
|
-
bumpScale: number;
|
|
3216
|
-
normalMap: THREE_2.Texture | null;
|
|
3217
|
-
normalMapType: THREE_2.NormalMapTypes;
|
|
3218
|
-
normalScale: THREE_2.Vector2;
|
|
3219
|
-
displacementMap: THREE_2.Texture | null;
|
|
3220
|
-
displacementScale: number;
|
|
3221
|
-
displacementBias: number;
|
|
3222
|
-
wireframe: boolean;
|
|
3223
|
-
wireframeLinewidth: number;
|
|
3224
|
-
wireframeLinecap: string;
|
|
3225
|
-
wireframeLinejoin: string;
|
|
3226
|
-
skinning: boolean;
|
|
3227
|
-
morphTargets: boolean;
|
|
3228
|
-
morphNormals: boolean;
|
|
3229
|
-
metal: boolean;
|
|
3230
|
-
vertexMarks: boolean;
|
|
3231
|
-
alphaMode: PBMAlphaMode;
|
|
3232
|
-
colorAlpha: number;
|
|
3233
|
-
pano0: PBMPanoPicture | null;
|
|
3234
|
-
pano1: PBMPanoPicture | null;
|
|
3235
|
-
pano0Depth: PBMPanoDepth | null;
|
|
3236
|
-
pano1Depth: PBMPanoDepth | null;
|
|
3237
|
-
refinedScreen: PBMRefinedScreen | null;
|
|
3238
|
-
modelAlpha: number;
|
|
3239
|
-
progress: number;
|
|
3240
|
-
transition: PBMTransition;
|
|
3241
|
-
colorStyle: PBMColorStyle;
|
|
3242
|
-
constantColor: THREE_2.Vector3;
|
|
3243
|
-
floorIndex: number;
|
|
3244
|
-
shownFloorIndex: number;
|
|
3245
|
-
floorStyle: PBMFloorStyle;
|
|
3246
|
-
gradientTexture: THREE_2.Texture | null;
|
|
3247
|
-
brightness: number;
|
|
3248
|
-
colorSaturation: number;
|
|
3249
|
-
colorBrightness: number;
|
|
3250
|
-
useEDL: boolean;
|
|
3251
|
-
useHQWeight: boolean;
|
|
3252
|
-
useHQDepth: boolean;
|
|
3253
|
-
modelBoundingMin: THREE_2.Vector3;
|
|
3254
|
-
modelBoundingMax: THREE_2.Vector3;
|
|
3255
|
-
clipping: boolean;
|
|
3256
|
-
clippers: readonly PBMClipperParameter[];
|
|
3257
|
-
customShaders: readonly PBMCustomShader[];
|
|
3258
|
-
onBeforeRender?: (renderer: THREE_2.WebGLRenderer, scene: THREE_2.Scene, camera: THREE_2.Camera, geometry: THREE_2.BufferGeometry | THREE_2.Geometry, object: THREE_2.Object3D, group: THREE_2.Group) => void;
|
|
3259
|
-
constructor(parameters?: PBMMeshMaterialParameters | PBMMeshShaderType);
|
|
3260
|
-
copy(source: PBMMeshMaterial): this;
|
|
3261
|
-
clone(): this;
|
|
3262
|
-
/**
|
|
3263
|
-
* @deprecated
|
|
3264
|
-
* 已经不需要再被调用了
|
|
3265
|
-
*/
|
|
3266
|
-
refreshUniforms(): void;
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
export declare interface PBMMeshMaterialParameters extends THREE_2.MaterialParameters, THREE_2.MaterialParameters, THREE_2.MeshBasicMaterialParameters, THREE_2.MeshPhongMaterialParameters, THREE_2.MeshStandardMaterialParameters {
|
|
3270
|
-
shaderType?: PBMMeshShaderType;
|
|
3271
|
-
vertexMarks?: boolean;
|
|
3272
|
-
colorAlpha?: number;
|
|
3273
|
-
alphaMode?: PBMAlphaMode;
|
|
3274
|
-
pano0?: PBMPanoPicture | null;
|
|
3275
|
-
pano1?: PBMPanoPicture | null;
|
|
3276
|
-
refinedScreen?: PBMRefinedScreen | null;
|
|
3277
|
-
modelAlpha?: number;
|
|
3278
|
-
progress?: number;
|
|
3279
|
-
transition?: PBMTransition;
|
|
3280
|
-
colorStyle?: PBMColorStyle;
|
|
3281
|
-
constantColor?: THREE_2.Vector3;
|
|
3282
|
-
floorIndex?: number;
|
|
3283
|
-
shownFloorIndex?: number;
|
|
3284
|
-
floorStyle?: PBMFloorStyle;
|
|
3285
|
-
gradientTexture?: THREE_2.Texture | null;
|
|
3286
|
-
brightness?: number;
|
|
3287
|
-
colorSaturation?: number;
|
|
3288
|
-
colorBrightness?: number;
|
|
3289
|
-
useEDL?: boolean;
|
|
3290
|
-
useHQWeight?: boolean;
|
|
3291
|
-
useHQDepth?: boolean;
|
|
3292
|
-
modelBoundingMin?: THREE_2.Vector3;
|
|
3293
|
-
modelBoundingMax?: THREE_2.Vector3;
|
|
3294
|
-
clippers?: PBMClipperParameter[];
|
|
3295
|
-
customShaders?: PBMCustomShader[];
|
|
3296
|
-
}
|
|
3297
|
-
|
|
3298
|
-
export declare type PBMMeshShaderType = 'none' | 'basic' | 'phong' | 'standard';
|
|
3299
|
-
|
|
3300
|
-
export declare interface PBMPanoDepth {
|
|
3301
|
-
/** 点位 Id */
|
|
3302
|
-
panoId: PanoId;
|
|
3303
|
-
/** 深度图 */
|
|
3304
|
-
map: THREE_2.CubeTexture;
|
|
3305
|
-
/** 图片尺寸 */
|
|
3306
|
-
mapSize: number;
|
|
3307
|
-
/** 图片最大深度 */
|
|
3308
|
-
maxDepth: number;
|
|
3309
|
-
}
|
|
3310
|
-
|
|
3311
|
-
export declare interface PBMPanoPicture {
|
|
3312
|
-
/** 点位 Id */
|
|
3313
|
-
panoId: PanoId;
|
|
3314
|
-
/** 全景图 */
|
|
3315
|
-
map: THREE_2.CubeTexture;
|
|
3316
|
-
/** 图片尺寸 */
|
|
3317
|
-
mapSize: number;
|
|
3318
|
-
/** 全景图变换矩阵 4x4 */
|
|
3319
|
-
matrix: THREE_2.Matrix4;
|
|
3320
|
-
/** 缩放 */
|
|
3321
|
-
zoom: number;
|
|
3322
|
-
}
|
|
3323
|
-
|
|
3324
|
-
export declare type PBMPointBack = 'VISIBLE' | 'HIDDEN' | 'DARK';
|
|
3325
|
-
|
|
3326
|
-
/** PBM 对象 */
|
|
3327
|
-
export declare class PBMPointCloud extends THREE_2.Points<THREE_2.BufferGeometry, PBMPointCloudMaterial> {
|
|
3328
|
-
constructor(geometry: THREE_2.BufferGeometry, materials: PBMPointCloudMaterial);
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
export declare class PBMPointCloudMaterial extends PBMMaterial {
|
|
3332
|
-
readonly isPBMPointCloudMaterial: true;
|
|
3333
|
-
readonly isShaderMaterial: true;
|
|
3334
|
-
readonly shaderType: PBMPointCloudShaderType;
|
|
3335
|
-
vertexMarks: boolean;
|
|
3336
|
-
pointScale: number;
|
|
3337
|
-
pointMinPixel: number;
|
|
3338
|
-
pointMaxPixel: number;
|
|
3339
|
-
pointSize: PBMPointSize;
|
|
3340
|
-
pointShape: PBMPointShape;
|
|
3341
|
-
pointBack: PBMPointBack;
|
|
3342
|
-
modelAlpha: number;
|
|
3343
|
-
colorStyle: PBMColorStyle;
|
|
3344
|
-
constantColor: THREE_2.Vector3;
|
|
3345
|
-
floorIndex: number;
|
|
3346
|
-
shownFloorIndex: number;
|
|
3347
|
-
floorStyle: PBMFloorStyle;
|
|
3348
|
-
gradientTexture: THREE_2.Texture | null;
|
|
3349
|
-
brightness: number;
|
|
3350
|
-
colorSaturation: number;
|
|
3351
|
-
colorBrightness: number;
|
|
3352
|
-
outlineGain: number;
|
|
3353
|
-
distanceGain: number;
|
|
3354
|
-
useEDL: boolean;
|
|
3355
|
-
useHQWeight: boolean;
|
|
3356
|
-
useHQDepth: boolean;
|
|
3357
|
-
modelBoundingMin: THREE_2.Vector3;
|
|
3358
|
-
modelBoundingMax: THREE_2.Vector3;
|
|
3359
|
-
clipping: boolean;
|
|
3360
|
-
clippers: readonly PBMClipperParameter[];
|
|
3361
|
-
customShaders: readonly PBMCustomShader[];
|
|
3362
|
-
onBeforeRender?: (renderer: THREE_2.WebGLRenderer, scene: THREE_2.Scene, camera: THREE_2.Camera, geometry: THREE_2.BufferGeometry | THREE_2.Geometry, object: THREE_2.Object3D, group: THREE_2.Group) => void;
|
|
3363
|
-
constructor(parameters?: PBMPointCloudMaterialParameters);
|
|
3364
|
-
copy(source: PBMPointCloudMaterial): this;
|
|
3365
|
-
clone(): this;
|
|
3366
|
-
/**
|
|
3367
|
-
* @deprecated
|
|
3368
|
-
* 已经不需要再被调用了
|
|
3369
|
-
*/
|
|
3370
|
-
refreshUniforms(): void;
|
|
3371
|
-
}
|
|
3372
|
-
|
|
3373
|
-
export declare interface PBMPointCloudMaterialParameters extends THREE_2.MaterialParameters {
|
|
3374
|
-
vertexMarks?: boolean;
|
|
3375
|
-
pointScale?: number;
|
|
3376
|
-
pointMinPixel?: number;
|
|
3377
|
-
pointMaxPixel?: number;
|
|
3378
|
-
pointSize?: PBMPointSize;
|
|
3379
|
-
pointShape?: PBMPointShape;
|
|
3380
|
-
pointBack?: PBMPointBack;
|
|
3381
|
-
modelAlpha?: number;
|
|
3382
|
-
colorStyle?: PBMColorStyle;
|
|
3383
|
-
constantColor?: THREE_2.Vector3;
|
|
3384
|
-
floorIndex?: number;
|
|
3385
|
-
shownFloorIndex?: number;
|
|
3386
|
-
floorStyle?: PBMFloorStyle;
|
|
3387
|
-
gradientTexture?: THREE_2.Texture | null;
|
|
3388
|
-
brightness?: number;
|
|
3389
|
-
colorSaturation?: number;
|
|
3390
|
-
colorBrightness?: number;
|
|
3391
|
-
outlineGain?: number;
|
|
3392
|
-
distanceGain?: number;
|
|
3393
|
-
useEDL?: boolean;
|
|
3394
|
-
useHQWeight?: boolean;
|
|
3395
|
-
useHQDepth?: boolean;
|
|
3396
|
-
modelBoundingMin?: THREE_2.Vector3;
|
|
3397
|
-
modelBoundingMax?: THREE_2.Vector3;
|
|
3398
|
-
clippers?: PBMClipperParameter[];
|
|
3399
|
-
customShaders?: PBMCustomShader[];
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
|
-
export declare type PBMPointCloudShaderType = 'pointcloud';
|
|
3403
|
-
|
|
3404
|
-
export declare type PBMPointShape = 'SQUARE' | 'CIRCLE';
|
|
3405
|
-
|
|
3406
|
-
export declare type PBMPointSize = 'FIXED' | 'ATTENUATION';
|
|
3407
|
-
|
|
3408
|
-
export declare interface PBMRefinedScreen {
|
|
3409
|
-
projectionMatrix: THREE_2.Matrix4;
|
|
3410
|
-
matrixInverse: THREE_2.Matrix4;
|
|
3411
|
-
map: THREE_2.Texture | null;
|
|
3412
|
-
pano: number;
|
|
3413
|
-
opacity: number;
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
export declare class PBMSkinnedMesh extends THREE_2.SkinnedMesh<THREE_2.BufferGeometry, PBMMeshMaterial[]> {
|
|
3417
|
-
geometry: THREE_2.BufferGeometry;
|
|
3418
|
-
material: PBMMeshMaterial[];
|
|
3419
|
-
constructor(geometry: THREE_2.BufferGeometry, materials: PBMMeshMaterial[], useVertexTexture?: boolean);
|
|
3420
|
-
}
|
|
3421
|
-
|
|
3422
|
-
export declare type PBMTransition = 'BLACK' | 'SPREAD' | 'FADE';
|
|
3423
|
-
|
|
3424
|
-
/**
|
|
3425
|
-
* 相机位姿
|
|
3426
|
-
*/
|
|
3427
|
-
export declare interface Pose {
|
|
3428
|
-
/** 相机偏航角 */
|
|
3429
|
-
longitude: number;
|
|
3430
|
-
/** 相机俯仰角 */
|
|
3431
|
-
latitude: number;
|
|
3432
|
-
/** 相机可视角度(垂直)*/
|
|
3433
|
-
fov: number;
|
|
3434
|
-
/** 相机位置*/
|
|
3435
|
-
offset: THREE_2.Vector3;
|
|
3436
|
-
/** 相机距离 */
|
|
3437
|
-
distance: number;
|
|
3438
|
-
}
|
|
3439
|
-
|
|
3440
|
-
export declare type PostProcessingType = 'edl' | 'hq' | 'luminance' | null;
|
|
3441
|
-
|
|
3442
|
-
export declare const PROXY_CONTROLLER_EVENT_NAMES: readonly ["gesture.pan", "gesture.tap", "gesture.dbltap", "gesture.press", "gesture.pinch", "gesture.mousewheel", "gesture.mousemove", "gesture.momentum", "initAnimation.start", "initAnimation.end", "camera.update", "intersect.update", "pano.select", "pano.moveTo", "pano.moving", "pano.arrived", "pano.cancel", "pano.error", "pano.texture.load", "pano.texture.progress", "pano.texture.success", "pano.texture.error", "pano.texture.abort", "xr.session.start", "xr.session.end", "xr.gesture.tap", "xr.gesture.press", "xr.gesture.buttonUp", "xr.gesture.buttonDown", "xr.controller.update"];
|
|
3443
|
-
|
|
3444
|
-
export declare class RegionBoundingVolume implements BoundingVolume {
|
|
3445
|
-
type: "regin";
|
|
3446
|
-
west: number;
|
|
3447
|
-
south: number;
|
|
3448
|
-
east: number;
|
|
3449
|
-
north: number;
|
|
3450
|
-
minHeight: number;
|
|
3451
|
-
maxHeight: number;
|
|
3452
|
-
constructor();
|
|
3453
|
-
fromJson({ region }: RegionBoundingVolumeJson): this;
|
|
3454
|
-
toJson(): RegionBoundingVolumeJson;
|
|
3455
|
-
copy(regionBoundingVolume: RegionBoundingVolume): this;
|
|
3456
|
-
clone(): RegionBoundingVolume;
|
|
3457
|
-
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
3458
|
-
toGeometry(): THREE_2.BufferGeometry;
|
|
3459
|
-
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
3460
|
-
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
3461
|
-
distanceToPoint(point: THREE_2.Vector3): number;
|
|
3462
|
-
distanceSquaredToPoint(point: THREE_2.Vector3): number;
|
|
3463
|
-
distanceToPlane(plane: THREE_2.Plane): number;
|
|
3464
|
-
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
3465
|
-
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
export declare type RegionBoundingVolumeJson = {
|
|
3469
|
-
region: number[];
|
|
3470
|
-
};
|
|
3471
|
-
|
|
3472
|
-
export declare interface RenderEvent extends BaseEvent {
|
|
3473
|
-
needsRender: boolean;
|
|
3474
|
-
}
|
|
3475
|
-
|
|
3476
|
-
export declare type RequestAnimationFrameArgs<Args extends any[] = any[]> = [domHighResTimeStamp: number, ...args: Args];
|
|
3477
|
-
|
|
3478
|
-
export declare interface ResolvedParameterValue extends ParameterValue {
|
|
3479
|
-
versions: string[];
|
|
3480
|
-
version: string;
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
/** Five 场景*/
|
|
3484
|
-
export declare class Scene extends THREE_2.Scene {
|
|
3485
|
-
needsRender: boolean;
|
|
3486
|
-
add(...objects: AddableObject[]): this;
|
|
3487
|
-
remove(...objects: AddableObject[]): this;
|
|
3488
|
-
update(renderer: THREE_2.WebGLRenderer, camera: THREE_2.Camera): boolean;
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
/**
|
|
3492
|
-
* @deprecated
|
|
3493
|
-
* use Viewport instead
|
|
3494
|
-
*/
|
|
3495
|
-
export declare type Scissor = Viewport;
|
|
3496
|
-
|
|
3497
|
-
export declare class SphereBoundingVolume implements BoundingVolume {
|
|
3498
|
-
type: "sphere";
|
|
3499
|
-
center: THREE_2.Vector3;
|
|
3500
|
-
radius: number;
|
|
3501
|
-
constructor();
|
|
3502
|
-
fromJson({ sphere }: SphereBoundingVolumeJson): this;
|
|
3503
|
-
toJson(): SphereBoundingVolumeJson;
|
|
3504
|
-
copy(sphereBoundingVolume: SphereBoundingVolume): this;
|
|
3505
|
-
clone(): SphereBoundingVolume;
|
|
3506
|
-
getBoundingBox(target: THREE_2.Box3): THREE_2.Box3;
|
|
3507
|
-
toGeometry(): THREE_2.BufferGeometry;
|
|
3508
|
-
applyMatrix4(matrix: THREE_2.Matrix4): this;
|
|
3509
|
-
getCenter(result: THREE_2.Vector3): THREE_2.Vector3;
|
|
3510
|
-
distanceSquaredToPoint(point: THREE_2.Vector3): number;
|
|
3511
|
-
distanceToPoint(point: THREE_2.Vector3): number;
|
|
3512
|
-
distanceToPlane(plane: THREE_2.Plane): number;
|
|
3513
|
-
intersectPlane(plane: THREE_2.Plane): VolumePlaneIntersect;
|
|
3514
|
-
intersectRay(ray: THREE_2.Ray, threshold?: number, far?: number): boolean;
|
|
3515
|
-
}
|
|
3516
|
-
|
|
3517
|
-
export declare type SphereBoundingVolumeJson = {
|
|
3518
|
-
sphere: number[];
|
|
3519
|
-
};
|
|
3520
|
-
|
|
3521
|
-
export declare interface SplatData {
|
|
3522
|
-
numPoints: number;
|
|
3523
|
-
positions: Float32Array;
|
|
3524
|
-
colors: Uint8Array;
|
|
3525
|
-
scales: Float32Array;
|
|
3526
|
-
rotations: Float32Array;
|
|
3527
|
-
sh1?: Float32Array;
|
|
3528
|
-
sh2?: Float32Array;
|
|
3529
|
-
sh3?: Float32Array;
|
|
3530
|
-
shDegree?: number;
|
|
3531
|
-
}
|
|
3532
|
-
|
|
3533
|
-
/**
|
|
3534
|
-
* 状态
|
|
3535
|
-
* @description
|
|
3536
|
-
* ```text
|
|
3537
|
-
* 可以通过 five.state 和 five.setState 来获取和设置。
|
|
3538
|
-
* 通过 state 设置后,five 会通过合适的动画运动来达到设置的位置。
|
|
3539
|
-
* 来迎合一些通过数据驱动的场景。
|
|
3540
|
-
* ```
|
|
3541
|
-
*/
|
|
3542
|
-
export declare interface State extends Pose {
|
|
3543
|
-
/** 模态 */
|
|
3544
|
-
mode: Mode;
|
|
3545
|
-
/** workCode */
|
|
3546
|
-
workCode: string;
|
|
3547
|
-
/** 观察点序号 */
|
|
3548
|
-
panoIndex: number;
|
|
3549
|
-
}
|
|
3550
|
-
|
|
3551
|
-
export declare interface StateEvent extends BaseEvent {
|
|
3552
|
-
state: State;
|
|
3553
|
-
userAction: boolean;
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
|
-
/**
|
|
3557
|
-
* 监听者模式
|
|
3558
|
-
* @template T - 预设的监听回调类型
|
|
3559
|
-
* @example
|
|
3560
|
-
* ```
|
|
3561
|
-
* new Subscribe<{
|
|
3562
|
-
* "foo": [arg1: number, arg2: string],
|
|
3563
|
-
* "bar": [arg: boolean],
|
|
3564
|
-
* }>()
|
|
3565
|
-
* ```
|
|
3566
|
-
*/
|
|
3567
|
-
export declare class Subscribe<T extends SubscribeEventMap> {
|
|
3568
|
-
/**
|
|
3569
|
-
* 判断是否注册了事件
|
|
3570
|
-
* @param name - 事件类型
|
|
3571
|
-
*/
|
|
3572
|
-
hasListener(name: keyof T): boolean;
|
|
3573
|
-
/**
|
|
3574
|
-
* 注册事件
|
|
3575
|
-
* @param name - 事件类型
|
|
3576
|
-
* @param callback - 事件回调函数
|
|
3577
|
-
* @param once - 是否只执行一次
|
|
3578
|
-
* @returns 解除事件
|
|
3579
|
-
* @template K - 预设的监听事件名称
|
|
3580
|
-
* @template C - 回调函数函数上下文
|
|
3581
|
-
*/
|
|
3582
|
-
on<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>, once?: boolean): () => void;
|
|
3583
|
-
/**
|
|
3584
|
-
* 注册事件(是否只执行一次)
|
|
3585
|
-
* @param name - 事件类型
|
|
3586
|
-
* @param callback - 事件回调函数
|
|
3587
|
-
* @returns 解除事件
|
|
3588
|
-
* @template K - 预设的监听事件名称
|
|
3589
|
-
* @template C - 回调函数函数上下文
|
|
3590
|
-
*/
|
|
3591
|
-
once<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>): () => void;
|
|
3592
|
-
/**
|
|
3593
|
-
* 解除事件
|
|
3594
|
-
*
|
|
3595
|
-
* 如果 name 不传的话解除对应所有事件
|
|
3596
|
-
* 如果 name, callback 不传的话解除所有name的所有事件
|
|
3597
|
-
* @param name - 事件类型
|
|
3598
|
-
* @param callback - 事件回调函数
|
|
3599
|
-
* @template K - 预设的监听事件名称
|
|
3600
|
-
*/
|
|
3601
|
-
off<K extends keyof T>(name?: K, callback?: (...args: Parameters<T[K]>) => ReturnType<T[K]>): void;
|
|
3602
|
-
/**
|
|
3603
|
-
* 触发事件
|
|
3604
|
-
* @param name - 事件类型
|
|
3605
|
-
* @param data - 触发事件的数据
|
|
3606
|
-
* @returns canceled 是否被触发取消
|
|
3607
|
-
* @template K - 预设的监听事件名称
|
|
3608
|
-
*/
|
|
3609
|
-
emit<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
3610
|
-
/**
|
|
3611
|
-
* 等待事件
|
|
3612
|
-
* @param name - 事件类型
|
|
3613
|
-
* @param filter - 事件类型
|
|
3614
|
-
* @returns 触发事件的数据
|
|
3615
|
-
* @template K - 预设的监听事件名称
|
|
3616
|
-
*/
|
|
3617
|
-
waitUntil<K extends keyof T>(name: K, filter?: (...args: Parameters<T[K]>) => boolean | void): Promise<Parameters<T[K]>>;
|
|
3618
|
-
}
|
|
3619
|
-
|
|
3620
|
-
export declare type SubscribeEventMap = {
|
|
3621
|
-
[name: string]: (...args: any[]) => void | boolean;
|
|
3622
|
-
};
|
|
3623
|
-
|
|
3624
|
-
export declare class TextureLoader {
|
|
3625
|
-
loadTexture(source: string, options: {
|
|
3626
|
-
imageURL?: {
|
|
3627
|
-
transform?: (source: string, options: ImageURLOptions) => string;
|
|
3628
|
-
options?: ImageURLOptions;
|
|
3629
|
-
};
|
|
3630
|
-
flipY?: boolean;
|
|
3631
|
-
format?: THREE_2.PixelFormat;
|
|
3632
|
-
encoding?: THREE_2.TextureEncoding;
|
|
3633
|
-
minFilter?: THREE_2.TextureFilter;
|
|
3634
|
-
magFilter?: THREE_2.TextureFilter;
|
|
3635
|
-
generateMipmaps?: boolean;
|
|
3636
|
-
wrapS?: THREE_2.Wrapping;
|
|
3637
|
-
wrapT?: THREE_2.Wrapping;
|
|
3638
|
-
maxSize?: THREE_2.Vector2;
|
|
3639
|
-
viaAjax?: boolean;
|
|
3640
|
-
timeout?: number;
|
|
3641
|
-
fetcher: Fetcher;
|
|
3642
|
-
}, onLoad?: (response: NetworkResponse<THREE_2.Texture>) => void, onError?: (error: Error) => void, onProgress?: (percent: number) => void, renderer?: THREE_2.WebGLRenderer): Promise<NetworkResponse<THREE_2.Texture>>;
|
|
3643
|
-
loadCubeTexture(sources: Record<CubeFace, string>, options: {
|
|
3644
|
-
imageURL?: {
|
|
3645
|
-
transform?: (source: string, options: ImageURLOptions) => string;
|
|
3646
|
-
options?: ImageURLOptions;
|
|
3647
|
-
};
|
|
3648
|
-
format?: THREE_2.PixelFormat;
|
|
3649
|
-
minFilter?: THREE_2.TextureFilter;
|
|
3650
|
-
magFilter?: THREE_2.TextureFilter;
|
|
3651
|
-
generateMipmaps?: boolean;
|
|
3652
|
-
wrapS?: THREE_2.Wrapping;
|
|
3653
|
-
wrapT?: THREE_2.Wrapping;
|
|
3654
|
-
viaAjax?: boolean;
|
|
3655
|
-
timeout?: number;
|
|
3656
|
-
fetcher: Fetcher;
|
|
3657
|
-
}, onLoad: (response: NetworkResponse<THREE_2.CubeTexture, NetWorkMeta[]>) => void, onError: (error: Error) => void, onProgress: (percent: number) => void, renderer: THREE_2.WebGLRenderer): Promise<NetworkResponse<THREE_2.CubeTexture, NetWorkMeta[]>>;
|
|
3658
|
-
}
|
|
3659
|
-
|
|
3660
|
-
/**
|
|
3661
|
-
* 材质的图片参数
|
|
3662
|
-
*/
|
|
3663
|
-
export declare interface TextureOptions extends ImageOptions {
|
|
3664
|
-
/** 针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true */
|
|
3665
|
-
autoResize?: boolean;
|
|
3666
|
-
}
|
|
3667
|
-
|
|
3668
|
-
export declare class Tile {
|
|
3669
|
-
id: string;
|
|
3670
|
-
tileset: Tileset;
|
|
3671
|
-
parent: Tile | null;
|
|
3672
|
-
contentParent: Tile | null;
|
|
3673
|
-
geometricError: number;
|
|
3674
|
-
type: 'SCENEGRAPH' | 'EMPTY' | 'TILESET';
|
|
3675
|
-
floor: number;
|
|
3676
|
-
content: {
|
|
3677
|
-
uri: string;
|
|
3678
|
-
group?: number;
|
|
3679
|
-
data?: TileContentData;
|
|
3680
|
-
loadState: 'LOADING' | 'UNLOADED' | 'READY' | 'FAILED';
|
|
3681
|
-
loadStateUpdateTime: number;
|
|
3682
|
-
loadfailRetryDelay: number;
|
|
3683
|
-
byteLength: number;
|
|
3684
|
-
memoryUsage: number;
|
|
3685
|
-
} | null;
|
|
3686
|
-
level: number;
|
|
3687
|
-
levelOfContent: number;
|
|
3688
|
-
extras: Record<string, any>;
|
|
3689
|
-
refine: TileHeader['refine'];
|
|
3690
|
-
boundingVolume?: BoundingVolume;
|
|
3691
|
-
viewerRequestVolume?: BoundingVolume;
|
|
3692
|
-
transform: THREE_2.Matrix4;
|
|
3693
|
-
children: Tile[];
|
|
3694
|
-
state: {
|
|
3695
|
-
visible: boolean;
|
|
3696
|
-
frameNumber: number;
|
|
3697
|
-
selectedFrameNumber: number;
|
|
3698
|
-
requestedFrameNumber: number;
|
|
3699
|
-
touchedFrameNumber: number;
|
|
3700
|
-
distanceToCamera: number;
|
|
3701
|
-
centerZDepth: number;
|
|
3702
|
-
centerScreenY: number;
|
|
3703
|
-
screenSpaceError: number;
|
|
3704
|
-
inRequestVolume: boolean;
|
|
3705
|
-
visibilityPlaneMask: number;
|
|
3706
|
-
shouldRefine: boolean;
|
|
3707
|
-
stackLength: number;
|
|
3708
|
-
finalResolution: boolean;
|
|
3709
|
-
selectionDepth: number;
|
|
3710
|
-
shouldSelect: boolean;
|
|
3711
|
-
lastSelect: boolean;
|
|
3712
|
-
ancestorWithContent: Tile | null;
|
|
3713
|
-
ancestorWithContentAvailable: Tile | null;
|
|
3714
|
-
};
|
|
3715
|
-
constructor(id: string, header: TileHeader, tileset: Tileset, parent?: Tile);
|
|
3716
|
-
traverse(callback: (tile: Tile) => void): void;
|
|
3717
|
-
updateState(frameState: TilesetFrameState): void;
|
|
3718
|
-
get selected(): boolean;
|
|
3719
|
-
get hasChildren(): boolean;
|
|
3720
|
-
get siblingIndex(): number;
|
|
3721
|
-
get hasTilesetContent(): boolean;
|
|
3722
|
-
get hasRenderContent(): boolean;
|
|
3723
|
-
get contentAvailable(): boolean;
|
|
3724
|
-
get hasUnloadedContent(): boolean;
|
|
3725
|
-
get hasEmptyContent(): boolean;
|
|
3726
|
-
get contentReady(): boolean;
|
|
3727
|
-
get contentByteLength(): number;
|
|
3728
|
-
get contentMemoryUsage(): number;
|
|
3729
|
-
getScreenSpaceError(frameState: TilesetFrameState, distanceToCamera: number, useParentGeometricError: boolean): number;
|
|
3730
|
-
getPriority(frameState: TilesetFrameState): number;
|
|
3731
|
-
}
|
|
3732
|
-
|
|
3733
|
-
declare class Tile3D extends THREE_2.Object3D {
|
|
3734
|
-
type: 'point_cloud' | 'mesh';
|
|
3735
|
-
parent: Model | null;
|
|
3736
|
-
/** meta 信息加载错误 */
|
|
3737
|
-
error?: Error | null;
|
|
3738
|
-
/** meta 信息加载错误 */
|
|
3739
|
-
onError?: (error: Error) => void;
|
|
3740
|
-
/** 更新帧次数 */
|
|
3741
|
-
frameNumber: number;
|
|
3742
|
-
parameter: Parameter;
|
|
3743
|
-
light: boolean;
|
|
3744
|
-
upAxis: string;
|
|
3745
|
-
fetcher: Fetcher;
|
|
3746
|
-
search: string;
|
|
3747
|
-
groundHeight: number | null;
|
|
3748
|
-
coordinateSystem: TileCoordinateSystem;
|
|
3749
|
-
tileset: Tileset;
|
|
3750
|
-
boundingBox: THREE_2.Box3;
|
|
3751
|
-
autoRefine: boolean;
|
|
3752
|
-
refined: boolean;
|
|
3753
|
-
refineProgress: [number, number];
|
|
3754
|
-
loaded: boolean;
|
|
3755
|
-
private clearStencilObject;
|
|
3756
|
-
private disposed;
|
|
3757
|
-
private renderer?;
|
|
3758
|
-
private renderObjects;
|
|
3759
|
-
private backfaceObjects;
|
|
3760
|
-
private tileObjects;
|
|
3761
|
-
constructor(tilesetHeader: TilesetHeader, options: Tile3DOptions);
|
|
3762
|
-
get viewerRequestVolume(): BoundingVolume;
|
|
3763
|
-
set viewerRequestVolume(value: BoundingVolume);
|
|
3764
|
-
get tiles(): Tile[];
|
|
3765
|
-
get trajectories(): Trajectory[];
|
|
3766
|
-
getRecommendProps(options?: {
|
|
3767
|
-
powerPreference?: 'high' | 'default';
|
|
3768
|
-
}): {
|
|
3769
|
-
pointScale: number;
|
|
3770
|
-
pointMinPixel: number;
|
|
3771
|
-
maxScreenSpaceError: number;
|
|
3772
|
-
};
|
|
3773
|
-
loadContent(tile: Tile): Promise<void>;
|
|
3774
|
-
unloadContent(tile: Tile): Promise<void>;
|
|
3775
|
-
loadAllTilesets(): Promise<void>;
|
|
3776
|
-
loadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3777
|
-
unloadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3778
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
3779
|
-
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene, model: Model): boolean;
|
|
3780
|
-
dispose(): void;
|
|
3781
|
-
/**
|
|
3782
|
-
* @deprecated
|
|
3783
|
-
* use this.parent instead.
|
|
3784
|
-
*/
|
|
3785
|
-
get model(): Model;
|
|
3786
|
-
/**
|
|
3787
|
-
* @deprecated
|
|
3788
|
-
* it's self
|
|
3789
|
-
*/
|
|
3790
|
-
get scene(): this;
|
|
3791
|
-
/**
|
|
3792
|
-
* @deprecated
|
|
3793
|
-
* it's self
|
|
3794
|
-
*/
|
|
3795
|
-
get viewLayer(): this;
|
|
3796
|
-
localToEnu(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3797
|
-
enuToLocal(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3798
|
-
enuToEcef(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3799
|
-
ecefToEnu(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3800
|
-
localToEcef(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3801
|
-
ecefToLocal(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3802
|
-
localToLla(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3803
|
-
llaToLocal(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3804
|
-
worldToEnu(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3805
|
-
enuToWorld(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3806
|
-
worldToEcef(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3807
|
-
ecefToWorld(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3808
|
-
worldToLla(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3809
|
-
llaToWorld(vector: THREE_2.Vector3): THREE_2.Vector3;
|
|
3810
|
-
/**
|
|
3811
|
-
* @deprecated
|
|
3812
|
-
* 使用 localToLla(new THREE.Vector()) 替代
|
|
3813
|
-
*/
|
|
3814
|
-
get coordinates(): string;
|
|
3815
|
-
/**
|
|
3816
|
-
* @deprecated
|
|
3817
|
-
* 使用 coordinateSystem 替代
|
|
3818
|
-
*/
|
|
3819
|
-
getTransformMatrix4(target?: THREE_2.Matrix4): THREE_2.Matrix4;
|
|
3820
|
-
/**
|
|
3821
|
-
* @deprecated
|
|
3822
|
-
* 使用 llaToWorld 替代
|
|
3823
|
-
*/
|
|
3824
|
-
coordinatesToWorldPoint(coordinates: {
|
|
3825
|
-
longitude: number;
|
|
3826
|
-
latitude: number;
|
|
3827
|
-
altitude: number;
|
|
3828
|
-
}): THREE_2.Vector3;
|
|
3829
|
-
/**
|
|
3830
|
-
* @deprecated
|
|
3831
|
-
* 使用 llaToWorld 替代
|
|
3832
|
-
*/
|
|
3833
|
-
worldPointToCoordinates(point: THREE_2.Vector3): {
|
|
3834
|
-
longitude: number;
|
|
3835
|
-
latitude: number;
|
|
3836
|
-
altitude: number;
|
|
3837
|
-
};
|
|
3838
|
-
/**
|
|
3839
|
-
* @deprecated
|
|
3840
|
-
* Use `.parameter.reset('brightness')` instead
|
|
3841
|
-
*/
|
|
3842
|
-
resetBrightness(): void;
|
|
3843
|
-
/**
|
|
3844
|
-
* @deprecated
|
|
3845
|
-
* use `.parameter.minLevelOfDetail` `.parameter.set('minLevelOfDetail', minLevelOfDetail)` instend
|
|
3846
|
-
*/
|
|
3847
|
-
get minLevelOfDetail(): number;
|
|
3848
|
-
set minLevelOfDetail(value: number);
|
|
3849
|
-
/**
|
|
3850
|
-
* @deprecated
|
|
3851
|
-
* use `.parameter.maxLevelOfDetail` `.parameter.set('maxLevelOfDetail', maxLevelOfDetail)` instend
|
|
3852
|
-
*/
|
|
3853
|
-
get maxLevelOfDetail(): number;
|
|
3854
|
-
set maxLevelOfDetail(value: number);
|
|
3855
|
-
/**
|
|
3856
|
-
* @deprecated
|
|
3857
|
-
* use `.parameter.minGeometricError` `.parameter.set('minGeometricError', minGeometricError)` instend
|
|
3858
|
-
*/
|
|
3859
|
-
get minGeometricError(): number;
|
|
3860
|
-
set minGeometricError(value: number);
|
|
3861
|
-
/**
|
|
3862
|
-
* @deprecated
|
|
3863
|
-
* use `.parameter.maxGeometricError` `.parameter.set('maxGeometricError', maxGeometricError)` instend
|
|
3864
|
-
*/
|
|
3865
|
-
get maxGeometricError(): number;
|
|
3866
|
-
set maxGeometricError(value: number);
|
|
3867
|
-
/**
|
|
3868
|
-
* @deprecated
|
|
3869
|
-
* use `.parameter.panoramaMinGeometricError` `.parameter.set('panoramaMinGeometricError', panoramaMinGeometricError)` instend
|
|
3870
|
-
*/
|
|
3871
|
-
get panoramaMinGeometricError(): number;
|
|
3872
|
-
set panoramaMinGeometricError(value: number);
|
|
3873
|
-
/**
|
|
3874
|
-
* @deprecated
|
|
3875
|
-
* use `.parameter.skipLevelOfDetail` `.parameter.set('skipLevelOfDetail', skipLevelOfDetail)` instend
|
|
3876
|
-
*/
|
|
3877
|
-
get skipLevelOfDetail(): boolean;
|
|
3878
|
-
set skipLevelOfDetail(value: boolean);
|
|
3879
|
-
/**
|
|
3880
|
-
* @deprecated
|
|
3881
|
-
* use `.parameter.mostDetail` `.parameter.set('mostDetail', mostDetail)` instend
|
|
3882
|
-
*/
|
|
3883
|
-
get mostDetail(): boolean;
|
|
3884
|
-
set mostDetail(value: boolean);
|
|
3885
|
-
/**
|
|
3886
|
-
* @deprecated
|
|
3887
|
-
* use `.parameter.loadSiblings` `.parameter.set('loadSiblings', loadSiblings)` instend
|
|
3888
|
-
*/
|
|
3889
|
-
get loadSiblings(): boolean;
|
|
3890
|
-
set loadSiblings(value: boolean);
|
|
3891
|
-
/**
|
|
3892
|
-
* @deprecated
|
|
3893
|
-
* use `.parameter.maxMemoryUsage` `.parameter.set('maxMemoryUsage', maxMemoryUsage)` instend
|
|
3894
|
-
*/
|
|
3895
|
-
get maxMemoryUsage(): number;
|
|
3896
|
-
set maxMemoryUsage(value: number);
|
|
3897
|
-
/**
|
|
3898
|
-
* @deprecated
|
|
3899
|
-
* use `.parameter.maxRequests` `.parameter.set('maxRequests', maxRequests)` instend
|
|
3900
|
-
*/
|
|
3901
|
-
get maxRequests(): number;
|
|
3902
|
-
set maxRequests(value: number);
|
|
3903
|
-
/**
|
|
3904
|
-
* @deprecated
|
|
3905
|
-
* use `.parameter.requestOrder` `.parameter.set('requestOrder', requestOrder)` instend
|
|
3906
|
-
*/
|
|
3907
|
-
get requestOrder(): TileRequestOrder;
|
|
3908
|
-
set requestOrder(value: TileRequestOrder);
|
|
3909
|
-
/**
|
|
3910
|
-
* @deprecated
|
|
3911
|
-
* use `.parameter.maxScreenSpaceError` `.parameter.set('maxScreenSpaceError', maxScreenSpaceError)` instend
|
|
3912
|
-
*/
|
|
3913
|
-
get maxScreenSpaceError(): number;
|
|
3914
|
-
set maxScreenSpaceError(value: number);
|
|
3915
|
-
}
|
|
3916
|
-
export { Tile3D }
|
|
3917
|
-
export { Tile3D as Tile3DModel }
|
|
3918
|
-
|
|
3919
|
-
/** Advanced loader options */
|
|
3920
|
-
declare interface Tile3DOptions {
|
|
3921
|
-
name: string;
|
|
3922
|
-
light: boolean;
|
|
3923
|
-
type: 'point_cloud' | 'mesh';
|
|
3924
|
-
upAxis: string;
|
|
3925
|
-
fetcher: Fetcher;
|
|
3926
|
-
search?: string;
|
|
3927
|
-
groundHeight: number | null;
|
|
3928
|
-
coordinateSystem: TileCoordinateSystem;
|
|
3929
|
-
error?: Error | null;
|
|
3930
|
-
}
|
|
3931
|
-
export { Tile3DOptions as Tile3DModelLoaderOptions }
|
|
3932
|
-
export { Tile3DOptions }
|
|
3933
|
-
|
|
3934
|
-
export declare class TileCache {
|
|
3935
|
-
private options;
|
|
3936
|
-
private cacheNodeMap;
|
|
3937
|
-
private list;
|
|
3938
|
-
private sentinel;
|
|
3939
|
-
constructor(options?: TileCacheOptions);
|
|
3940
|
-
reset(): void;
|
|
3941
|
-
touchTile(tile: Tile): void;
|
|
3942
|
-
loadTile(tile: Tile): void;
|
|
3943
|
-
unloadTile(tile: Tile): void;
|
|
3944
|
-
unloadTiles(isOverMemory: () => boolean): void;
|
|
3945
|
-
toArray(): Tile[];
|
|
3946
|
-
}
|
|
3947
|
-
|
|
3948
|
-
export declare type TileCacheOptions = {
|
|
3949
|
-
onTileLoad?: (tile: Tile) => void;
|
|
3950
|
-
onTileUnload?: (tile: Tile) => void;
|
|
3951
|
-
};
|
|
3952
|
-
|
|
3953
|
-
export declare type TileContentData = {
|
|
3954
|
-
type: LoadResultType['type'];
|
|
3955
|
-
byteLength: number;
|
|
3956
|
-
memoryUsage: number;
|
|
3957
|
-
uri: string;
|
|
3958
|
-
object: TileNode;
|
|
3959
|
-
};
|
|
3960
|
-
|
|
3961
|
-
export declare interface TileCoordinateSystem {
|
|
3962
|
-
enuToEcefMatrix: THREE_2.Matrix4;
|
|
3963
|
-
ecefToEnuMatrix: THREE_2.Matrix4;
|
|
3964
|
-
}
|
|
3965
|
-
|
|
3966
|
-
export declare interface TileHeader {
|
|
3967
|
-
content?: {
|
|
3968
|
-
uri?: string;
|
|
3969
|
-
url?: string;
|
|
3970
|
-
group?: number;
|
|
3971
|
-
boundingVolume?: BoundingVolumeJson;
|
|
3972
|
-
};
|
|
3973
|
-
geometricError: number;
|
|
3974
|
-
refine?: "REPLACE" | "ADD";
|
|
3975
|
-
boundingVolume?: BoundingVolumeJson;
|
|
3976
|
-
viewerRequestVolume?: BoundingVolumeJson;
|
|
3977
|
-
transform?: number[];
|
|
3978
|
-
children?: TileHeader[];
|
|
3979
|
-
extras?: Record<string, any>;
|
|
3980
|
-
}
|
|
3981
|
-
|
|
3982
|
-
export declare class TileNode extends THREE_2.Object3D {
|
|
3983
|
-
materials: THREE_2.Material[];
|
|
3984
|
-
animations: THREE_2.AnimationClip[];
|
|
3985
|
-
pbmObjects: (PBMMesh | PBMSkinnedMesh | PBMPointCloud | PBMGSObject)[];
|
|
3986
|
-
private contentObject;
|
|
3987
|
-
private appearMotion;
|
|
3988
|
-
private disposers;
|
|
3989
|
-
constructor(name: string, contentObject: THREE_2.Object3D, animations: THREE_2.AnimationClip[], disposer?: () => void);
|
|
3990
|
-
generateBvhTree(): Promise<this>;
|
|
3991
|
-
intersectRaycaster(raycaster: THREE_2.Raycaster, target?: Intersection[]): Intersection[];
|
|
3992
|
-
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene, tile3d: Tile3D, tile: Tile, parameterValue: ResolvedParameterValue): boolean;
|
|
3993
|
-
dispose(): void;
|
|
3994
|
-
clone(): this;
|
|
3995
|
-
}
|
|
3996
|
-
|
|
3997
|
-
export declare type TileRequestOrder = 'SCREEN_SPACE_ERROR' | 'SCREEN_LEVEL_VERTICAL' | 'SCREEN_VERTICAL';
|
|
3998
|
-
|
|
3999
|
-
export declare class TileRequestScheduler {
|
|
4000
|
-
private tileset;
|
|
4001
|
-
private options;
|
|
4002
|
-
private activeRequests;
|
|
4003
|
-
private requestQueue;
|
|
4004
|
-
constructor(tileset: Tileset, options: TileRequestSchedulerOptions);
|
|
4005
|
-
reset(): void;
|
|
4006
|
-
update(requestTiles: Tile[], order: TileRequestOrder, frameState: TilesetFrameState): void;
|
|
4007
|
-
}
|
|
4008
|
-
|
|
4009
|
-
export declare type TileRequestSchedulerOptions = {
|
|
4010
|
-
onTileSkip?: (tile: Tile) => void;
|
|
4011
|
-
onTileLoad?: (tile: Tile) => void;
|
|
4012
|
-
onTileError?: (tile: Tile, error: Error) => void;
|
|
4013
|
-
};
|
|
4014
|
-
|
|
4015
|
-
export declare class Tileset {
|
|
4016
|
-
asset: {
|
|
4017
|
-
version: string;
|
|
4018
|
-
tilesetVersion: string;
|
|
4019
|
-
gltfUpAxis: "Y" | "Z";
|
|
4020
|
-
overview?: {
|
|
4021
|
-
imageFile: string;
|
|
4022
|
-
worldFile: string;
|
|
4023
|
-
imageWidth: number;
|
|
4024
|
-
imageHeight: number;
|
|
4025
|
-
};
|
|
4026
|
-
trajectories?: TrajectoryHeader[];
|
|
4027
|
-
[key: string]: any;
|
|
4028
|
-
};
|
|
4029
|
-
id: string;
|
|
4030
|
-
frameNumber: number;
|
|
4031
|
-
hasMixedContent: boolean;
|
|
4032
|
-
properties: NonNullable<TilesetHeader['properties']>;
|
|
4033
|
-
options: TilesetOptions;
|
|
4034
|
-
root: Tile;
|
|
4035
|
-
rootMeta: NonNullable<TilesetHeader['rootMeta']>;
|
|
4036
|
-
transform: THREE_2.Matrix4;
|
|
4037
|
-
geometricError: number;
|
|
4038
|
-
cache: TileCache;
|
|
4039
|
-
currentMaxScreenSpaceError: number;
|
|
4040
|
-
requestScheduler: TileRequestScheduler;
|
|
4041
|
-
private cacheMemoryUsageInBytes;
|
|
4042
|
-
private normalTraverser;
|
|
4043
|
-
private skipTraverser;
|
|
4044
|
-
private mostDetailTraverser;
|
|
4045
|
-
loadedTiles: Set<Tile>;
|
|
4046
|
-
needsRefinedTiles: Set<Tile>;
|
|
4047
|
-
requestedTiles: Tile[];
|
|
4048
|
-
selectedTiles: Tile[];
|
|
4049
|
-
unloadTiles: Tile[];
|
|
4050
|
-
trajectories: Trajectory[];
|
|
4051
|
-
selectedTrajectories: Trajectory[];
|
|
4052
|
-
pointLength: number;
|
|
4053
|
-
floorLength: number;
|
|
4054
|
-
constructor(header: TilesetHeader, options: TilesetOptions);
|
|
4055
|
-
/**
|
|
4056
|
-
* 通过当前的内存使用,推测 maxScreenSpaceError
|
|
4057
|
-
*/
|
|
4058
|
-
private adjustScreenSpaceError;
|
|
4059
|
-
private getTraverser;
|
|
4060
|
-
/** Release resources */
|
|
4061
|
-
reset(): void;
|
|
4062
|
-
update(frameState: TilesetFrameState, cacheFrameStates?: TilesetFrameState[]): void;
|
|
4063
|
-
}
|
|
4064
|
-
|
|
4065
|
-
export declare type TilesetFrameState = {
|
|
4066
|
-
frameNumber: number;
|
|
4067
|
-
time: number;
|
|
4068
|
-
camera: {
|
|
4069
|
-
type: "PerspectiveCamera" | "OrthographicCamera";
|
|
4070
|
-
position: THREE_2.Vector3;
|
|
4071
|
-
direction: THREE_2.Vector3;
|
|
4072
|
-
up: THREE_2.Vector3;
|
|
4073
|
-
projectionMatrix: THREE_2.Matrix4;
|
|
4074
|
-
visible: boolean;
|
|
4075
|
-
refine: boolean;
|
|
4076
|
-
};
|
|
4077
|
-
height: number;
|
|
4078
|
-
pixelRatio: number;
|
|
4079
|
-
cullingVolume: CullingVolume;
|
|
4080
|
-
sseDenominator: number;
|
|
4081
|
-
minLevelOfDetail: number;
|
|
4082
|
-
maxLevelOfDetail: number;
|
|
4083
|
-
minGeometricError: number;
|
|
4084
|
-
maxGeometricError: number;
|
|
4085
|
-
skipLevelOfDetail: boolean;
|
|
4086
|
-
mostDetail: boolean;
|
|
4087
|
-
loadSiblings: boolean;
|
|
4088
|
-
cameraCulling: boolean;
|
|
4089
|
-
maxRequests: number;
|
|
4090
|
-
requestOrder: TileRequestOrder;
|
|
4091
|
-
maxScreenSpaceError: number;
|
|
4092
|
-
memoryAdjustedScreenSpaceError: boolean;
|
|
4093
|
-
maxMemoryUsage: number;
|
|
4094
|
-
};
|
|
4095
|
-
|
|
4096
|
-
export declare interface TilesetHeader {
|
|
4097
|
-
tilesetUrl: string;
|
|
4098
|
-
asset: {
|
|
4099
|
-
version: string;
|
|
4100
|
-
tilesetVersion?: string;
|
|
4101
|
-
gltfUpAxis?: "Y" | "Z";
|
|
4102
|
-
/** 俯视图 */
|
|
4103
|
-
overview?: {
|
|
4104
|
-
imageFile: string;
|
|
4105
|
-
worldFile: string;
|
|
4106
|
-
imageWidth: number;
|
|
4107
|
-
imageHeight: number;
|
|
4108
|
-
};
|
|
4109
|
-
/** 轨迹数据 */
|
|
4110
|
-
trajectories?: {
|
|
4111
|
-
version: string;
|
|
4112
|
-
list: TrajectoryHeader[];
|
|
4113
|
-
};
|
|
4114
|
-
[key: string]: any;
|
|
4115
|
-
};
|
|
4116
|
-
/**
|
|
4117
|
-
* @deprecated
|
|
4118
|
-
* 老数据,记录层高。现在记录在 tile 的 extra 中
|
|
4119
|
-
*/
|
|
4120
|
-
properties?: {
|
|
4121
|
-
floorInfo?: {
|
|
4122
|
-
ground: number;
|
|
4123
|
-
height: number;
|
|
4124
|
-
}[];
|
|
4125
|
-
};
|
|
4126
|
-
geometricError: number;
|
|
4127
|
-
root: TileHeader;
|
|
4128
|
-
rootMeta?: {
|
|
4129
|
-
/** 创建时间 */
|
|
4130
|
-
creationTime?: string;
|
|
4131
|
-
/** 天轴 X Y Z */
|
|
4132
|
-
upAxis?: string;
|
|
4133
|
-
/** 楼层数 */
|
|
4134
|
-
numFloors?: number;
|
|
4135
|
-
/** 点云的点数量 */
|
|
4136
|
-
numTotalPoints?: number;
|
|
4137
|
-
/** 采集轨迹数量 */
|
|
4138
|
-
numTrajectories?: number;
|
|
4139
|
-
/** 点云的 pnts 数据的排序规则 */
|
|
4140
|
-
pntsOrder?: "RANDOM" | "UNSORTED";
|
|
4141
|
-
/** 坐标参数 */
|
|
4142
|
-
coordinate?: {
|
|
4143
|
-
version: number;
|
|
4144
|
-
base_keyframe: number;
|
|
4145
|
-
base_trajectory: number;
|
|
4146
|
-
coordinate_system: string;
|
|
4147
|
-
ground_height: number;
|
|
4148
|
-
lon_lat_alt: [number, number, number];
|
|
4149
|
-
pose_ecef_to_enu: number[];
|
|
4150
|
-
pose_enu_to_ecef: number[];
|
|
4151
|
-
};
|
|
4152
|
-
/** 任务触发参数 */
|
|
4153
|
-
taskParameters?: {
|
|
4154
|
-
/** 是否跑点云均匀化 "0" "1" 的字符串 */
|
|
4155
|
-
point_homogenization?: string;
|
|
4156
|
-
/** 是否跑点云均匀化参数 "数字" 的字符串 */
|
|
4157
|
-
homo_point_density?: string;
|
|
4158
|
-
};
|
|
4159
|
-
};
|
|
4160
|
-
}
|
|
4161
|
-
|
|
4162
|
-
export declare interface TilesetOptions {
|
|
4163
|
-
url?: string;
|
|
4164
|
-
tileLoader: (tile: Tile) => Promise<void>;
|
|
4165
|
-
tileUnloader: (tile: Tile) => Promise<void>;
|
|
4166
|
-
onTileLoad: (tile: Tile) => any;
|
|
4167
|
-
onTileUnload: (tile: Tile) => any;
|
|
4168
|
-
onTileError: (tile: Tile, error: Error) => any;
|
|
4169
|
-
trajectoryLoader: (trajectory: Trajectory) => Promise<void>;
|
|
4170
|
-
trajectoryUnloader: (trajectory: Trajectory) => Promise<void>;
|
|
4171
|
-
onTrajectoryLoad: (trajectory: Trajectory) => any;
|
|
4172
|
-
onTrajectoryUnload: (trajectory: Trajectory) => any;
|
|
4173
|
-
onTrajectoryError: (trajectory: Trajectory, error: Error) => any;
|
|
4174
|
-
}
|
|
4175
|
-
|
|
4176
|
-
export declare interface TopviewControllerCustomInitArgs extends Omit<FloorplanControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
4177
|
-
}
|
|
4178
|
-
|
|
4179
|
-
export declare class Trajectory {
|
|
4180
|
-
id: string;
|
|
4181
|
-
name: string;
|
|
4182
|
-
tileset: Tileset;
|
|
4183
|
-
transform: THREE_2.Matrix4;
|
|
4184
|
-
visible: boolean;
|
|
4185
|
-
content: {
|
|
4186
|
-
uri: string;
|
|
4187
|
-
data?: TrajectoryContentData;
|
|
4188
|
-
loadState: 'LOADING' | 'UNLOADED' | 'READY' | 'FAILED';
|
|
4189
|
-
loadStateUpdateTime: number;
|
|
4190
|
-
loadfailRetryDelay: number;
|
|
4191
|
-
byteLength: number;
|
|
4192
|
-
memoryUsage: number;
|
|
4193
|
-
};
|
|
4194
|
-
constructor(id: string, header: TrajectoryHeader, tileset: Tileset);
|
|
4195
|
-
}
|
|
4196
|
-
|
|
4197
|
-
export declare type TrajectoryContentData = {
|
|
4198
|
-
byteLength: number;
|
|
4199
|
-
memoryUsage: number;
|
|
4200
|
-
uri: string;
|
|
4201
|
-
object: TrajectoryNode;
|
|
4202
|
-
positionArray: ArrayLike<number>;
|
|
4203
|
-
timeArray: ArrayLike<number>;
|
|
4204
|
-
};
|
|
4205
|
-
|
|
4206
|
-
export declare interface TrajectoryHeader {
|
|
4207
|
-
file: string;
|
|
4208
|
-
name: string;
|
|
4209
|
-
color?: number | string;
|
|
4210
|
-
transform?: number[];
|
|
4211
|
-
}
|
|
4212
|
-
|
|
4213
|
-
export declare class TrajectoryNode extends THREE_2.Object3D {
|
|
4214
|
-
name: string;
|
|
4215
|
-
contentObject: THREE_2.Object3D;
|
|
4216
|
-
private disposers;
|
|
4217
|
-
constructor(name: string, contentObject: THREE_2.Object3D, disposer?: () => void);
|
|
4218
|
-
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene, tile3d: Tile3D, trajectory: Trajectory, parameterValue: ParameterValue): boolean;
|
|
4219
|
-
dispose(): void;
|
|
4220
|
-
clone(): this;
|
|
4221
|
-
}
|
|
4222
|
-
|
|
4223
|
-
/** 单位向量转换成坐标 */
|
|
4224
|
-
export declare function vectorToCoordinates(vector: THREE_2.Vector3): {
|
|
4225
|
-
longitude: number;
|
|
4226
|
-
latitude: number;
|
|
4227
|
-
};
|
|
4228
|
-
|
|
4229
|
-
export declare interface ViewLayer extends Tile3D {
|
|
4230
|
-
}
|
|
4231
|
-
|
|
4232
|
-
/**
|
|
4233
|
-
* 显示区域裁剪参数
|
|
4234
|
-
* @description
|
|
4235
|
-
* 可通过初始化,或者 setScissor 方式设置
|
|
4236
|
-
* `scissor` 是将屏幕中的内容渲染到 `renderer` 的指定区域。
|
|
4237
|
-
* 页面整体长宽均为 `1`。通过类似 css 的 `left` `bottom` `width` `height` 来确定区域。
|
|
4238
|
-
*/
|
|
4239
|
-
export declare interface Viewport {
|
|
4240
|
-
/** 距离左侧 */
|
|
4241
|
-
left: number;
|
|
4242
|
-
/** 距离下侧 */
|
|
4243
|
-
bottom: number;
|
|
4244
|
-
/** 宽度 */
|
|
4245
|
-
width: number;
|
|
4246
|
-
/** 高度 */
|
|
4247
|
-
height: number;
|
|
4248
|
-
}
|
|
4249
|
-
|
|
4250
|
-
export declare enum VolumePlaneIntersect {
|
|
4251
|
-
Outside = -1,
|
|
4252
|
-
Intersecting = 0,
|
|
4253
|
-
Inside = 1
|
|
4254
|
-
}
|
|
4255
|
-
|
|
4256
|
-
export declare interface VRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
4257
|
-
}
|
|
4258
|
-
|
|
4259
|
-
export declare interface WebXRAxesParams {
|
|
4260
|
-
raycaster: {
|
|
4261
|
-
leftRay?: THREE_2.Raycaster;
|
|
4262
|
-
rightRay?: THREE_2.Raycaster;
|
|
4263
|
-
};
|
|
4264
|
-
axesState: {
|
|
4265
|
-
up: number;
|
|
4266
|
-
down: number;
|
|
4267
|
-
left: number;
|
|
4268
|
-
right: number;
|
|
4269
|
-
};
|
|
4270
|
-
deltaTime: number;
|
|
4271
|
-
}
|
|
4272
|
-
|
|
4273
|
-
export declare type WebXRControllerKey = XRGestureEvent['buttons'];
|
|
4274
|
-
|
|
4275
|
-
export declare interface WebXRControllerParams {
|
|
4276
|
-
raycaster: {
|
|
4277
|
-
leftRay: THREE_2.Raycaster;
|
|
4278
|
-
rightRay: THREE_2.Raycaster;
|
|
4279
|
-
};
|
|
4280
|
-
}
|
|
4281
|
-
|
|
4282
|
-
export declare type WebXRControllerType = 'tap' | 'press' | 'axes' | 'buttonUp' | 'buttonDown';
|
|
4283
|
-
|
|
4284
|
-
export declare interface Work {
|
|
4285
|
-
/** 数据签发人 */
|
|
4286
|
-
issuer: string;
|
|
4287
|
-
/** 编号 */
|
|
4288
|
-
workCode: string;
|
|
4289
|
-
/** 内部项目 id */
|
|
4290
|
-
projectId?: string;
|
|
4291
|
-
/** 允许访问的安全域名 */
|
|
4292
|
-
allowHosts: readonly string[];
|
|
4293
|
-
/** 过期时间 */
|
|
4294
|
-
expire: Date;
|
|
4295
|
-
/** 名称 */
|
|
4296
|
-
name: string;
|
|
4297
|
-
/** 根地址 */
|
|
4298
|
-
baseURL: string;
|
|
4299
|
-
/** 初始化参数 */
|
|
4300
|
-
initial: WorkInitial;
|
|
4301
|
-
/** 相对位姿 */
|
|
4302
|
-
transform: THREE_2.Matrix4;
|
|
4303
|
-
/** 模型参数 */
|
|
4304
|
-
model?: WorkModel;
|
|
4305
|
-
/** 全景点位信息 */
|
|
4306
|
-
observers: readonly WorkObserver[];
|
|
4307
|
-
}
|
|
4308
|
-
|
|
4309
|
-
export declare class Work {
|
|
4310
|
-
jsonp: boolean;
|
|
4311
|
-
shortPath: boolean;
|
|
4312
|
-
observerBox: THREE_2.Box3;
|
|
4313
|
-
/**
|
|
4314
|
-
* 控制参数
|
|
4315
|
-
* @deprecated 通过 work.transform 替换
|
|
4316
|
-
*/
|
|
4317
|
-
options: {
|
|
4318
|
-
/**
|
|
4319
|
-
* 位姿修正
|
|
4320
|
-
* @deprecated 通过 work.transform 替换
|
|
4321
|
-
*/
|
|
4322
|
-
transform: THREE_2.Matrix4;
|
|
4323
|
-
};
|
|
4324
|
-
/**
|
|
4325
|
-
* 原始数据
|
|
4326
|
-
* @deprecated 通过 work.toJSON 替换
|
|
4327
|
-
*/
|
|
4328
|
-
raw: {
|
|
4329
|
-
works: string[];
|
|
4330
|
-
};
|
|
4331
|
-
/**
|
|
4332
|
-
* 解析 Work 数据
|
|
4333
|
-
* @param obj - work 数据,从如数开发者平台获取
|
|
4334
|
-
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
4335
|
-
* @returns - 签署过的 Work 数据结构
|
|
4336
|
-
*/
|
|
4337
|
-
static parse: typeof parseWork;
|
|
4338
|
-
constructor(obj: Work | LoosePanoWork | LooseWork | (Work | LooseWork)[] | any, options: ParseOptions);
|
|
4339
|
-
getURL(source: string): string;
|
|
4340
|
-
verifyURL(source: string): boolean;
|
|
4341
|
-
toJSON(): any;
|
|
4342
|
-
}
|
|
4343
|
-
|
|
4344
|
-
export declare interface WorkCubeImage extends Record<CubeFace, string> {
|
|
4345
|
-
work: Work;
|
|
4346
|
-
}
|
|
4347
|
-
|
|
4348
|
-
/** 全景图 */
|
|
4349
|
-
export declare interface WorkImage extends WorkCubeImage {
|
|
4350
|
-
/** 分辨率表 */
|
|
4351
|
-
sizeList: readonly number[];
|
|
4352
|
-
/** 瓦片信息 */
|
|
4353
|
-
tiles: readonly WorkTile[];
|
|
4354
|
-
/** 点位视频 */
|
|
4355
|
-
video?: WorkVideo;
|
|
4356
|
-
}
|
|
4357
|
-
|
|
4358
|
-
/** 初始化位姿参数 */
|
|
4359
|
-
export declare interface WorkInitial {
|
|
4360
|
-
work: Work;
|
|
4361
|
-
/** 模态 */
|
|
4362
|
-
mode?: Mode;
|
|
4363
|
-
/** 点位序号 */
|
|
4364
|
-
panoIndex?: number;
|
|
4365
|
-
/** 相机水平角 */
|
|
4366
|
-
longitude?: number;
|
|
4367
|
-
/** 相机俯仰角 */
|
|
4368
|
-
latitude?: number;
|
|
4369
|
-
/** 相机可视角度(垂直)*/
|
|
4370
|
-
fov?: number;
|
|
4371
|
-
/** 相机观察点位置 [x, y, z] */
|
|
4372
|
-
offset?: THREE_2.Vector3;
|
|
4373
|
-
/** 相机距离观察点距离 */
|
|
4374
|
-
distance?: number;
|
|
4375
|
-
}
|
|
4376
|
-
|
|
4377
|
-
export declare interface WorkInitialJson {
|
|
4378
|
-
mode?: string;
|
|
4379
|
-
pano_index?: number;
|
|
4380
|
-
longitude?: number;
|
|
4381
|
-
latitude?: number;
|
|
4382
|
-
fov?: number;
|
|
4383
|
-
offset?: number[];
|
|
4384
|
-
distance?: number;
|
|
4385
|
-
}
|
|
4386
|
-
|
|
4387
|
-
export declare interface WorkJson {
|
|
4388
|
-
allow_hosts: string[];
|
|
4389
|
-
expire_at: string;
|
|
4390
|
-
code: string;
|
|
4391
|
-
name?: string;
|
|
4392
|
-
project_id?: string;
|
|
4393
|
-
base_url: string;
|
|
4394
|
-
initial?: WorkInitialJson;
|
|
4395
|
-
model?: WorkModelJson;
|
|
4396
|
-
observers?: WorkObserverJson[];
|
|
4397
|
-
panorama?: WorkPanoramasJson;
|
|
4398
|
-
}
|
|
4399
|
-
|
|
4400
|
-
/** 模型数据 */
|
|
4401
|
-
export declare interface WorkModel {
|
|
4402
|
-
/** work */
|
|
4403
|
-
work: Work;
|
|
4404
|
-
/** 模型文件地址 at3d / domez */
|
|
4405
|
-
file?: string;
|
|
4406
|
-
/** 模型贴图文件地址 */
|
|
4407
|
-
textures?: readonly string[];
|
|
4408
|
-
/** 模型贴图文件地址的父目录 */
|
|
4409
|
-
textureBase?: string;
|
|
4410
|
-
/** 指定上方向,对于 obj, ply 等定义不明确的需要指定上方向 */
|
|
4411
|
-
upAxis?: string;
|
|
4412
|
-
/** 模型的地理坐标数据 */
|
|
4413
|
-
coordinate?: NonNullable<TilesetHeader['rootMeta']>['coordinate'];
|
|
4414
|
-
/** 3d tile */
|
|
4415
|
-
layers: readonly WorkModelLayer[];
|
|
4416
|
-
}
|
|
4417
|
-
|
|
4418
|
-
export declare interface WorkModelJson {
|
|
4419
|
-
file_url?: string;
|
|
4420
|
-
material_textures?: string[];
|
|
4421
|
-
material_base_url?: string;
|
|
4422
|
-
up_axis?: string;
|
|
4423
|
-
layers?: WorkModelLayerJson[];
|
|
4424
|
-
}
|
|
4425
|
-
|
|
4426
|
-
export declare interface WorkModelLayer {
|
|
4427
|
-
/** work */
|
|
4428
|
-
work: Work;
|
|
4429
|
-
/** 模型类型 point_cloud mesh */
|
|
4430
|
-
type: 'point_cloud' | 'mesh';
|
|
4431
|
-
/** 模型名称 */
|
|
4432
|
-
name: string;
|
|
4433
|
-
/** 指定上方向 */
|
|
4434
|
-
upAxis: string;
|
|
4435
|
-
/** 如果 tileset.json 地址 */
|
|
4436
|
-
tileset: string;
|
|
4437
|
-
}
|
|
4438
|
-
|
|
4439
|
-
export declare interface WorkModelLayerJson {
|
|
4440
|
-
name?: string;
|
|
4441
|
-
type?: string;
|
|
4442
|
-
up_axis: string;
|
|
4443
|
-
tileset_url: string;
|
|
4444
|
-
}
|
|
4445
|
-
|
|
4446
|
-
/** 每个点位的数据 */
|
|
4447
|
-
export declare interface WorkObserver {
|
|
4448
|
-
/** work */
|
|
4449
|
-
work: Work;
|
|
4450
|
-
/** 序号 */
|
|
4451
|
-
index: number;
|
|
4452
|
-
/** 序号 */
|
|
4453
|
-
panoIndex: number;
|
|
4454
|
-
/**
|
|
4455
|
-
* 序号
|
|
4456
|
-
* @example
|
|
4457
|
-
* `${workCode}[${panoIndex}]`
|
|
4458
|
-
*/
|
|
4459
|
-
panoId: PanoId;
|
|
4460
|
-
/** 点位所在楼层 */
|
|
4461
|
-
floorIndex: number;
|
|
4462
|
-
/** 点位 derived_id */
|
|
4463
|
-
derivedId: number;
|
|
4464
|
-
/** 点位 derived_id_str */
|
|
4465
|
-
derivedIdStr: string;
|
|
4466
|
-
/** 点位是否激活可用 */
|
|
4467
|
-
active: boolean;
|
|
4468
|
-
/** 点位是否可加载 */
|
|
4469
|
-
loadable: boolean;
|
|
4470
|
-
/** 点位全景图 */
|
|
4471
|
-
images: WorkImage;
|
|
4472
|
-
/**
|
|
4473
|
-
* @deprecated
|
|
4474
|
-
* 可以看到的相关点位序号
|
|
4475
|
-
* 数据和 accessibleNodes 一致,使用 accessibleNodes
|
|
4476
|
-
*/
|
|
4477
|
-
visibleNodes: readonly number[];
|
|
4478
|
-
/** 可以连通的相关点位序号 */
|
|
4479
|
-
accessibleNodes: readonly number[];
|
|
4480
|
-
/** 点位和模型的地面坐标 */
|
|
4481
|
-
standingPosition: THREE_2.Vector3;
|
|
4482
|
-
/** 点位和模型的观察点坐标 */
|
|
4483
|
-
position: THREE_2.Vector3;
|
|
4484
|
-
/** 点位和模型的旋转对齐关系四元数 */
|
|
4485
|
-
quaternion: THREE_2.Quaternion;
|
|
4486
|
-
/** 点位和模型的旋转对齐关系矩阵 */
|
|
4487
|
-
matrix: THREE_2.Matrix4;
|
|
4488
|
-
}
|
|
4489
|
-
|
|
4490
|
-
export declare interface WorkObserverJson {
|
|
4491
|
-
index: number;
|
|
4492
|
-
floor_index: number;
|
|
4493
|
-
derived_id: number;
|
|
4494
|
-
derived_id_str: string;
|
|
4495
|
-
position: number[];
|
|
4496
|
-
standing_position: number[];
|
|
4497
|
-
quaternion: {
|
|
4498
|
-
x: number;
|
|
4499
|
-
y: number;
|
|
4500
|
-
z: number;
|
|
4501
|
-
w: number;
|
|
4502
|
-
};
|
|
4503
|
-
visible_nodes: number[];
|
|
4504
|
-
accessible_nodes: number[];
|
|
4505
|
-
}
|
|
4506
|
-
|
|
4507
|
-
export declare interface WorkPanoramaJson {
|
|
4508
|
-
index: number;
|
|
4509
|
-
active?: boolean;
|
|
4510
|
-
loadable?: boolean;
|
|
4511
|
-
derived_id?: number;
|
|
4512
|
-
derived_id_str?: string;
|
|
4513
|
-
size_list: number[];
|
|
4514
|
-
up: string;
|
|
4515
|
-
down: string;
|
|
4516
|
-
right: string;
|
|
4517
|
-
left: string;
|
|
4518
|
-
front: string;
|
|
4519
|
-
back: string;
|
|
4520
|
-
video?: {
|
|
4521
|
-
source: string;
|
|
4522
|
-
matrix: number[];
|
|
4523
|
-
size: number[];
|
|
4524
|
-
};
|
|
4525
|
-
}
|
|
4526
|
-
|
|
4527
|
-
export declare interface WorkPanoramasJson {
|
|
4528
|
-
count: number;
|
|
4529
|
-
list: WorkPanoramaJson[];
|
|
4530
|
-
}
|
|
4531
|
-
|
|
4532
|
-
export declare interface WorkResolvedObserver extends WorkObserver {
|
|
4533
|
-
isResolved: true;
|
|
4534
|
-
panoId: PanoId;
|
|
4535
|
-
pano: Pano;
|
|
4536
|
-
accessibleIds: readonly PanoId[];
|
|
4537
|
-
visibleIds: readonly PanoId[];
|
|
4538
|
-
}
|
|
4539
|
-
|
|
4540
|
-
export declare class WorkResolvedObserver {
|
|
4541
|
-
constructor(observer: WorkObserver);
|
|
4542
|
-
}
|
|
4543
|
-
|
|
4544
|
-
export declare type Works = ReadonlyArray<Work> & {
|
|
4545
|
-
initial: WorkInitial;
|
|
4546
|
-
getWork(workCode: string): Work | undefined;
|
|
4547
|
-
getObserver(pano: PanoId | Pano | number): WorkObserver | undefined;
|
|
4548
|
-
getResolvedObserver(pano: PanoId | Pano | number): WorkResolvedObserver | undefined;
|
|
4549
|
-
};
|
|
4550
|
-
|
|
4551
|
-
export declare interface WorksEvent extends BaseEvent {
|
|
4552
|
-
input: any;
|
|
4553
|
-
works: Works;
|
|
4554
|
-
userAction: boolean;
|
|
4555
|
-
}
|
|
4556
|
-
|
|
4557
|
-
export declare interface WorkTile extends WorkCubeImage {
|
|
4558
|
-
/** 层级 */
|
|
4559
|
-
level: number;
|
|
4560
|
-
/** 尺寸 */
|
|
4561
|
-
size: number;
|
|
4562
|
-
/** 缩放比例 */
|
|
4563
|
-
scale: number;
|
|
4564
|
-
}
|
|
4565
|
-
|
|
4566
|
-
export declare function workToJson(work: Work): WorkJson;
|
|
4567
|
-
|
|
4568
|
-
/** 全景视频贴片 */
|
|
4569
|
-
export declare interface WorkVideo {
|
|
4570
|
-
work: Work;
|
|
4571
|
-
/** 视频源 url */
|
|
4572
|
-
source: string;
|
|
4573
|
-
/** 视频源变化矩阵 */
|
|
4574
|
-
matrix: THREE_2.Matrix4;
|
|
4575
|
-
/** 视频源长宽尺寸 */
|
|
4576
|
-
size: THREE_2.Vector2;
|
|
4577
|
-
}
|
|
4578
|
-
|
|
4579
|
-
export declare class XRButton {
|
|
4580
|
-
static createButton(onClickHook: () => void): HTMLAnchorElement | HTMLButtonElement;
|
|
4581
|
-
}
|
|
4582
|
-
|
|
4583
|
-
export declare interface XRControllerEvent extends BaseEvent {
|
|
4584
|
-
left: {
|
|
4585
|
-
axes: {
|
|
4586
|
-
up: number;
|
|
4587
|
-
down: number;
|
|
4588
|
-
left: number;
|
|
4589
|
-
right: number;
|
|
4590
|
-
};
|
|
4591
|
-
raycaster: THREE_2.Raycaster;
|
|
4592
|
-
deltaTime: number;
|
|
4593
|
-
};
|
|
4594
|
-
right: {
|
|
4595
|
-
axes: {
|
|
4596
|
-
up: number;
|
|
4597
|
-
down: number;
|
|
4598
|
-
left: number;
|
|
4599
|
-
right: number;
|
|
4600
|
-
};
|
|
4601
|
-
raycaster: THREE_2.Raycaster;
|
|
4602
|
-
deltaTime: number;
|
|
4603
|
-
};
|
|
4604
|
-
buttons: {
|
|
4605
|
-
X: boolean;
|
|
4606
|
-
Y: boolean;
|
|
4607
|
-
LeftTrigger: boolean;
|
|
4608
|
-
LeftPinch: boolean;
|
|
4609
|
-
A: boolean;
|
|
4610
|
-
B: boolean;
|
|
4611
|
-
RightTrigger: boolean;
|
|
4612
|
-
RightPinch: boolean;
|
|
4613
|
-
};
|
|
4614
|
-
}
|
|
4615
|
-
|
|
4616
|
-
export declare interface XRGestureEvent extends BaseEvent {
|
|
4617
|
-
session: XRSession | null;
|
|
4618
|
-
buttons: 'A' | 'B' | 'X' | 'Y' | 'RightTrigger' | 'RightPinch' | 'LeftTrigger' | 'LeftPinch' | 'LeftAxesLeft' | 'LeftAxesRight' | 'LeftAxesUp' | 'LeftAxesDown' | 'RightAxesLeft' | 'RightAxesRight' | 'RightAxesUp' | 'RightAxesDown';
|
|
4619
|
-
machineType: 'Pico' | 'Oculus';
|
|
4620
|
-
isFirst: boolean;
|
|
4621
|
-
isFinal: boolean;
|
|
4622
|
-
controllers: {
|
|
4623
|
-
raycaster: {
|
|
4624
|
-
leftRay: THREE_2.Raycaster;
|
|
4625
|
-
rightRay: THREE_2.Raycaster;
|
|
4626
|
-
};
|
|
4627
|
-
};
|
|
4628
|
-
}
|
|
4629
|
-
|
|
4630
|
-
export declare interface XRPanoramaControllerCustomInitArgs extends Omit<PanoramaControllerCustomInitArgs, "maxLatitude" | "minLatitude"> {
|
|
4631
|
-
}
|
|
4632
|
-
|
|
4633
|
-
declare interface XRSessionEvent_2 extends BaseEvent {
|
|
4634
|
-
session: XRSession | null;
|
|
4635
|
-
machineType: 'Pico' | 'Oculus';
|
|
4636
|
-
}
|
|
4637
|
-
export { XRSessionEvent_2 as XRSessionEvent }
|
|
4638
|
-
|
|
4639
|
-
export { }
|
|
3
|
+
import "./three-version-check";
|
|
4
|
+
import "./certificates/hardware";
|
|
5
|
+
export * from './model';
|
|
6
|
+
export * from "./work";
|
|
7
|
+
export * from "./renderer";
|
|
8
|
+
export { InternalWebGLRenderer, } from "./core/internalWebGLRenderer";
|
|
9
|
+
export { Scene } from "./core/scene";
|
|
10
|
+
export { Camera, type CameraPose, } from "./core/camera";
|
|
11
|
+
export { TextureLoader, } from "./texture/loader";
|
|
12
|
+
export { Histogram, } from "./texture/histogram";
|
|
13
|
+
export { type RgbaData, } from "./texture/textureData";
|
|
14
|
+
export { NetworkSubscribe, Fetcher, type AjaxResponseTypeMapping, type AjaxOptions, type AjaxResponseType, type NetWorkMeta, type NetworkState, type NetworkType, type NetworkResponse, type NetworkError, type NetworkResponseError, type NetworkAbortError, type NetworkTimeoutError, type NetworkFirbiddenError, type NetworkProxyError, type NetworkOptions, type NetworkSuccessCallback, type NetworkProgressCallback, type NetworkErrorCallback, } from "./utils/ajax";
|
|
15
|
+
export { Subscribe, type SubscribeEventMap, } from "./utils/subscribe";
|
|
16
|
+
export { AnimationFrameLoop, type RequestAnimationFrameArgs, type AnimationFrame, type AnimationFrameContext, type AnimationFrameLoopType, } from "./utils/animationFrameLoop";
|
|
17
|
+
export { imageURL as defaultImageURLTransform, type ImageURLOptions, type ImageURLMappings, } from "./utils/imageURL";
|
|
18
|
+
export { imageSupport } from "./utils/imageSupport";
|
|
19
|
+
export { Motion, type MotionKeyframe, type MotionValue, type MotionConfig, type MotionInitalValue, type MotionCircle, } from "./utils/motion";
|
|
20
|
+
export { isPanoId, panoEqual, panoParse, panoStringify, type PanoId, type Pano, } from "./utils/pano";
|
|
21
|
+
export { coordinatesToVector, vectorToCoordinates, headingToLongitude, longitudeToHeading, } from './utils/vectorCoordinates';
|
|
22
|
+
export { draco, type Draco } from './utils/draco';
|
|
23
|
+
export { ktx2, type KTX2 } from './utils/ktx2';
|
|
24
|
+
export { makeBoundingVolume, isBoundingVolume, createDebugBoundingMesh, type BoundingVolume, type CullingVolume, type VolumePlaneIntersect, type BoundingVolumeJson, type BoxBoundingVolume, type BoxBoundingVolumeJson, type RegionBoundingVolume, type RegionBoundingVolumeJson, type SphereBoundingVolume, type SphereBoundingVolumeJson } from './utils/volume';
|
|
25
|
+
export { type BaseEvent, type GestureEvent, type IntersectEvent, type ModeChangeEvent, type ModelTileEvent, type ModelEvent, type ModelSceneEvent, type NetworkResourceEvent, type ObjectEvent, type PanoEvent, type PanoTextureEvent, type RenderEvent, type StateEvent, type WorksEvent, type XRGestureEvent, type XRSessionEvent, type XRControllerEvent } from './utils/event';
|
|
26
|
+
export { type EasingFunction, } from './utils/easing';
|
|
27
|
+
export { BoundingMesh, } from './meshes/boundingMesh';
|
|
28
|
+
export { PanoCircleMesh, type PanoCircleMeshOptions, } from "./meshes/panoCircleMesh";
|
|
29
|
+
export { PanoCircleMeshSolid, type PanoCircleMeshSolidOptions, } from "./meshes/panoCircleMeshSolid";
|
|
30
|
+
export { PanoCircleMeshCustom, type PanoCircleMeshCustomOptions, } from "./meshes/panoCircleMeshCustom";
|
|
31
|
+
export { type IntersectMesh } from "./meshes/intersectMesh";
|
|
32
|
+
export { type FivePlugin, type FivePluginInstance, type FivePluginInit } from "./types/plugin";
|
|
33
|
+
export { type CubeFace } from "./types/cube";
|
|
34
|
+
export { type ImageOptions, type TextureOptions } from "./types/imageOptions";
|
|
35
|
+
export { type MovePanoEffect } from "./types/movePanoEffect";
|
|
36
|
+
export { type MovePanoOptions } from "./types/movePanoOptions";
|
|
37
|
+
export { type Viewport, type Scissor } from "./types/viewport";
|
|
38
|
+
export { type Pose } from "./types/pose";
|
|
39
|
+
export { type State } from "./types/state";
|
|
40
|
+
export { type AddableObject } from "./types/addableObject";
|
|
41
|
+
export { type PanoCircleMeshInterface } from "./types/panoCircleMeshInterface";
|
|
42
|
+
export { type IntersectMeshInterface } from "./types/intersectMeshInterface";
|
|
43
|
+
export { type Intersection } from "./model/intersection";
|
|
44
|
+
export { Five } from "./application/five";
|
|
45
|
+
export { type Mode } from "./application/mode";
|
|
46
|
+
export { PROXY_CONTROLLER_EVENT_NAMES, type EventTypes, type ControllerEventTypes, type EventCallback, } from "./application/events";
|
|
47
|
+
export { type LegacyEventType, type GestureTypes, type WebXRControllerKey, type WebXRControllerType, type WebXRControllerParams, type WebXRAxesParams } from './application/events-legacy';
|
|
48
|
+
export { type FiveInitArgs } from "./application/fiveInitArgs";
|
|
49
|
+
export { type FiveLoadOptions } from "./application/fiveLoadOptions";
|
|
50
|
+
export { type ControllerCustomInitTypes } from "./application/controllers";
|
|
51
|
+
export { controllersDefaultInitArgs } from "./application/controllers";
|
|
52
|
+
export { getViewportScale } from "./application/getViewportScale";
|
|
53
|
+
export { type PostProcessingType } from "./controllers/base";
|
|
54
|
+
export { type FloorplanControllerCustomInitArgs } from "./controllers/floorplan";
|
|
55
|
+
export { type ModelControllerCustomInitArgs } from "./controllers/model";
|
|
56
|
+
export { type PanoramaControllerCustomInitArgs } from "./controllers/panorama";
|
|
57
|
+
export { type TopviewControllerCustomInitArgs } from "./controllers/topview";
|
|
58
|
+
export { type VRPanoramaControllerCustomInitArgs } from "./controllers/vrPanorama";
|
|
59
|
+
export { type PanoramaLikeControllerCustomInitArgs } from "./controllers/panoramaLike";
|
|
60
|
+
export { type MapviewControllerCustomInitArgs } from "./controllers/mapview";
|
|
61
|
+
export { type XRPanoramaControllerCustomInitArgs } from "./controllers/xrPanorama";
|
|
62
|
+
export { XRButton } from "./webxr/xrButton";
|