@realsee/five-webgpu 1.0.0-alpha.1
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 +9 -0
- package/AI_CONTEXT.md +9 -0
- package/README.md +80 -0
- package/TERMS.txt +54 -0
- package/ai_guides/README.md +118 -0
- package/ai_guides/ai-doc-guidelines.md +102 -0
- package/ai_guides/api.md +274 -0
- package/ai_guides/features/3dtile.md +172 -0
- package/ai_guides/features/camera-animation.md +205 -0
- package/ai_guides/features/clipper.md +135 -0
- package/ai_guides/features/coordinate-system.md +128 -0
- package/ai_guides/features/event.md +154 -0
- package/ai_guides/features/five.md +184 -0
- package/ai_guides/features/gesture.md +181 -0
- package/ai_guides/features/get-screen-pixels.md +182 -0
- package/ai_guides/features/image-options.md +164 -0
- package/ai_guides/features/load-external-model.md +350 -0
- package/ai_guides/features/load-progress.md +140 -0
- package/ai_guides/features/material.md +153 -0
- package/ai_guides/features/mode.md +269 -0
- package/ai_guides/features/model.md +186 -0
- package/ai_guides/features/move-pano-effect.md +145 -0
- package/ai_guides/features/multi-work.md +146 -0
- package/ai_guides/features/pano-filter.md +144 -0
- package/ai_guides/features/pano-tile.md +132 -0
- package/ai_guides/features/pano-uv.md +131 -0
- package/ai_guides/features/parameter.md +153 -0
- package/ai_guides/features/raycast.md +175 -0
- package/ai_guides/features/request-proxy.md +112 -0
- package/ai_guides/features/screen-project.md +165 -0
- package/ai_guides/features/state.md +101 -0
- package/ai_guides/features/ultra-hdr.md +204 -0
- package/ai_guides/features/view-layer.md +187 -0
- package/ai_guides/features/work.md +303 -0
- package/ai_guides/glossary.md +93 -0
- package/ai_guides/intro.md +23 -0
- package/ai_guides/quick-start.md +69 -0
- package/ai_guides/release_notes/6.6.md +86 -0
- package/ai_guides/release_notes/6.7.md +401 -0
- package/ai_guides/release_notes/6.8.md +208 -0
- package/ai_guides/support.md +23 -0
- package/ai_guides/template.md +70 -0
- package/docs/.nojekyll +1 -0
- package/docs/00_FOR_AI_AGENTS.md +12 -0
- package/docs/README.md +12 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +134 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/index.AdaptiveLuminancePass.html +23 -0
- package/docs/classes/index.AnimationFrameLoop.html +18 -0
- package/docs/classes/index.BoundingMesh.html +4 -0
- package/docs/classes/index.Camera.html +42 -0
- package/docs/classes/index.EffectComposer.html +25 -0
- package/docs/classes/index.EyeDomeLightingPass.html +20 -0
- package/docs/classes/index.Fetcher.html +5 -0
- package/docs/classes/index.Five.html +311 -0
- package/docs/classes/index.FivePass.html +17 -0
- package/docs/classes/index.FiveRenderer.html +8 -0
- package/docs/classes/index.FlowingFireworks3DPass.html +22 -0
- package/docs/classes/index.FlowingLight2DPass.html +21 -0
- package/docs/classes/index.FlowingLight3DPass.html +23 -0
- package/docs/classes/index.FullScreenQuad.html +7 -0
- package/docs/classes/index.GaussianBlurPass.html +19 -0
- package/docs/classes/index.Histogram.html +19 -0
- package/docs/classes/index.InternalWebGPURenderer.html +4 -0
- package/docs/classes/index.Model.html +93 -0
- package/docs/classes/index.ModelScene.html +40 -0
- package/docs/classes/index.Motion.html +17 -0
- package/docs/classes/index.NetworkSubscribe.html +41 -0
- package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +37 -0
- package/docs/classes/index.PBMGaussianSplattingObject.html +32 -0
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +19 -0
- package/docs/classes/index.PBMGroup.html +5 -0
- package/docs/classes/index.PBMMesh.html +2 -0
- package/docs/classes/index.PBMMeshBasicMaterial.html +70 -0
- package/docs/classes/index.PBMMeshBasicNodeMaterial.html +74 -0
- package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +70 -0
- package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +74 -0
- package/docs/classes/index.PBMMeshPhongMaterial.html +69 -0
- package/docs/classes/index.PBMMeshPhongNodeMaterial.html +73 -0
- package/docs/classes/index.PBMMeshPhysicalMaterial.html +69 -0
- package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +73 -0
- package/docs/classes/index.PBMPanoFilter.html +61 -0
- package/docs/classes/index.PBMPointCloud.html +50 -0
- package/docs/classes/index.PBMSkinnedMesh.html +8 -0
- package/docs/classes/index.PBMUpdateable.html +41 -0
- package/docs/classes/index.PanoCircleMesh.html +30 -0
- package/docs/classes/index.PanoCircleMeshCustom.html +30 -0
- package/docs/classes/index.PanoCircleMeshSolid.html +30 -0
- package/docs/classes/index.Parameter.html +114 -0
- package/docs/classes/index.Scene.html +18 -0
- package/docs/classes/index.Subscribe.html +43 -0
- package/docs/classes/index.TextureLoader.html +4 -0
- package/docs/classes/index.Tile.html +34 -0
- package/docs/classes/index.Tile3D.html +98 -0
- package/docs/classes/index.TileCache.html +8 -0
- package/docs/classes/index.TileNode.html +14 -0
- package/docs/classes/index.TileRequestScheduler.html +4 -0
- package/docs/classes/index.Tileset.html +38 -0
- package/docs/classes/index.Trajectory.html +8 -0
- package/docs/classes/index.TrajectoryNode.html +8 -0
- package/docs/classes/index.Work.html +52 -0
- package/docs/classes/index.WorkResolvedObserver.html +68 -0
- package/docs/documents/README.html +134 -0
- package/docs/documents/ai-doc-guidelines.html +117 -0
- package/docs/documents/api.html +337 -0
- package/docs/documents/features_3dtile.html +216 -0
- package/docs/documents/features_camera-animation.html +157 -0
- package/docs/documents/features_clipper.html +80 -0
- package/docs/documents/features_coordinate-system.html +127 -0
- package/docs/documents/features_event.html +104 -0
- package/docs/documents/features_five.html +147 -0
- package/docs/documents/features_gesture.html +121 -0
- package/docs/documents/features_get-screen-pixels.html +88 -0
- package/docs/documents/features_image-options.html +108 -0
- package/docs/documents/features_load-external-model.html +600 -0
- package/docs/documents/features_load-progress.html +110 -0
- package/docs/documents/features_material.html +341 -0
- package/docs/documents/features_mode.html +114 -0
- package/docs/documents/features_model.html +141 -0
- package/docs/documents/features_move-pano-effect.html +110 -0
- package/docs/documents/features_multi-work.html +97 -0
- package/docs/documents/features_pano-filter.html +119 -0
- package/docs/documents/features_pano-tile.html +100 -0
- package/docs/documents/features_pano-uv.html +82 -0
- package/docs/documents/features_parameter.html +101 -0
- package/docs/documents/features_raycast.html +98 -0
- package/docs/documents/features_request-proxy.html +78 -0
- package/docs/documents/features_screen-project.html +112 -0
- package/docs/documents/features_state.html +71 -0
- package/docs/documents/features_ultra-hdr.html +188 -0
- package/docs/documents/features_view-layer.html +158 -0
- package/docs/documents/features_work.html +129 -0
- package/docs/documents/glossary.html +94 -0
- package/docs/documents/intro.html +24 -0
- package/docs/documents/quick-start.html +32 -0
- package/docs/documents/release_notes_6.6.html +79 -0
- package/docs/documents/release_notes_6.7.html +209 -0
- package/docs/documents/release_notes_6.8.html +189 -0
- package/docs/documents/support.html +49 -0
- package/docs/documents/template.html +80 -0
- package/docs/enums/index.VolumePlaneIntersect.html +4 -0
- package/docs/functions/index.coordinatesToVector.html +2 -0
- package/docs/functions/index.createDebugBoundingMesh.html +1 -0
- package/docs/functions/index.createWorks.html +1 -0
- package/docs/functions/index.defaultImageURLTransform.html +5 -0
- package/docs/functions/index.getViewportScale.html +1 -0
- package/docs/functions/index.headingToLongitude.html +4 -0
- package/docs/functions/index.imageSupport.html +1 -0
- package/docs/functions/index.isBoundingVolume.html +1 -0
- package/docs/functions/index.isPanoId.html +1 -0
- package/docs/functions/index.loadAt3d.html +1 -0
- package/docs/functions/index.loadDome.html +1 -0
- package/docs/functions/index.loadDomez.html +1 -0
- package/docs/functions/index.loadGltf.html +1 -0
- package/docs/functions/index.loadPbm.html +1 -0
- package/docs/functions/index.loadPly.html +1 -0
- package/docs/functions/index.longitudeToHeading.html +4 -0
- package/docs/functions/index.makeBoundingVolume.html +1 -0
- package/docs/functions/index.panoEqual.html +1 -0
- package/docs/functions/index.panoParse.html +1 -0
- package/docs/functions/index.panoStringify.html +1 -0
- package/docs/functions/index.parseWork.html +7 -0
- package/docs/functions/index.registerPBMMaterials.html +3 -0
- package/docs/functions/index.vectorToCoordinates.html +2 -0
- package/docs/functions/index.workToJson.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +134 -0
- package/docs/interfaces/index.AddableObject.html +9 -0
- package/docs/interfaces/index.AjaxOptions.html +9 -0
- package/docs/interfaces/index.AnimationFrame.html +6 -0
- package/docs/interfaces/index.AnimationFrameContext.html +3 -0
- package/docs/interfaces/index.BaseEvent.html +5 -0
- package/docs/interfaces/index.BoundingVolume.html +15 -0
- package/docs/interfaces/index.BoxBoundingVolume.html +18 -0
- package/docs/interfaces/index.CameraPose.html +6 -0
- package/docs/interfaces/index.CullingVolume.html +9 -0
- package/docs/interfaces/index.Draco.html +12 -0
- package/docs/interfaces/index.EventCallback.html +394 -0
- package/docs/interfaces/index.FiveInitArgs.html +104 -0
- package/docs/interfaces/index.FiveLoadOptions.html +12 -0
- package/docs/interfaces/index.FloorplanControllerCustomInitArgs.html +17 -0
- package/docs/interfaces/index.GestureEvent.html +19 -0
- package/docs/interfaces/index.IPBMMaterial.html +64 -0
- package/docs/interfaces/index.ImageOptions.html +21 -0
- package/docs/interfaces/index.ImageURLMappings.html +1 -0
- package/docs/interfaces/index.ImageURLOptions.html +17 -0
- package/docs/interfaces/index.IntersectEvent.html +8 -0
- package/docs/interfaces/index.IntersectMesh.html +2 -0
- package/docs/interfaces/index.IntersectMeshInterface.html +3 -0
- package/docs/interfaces/index.Intersection.html +9 -0
- package/docs/interfaces/index.LoosePanoWork.html +10 -0
- package/docs/interfaces/index.LooseWork.html +15 -0
- package/docs/interfaces/index.LooseWorkInitial.html +11 -0
- package/docs/interfaces/index.LooseWorkModel.html +8 -0
- package/docs/interfaces/index.LooseWorkObserver.html +17 -0
- package/docs/interfaces/index.LooseWorkPanorama.html +22 -0
- package/docs/interfaces/index.LooseWorkVideo.html +4 -0
- package/docs/interfaces/index.LooseWorkWithExtrinsics.html +15 -0
- package/docs/interfaces/index.MapviewControllerCustomInitArgs.html +20 -0
- package/docs/interfaces/index.ModeChangeEvent.html +9 -0
- package/docs/interfaces/index.ModelControllerCustomInitArgs.html +20 -0
- package/docs/interfaces/index.ModelEvent.html +8 -0
- package/docs/interfaces/index.ModelOptions.html +11 -0
- package/docs/interfaces/index.ModelSceneEvent.html +6 -0
- package/docs/interfaces/index.ModelTileEvent.html +8 -0
- package/docs/interfaces/index.MotionKeyframe.html +4 -0
- package/docs/interfaces/index.MovePanoOptions.html +35 -0
- package/docs/interfaces/index.NetworkAbortError.html +1 -0
- package/docs/interfaces/index.NetworkFirbiddenError.html +1 -0
- package/docs/interfaces/index.NetworkOptions.html +7 -0
- package/docs/interfaces/index.NetworkProxyError.html +1 -0
- package/docs/interfaces/index.NetworkResourceEvent.html +9 -0
- package/docs/interfaces/index.NetworkResponseError.html +2 -0
- package/docs/interfaces/index.NetworkTimeoutError.html +1 -0
- package/docs/interfaces/index.ObjectEvent.html +6 -0
- package/docs/interfaces/index.PBMClipperParameter.html +3 -0
- package/docs/interfaces/index.PBMHDRConfig.html +12 -0
- package/docs/interfaces/index.PBMPanoDepth.html +9 -0
- package/docs/interfaces/index.PBMPanoFilterValue.html +6 -0
- package/docs/interfaces/index.PBMPanoPicture.html +14 -0
- package/docs/interfaces/index.PBMRefinedScreen.html +6 -0
- package/docs/interfaces/index.PanoCircleMeshCustomOptions.html +9 -0
- package/docs/interfaces/index.PanoCircleMeshInterface.html +30 -0
- package/docs/interfaces/index.PanoCircleMeshOptions.html +3 -0
- package/docs/interfaces/index.PanoCircleMeshSolidOptions.html +3 -0
- package/docs/interfaces/index.PanoEvent.html +11 -0
- package/docs/interfaces/index.PanoTextureEvent.html +9 -0
- package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +41 -0
- package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +20 -0
- package/docs/interfaces/index.ParameterMaterialValue.html +74 -0
- package/docs/interfaces/index.ParameterTilesetValue.html +30 -0
- package/docs/interfaces/index.ParameterValue.html +103 -0
- package/docs/interfaces/index.Pass.html +9 -0
- package/docs/interfaces/index.PointCloudData.html +6 -0
- package/docs/interfaces/index.Pose.html +12 -0
- package/docs/interfaces/index.RegionBoundingVolume.html +21 -0
- package/docs/interfaces/index.RenderEvent.html +6 -0
- package/docs/interfaces/index.ResolvedParameterValue.html +104 -0
- package/docs/interfaces/index.RgbaData.html +7 -0
- package/docs/interfaces/index.SphereBoundingVolume.html +17 -0
- package/docs/interfaces/index.SplatData.html +10 -0
- package/docs/interfaces/index.State.html +23 -0
- package/docs/interfaces/index.StateEvent.html +7 -0
- package/docs/interfaces/index.TextureOptions.html +23 -0
- package/docs/interfaces/index.Tile3DOptions.html +11 -0
- package/docs/interfaces/index.TileCoordinateSystem.html +3 -0
- package/docs/interfaces/index.TileHeader.html +9 -0
- package/docs/interfaces/index.TilesetHeader.html +20 -0
- package/docs/interfaces/index.TilesetOptions.html +7 -0
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +13 -0
- package/docs/interfaces/index.TrajectoryHeader.html +5 -0
- package/docs/interfaces/index.ViewLayer.html +97 -0
- package/docs/interfaces/index.Viewport.html +13 -0
- package/docs/interfaces/index.WebXRAxesParams.html +4 -0
- package/docs/interfaces/index.WebXRControllerParams.html +2 -0
- package/docs/interfaces/index.WorkCubeImage.html +15 -0
- package/docs/interfaces/index.WorkImage.html +22 -0
- package/docs/interfaces/index.WorkInitial.html +17 -0
- package/docs/interfaces/index.WorkInitialJson.html +8 -0
- package/docs/interfaces/index.WorkJson.html +11 -0
- package/docs/interfaces/index.WorkModel.html +16 -0
- package/docs/interfaces/index.WorkModelJson.html +6 -0
- package/docs/interfaces/index.WorkModelLayer.html +11 -0
- package/docs/interfaces/index.WorkModelLayerJson.html +5 -0
- package/docs/interfaces/index.WorkObserver.html +63 -0
- package/docs/interfaces/index.WorkObserverJson.html +10 -0
- package/docs/interfaces/index.WorkPanoramaJson.html +14 -0
- package/docs/interfaces/index.WorkPanoramasJson.html +3 -0
- package/docs/interfaces/index.WorkTile.html +21 -0
- package/docs/interfaces/index.WorkVideo.html +9 -0
- package/docs/interfaces/index.WorksEvent.html +8 -0
- package/docs/interfaces/index.XRControllerEvent.html +8 -0
- package/docs/interfaces/index.XRGestureEvent.html +11 -0
- package/docs/interfaces/index.XRSessionEvent.html +7 -0
- package/docs/modules/index.html +1 -0
- package/docs/modules.html +1 -0
- package/docs/types/index.AjaxResponseType.html +1 -0
- package/docs/types/index.AjaxResponseTypeMapping.html +1 -0
- package/docs/types/index.AnimationFrameLoopType.html +1 -0
- package/docs/types/index.BoundingVolumeJson.html +1 -0
- package/docs/types/index.BoxBoundingVolumeJson.html +2 -0
- package/docs/types/index.ControllerCustomInitTypes.html +6 -0
- package/docs/types/index.ControllerEventTypes.html +68 -0
- package/docs/types/index.CubeFace.html +1 -0
- package/docs/types/index.EasingFunction.html +1 -0
- package/docs/types/index.EventTypes.html +28 -0
- package/docs/types/index.FivePlugin.html +4 -0
- package/docs/types/index.FivePluginInit.html +3 -0
- package/docs/types/index.FivePluginInstance.html +3 -0
- package/docs/types/index.FlowingFireworks3DPassLine.html +16 -0
- package/docs/types/index.FlowingLight2DPassLine.html +10 -0
- package/docs/types/index.FlowingLight3DPassLine.html +10 -0
- package/docs/types/index.GestureTypes.html +1 -0
- package/docs/types/index.LegacyEventType.html +282 -0
- package/docs/types/index.LoadResultType.html +12 -0
- package/docs/types/index.Mode.html +15 -0
- package/docs/types/index.Models.html +11 -0
- package/docs/types/index.MotionCircle.html +2 -0
- package/docs/types/index.MotionConfig.html +1 -0
- package/docs/types/index.MotionInitalValue.html +1 -0
- package/docs/types/index.MotionValue.html +1 -0
- package/docs/types/index.MovePanoEffect.html +12 -0
- package/docs/types/index.NetWorkMeta.html +8 -0
- package/docs/types/index.NetworkError.html +1 -0
- package/docs/types/index.NetworkErrorCallback.html +1 -0
- package/docs/types/index.NetworkProgressCallback.html +1 -0
- package/docs/types/index.NetworkResponse.html +3 -0
- package/docs/types/index.NetworkState.html +1 -0
- package/docs/types/index.NetworkSuccessCallback.html +1 -0
- package/docs/types/index.NetworkType.html +1 -0
- package/docs/types/index.OutputTextureDataType.html +1 -0
- package/docs/types/index.PBMAlphaMode.html +1 -0
- package/docs/types/index.PBMColorStyle.html +1 -0
- package/docs/types/index.PBMFloorStyle.html +1 -0
- package/docs/types/index.PBMMeshMaterial.html +1 -0
- package/docs/types/index.PBMPointBack.html +1 -0
- package/docs/types/index.PBMPointCloudShaderType.html +1 -0
- package/docs/types/index.PBMPointShape.html +1 -0
- package/docs/types/index.PBMPointSize.html +1 -0
- package/docs/types/index.PBMTransition.html +1 -0
- package/docs/types/index.Pano.html +3 -0
- package/docs/types/index.PanoId.html +1 -0
- package/docs/types/index.ParseOptions.html +13 -0
- package/docs/types/index.PostProcessingType.html +1 -0
- package/docs/types/index.RegionBoundingVolumeJson.html +2 -0
- package/docs/types/index.RequestAnimationFrameArgs.html +1 -0
- package/docs/types/index.Scissor.html +2 -0
- package/docs/types/index.SphereBoundingVolumeJson.html +2 -0
- package/docs/types/index.SubscribeEventMap.html +1 -0
- package/docs/types/index.TileCacheOptions.html +3 -0
- package/docs/types/index.TileContentData.html +6 -0
- package/docs/types/index.TileRequestOrder.html +1 -0
- package/docs/types/index.TileRequestSchedulerOptions.html +4 -0
- package/docs/types/index.TilesetFrameState.html +21 -0
- package/docs/types/index.TrajectoryContentData.html +7 -0
- package/docs/types/index.WebXRControllerKey.html +1 -0
- package/docs/types/index.WebXRControllerType.html +1 -0
- package/docs/types/index.Works.html +1 -0
- package/docs/variables/index.PROXY_CONTROLLER_EVENT_NAMES.html +1 -0
- package/docs/variables/index.controllersDefaultInitArgs.html +1 -0
- package/docs/variables/index.draco.html +1 -0
- package/five/application/analysis.d.ts +40 -0
- package/five/application/controllers.d.ts +33 -0
- package/five/application/events-legacy.d.ts +454 -0
- package/five/application/events.d.ts +69 -0
- package/five/application/five.d.ts +498 -0
- package/five/application/fiveInitArgs.d.ts +173 -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 +24 -0
- package/five/application/renderPoweredByRealsee.d.ts +3 -0
- package/five/assets/cardboard-png-data-url.d.ts +2 -0
- package/five/assets/gradient-png-data-url.d.ts +2 -0
- package/five/assets/loading-png-data-url.d.ts +2 -0
- package/five/assets/phone-png-data-url.d.ts +2 -0
- package/five/assets/realsee-pmg-data-url.d.ts +2 -0
- package/five/bvh/bvhMath.d.ts +33 -0
- package/five/bvh/bvhMesh.d.ts +7 -0
- package/five/bvh/bvhNode.d.ts +29 -0
- package/five/bvh/bvhObject.d.ts +19 -0
- package/five/bvh/bvhPoints.d.ts +6 -0
- package/five/bvh/index.d.ts +14 -0
- package/five/bvh/type.d.ts +1 -0
- package/five/bvh/worker.d.ts +36 -0
- package/five/certificates/hardware.d.ts +1 -0
- package/five/controllers/base.d.ts +166 -0
- package/five/controllers/events.d.ts +71 -0
- package/five/controllers/floorplan.d.ts +119 -0
- package/five/controllers/mapview.d.ts +138 -0
- package/five/controllers/model.d.ts +57 -0
- package/five/controllers/panorama.d.ts +143 -0
- package/five/controllers/panoramaLike.d.ts +87 -0
- package/five/controllers/topview.d.ts +42 -0
- package/five/core/camera.d.ts +65 -0
- package/five/core/internalWebGPURenderer.d.ts +13 -0
- package/five/core/panoVideo.d.ts +18 -0
- package/five/core/scene.d.ts +10 -0
- package/five/core/tiling.d.ts +56 -0
- package/five/declare.d.ts +35 -0
- package/five/gaussian-splatting/util/renderData.d.ts +66 -0
- package/five/gaussian-splatting/wasm/data.d.ts +20 -0
- package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
- package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
- package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
- package/five/index.d.ts +58 -0
- package/five/index.js +1179 -0
- package/five/index.mjs +25111 -0
- package/five/meshes/boundingMesh.d.ts +12 -0
- package/five/meshes/intersectMesh.d.ts +8 -0
- package/five/meshes/panoCircleMesh.d.ts +36 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +35 -0
- package/five/meshes/panoSphereMesh.d.ts +29 -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 +55 -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 +10 -0
- package/five/model/loaders/dome.d.ts +22 -0
- package/five/model/loaders/domez.d.ts +11 -0
- package/five/model/loaders/fbx.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
- package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting.d.ts +26 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +11 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +13 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +12 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
- package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
- package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
- package/five/model/loaders/glTF-helpers/extensions/base.d.ts +25 -0
- package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
- package/five/model/loaders/glTF-helpers/index.d.ts +51 -0
- package/five/model/loaders/glTF-helpers/parser.d.ts +115 -0
- package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
- package/five/model/loaders/gltf.d.ts +10 -0
- package/five/model/loaders/obj.d.ts +9 -0
- package/five/model/loaders/pbm.d.ts +26 -0
- package/five/model/loaders/ply.d.ts +24 -0
- package/five/model/loaders/pnts.d.ts +8 -0
- package/five/model/loaders/protobuf/dome.d.ts +540 -0
- package/five/model/loaders/protobuf/pbm.d.ts +203 -0
- package/five/model/loaders/shared.d.ts +16 -0
- package/five/model/loaders/splat.d.ts +8 -0
- package/five/model/loaders/spz.d.ts +14 -0
- package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
- package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
- package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
- package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
- package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
- package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +36 -0
- package/five/model/loaders/x3p.d.ts +22 -0
- package/five/model/materials/nodes/pbmMeshBasicNodeMaterial.d.ts +14 -0
- package/five/model/materials/nodes/pbmMeshPanoOnlyNodeMaterial.d.ts +14 -0
- package/five/model/materials/nodes/pbmMeshPhongNodeMaterial.d.ts +14 -0
- package/five/model/materials/nodes/pbmMeshPhysicalNodeMaterial.d.ts +14 -0
- package/five/model/materials/nodes/pbmPointCloudNodeMaterial.d.ts +22 -0
- package/five/model/materials/pbmGaussianSplattingNodeMaterial.d.ts +78 -0
- package/five/model/materials/pbmMaterial.d.ts +171 -0
- package/five/model/materials/pbmMaterialRegister.d.ts +6 -0
- package/five/model/materials/pbmMeshMaterial.d.ts +57 -0
- package/five/model/materials/pbmPointCloudMaterial.d.ts +20 -0
- package/five/model/materials/pbmPointCloudNodeMaterial.d.ts +46 -0
- package/five/model/materials/tsl/colorFilter.d.ts +9 -0
- package/five/model/materials/tsl/defines.d.ts +68 -0
- package/five/model/materials/tsl/nodeTypes.d.ts +12 -0
- package/five/model/materials/tsl/outputBuilder.d.ts +26 -0
- package/five/model/materials/tsl/panoColor.d.ts +17 -0
- package/five/model/materials/tsl/panoTransition.d.ts +8 -0
- package/five/model/materials/tsl/utils.d.ts +11 -0
- package/five/model/model-scene.d.ts +172 -0
- package/five/model/model.d.ts +203 -0
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +47 -0
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +73 -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 +89 -0
- package/five/model/objects/pbmPointCloudObject.d.ts +81 -0
- package/five/model/parameter.d.ts +138 -0
- package/five/model/tile3d/header.d.ts +88 -0
- package/five/model/tile3d/index.d.ts +213 -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 +26 -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 +65 -0
- package/five/model/tile3d/trajectory-content.d.ts +0 -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/compute-renderers/pointcloud-compute-renderer.d.ts +154 -0
- package/five/renderer/compute-renderers/rgb565.d.ts +45 -0
- package/five/renderer/compute-renderers/shaders/clear.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/fullscreenQuad.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/rasterize.d.ts +2 -0
- package/five/renderer/five-renderer.d.ts +33 -0
- package/five/renderer/index.d.ts +3 -0
- package/five/renderer/postprocessing/composer.d.ts +45 -0
- package/five/renderer/postprocessing/index.d.ts +8 -0
- package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +27 -0
- package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +31 -0
- package/five/renderer/postprocessing/passes/flowing-fireworks-3d-pass.d.ts +71 -0
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +26 -0
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +75 -0
- package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +22 -0
- package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
- package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
- package/five/renderer/tools/full-screen-quad.d.ts +17 -0
- package/five/renderer/tools/postprocess-uv.d.ts +11 -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 +2 -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 +30 -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/face3.d.ts +12 -0
- package/five/utils/formatRad.d.ts +7 -0
- package/five/utils/hdr-data.d.ts +13 -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 +37 -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/worker.d.ts +26 -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 +128 -0
- package/five/work/verify.d.ts +7 -0
- package/five/work/work.d.ts +246 -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/llms.txt +66 -0
- package/package.json +56 -0
- package/plugins/BasePlugin/index.d.ts +96 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +66 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +5 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/typing.d.ts +32 -0
- package/plugins/index.d.ts +2 -0
- package/plugins/index.js +255 -0
- package/plugins/index.mjs +539 -0
- package/plugins/utils/absoluteUrl.d.ts +5 -0
- package/react/autoCanvas.d.ts +9 -0
- package/react/canvas.d.ts +19 -0
- package/react/context.d.ts +12 -0
- package/react/createProvider.d.ts +98 -0
- package/react/createStore.d.ts +144 -0
- package/react/fiveApp.d.ts +22 -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/useFivePlugin.d.ts +22 -0
- package/react/hooks/useFiveProject2d.d.ts +21 -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 +28 -0
- package/react/index.js +255 -0
- package/react/index.mjs +896 -0
- package/react/withFive.d.ts +213 -0
- package/resource/basis/1.16/basis_transcoder.js +22 -0
- package/resource/basis/1.16/basis_transcoder.wasm +0 -0
- package/resource/basis/README.md +5 -0
- package/resource/draco/1.5.6/draco_decoder.js +34 -0
- package/resource/draco/1.5.6/draco_decoder.wasm +0 -0
- package/resource/draco/1.5.6/draco_decoder_gltf.js +33 -0
- package/resource/draco/1.5.6/draco_decoder_gltf.wasm +0 -0
- package/resource/draco/1.5.6/draco_encoder.js +35 -0
- package/resource/draco/1.5.6/draco_encoder.wasm +0 -0
- package/resource/draco/1.5.6/draco_encoder_wrapper.js +97 -0
- package/resource/draco/1.5.6/draco_wasm_wrapper.js +117 -0
- package/resource/draco/1.5.6/draco_wasm_wrapper_gltf.js +116 -0
- package/resource/draco/README.md +5 -0
- package/umd/five-plugins.js +255 -0
- package/umd/five-react.js +255 -0
- package/umd/five.js +1579 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
import * as THREE from "three/webgpu";
|
|
2
|
+
import { Camera } from "../core/camera";
|
|
3
|
+
import { Scene } from "../core/scene";
|
|
4
|
+
import { Pano, PanoId } from "../utils/pano";
|
|
5
|
+
import { ModelScene, Model, Models } from "../model";
|
|
6
|
+
import { Subscribe } from "../utils/subscribe";
|
|
7
|
+
import { Works, Work, LooseWork, LooseWorkWithExtrinsics } from "../work";
|
|
8
|
+
import { ImageOptions, TextureOptions } from "../types/imageOptions";
|
|
9
|
+
import { Pose } from "../types/pose";
|
|
10
|
+
import { State } from "../types/state";
|
|
11
|
+
import { Viewport } from "../types/viewport";
|
|
12
|
+
import { MovePanoEffect } from "../types/movePanoEffect";
|
|
13
|
+
import { MovePanoOptions } from "../types/movePanoOptions";
|
|
14
|
+
import { Mode } from "./mode";
|
|
15
|
+
import { Pass } from '../renderer';
|
|
16
|
+
import { EventTypes } from "./events";
|
|
17
|
+
import { FivePluginInstance } from "../types/plugin";
|
|
18
|
+
import type { FiveInitArgs } from "./fiveInitArgs";
|
|
19
|
+
import type { FiveLoadOptions } from "./fiveLoadOptions";
|
|
20
|
+
/**
|
|
21
|
+
* 如视 VR Web展示器
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```
|
|
25
|
+
* // 初始化构造函数
|
|
26
|
+
* const five = new Five();
|
|
27
|
+
* // 将绘制区域添加到页面上
|
|
28
|
+
* five.appendTo(document.body);
|
|
29
|
+
* // 加载 Work 数据
|
|
30
|
+
* five.load({...});
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare class Five extends Subscribe<EventTypes> {
|
|
34
|
+
static get version(): string;
|
|
35
|
+
static get dracoPath(): string;
|
|
36
|
+
static set dracoPath(path: string);
|
|
37
|
+
static get ktx2Path(): string;
|
|
38
|
+
static set ktx2Path(path: string);
|
|
39
|
+
static get useNativeImageBitmap(): boolean;
|
|
40
|
+
static set useNativeImageBitmap(enable: boolean);
|
|
41
|
+
/**
|
|
42
|
+
* Five 的显示模式,可以通过 `five.changeMode` `five.setState` 来切换
|
|
43
|
+
* @description
|
|
44
|
+
* ```text
|
|
45
|
+
* Panorama 全景图游走模式
|
|
46
|
+
* Model 模型游走模式
|
|
47
|
+
* Floorplan 模型查看模式
|
|
48
|
+
* Topview 户型图模式
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
static Mode: {
|
|
52
|
+
readonly Panorama: "Panorama";
|
|
53
|
+
readonly Model: "Model";
|
|
54
|
+
readonly Floorplan: "Floorplan";
|
|
55
|
+
readonly Topview: "Topview";
|
|
56
|
+
readonly Mapview: "Mapview";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* 自动播放状态是否暂停
|
|
60
|
+
* @description
|
|
61
|
+
* 可以通过 `five.play` `five.pause` 方法播放或暂停
|
|
62
|
+
*/
|
|
63
|
+
paused: boolean;
|
|
64
|
+
/** 当前点位序号 */
|
|
65
|
+
pano: Pano;
|
|
66
|
+
/** 当前展示的模式 */
|
|
67
|
+
currentMode: Mode;
|
|
68
|
+
/** 非模型部分使用的 `THREE.Scene` */
|
|
69
|
+
scene: Scene;
|
|
70
|
+
/** 内部模型部分使用的 `THREE.Scene` */
|
|
71
|
+
modelScene: ModelScene;
|
|
72
|
+
/** 供外部放置需要在xr场景下产生遮挡的物体们*/
|
|
73
|
+
xrCustomObjectsScene: THREE.Scene;
|
|
74
|
+
/** 内部使用的 `Camera` */
|
|
75
|
+
camera: Camera;
|
|
76
|
+
/**
|
|
77
|
+
* 当前设置的 `viewport`
|
|
78
|
+
* @description
|
|
79
|
+
* 可通过初始化,或者 setScissor 方式设置
|
|
80
|
+
* `viewport` 是将屏幕中的内容渲染到 `renderer` 的指定区域。
|
|
81
|
+
* 页面整体长宽均为 `1`。通过类似 css 的 `left` `bottom` `width` `height` 来确定区域。
|
|
82
|
+
* @example
|
|
83
|
+
* ```
|
|
84
|
+
* viewport: { left: 0.75, bottom: 0, width: 0.25, height: 1 }
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
viewport: Viewport;
|
|
88
|
+
/**
|
|
89
|
+
* 当前使用的 THREE.WebGPURenderer。
|
|
90
|
+
* @description
|
|
91
|
+
* 如果初始化时传入了 `renderer` 则直接时该值
|
|
92
|
+
* 否则会通过 `preserveDrawingBuffer` `backgroundColor` `backgroundAlpha` `antialias` 创建一个 `THREE.WebGPURenderer`
|
|
93
|
+
*/
|
|
94
|
+
renderer?: THREE.WebGPURenderer;
|
|
95
|
+
/**
|
|
96
|
+
* 是否需要渲染
|
|
97
|
+
* @description
|
|
98
|
+
* 如果初始化设置了 `onlyRenderIfNeeds: true`, 则会激活按需渲染
|
|
99
|
+
* 可以通过设置 `five.needsRender = true` 来告知,five 会在下一帧渲染画面。
|
|
100
|
+
*/
|
|
101
|
+
needsRender: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 是否按需渲染
|
|
104
|
+
*/
|
|
105
|
+
onlyRenderIfNeeds: boolean;
|
|
106
|
+
/** 是否显示 Powered By Realsee */
|
|
107
|
+
poweredByRealsee: boolean;
|
|
108
|
+
/** 背景颜色 */
|
|
109
|
+
backgroundColor: THREE.Color;
|
|
110
|
+
/** 背景透明度 */
|
|
111
|
+
backgroundAlpha: number;
|
|
112
|
+
/**
|
|
113
|
+
* 全景图的配置参数
|
|
114
|
+
* @description
|
|
115
|
+
* 可以动态对配置在 `work` 数据中的全景图片在 runtime 做 url 调整。
|
|
116
|
+
* 平衡加载时间和图片质量
|
|
117
|
+
*/
|
|
118
|
+
imageOptions: ImageOptions;
|
|
119
|
+
/**
|
|
120
|
+
* 模型贴图的配置参数
|
|
121
|
+
* @description
|
|
122
|
+
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
123
|
+
* 平衡加载时间和图片质量
|
|
124
|
+
*/
|
|
125
|
+
textureOptions: TextureOptions;
|
|
126
|
+
/**
|
|
127
|
+
* 模型贴图的配置参数
|
|
128
|
+
* @description
|
|
129
|
+
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
130
|
+
* 平衡加载时间和图片质量
|
|
131
|
+
*/
|
|
132
|
+
videoTexture: THREE.VideoTexture;
|
|
133
|
+
/**
|
|
134
|
+
* 当前状态
|
|
135
|
+
* @description
|
|
136
|
+
* ```text
|
|
137
|
+
* five 设置了以下状态
|
|
138
|
+
*
|
|
139
|
+
* - mode: Mode
|
|
140
|
+
* - panoIndex: number
|
|
141
|
+
* - longitude: number
|
|
142
|
+
* - latitude: number
|
|
143
|
+
* - fov: number
|
|
144
|
+
* - offset: THREE.Vector3
|
|
145
|
+
*
|
|
146
|
+
* 可以通过 five.state 和 five.setState 来获取和设置。
|
|
147
|
+
* 通过 state 设置后,five 会通过合适的动画运动来达到设置的位置。
|
|
148
|
+
* 来迎合一些通过数据驱动的场景。
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
state: State;
|
|
152
|
+
/** 插件暴露的方法 */
|
|
153
|
+
plugins: {
|
|
154
|
+
[key: string]: FivePluginInstance<any>;
|
|
155
|
+
};
|
|
156
|
+
readonly fiveId: string;
|
|
157
|
+
private stopAnimationLoop?;
|
|
158
|
+
private fps;
|
|
159
|
+
private helperGroup;
|
|
160
|
+
private modeChangeDuration;
|
|
161
|
+
private enableWheel;
|
|
162
|
+
private controller?;
|
|
163
|
+
private destroyed;
|
|
164
|
+
private stateSynced;
|
|
165
|
+
private controllerInits;
|
|
166
|
+
private extraElements;
|
|
167
|
+
private getPixelsRenderTarget;
|
|
168
|
+
private readyCallbacks;
|
|
169
|
+
private syncingState;
|
|
170
|
+
private loadWorkTask;
|
|
171
|
+
private requestProxy;
|
|
172
|
+
private networkSubscribe;
|
|
173
|
+
private analysis?;
|
|
174
|
+
private currentUpdateArgs;
|
|
175
|
+
private fiveRenderer;
|
|
176
|
+
private adaptiveLuminancePass;
|
|
177
|
+
private eyeDomeLightingPass;
|
|
178
|
+
private pbmGaussianSplattingRenderMesh;
|
|
179
|
+
constructor(initArgs?: FiveInitArgs);
|
|
180
|
+
get ident(): string;
|
|
181
|
+
get panoIndex(): number;
|
|
182
|
+
/**
|
|
183
|
+
* load work 前的异步准备工作
|
|
184
|
+
* @returns
|
|
185
|
+
*/
|
|
186
|
+
private prepare;
|
|
187
|
+
/**
|
|
188
|
+
* 析构 five 对象。
|
|
189
|
+
* @description
|
|
190
|
+
* 一旦调用了析构方法,则不能再使用当前 five 对象了。
|
|
191
|
+
* 你可以新建一个新的。
|
|
192
|
+
*/
|
|
193
|
+
dispose(): void;
|
|
194
|
+
/**
|
|
195
|
+
* 设置 `viewport`
|
|
196
|
+
* @param viewport - 指定区域
|
|
197
|
+
* `scissor` 是将屏幕中的内容渲染到 `renderer` 的指定区域。
|
|
198
|
+
* 请确保在 five 初始化时传入 `renderer` 对象
|
|
199
|
+
* 页面整体长宽均为 `1`。通过类似 css 的 `left` `bottom` `width` `height` 来确定区域。
|
|
200
|
+
* @example
|
|
201
|
+
* ```
|
|
202
|
+
* five.setViewport({ left: 0.75, bottom: 0, width: 0.25, height: 1 })
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
setViewport(viewport: Viewport): void;
|
|
206
|
+
/**
|
|
207
|
+
* 获取 boundingMesh
|
|
208
|
+
*/
|
|
209
|
+
get boundingMesh(): import("..").BoundingMesh;
|
|
210
|
+
/**
|
|
211
|
+
* 帮助元素显示/隐藏
|
|
212
|
+
*/
|
|
213
|
+
get helperVisible(): boolean;
|
|
214
|
+
set helperVisible(visible: boolean);
|
|
215
|
+
updateConfiguration(args: Pick<FiveInitArgs, "panorama" | "model" | "floorplan" | "topview" | "mapview" | "imageOptions" | "textureOptions">, refresh?: boolean): void;
|
|
216
|
+
/**
|
|
217
|
+
* 将显示区域加载到页面 DOM 中
|
|
218
|
+
* @description
|
|
219
|
+
* 如果你是传入的 `renderer`. 则你需要自行来方式显示区域该方法并不生效
|
|
220
|
+
*
|
|
221
|
+
* @param element - 加载到页面的 DOM 元素
|
|
222
|
+
* @param size - 显示区域尺寸 默认铺满这个 DOM 元素
|
|
223
|
+
*/
|
|
224
|
+
appendTo(element: HTMLElement, size?: {
|
|
225
|
+
width?: number;
|
|
226
|
+
height?: number;
|
|
227
|
+
}): void;
|
|
228
|
+
/**
|
|
229
|
+
* 设置显示区域尺寸
|
|
230
|
+
* @description
|
|
231
|
+
* 如果你是传入的 `renderer`. 则你需要自行来设置显示区域尺寸,该方法并不生效
|
|
232
|
+
*
|
|
233
|
+
* @param size - 显示区域尺寸 默认铺满这个 DOM 元素
|
|
234
|
+
* @param pixelRatio - 像素比 默认继承之前的设置
|
|
235
|
+
*/
|
|
236
|
+
refresh(size?: {
|
|
237
|
+
width?: number;
|
|
238
|
+
height?: number;
|
|
239
|
+
}, pixelRatio?: number): void;
|
|
240
|
+
/**
|
|
241
|
+
* 绑定一个额外 DOM 区域,接受触控/鼠标事件
|
|
242
|
+
* @returns 解除该绑定
|
|
243
|
+
*/
|
|
244
|
+
addExtraElement(element: HTMLElement): () => void;
|
|
245
|
+
/**
|
|
246
|
+
* 解除绑定的一个额外 DOM 区域
|
|
247
|
+
*/
|
|
248
|
+
removeExtraElement(element: HTMLElement): void;
|
|
249
|
+
getSize(target: THREE.Vector2): THREE.Vector2;
|
|
250
|
+
getDrawingBufferSize(target: THREE.Vector2): THREE.Vector2;
|
|
251
|
+
/**
|
|
252
|
+
* 移动相机。(不触发点位移动)
|
|
253
|
+
* @description
|
|
254
|
+
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
255
|
+
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
256
|
+
* @param pose - 相机目标位置
|
|
257
|
+
* @param duration - 动画触发的时常
|
|
258
|
+
* @param userAction - 是否用户触发
|
|
259
|
+
* @returns Promise 是否移动成功
|
|
260
|
+
*/
|
|
261
|
+
updateCamera(pose: Partial<Pose>, duration: number, userAction?: boolean): Promise<void>;
|
|
262
|
+
/**
|
|
263
|
+
* 通过帧动画移动相机。(不触发点位移动)
|
|
264
|
+
* @description
|
|
265
|
+
* 如果动画中途被打断(用户触发行为,或者调用 setState, load, changeMode)的等
|
|
266
|
+
* 会 Promise.reject。运动完成则 Promise.resolve
|
|
267
|
+
* @param keyframes - 动画帧
|
|
268
|
+
* @param duration - 动画触发的时常
|
|
269
|
+
* @param userAction - 是否用户触发
|
|
270
|
+
* @returns Promise 是否移动成功
|
|
271
|
+
*/
|
|
272
|
+
updateCameraWithKeyframes(keyframes: {
|
|
273
|
+
progress: number;
|
|
274
|
+
value: Pose;
|
|
275
|
+
key?: string;
|
|
276
|
+
}[], duration: number, userAction?: boolean): Promise<void>;
|
|
277
|
+
/** 当前加载的 work 数据 */
|
|
278
|
+
get works(): Works;
|
|
279
|
+
get work(): Work;
|
|
280
|
+
get observers(): readonly import("..").WorkObserver[];
|
|
281
|
+
get models(): Models;
|
|
282
|
+
get model(): Model;
|
|
283
|
+
/**
|
|
284
|
+
* 加载 Work 数据
|
|
285
|
+
* @param inputWork - Work 数据
|
|
286
|
+
* @param state - 初始化姿态
|
|
287
|
+
* - "inherit" 使用当前姿态
|
|
288
|
+
* - "initial" 使用 Work 数据中的 initial 姿态
|
|
289
|
+
* - State 自定义姿态
|
|
290
|
+
* @param options - 切换时间, 切换效果
|
|
291
|
+
*/
|
|
292
|
+
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>;
|
|
293
|
+
private load_;
|
|
294
|
+
reset(): Promise<void>;
|
|
295
|
+
reset_(): Promise<void>;
|
|
296
|
+
/**
|
|
297
|
+
* 切换模态
|
|
298
|
+
* @param mode - 切换到的模态
|
|
299
|
+
* @param state - 切换完成时的姿态
|
|
300
|
+
* @param options - 模态切换动画用时
|
|
301
|
+
* @param userAction - 是否时用户动作触发 默认 true
|
|
302
|
+
* @param force - 必须重新初始化 controller
|
|
303
|
+
*/
|
|
304
|
+
changeMode<T extends Mode>(mode: T, state?: Partial<Omit<State, "mode">>, options?: number | {
|
|
305
|
+
duration?: number;
|
|
306
|
+
effect?: MovePanoEffect;
|
|
307
|
+
}, userAction?: boolean, force?: boolean): Promise<void>;
|
|
308
|
+
/**
|
|
309
|
+
* 获取画面中的像素颜色
|
|
310
|
+
* @param x - 获取像素区域的起始坐标 x
|
|
311
|
+
* @param y - 获取像素区域的起始坐标 y
|
|
312
|
+
* @param width - 获取像素区域的宽度
|
|
313
|
+
* @param height - 获取像素区域的高度
|
|
314
|
+
* @param pixelRatio - 获取区域的像素比
|
|
315
|
+
* @param flipY - 是否Y轴翻转
|
|
316
|
+
* @param buffer - 存储数组
|
|
317
|
+
* @returns rgba颜色平铺的 Uint8Array
|
|
318
|
+
*/
|
|
319
|
+
getPixels<T extends Uint8Array | Uint8ClampedArray = Uint8Array>(x: number, y: number, width: number, height: number, pixelRatio?: number, flipY?: boolean, buffer?: T): Promise<T>;
|
|
320
|
+
/**
|
|
321
|
+
* 获取画面中的像素颜色
|
|
322
|
+
* @param options - 参数
|
|
323
|
+
* @returns
|
|
324
|
+
*/
|
|
325
|
+
getPixels<T extends Uint8Array | Uint8ClampedArray = Uint8Array>(options: {
|
|
326
|
+
/** 获取像素区域的起始坐标 x */
|
|
327
|
+
x: number;
|
|
328
|
+
/** 获取像素区域的起始坐标 y */
|
|
329
|
+
y: number;
|
|
330
|
+
/** 获取像素区域的宽度 */
|
|
331
|
+
width: number;
|
|
332
|
+
/** 获取像素区域的高度 */
|
|
333
|
+
height: number;
|
|
334
|
+
/** 获取区域的像素比 */
|
|
335
|
+
pixelRatio?: number;
|
|
336
|
+
helperVisible?: boolean;
|
|
337
|
+
skipPanorama?: boolean;
|
|
338
|
+
/** 是否Y轴翻转 */
|
|
339
|
+
flipY?: boolean;
|
|
340
|
+
/** 存储数组 */
|
|
341
|
+
buffer?: T;
|
|
342
|
+
}): Promise<T>;
|
|
343
|
+
/**
|
|
344
|
+
* 获取显示用的画布(Canvas DOM节点)
|
|
345
|
+
*/
|
|
346
|
+
getElement(): HTMLCanvasElement | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* 强制渲染
|
|
349
|
+
* @description
|
|
350
|
+
* 调用 `five.render()` 和设置 `five.needsRender = true` 均可在按需渲染时,使得画面渲染一次
|
|
351
|
+
* 区别在于:
|
|
352
|
+
* - `five.needsRender = true` 为在下帧渲染画面
|
|
353
|
+
* - `five.render()` 在当前帧渲染画面
|
|
354
|
+
* 推荐使用 `five.needsRender = true`, 可以更加流畅。但是如果需要截图等同步操作,可以使用 `five.render()`
|
|
355
|
+
*
|
|
356
|
+
* @param callback - 渲染完成回调
|
|
357
|
+
*/
|
|
358
|
+
render(callback?: () => void): void;
|
|
359
|
+
updateTime(time: number, deltaTime: number, ...args: any[]): void;
|
|
360
|
+
/**
|
|
361
|
+
* 暂停自动播放
|
|
362
|
+
*/
|
|
363
|
+
pause(): void;
|
|
364
|
+
play(): void;
|
|
365
|
+
/**
|
|
366
|
+
* 转化到 Panorama 模态,并移动到对应序号的观察点。
|
|
367
|
+
* @param pano - 观察点序号
|
|
368
|
+
* @param options - 移动点位参数
|
|
369
|
+
* @param userAction - 是否用户触犯
|
|
370
|
+
*/
|
|
371
|
+
moveToPano(pano: Pano | PanoId | number, options?: MovePanoOptions, userAction?: boolean): Promise<void>;
|
|
372
|
+
/**
|
|
373
|
+
* 预加载点位图片资源
|
|
374
|
+
* @param pano - 观察点序号
|
|
375
|
+
* @param callback - 加载完成回调, 并传递加载用时。
|
|
376
|
+
* @returns 加载完成的 Promise 参数同 callback
|
|
377
|
+
*/
|
|
378
|
+
preloadPano(pano: Pano | PanoId | number, callback?: (costs: number) => void): Promise<number>;
|
|
379
|
+
/**
|
|
380
|
+
* 计算三维坐标对应到屏幕的二维坐标
|
|
381
|
+
* @description
|
|
382
|
+
* 如果三维坐标不在屏幕中,则返回 null
|
|
383
|
+
* @param vector - 三维坐标
|
|
384
|
+
* @param testModel - 是否计算模型遮挡
|
|
385
|
+
* @returns 二维坐标 或者 null
|
|
386
|
+
*/
|
|
387
|
+
project2d(vector: THREE.Vector3, testModel?: boolean): THREE.Vector2 | null;
|
|
388
|
+
getCurrentState(): State;
|
|
389
|
+
/**
|
|
390
|
+
* 设置 State
|
|
391
|
+
* @description
|
|
392
|
+
* ```text
|
|
393
|
+
* five 设置了以下状态
|
|
394
|
+
*
|
|
395
|
+
* - mode: Mode
|
|
396
|
+
* - panoIndex: number
|
|
397
|
+
* - longitude: number
|
|
398
|
+
* - latitude: number
|
|
399
|
+
* - distance: number
|
|
400
|
+
* - fov: number
|
|
401
|
+
* - offset: THREE.Vector3
|
|
402
|
+
*
|
|
403
|
+
* 可以通过 five.state 和 five.setState 来获取和设置。
|
|
404
|
+
* 通过 state 设置后,five 会通过合适的动画运动来达到设置的位置。
|
|
405
|
+
* 来迎合一些通过数据驱动的场景。
|
|
406
|
+
* ```
|
|
407
|
+
* @param state - 目标状态
|
|
408
|
+
* @param immediately - 是否马上转换,马上转换会尽快达到目标状态,尽量减少中间状态,更少动画。
|
|
409
|
+
* @param userAction - 是否是用户触发的动作
|
|
410
|
+
*/
|
|
411
|
+
setState(state: Partial<State>, immediately?: boolean, userAction?: boolean): void;
|
|
412
|
+
private syncState;
|
|
413
|
+
/**
|
|
414
|
+
* 当前页面静态
|
|
415
|
+
*/
|
|
416
|
+
ready(args?: {
|
|
417
|
+
tile?: boolean;
|
|
418
|
+
}): Promise<void>;
|
|
419
|
+
/**
|
|
420
|
+
* 请求全屏
|
|
421
|
+
*/
|
|
422
|
+
requestFullscreen(): void;
|
|
423
|
+
/**
|
|
424
|
+
* 退出全屏
|
|
425
|
+
*/
|
|
426
|
+
exitFullscreen(): void;
|
|
427
|
+
private throwError;
|
|
428
|
+
private bindModel;
|
|
429
|
+
private bindWorkFetcher;
|
|
430
|
+
private commonParams;
|
|
431
|
+
private applyController;
|
|
432
|
+
/** 移除事件绑定 */
|
|
433
|
+
private removeEventListeners;
|
|
434
|
+
get internalLightsEnabled(): boolean;
|
|
435
|
+
set internalLightsEnabled(value: boolean);
|
|
436
|
+
/**
|
|
437
|
+
* @deprecated
|
|
438
|
+
* use Viewport instead.
|
|
439
|
+
*/
|
|
440
|
+
get scissor(): Viewport;
|
|
441
|
+
/**
|
|
442
|
+
* @deprecated
|
|
443
|
+
* use setViewport instead.
|
|
444
|
+
*/
|
|
445
|
+
setScissor(scissor: Viewport): void;
|
|
446
|
+
/**
|
|
447
|
+
* @deprecated
|
|
448
|
+
* 获取当前相机姿态, 可以使用 getCurrentState 代替
|
|
449
|
+
*/
|
|
450
|
+
getPose(): Pose;
|
|
451
|
+
/**
|
|
452
|
+
* 获取当前相机经纬度
|
|
453
|
+
* @deprecated 请使用使用 getPose
|
|
454
|
+
*/
|
|
455
|
+
getLongitudeAndLatitude(): Pick<Pose, "longitude" | "latitude">;
|
|
456
|
+
/**
|
|
457
|
+
* 获取当前相机位置
|
|
458
|
+
* @deprecated 请使用使用 getPose
|
|
459
|
+
*/
|
|
460
|
+
getOffset(): Pose["offset"];
|
|
461
|
+
/**
|
|
462
|
+
* 获取当前相机的姿态(用于内部的 python 脚本截图)
|
|
463
|
+
* @deprecated 这是用于内部的 python 脚本截图
|
|
464
|
+
*/
|
|
465
|
+
getCameraLocal(): {
|
|
466
|
+
theta: number;
|
|
467
|
+
phi: number;
|
|
468
|
+
lookAtVector: THREE.Vector3;
|
|
469
|
+
} | null;
|
|
470
|
+
/**
|
|
471
|
+
* 增加后处理PASS
|
|
472
|
+
* @param pass - 要添加的Pass实例
|
|
473
|
+
*/
|
|
474
|
+
addPass(pass: Pass): void;
|
|
475
|
+
/**
|
|
476
|
+
* 移除后处理Pass
|
|
477
|
+
* @param pass - 要移除的Pass实例
|
|
478
|
+
*/
|
|
479
|
+
removePass(pass: Pass): void;
|
|
480
|
+
/**
|
|
481
|
+
* 在指定位置插入后处理Pass
|
|
482
|
+
* @param pass - 要插入的Pass实例
|
|
483
|
+
* @param index - 插入位置的索引
|
|
484
|
+
*/
|
|
485
|
+
insertPass(pass: Pass, index: number): void;
|
|
486
|
+
/**
|
|
487
|
+
* 设置渲染模式
|
|
488
|
+
*/
|
|
489
|
+
get renderMode(): string;
|
|
490
|
+
set renderMode(value: string);
|
|
491
|
+
/** 开启 edl */
|
|
492
|
+
get enableEDL(): boolean;
|
|
493
|
+
set enableEDL(enable: boolean);
|
|
494
|
+
/** 开启 AdaptiveLuminance */
|
|
495
|
+
get enableAdaptiveLuminance(): boolean;
|
|
496
|
+
set enableAdaptiveLuminance(enable: boolean);
|
|
497
|
+
}
|
|
498
|
+
export { Five, FiveInitArgs };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as THREE from "three/webgpu";
|
|
2
|
+
import { ImageOptions, TextureOptions } from "../types/imageOptions";
|
|
3
|
+
import { Viewport } from "../types/viewport";
|
|
4
|
+
import { ControllerCustomInitTypes } from "./controllers";
|
|
5
|
+
import { FivePlugin, FivePluginInit } from "../types/plugin";
|
|
6
|
+
/** Five 初始化参数 */
|
|
7
|
+
interface FiveInitArgs {
|
|
8
|
+
/**
|
|
9
|
+
* 外部传入的 `THREE.WebGPURenderer`。
|
|
10
|
+
* @description
|
|
11
|
+
* 如果需要使用 `scissor` 分割画布功能,则必须使用外部传入 renderer,
|
|
12
|
+
* 并且设置为 `preserveDrawingBuffer: false`。
|
|
13
|
+
* 如果设置了 `renderer`, 则 `preserveDrawingBuffer`
|
|
14
|
+
* `backgroundColor` `backgroundAlpha` `antialias`
|
|
15
|
+
* 均不再生效。
|
|
16
|
+
*/
|
|
17
|
+
renderer?: THREE.WebGPURenderer;
|
|
18
|
+
/**
|
|
19
|
+
* 内部 `THREE.WebGPURenderer` 是否通过像素拷贝的方式绘制。
|
|
20
|
+
* @description
|
|
21
|
+
* 当你想做屏幕截图等要确定取得屏幕像素时,请设置为 `true`。
|
|
22
|
+
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
23
|
+
* @default `false`
|
|
24
|
+
*/
|
|
25
|
+
preserveDrawingBuffer?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 输出画面的背景颜色。
|
|
28
|
+
* @description
|
|
29
|
+
* 通过数字类型传入。
|
|
30
|
+
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
31
|
+
* @default `0x181A1C`
|
|
32
|
+
* @example
|
|
33
|
+
* ```
|
|
34
|
+
* backgroundColor: 0xffffff // 白色
|
|
35
|
+
* backgroundColor: 0xff0000 // 红色
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
backgroundColor?: number | THREE.Color;
|
|
39
|
+
/**
|
|
40
|
+
* 输出画面的背景透明度
|
|
41
|
+
* @description
|
|
42
|
+
* 通过数字类型传入。取值范围 [0-1]
|
|
43
|
+
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
44
|
+
* @default `1`
|
|
45
|
+
*/
|
|
46
|
+
backgroundAlpha?: number;
|
|
47
|
+
/**
|
|
48
|
+
* 是否开启 `THREE.WebGPURenderer` 的抗锯齿功能
|
|
49
|
+
* @description
|
|
50
|
+
* 这个抗锯齿功能是 `WEBGL` 自带的抗锯齿,并不是类似 fxaa taa 等后处理方式,比较吃性能。
|
|
51
|
+
* 如果设置了参数 `renderer` 参数,则不生效,请对传入的 `renderer` 自行设置。
|
|
52
|
+
* @default `false`
|
|
53
|
+
*/
|
|
54
|
+
antialias?: boolean;
|
|
55
|
+
enableHDR?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 屏幕渲染区域
|
|
58
|
+
* @description
|
|
59
|
+
* 请确保设置了 `renderer` 参数,`viewport` 参数才可生效
|
|
60
|
+
* `viewport` 是将屏幕中的内容渲染到 `renderer` 的指定区域。
|
|
61
|
+
* 页面整体长宽均为 `1`。通过类似 css 的 `left` `bottom` `width` `height` 来确定区域。
|
|
62
|
+
* @example
|
|
63
|
+
* ```
|
|
64
|
+
* viewport: { left: 0.75, bottom: 0, width: 0.25, height: 1 }
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
viewport?: Viewport;
|
|
68
|
+
/**
|
|
69
|
+
* 是否自动播放。
|
|
70
|
+
* @description
|
|
71
|
+
* 播放即把内存中计算的内容渲染到画面上。play则是进行每帧播放。
|
|
72
|
+
* 如果 `play: false` 则不自动播放。屏幕不显示。
|
|
73
|
+
* 你还可以通过 `five.play()` `five.pause()` 的方式来控制播放。
|
|
74
|
+
* @default `true`
|
|
75
|
+
*/
|
|
76
|
+
play?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 全景图的配置参数
|
|
79
|
+
* @description
|
|
80
|
+
* 可以动态对配置在 `work` 数据中的全景图片在 runtime 做 url 调整。
|
|
81
|
+
* 平衡加载时间和图片质量
|
|
82
|
+
*/
|
|
83
|
+
imageOptions?: ImageOptions;
|
|
84
|
+
/**
|
|
85
|
+
* 模型贴图的配置参数
|
|
86
|
+
* @description
|
|
87
|
+
* 可以动态对配置在 `work` 数据中的模型贴图在 runtime 做 url 调整。
|
|
88
|
+
* 平衡加载时间和图片质量
|
|
89
|
+
*/
|
|
90
|
+
textureOptions?: TextureOptions;
|
|
91
|
+
/**
|
|
92
|
+
* 是否按需渲染
|
|
93
|
+
* @description
|
|
94
|
+
* 按需渲染时,如果页面中的渲染有 `needsRender: true` 属性。或者 `five.needsRender: true` 时
|
|
95
|
+
* 才会重新渲染屏幕,降低无用渲染产生的消耗。
|
|
96
|
+
* @default `true`
|
|
97
|
+
*/
|
|
98
|
+
onlyRenderIfNeeds?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 最高 fps 限制
|
|
101
|
+
* @description
|
|
102
|
+
* 如果为 `false`, 则不限制。最好也就是屏幕刷新率,不会再高了。
|
|
103
|
+
* @default `false`
|
|
104
|
+
*/
|
|
105
|
+
maxFps?: number | false;
|
|
106
|
+
/**
|
|
107
|
+
* 外挂视频对象。
|
|
108
|
+
* @description
|
|
109
|
+
* 当点位中有视频元素,则会使用。如果不传入也会外部新建,
|
|
110
|
+
* 加入传入的原因是,视频自动播放在不同浏览器或者 webview 中有不同的特性。
|
|
111
|
+
* 给予更多外部操作的空间。
|
|
112
|
+
*/
|
|
113
|
+
videoInstance?: HTMLVideoElement;
|
|
114
|
+
/** 全景图游走模式下的特定参数 */
|
|
115
|
+
panorama?: ControllerCustomInitTypes["Panorama"];
|
|
116
|
+
/** 模型游走模式下的特定参数 */
|
|
117
|
+
model?: ControllerCustomInitTypes["Model"];
|
|
118
|
+
/** 模型查看模式下的特定参数 */
|
|
119
|
+
floorplan?: ControllerCustomInitTypes["Floorplan"];
|
|
120
|
+
/** 户型图模式下的特定参数 */
|
|
121
|
+
topview?: ControllerCustomInitTypes["Topview"];
|
|
122
|
+
/** 地图模式下的特定参数 */
|
|
123
|
+
mapview?: ControllerCustomInitTypes["Mapview"];
|
|
124
|
+
/**
|
|
125
|
+
* 模式间切换时的过度动画时间
|
|
126
|
+
* @description
|
|
127
|
+
* 单位毫秒
|
|
128
|
+
* @default `800`
|
|
129
|
+
*/
|
|
130
|
+
modeChangeDuration?: number;
|
|
131
|
+
/**
|
|
132
|
+
* 是否支持滚轮
|
|
133
|
+
*/
|
|
134
|
+
enableWheel?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* 插件定义
|
|
137
|
+
* @description
|
|
138
|
+
* 详见插件部分。
|
|
139
|
+
*/
|
|
140
|
+
plugins?: (FivePlugin<void> | FivePluginInit<FivePlugin<any, any>> | FivePluginInit<FivePlugin<void, any>>)[];
|
|
141
|
+
/**
|
|
142
|
+
* 是否展示 powered by 如视
|
|
143
|
+
*/
|
|
144
|
+
poweredByRealsee?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* 是否使用对数深度缓存。如果要在单个场景中处理巨大的比例差异,就有必要使用
|
|
147
|
+
*/
|
|
148
|
+
logarithmicDepthBuffer?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* 着色器精度. 可以是 "highp", "mediump" 或者 "lowp". 如果设备支持
|
|
151
|
+
*/
|
|
152
|
+
precision?: 'highp' | 'mediump' | 'lowp';
|
|
153
|
+
/**
|
|
154
|
+
* 性能参数
|
|
155
|
+
*/
|
|
156
|
+
powerPreference?: 'high-performance' | 'low-power' | 'default';
|
|
157
|
+
/**
|
|
158
|
+
* 是否使用webgl2渲染执行环境, 默认值 false
|
|
159
|
+
*/
|
|
160
|
+
webgl2?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* 请求代理
|
|
163
|
+
* @param url - 发起的请求
|
|
164
|
+
* @returns 返回的请求
|
|
165
|
+
*/
|
|
166
|
+
requestProxy?(url: string): string | Promise<string>;
|
|
167
|
+
/**
|
|
168
|
+
* @deprecated
|
|
169
|
+
* 无效
|
|
170
|
+
*/
|
|
171
|
+
enableLayeringRendering?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export type { FiveInitArgs };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ModelOptions } from "../model";
|
|
2
|
+
import { MovePanoEffect } from '../types/movePanoEffect';
|
|
3
|
+
export interface FiveLoadOptions {
|
|
4
|
+
/** 替换 / 追加 */
|
|
5
|
+
mode?: 'replace' | "add";
|
|
6
|
+
/** 切换运动时间 */
|
|
7
|
+
duration?: number;
|
|
8
|
+
/** 切换运动全景图效果 */
|
|
9
|
+
effect?: MovePanoEffect;
|
|
10
|
+
model?: ModelOptions;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
* 请通过 model.textureOptions 设置
|
|
14
|
+
*/
|
|
15
|
+
textureOptions?: ModelOptions['textureOptions'];
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated
|
|
18
|
+
* 请通过 model.textureOptions 设置
|
|
19
|
+
*/
|
|
20
|
+
"3d-tiles"?: ModelOptions['3d-tiles'];
|
|
21
|
+
}
|