@realsee/five-webgpu 1.0.0-alpha.13 → 1.0.0-alpha.15
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/_virtual/_rolldown/runtime.js +3 -3
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/index.AdaptiveLuminancePass.html +1 -1
- package/docs/classes/index.BoundingMesh.html +1 -1
- package/docs/classes/index.Camera.html +1 -1
- package/docs/classes/index.EyeDomeLightingPass.html +1 -1
- package/docs/classes/index.Five.html +65 -64
- package/docs/classes/index.FivePass.html +1 -1
- package/docs/classes/index.FiveRenderer.html +4 -4
- package/docs/classes/index.FlowingFireworks3DPass.html +1 -1
- package/docs/classes/index.FlowingLight2DPass.html +1 -1
- package/docs/classes/index.FlowingLight3DPass.html +1 -1
- package/docs/classes/index.GaussianBlurPass.html +1 -1
- package/docs/classes/index.InternalWebGPURenderer.html +4 -4
- package/docs/classes/index.Model.html +1 -1
- package/docs/classes/index.ModelScene.html +1 -1
- package/docs/classes/index.NetworkSubscribe.html +1 -1
- package/docs/classes/index.PBMCustomNode.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingObject.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +1 -1
- package/docs/classes/index.PBMGroup.html +1 -1
- package/docs/classes/index.PBMMesh.html +1 -1
- package/docs/classes/index.PBMMeshBasicMaterial.html +1 -1
- package/docs/classes/index.PBMMeshBasicNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhongMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhongNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhysicalMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +1 -1
- package/docs/classes/index.PBMPanoFilter.html +1 -1
- package/docs/classes/index.PBMPointCloud.html +1 -1
- package/docs/classes/index.PBMPointCloudMaterial.html +1 -1
- package/docs/classes/index.PBMSkinnedMesh.html +1 -1
- package/docs/classes/index.PBMUpdateable.html +1 -1
- package/docs/classes/index.PanoCircleMesh.html +9 -5
- package/docs/classes/index.PanoCircleMeshCustom.html +9 -5
- package/docs/classes/index.PanoCircleMeshSolid.html +9 -5
- package/docs/classes/index.Parameter.html +1 -1
- package/docs/classes/index.Scene.html +1 -1
- package/docs/classes/index.Subscribe.html +1 -1
- package/docs/classes/index.Tile3D.html +1 -1
- package/docs/classes/index.TileNode.html +1 -1
- package/docs/classes/index.TrajectoryNode.html +1 -1
- package/docs/classes/index.Work.html +15 -22
- package/docs/classes/index.WorkResolvedObserver.html +22 -22
- package/docs/functions/index.createWorks.html +1 -1
- package/docs/functions/index.parseWork.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/index.AddableObject.html +1 -1
- package/docs/interfaces/index.AjaxOptions.html +1 -1
- package/docs/interfaces/index.BaseEvent.html +1 -1
- package/docs/interfaces/index.Clock.html +1 -1
- package/docs/interfaces/index.EventCallback.html +3 -3
- package/docs/interfaces/index.GestureEvent.html +1 -1
- package/docs/interfaces/index.IPBMMaterial.html +1 -1
- package/docs/interfaces/index.ImageOptions.html +1 -1
- package/docs/interfaces/index.IntersectEvent.html +1 -1
- package/docs/interfaces/index.IntersectMesh.html +1 -1
- package/docs/interfaces/index.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/index.Intersection.html +1 -1
- package/docs/interfaces/index.LooseWorkObserver.html +2 -2
- package/docs/interfaces/index.LooseWorkPanorama.html +2 -2
- package/docs/interfaces/index.LooseWorkWithExtrinsics.html +8 -8
- package/docs/interfaces/index.ModeChangeEvent.html +1 -1
- package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ModelEvent.html +1 -1
- package/docs/interfaces/index.ModelSceneEvent.html +1 -1
- package/docs/interfaces/index.ModelTileEvent.html +1 -1
- package/docs/interfaces/index.MovePanoOptions.html +1 -1
- package/docs/interfaces/index.NetworkAbortError.html +1 -1
- package/docs/interfaces/index.NetworkFirbiddenError.html +1 -1
- package/docs/interfaces/index.NetworkOptions.html +1 -1
- package/docs/interfaces/index.NetworkProxyError.html +1 -1
- package/docs/interfaces/index.NetworkResourceEvent.html +1 -1
- package/docs/interfaces/index.NetworkResponseError.html +1 -1
- package/docs/interfaces/index.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/index.ObjectEvent.html +1 -1
- package/docs/interfaces/index.PanoCircleMeshInterface.html +8 -4
- package/docs/interfaces/index.PanoCircleMeshOptions.html +2 -2
- package/docs/interfaces/index.PanoCircleMeshSolidOptions.html +2 -2
- package/docs/interfaces/index.PanoEvent.html +1 -1
- package/docs/interfaces/index.PanoPrepareEvent.html +1 -1
- package/docs/interfaces/index.PanoTextureEvent.html +1 -1
- package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ParameterMaterialValue.html +1 -1
- package/docs/interfaces/index.ParameterTilesetValue.html +1 -1
- package/docs/interfaces/index.ParameterValue.html +1 -1
- package/docs/interfaces/index.Pose.html +1 -1
- package/docs/interfaces/index.RenderEvent.html +1 -1
- package/docs/interfaces/index.ResolvedParameterValue.html +1 -1
- package/docs/interfaces/index.State.html +1 -1
- package/docs/interfaces/index.StateEvent.html +1 -1
- package/docs/interfaces/index.TextureOptions.html +1 -1
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ViewLayer.html +1 -1
- package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +2 -2
- package/docs/interfaces/index.WorkCubeImage.html +2 -2
- package/docs/interfaces/index.WorkImage.html +5 -5
- package/docs/interfaces/index.WorkInitial.html +8 -8
- package/docs/interfaces/index.WorkInitialJson.html +2 -2
- package/docs/interfaces/index.WorkJson.html +2 -4
- package/docs/interfaces/index.WorkModel.html +8 -8
- package/docs/interfaces/index.WorkModelJson.html +2 -2
- package/docs/interfaces/index.WorkModelLayer.html +6 -6
- package/docs/interfaces/index.WorkModelLayerJson.html +2 -2
- package/docs/interfaces/index.WorkObserver.html +23 -23
- package/docs/interfaces/index.WorkObserverJson.html +2 -2
- package/docs/interfaces/index.WorkPanoramaJson.html +2 -2
- package/docs/interfaces/index.WorkPanoramasJson.html +2 -2
- package/docs/interfaces/index.WorkTile.html +5 -5
- package/docs/interfaces/index.WorkVideo.html +4 -4
- package/docs/interfaces/index.WorksEvent.html +1 -1
- package/docs/interfaces/index.XRControllerEvent.html +1 -1
- package/docs/interfaces/index.XRGestureEvent.html +2 -2
- package/docs/interfaces/index.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.XRSessionEvent.html +1 -1
- package/docs/modules/index.html +1 -1
- package/docs/types/index.LegacyEventType.html +3 -3
- package/docs/types/index.OutputTextureDataType.html +1 -1
- package/docs/types/index.ParseOptions.html +8 -8
- package/docs/types/index.PointCloudTransparencyMode.html +2 -0
- package/docs/types/index.Works.html +1 -1
- package/docs/variables/index.loadAt3d.html +2 -0
- package/docs/variables/index.loadDome.html +2 -0
- package/docs/variables/index.loadDomez.html +2 -0
- package/docs/variables/index.loadGltf.html +2 -0
- package/docs/variables/index.loadPbm.html +2 -0
- package/docs/variables/index.loadPly.html +2 -0
- package/five/application/five.d.ts +3 -2
- package/five/chunks/at3d.js +338 -0
- package/five/chunks/at3d.mjs +338 -0
- package/five/chunks/dome.js +338 -0
- package/five/chunks/dome.mjs +338 -0
- package/five/chunks/domez.js +338 -0
- package/five/chunks/domez.mjs +338 -0
- package/five/chunks/fbx.js +338 -0
- package/five/chunks/fbx.mjs +338 -0
- package/five/chunks/fflate.js +338 -0
- package/five/chunks/fflate.mjs +338 -0
- package/five/chunks/glTF-helpers.js +804 -0
- package/five/chunks/glTF-helpers.mjs +804 -0
- package/five/chunks/gltf.js +338 -0
- package/five/chunks/gltf.mjs +338 -0
- package/five/chunks/imageBitmap.js +338 -0
- package/five/chunks/imageBitmap.mjs +338 -0
- package/five/chunks/imageSupport.js +338 -0
- package/five/chunks/imageSupport.mjs +338 -0
- package/five/chunks/lzma.js +383 -0
- package/five/chunks/lzma.mjs +383 -0
- package/five/chunks/memoryUsage.js +339 -0
- package/five/chunks/memoryUsage.mjs +339 -0
- package/five/chunks/minimal.js +338 -0
- package/five/chunks/minimal.mjs +338 -0
- package/five/chunks/pbm.js +338 -0
- package/five/chunks/pbm.mjs +338 -0
- package/five/chunks/pbmGaussianSplattingObject.js +338 -0
- package/five/chunks/pbmGaussianSplattingObject.mjs +338 -0
- package/five/chunks/pbmMeshMaterial.js +338 -0
- package/five/chunks/pbmMeshMaterial.mjs +338 -0
- package/five/chunks/pick.js +338 -0
- package/five/chunks/pick.mjs +338 -0
- package/five/chunks/ply.js +339 -0
- package/five/chunks/ply.mjs +339 -0
- package/five/chunks/spz.js +364 -0
- package/five/chunks/spz.mjs +364 -0
- package/five/controllers/panorama.d.ts +6 -0
- package/five/core/webglBlendEquationFix.d.ts +41 -0
- package/five/index.d.ts +0 -1
- package/five/index.js +49 -626
- package/five/index.mjs +229 -32052
- package/five/meshes/panoCircleMesh.d.ts +1 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +1 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +1 -0
- package/five/meshes/panoSphereMesh.d.ts +1 -0
- package/five/model/index.d.ts +18 -6
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +1 -1
- package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +1 -1
- package/five/model/loaders/spz.d.ts +1 -2
- package/five/model/loaders/spz.worker.d.ts +37 -0
- package/five/renderer/five-renderer.d.ts +1 -1
- package/five/renderer/index.d.ts +1 -1
- package/five/renderer/postprocessing/passes/pass.js +3 -3
- package/five/renderer/postprocessing/passes/pass.mjs +3 -3
- package/five/renderer/tools/full-screen-quad.js +3 -3
- package/five/renderer/tools/full-screen-quad.mjs +3 -3
- package/five/texture/initTexture.d.ts +8 -0
- package/five/texture/videoTextureBridge.d.ts +124 -15
- package/five/thirdparty/sha256.d.ts +149 -0
- package/five/types/panoCircleMeshInterface.d.ts +6 -0
- package/five/utils/calculateThreeMouse.js +3 -3
- package/five/utils/calculateThreeMouse.mjs +3 -3
- package/five/utils/distance.js +3 -3
- package/five/utils/distance.mjs +3 -3
- package/five/utils/isNil.js +3 -3
- package/five/utils/isNil.mjs +3 -3
- package/five/utils/memoryUsage.d.ts +1 -1
- package/five/utils/uuid.js +3 -3
- package/five/utils/uuid.mjs +3 -3
- package/five/work/looseWorkType.d.ts +2 -2
- package/five/work/work.d.ts +1 -8
- package/five/work/workJsonType.d.ts +2 -4
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -50
- package/line/index.js +3 -3
- package/line/index.mjs +3 -88
- package/package.json +1 -1
- package/plugins/BackgroundPlugin/Controller.js +4 -4
- package/plugins/BackgroundPlugin/Controller.mjs +4 -4
- package/plugins/BackgroundPlugin/index.js +3 -3
- package/plugins/BackgroundPlugin/index.mjs +3 -3
- package/plugins/BasePlugin/index.js +3 -3
- package/plugins/BasePlugin/index.mjs +3 -3
- package/plugins/CSS2DPlugin/Controller.js +3 -3
- package/plugins/CSS2DPlugin/Controller.mjs +3 -3
- package/plugins/CSS2DPlugin/index.js +3 -3
- package/plugins/CSS2DPlugin/index.mjs +3 -3
- package/plugins/CSS2DPlugin/style.css_raw.js +4 -4
- package/plugins/CSS2DPlugin/style.css_raw.mjs +4 -4
- package/plugins/CSS3DPlugin/Controller.js +3 -3
- package/plugins/CSS3DPlugin/Controller.mjs +3 -3
- package/plugins/CSS3DPlugin/index.js +3 -3
- package/plugins/CSS3DPlugin/index.mjs +3 -3
- package/plugins/CSS3DPlugin/style.css_raw.js +4 -4
- package/plugins/CSS3DPlugin/style.css_raw.mjs +4 -4
- package/plugins/FloorplanPlugin/Controller.js +3 -3
- package/plugins/FloorplanPlugin/Controller.mjs +3 -3
- package/plugins/FloorplanPlugin/index.js +3 -3
- package/plugins/FloorplanPlugin/index.mjs +3 -3
- package/plugins/FloorplanPlugin/render/assets.js +3 -3
- package/plugins/FloorplanPlugin/render/assets.mjs +3 -3
- package/plugins/FloorplanPlugin/render/index.js +3 -3
- package/plugins/FloorplanPlugin/render/index.mjs +3 -3
- package/plugins/FloorplanPlugin/render/isPointInPolygon.js +3 -3
- package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +3 -3
- package/plugins/FloorplanPlugin/render/renderFloor.js +3 -3
- package/plugins/FloorplanPlugin/render/renderFloor.mjs +3 -3
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +3 -3
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +3 -3
- package/plugins/FloorplanPlugin/render/style.css_raw.js +4 -4
- package/plugins/FloorplanPlugin/render/style.css_raw.mjs +4 -4
- package/plugins/FloorplanPlugin/utils/changeMode.js +3 -3
- package/plugins/FloorplanPlugin/utils/changeMode.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +3 -3
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/correctFiveState.js +3 -3
- package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/equal.js +3 -3
- package/plugins/FloorplanPlugin/utils/equal.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/filter.js +3 -3
- package/plugins/FloorplanPlugin/utils/filter.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +3 -3
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/formatData.js +3 -3
- package/plugins/FloorplanPlugin/utils/formatData.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +3 -3
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/formatPosition.js +3 -3
- package/plugins/FloorplanPlugin/utils/formatPosition.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +3 -3
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/getPxmm.js +3 -3
- package/plugins/FloorplanPlugin/utils/getPxmm.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/isTruelyObject.js +3 -3
- package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/nearlyEqual.js +3 -3
- package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/polylabel.js +3 -3
- package/plugins/FloorplanPlugin/utils/polylabel.mjs +3 -3
- package/plugins/FloorplanPlugin/utils/to.js +3 -3
- package/plugins/FloorplanPlugin/utils/to.mjs +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +3 -3
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controller.js +3 -3
- package/plugins/Object3DHelperPlugin/Controller.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +3 -3
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +3 -3
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +3 -3
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +3 -3
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +3 -3
- package/plugins/Object3DHelperPlugin/constant.js +3 -3
- package/plugins/Object3DHelperPlugin/constant.mjs +3 -3
- package/plugins/Object3DHelperPlugin/index.js +3 -3
- package/plugins/Object3DHelperPlugin/index.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/direction.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/direction.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/solidGuide.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +3 -3
- package/plugins/Object3DHelperPlugin/utils/tipsDom.js +3 -3
- package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +3 -3
- package/plugins/PanoAnimePlugin/Controller.js +3 -3
- package/plugins/PanoAnimePlugin/Controller.mjs +3 -3
- package/plugins/PanoAnimePlugin/index.js +3 -3
- package/plugins/PanoAnimePlugin/index.mjs +3 -3
- package/plugins/WordPassPlugin/Controller.js +3 -3
- package/plugins/WordPassPlugin/Controller.mjs +3 -3
- package/plugins/WordPassPlugin/hersheyFont.js +3 -3
- package/plugins/WordPassPlugin/hersheyFont.mjs +3 -3
- package/plugins/WordPassPlugin/index.js +3 -3
- package/plugins/WordPassPlugin/index.mjs +3 -3
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +4 -4
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +4 -4
- package/plugins/WordPassPlugin/word-pass.js +3 -3
- package/plugins/WordPassPlugin/word-pass.mjs +3 -3
- package/plugins/index.js +3 -3
- package/plugins/index.mjs +3 -3
- package/plugins/thirdParty/CSS2DRenderer.js +3 -3
- package/plugins/thirdParty/CSS2DRenderer.mjs +3 -3
- package/plugins/thirdParty/CSS3DRenderer.js +3 -3
- package/plugins/thirdParty/CSS3DRenderer.mjs +3 -3
- package/plugins/thirdParty/doctorstrange-model.js +75 -75
- package/plugins/thirdParty/doctorstrange-model.mjs +75 -75
- package/plugins/thirdParty/domevents.js +3 -3
- package/plugins/thirdParty/domevents.mjs +3 -3
- package/plugins/utils/absoluteUrl.js +3 -3
- package/plugins/utils/absoluteUrl.mjs +3 -3
- package/plugins/utils/calculatePath.js +3 -3
- package/plugins/utils/calculatePath.mjs +3 -3
- package/plugins/utils/clamp.js +3 -3
- package/plugins/utils/clamp.mjs +3 -3
- package/plugins/utils/uuid.js +3 -3
- package/plugins/utils/uuid.mjs +3 -3
- package/react/hooks/useFiveModelReadyState.d.ts +1 -1
- package/react/index.js +3 -3
- package/react/index.mjs +3 -644
- package/sticker/index.js +13 -4
- package/sticker/index.mjs +43 -260
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +4 -4
- package/umd/five-react.js +2 -2
- package/umd/five-sticker.js +13 -4
- package/umd/five-vfx.js +2 -2
- package/umd/five.js +152 -190
- package/vfx/index.js +3 -3
- package/vfx/index.mjs +3 -486
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +3 -315
- package/docs/functions/index.loadAt3d.html +0 -1
- package/docs/functions/index.loadDome.html +0 -1
- package/docs/functions/index.loadDomez.html +0 -1
- package/docs/functions/index.loadGltf.html +0 -1
- package/docs/functions/index.loadPbm.html +0 -1
- package/docs/functions/index.loadPly.html +0 -10
- package/five/certificates/hardware.d.ts +0 -1
- package/five/thirdparty/jsrsasign.d.ts +0 -753
- package/five/work/_ALLOW_HOST.d.ts +0 -2
- package/five/work/keychain.d.ts +0 -5
- package/five/work/verify.d.ts +0 -7
- package/five/work/workVerify.d.ts +0 -2
|
@@ -24,6 +24,7 @@ declare class PanoCircleMesh extends THREE.Object3D implements PanoCircleMeshInt
|
|
|
24
24
|
private panoU;
|
|
25
25
|
constructor(options?: PanoCircleMeshOptions);
|
|
26
26
|
setProgress(progress: number): void;
|
|
27
|
+
setHDRBoost(boost: number): void;
|
|
27
28
|
setOpacity(opacity: number): void;
|
|
28
29
|
setCurrent(current: boolean): void;
|
|
29
30
|
setLoading(loading: boolean): void;
|
|
@@ -29,6 +29,7 @@ declare class PanoCircleMeshCustom extends THREE.Object3D implements PanoCircleM
|
|
|
29
29
|
private panoU;
|
|
30
30
|
constructor(options?: PanoCircleMeshCustomOptions);
|
|
31
31
|
setProgress(progress: number): void;
|
|
32
|
+
setHDRBoost(boost: number): void;
|
|
32
33
|
setOpacity(opacity: number): void;
|
|
33
34
|
setCurrent(current: boolean): void;
|
|
34
35
|
setLoading(loading: boolean): void;
|
|
@@ -23,6 +23,7 @@ declare class PanoCircleMeshSolid extends THREE.Object3D implements PanoCircleMe
|
|
|
23
23
|
private panoU;
|
|
24
24
|
constructor(options?: PanoCircleMeshSolidOptions);
|
|
25
25
|
setProgress(progress: number): void;
|
|
26
|
+
setHDRBoost(boost: number): void;
|
|
26
27
|
setOpacity(opacity: number): void;
|
|
27
28
|
setCurrent(current: boolean): void;
|
|
28
29
|
setLoading(loading: boolean): void;
|
|
@@ -18,6 +18,7 @@ declare class PanoSphereMesh extends THREE.Object3D implements PanoCircleMeshInt
|
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
constructor();
|
|
20
20
|
setProgress(progress: number): void;
|
|
21
|
+
setHDRBoost(boost: number): void;
|
|
21
22
|
setOpacity(opacity: number): void;
|
|
22
23
|
setCurrent(current: boolean): void;
|
|
23
24
|
setLoading(loading: boolean): void;
|
package/five/model/index.d.ts
CHANGED
|
@@ -14,12 +14,24 @@ export { PBMMeshPhongNodeMaterial, } from './materials/nodes/pbmMeshPhongNodeMat
|
|
|
14
14
|
export { PBMMeshPhysicalNodeMaterial, } from './materials/nodes/pbmMeshPhysicalNodeMaterial';
|
|
15
15
|
export { PBMMeshPanoOnlyNodeMaterial, } from './materials/nodes/pbmMeshPanoOnlyNodeMaterial';
|
|
16
16
|
export { type LoadResultType } from "./loaders/shared";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
import type { loadPbm as LoadPbmFn } from "./loaders/pbm";
|
|
18
|
+
import type { loadAt3d as LoadAt3dFn } from "./loaders/at3d";
|
|
19
|
+
import type { loadDome as LoadDomeFn } from "./loaders/dome";
|
|
20
|
+
import type { loadDomez as LoadDomezFn } from "./loaders/domez";
|
|
21
|
+
import type { loadPly as LoadPlyFn } from "./loaders/ply";
|
|
22
|
+
import type { loadGltf as LoadGltfFn } from "./loaders/gltf";
|
|
23
|
+
/** 加载 PBM 格式模型(懒加载版本,实际实现见 `./loaders/pbm` 中的 `loadPbm`)。 */
|
|
24
|
+
export declare const loadPbm: typeof LoadPbmFn;
|
|
25
|
+
/** 加载 AT3D 格式模型(懒加载版本,实际实现见 `./loaders/at3d` 中的 `loadAt3d`)。 */
|
|
26
|
+
export declare const loadAt3d: typeof LoadAt3dFn;
|
|
27
|
+
/** 加载 Dome 格式全景模型(懒加载版本,实际实现见 `./loaders/dome` 中的 `loadDome`)。 */
|
|
28
|
+
export declare const loadDome: typeof LoadDomeFn;
|
|
29
|
+
/** 加载 Domez 格式全景模型(懒加载版本,实际实现见 `./loaders/domez` 中的 `loadDomez`)。 */
|
|
30
|
+
export declare const loadDomez: typeof LoadDomezFn;
|
|
31
|
+
/** 加载 PLY 格式模型(懒加载版本,实际实现见 `./loaders/ply` 中的 `loadPly`)。 */
|
|
32
|
+
export declare const loadPly: typeof LoadPlyFn;
|
|
33
|
+
/** 加载 glTF/GLB 格式模型(懒加载版本,实际实现见 `./loaders/gltf` 中的 `loadGltf`)。 */
|
|
34
|
+
export declare const loadGltf: typeof LoadGltfFn;
|
|
23
35
|
export { type TilesetHeader, type TileHeader, type TrajectoryHeader } from './tile3d/header';
|
|
24
36
|
export { Tile, type TileContentData } from './tile3d/tile';
|
|
25
37
|
export { TileNode } from './tile3d/tile-node';
|
package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three/webgpu';
|
|
2
2
|
import { BaseExtension } from './base';
|
|
3
3
|
import type { Parser } from '../parser';
|
|
4
|
-
import { PBMGaussianSplattingObject } from '../../../objects/pbmGaussianSplattingObject';
|
|
4
|
+
import type { PBMGaussianSplattingObject } from '../../../objects/pbmGaussianSplattingObject';
|
|
5
5
|
export declare const EXTENSION_NAME = "KHR_gaussian_splatting_compression_spz";
|
|
6
6
|
export declare class KHR_gaussian_splatting_compression_spz extends BaseExtension {
|
|
7
7
|
load(gaussianSplattingExtension: {
|
package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three/webgpu';
|
|
2
2
|
import { BaseExtension } from './base';
|
|
3
3
|
import type { Parser } from '../parser';
|
|
4
|
-
import { PBMGaussianSplattingObject } from '../../../objects/pbmGaussianSplattingObject';
|
|
4
|
+
import type { PBMGaussianSplattingObject } from '../../../objects/pbmGaussianSplattingObject';
|
|
5
5
|
export interface GaussianSplattingExtensionSpz2 {
|
|
6
6
|
bufferView: number;
|
|
7
7
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fetcher } from "../../utils/ajax";
|
|
2
|
-
import { PBMGaussianSplattingObject } from '../objects/pbmGaussianSplattingObject';
|
|
3
2
|
import { LoadResultType } from './shared';
|
|
4
3
|
import type { DecodeKind } from '../../gaussian-splatting/worker/decodeWorker';
|
|
5
4
|
export { detectPlyKind } from '../../gaussian-splatting/worker/decodeWorker';
|
|
@@ -14,7 +13,7 @@ export declare function decodeInWorker<T>(kind: DecodeKind, bytes: Uint8Array, t
|
|
|
14
13
|
* 解析 spz 格式数据为 `PBMGaussianSplattingObject`。
|
|
15
14
|
* 解码 + WASM pack 全部在共享解码 Worker 内完成,主线程不阻塞。
|
|
16
15
|
*/
|
|
17
|
-
export declare function parseSpz(fileBytes: Uint8Array | ArrayBuffer): Promise<
|
|
16
|
+
export declare function parseSpz(fileBytes: Uint8Array | ArrayBuffer): Promise<any>;
|
|
18
17
|
export declare function loadSpz(url: string, options?: {
|
|
19
18
|
modelUpAxis?: 'Y' | 'Z';
|
|
20
19
|
upAxis?: 'Y' | 'Z';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPZ 纯解码的输出:仅包含原始属性数组(无 THREE / DOM 依赖),
|
|
3
|
+
* 因此可在 Worker 中安全运行。`packedData` 为 Worker 内 WASM pack 后回填。
|
|
4
|
+
*/
|
|
5
|
+
export interface DecodedSpz {
|
|
6
|
+
numPoints: number;
|
|
7
|
+
shDegree: number;
|
|
8
|
+
positions: Float32Array;
|
|
9
|
+
colors: Uint8Array;
|
|
10
|
+
scales: Float32Array;
|
|
11
|
+
rotations: Float32Array;
|
|
12
|
+
sh1?: Float32Array;
|
|
13
|
+
sh2?: Float32Array;
|
|
14
|
+
sh3?: Float32Array;
|
|
15
|
+
/** Worker 内 WASM pack 好的 8 uint32/splat GPU 数据。 */
|
|
16
|
+
packedData?: Uint32Array;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 纯解码函数:把 SPZ 字节流(gzip)解码为原始属性数组。
|
|
20
|
+
*
|
|
21
|
+
* - 不触碰主线程 / DOM,仅使用 `DecompressionStream`、`DataView`、TypedArray,
|
|
22
|
+
* 因此可在 Worker 内直接运行。
|
|
23
|
+
* - 保留 magic / version 校验(非法魔数或不支持的版本会 reject)。
|
|
24
|
+
* - 数据不足(读越界)时由 `GunzipReader` 抛出 `Unexpected EOF` 而 reject。
|
|
25
|
+
*/
|
|
26
|
+
export declare function decodeSpz(fileBytes: Uint8Array | ArrayBuffer): Promise<DecodedSpz>;
|
|
27
|
+
/** SPZ_Decode_Worker 的解码请求。 */
|
|
28
|
+
export interface SpzDecodeRequest {
|
|
29
|
+
requestId: number;
|
|
30
|
+
fileBytes: ArrayBuffer;
|
|
31
|
+
}
|
|
32
|
+
/** SPZ_Decode_Worker 的解码响应(成功回传 decoded,失败回传 error)。 */
|
|
33
|
+
export interface SpzDecodeResponse {
|
|
34
|
+
requestId: number;
|
|
35
|
+
decoded?: DecodedSpz;
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
@@ -23,7 +23,7 @@ export declare class FiveRenderer {
|
|
|
23
23
|
/** 只存值与标记,不触碰 GPU,WebGL 后端下同样可安全读写 */
|
|
24
24
|
private readonly transparencySettings;
|
|
25
25
|
/**
|
|
26
|
-
* 计算着色器点云的半透明处理方式:'blend' | 'opaque',默认 '
|
|
26
|
+
* 计算着色器点云的半透明处理方式:'blend' | 'opaque',默认 'blend'。
|
|
27
27
|
* 非法值保持原值并输出警告;值改变时置 needsRender。
|
|
28
28
|
*/
|
|
29
29
|
get pointCloudTransparencyMode(): PointCloudTransparencyMode;
|
package/five/renderer/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { EffectComposer, FivePass, type Pass, AdaptiveLuminancePass, EyeDomeLightingPass, FlowingLight2DPass, type FlowingLight2DPassLine, FlowingLight3DPass, type FlowingLight3DPassLine, type FlowingLightLineInput, GaussianBlurPass, FlowingFireworks3DPass, type FlowingFireworks3DPassLine, } from './postprocessing';
|
|
2
2
|
export { FullScreenQuad } from './tools/full-screen-quad';
|
|
3
|
-
export { FiveRenderer } from './five-renderer';
|
|
3
|
+
export { FiveRenderer, type PointCloudTransparencyMode } from './five-renderer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/const
|
|
338
|
+
*/const require_full_screen_quad=require("../../tools/full-screen-quad.js");var FivePass=class{constructor(dependencies){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!0,this.dependencies=dependencies==null?[]:dependencies}setSize(width,height){}render(renderer,writeBuffer,readBuffer,deltaTime,maskActive){}dispose(){}};FivePass.FullScreenQuad=require_full_screen_quad.FullScreenQuad,exports.FivePass=FivePass;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import{FullScreenQuad
|
|
338
|
+
*/import{FullScreenQuad}from"../../tools/full-screen-quad.mjs";var FivePass=class{constructor(dependencies){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!0,this.dependencies=dependencies==null?[]:dependencies}setSize(width,height){}render(renderer,writeBuffer,readBuffer,deltaTime,maskActive){}dispose(){}};FivePass.FullScreenQuad=FullScreenQuad;export{FivePass};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/const
|
|
338
|
+
*/const require_runtime=require("../../../_virtual/_rolldown/runtime.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var FullScreenQuad=class FullScreenQuad{constructor(material){this._scene=new three_webgpu.Scene,this._mesh=new three_webgpu.Mesh(FullScreenQuad.geometry,material),this._mesh.frustumCulled=!1,this._scene.add(this._mesh)}get material(){return this._mesh.material}set material(value){this._mesh.material=value}dispose(){this._mesh.geometry.dispose()}render(renderer){renderer.render(this._scene,FullScreenQuad.camera)}};FullScreenQuad.camera=new three_webgpu.OrthographicCamera(-1,1,1,-1,0,1),FullScreenQuad.geometry=(()=>{let ge=new three_webgpu.PlaneGeometry(2,2,1,1);for(let i=1;i<ge.attributes.uv.array.length;i+=2)ge.attributes.uv.array[i]=1-ge.attributes.uv.array[i];return ge})(),exports.FullScreenQuad=FullScreenQuad;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import*as
|
|
338
|
+
*/import*as THREE from"three/webgpu";var FullScreenQuad=class FullScreenQuad{constructor(material){this._scene=new THREE.Scene,this._mesh=new THREE.Mesh(FullScreenQuad.geometry,material),this._mesh.frustumCulled=!1,this._scene.add(this._mesh)}get material(){return this._mesh.material}set material(value){this._mesh.material=value}dispose(){this._mesh.geometry.dispose()}render(renderer){renderer.render(this._scene,FullScreenQuad.camera)}};FullScreenQuad.camera=new THREE.OrthographicCamera(-1,1,1,-1,0,1),FullScreenQuad.geometry=(()=>{let ge=new THREE.PlaneGeometry(2,2,1,1);for(let i=1;i<ge.attributes.uv.array.length;i+=2)ge.attributes.uv.array[i]=1-ge.attributes.uv.array[i];return ge})();export{FullScreenQuad};
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import * as THREE from "three/webgpu";
|
|
2
|
+
/**
|
|
3
|
+
* 提前把纹理上传到 GPU。
|
|
4
|
+
*
|
|
5
|
+
* three 的 `renderer.initTexture()` 要求 backend 已初始化,否则会抛错。
|
|
6
|
+
* 模型/瓦片加载流程可能早于 renderer 就绪,因此这里在未就绪时先等待:
|
|
7
|
+
* - InternalWebGPURenderer:等待 `ready`(含 init 之后安装的 WebGL 补丁);
|
|
8
|
+
* - 其他 WebGPURenderer:回退到 `init()`(重复调用返回同一个缓存 Promise)。
|
|
9
|
+
*/
|
|
2
10
|
export declare function initTexture<T extends THREE.Texture>(texture: T, renderer: THREE.WebGPURenderer): Promise<T>;
|
|
3
11
|
export declare function initTextures<T extends THREE.Texture[]>(textures: T, renderer: THREE.WebGPURenderer): Promise<T>;
|
|
@@ -1,43 +1,152 @@
|
|
|
1
1
|
import * as THREE from "three/webgpu";
|
|
2
|
+
/**
|
|
3
|
+
* 视频纹理桥(WebGPU / WebGL 后端通用)。
|
|
4
|
+
*
|
|
5
|
+
* ## 为什么需要
|
|
6
|
+
*
|
|
7
|
+
* 把 `<video>` 直接交给 three 的 `VideoTexture` 上传,在部分「浏览器 × 后端」组合下得到的是黑色:
|
|
8
|
+
*
|
|
9
|
+
* - Safari 18(WebGPU):`copyExternalImageToTexture(video)` 校验失败,纹理没有被写入;
|
|
10
|
+
* - 小米浏览器(WebGL,Chromium 内核):`texImage2D(video)`、`drawImage(video)`、`createImageBitmap(video)`
|
|
11
|
+
* 全部读到黑色,只有 `new VideoFrame(video)` 能拿到画面。
|
|
12
|
+
*
|
|
13
|
+
* 没有任何一条上传路径在所有环境里都可靠,所以这里不按 UA 猜,而是**运行时探测**:
|
|
14
|
+
* 按优先级依次用小尺寸采样验证每条候选路径「真的有画面」,选第一条有画面的并锁定。
|
|
15
|
+
*
|
|
16
|
+
* ## 候选路径(按优先级)
|
|
17
|
+
*
|
|
18
|
+
* | 候选 | 取帧 | WebGPU 后端 | WebGL 后端 |
|
|
19
|
+
* | ---------------------- | ------------------------------ | ------------------------------ | ------------------------- |
|
|
20
|
+
* | `videoFrame` | `new VideoFrame(video)` | importExternalTexture + blit | texImage2D(VideoFrame) |
|
|
21
|
+
* | `video` | `<video>` 元素本身 | importExternalTexture + blit | texImage2D(video) |
|
|
22
|
+
* | `canvasFromVideoFrame` | VideoFrame → canvas2d.drawImage | three 上传 canvas | three 上传 canvas |
|
|
23
|
+
* | `canvasFromVideo` | video → canvas2d.drawImage | three 上传 canvas | three 上传 canvas |
|
|
24
|
+
*
|
|
25
|
+
* WebGPU 后端下前两条是「external texture → 全屏三角形 render pass → 自持中间纹理」,全程在 GPU 上,
|
|
26
|
+
* 没有 CPU 读写。后两条经过 canvas2d(有一定性能损耗),是前两条都不可用时的兜底。
|
|
27
|
+
*
|
|
28
|
+
* ## 探测与锁定
|
|
29
|
+
*
|
|
30
|
+
* - 探测只读一块 16x16(WebGL / canvas)或 64x16(WebGPU)的小采样,取各通道最大值,
|
|
31
|
+
* `>= BRIGHT_THRESHOLD` 视为有画面;
|
|
32
|
+
* - 探测通过的第一条候选被锁定,之后不再探测;
|
|
33
|
+
* - 全部候选都是黑(视频本身可能就是黑场)时保持默认候选,退避重试,直到出现有画面的候选;
|
|
34
|
+
* - 视频 `src` 变化(`loadstart`)时解除锁定并重新探测;
|
|
35
|
+
* - 当前候选连续多帧抛错时,拉黑它并换下一条。
|
|
36
|
+
*
|
|
37
|
+
* ## 调用约定
|
|
38
|
+
*
|
|
39
|
+
* 由使用方在 `Object3D.onBeforeRender` 中调用 {@link VideoTextureBridge.update},
|
|
40
|
+
* 然后把 {@link VideoTextureBridge.texture} 赋给材质。`onBeforeRender` 早于该对象的
|
|
41
|
+
* 节点构建与绑定更新,所以本帧绑定的一定是更新后的纹理。
|
|
42
|
+
*/
|
|
43
|
+
type CandidateId = 'videoFrame' | 'video' | 'canvasFromVideoFrame' | 'canvasFromVideo';
|
|
2
44
|
declare class VideoTextureBridge {
|
|
3
|
-
/**
|
|
45
|
+
/** 原始视频纹理:所有候选都不可用(或桥无法识别后端)时原样使用 */
|
|
4
46
|
readonly videoTexture: THREE.VideoTexture;
|
|
47
|
+
/**
|
|
48
|
+
* 诊断信息(只读,供排查用)。
|
|
49
|
+
* - `path`:`pending` 未见过 renderer / `webgpu` / `webgl` / `fallback` 全部候选失败、退回原 VideoTexture
|
|
50
|
+
* - `candidate`:当前候选;`locked`:是否已探测通过并锁定
|
|
51
|
+
* - `probe`:最近一次探测结果,如 `vf:210 video:0`(数字为采样最大值,`n/a` 不可用,`-1` 失败)
|
|
52
|
+
* - `updateCalls` update 调用次数(为 0 说明 onBeforeRender 没触发,即对象没被渲染);
|
|
53
|
+
* `skipNotReady` 因视频未就绪跳过的次数;`blitCount` 实际产出帧数;`rvfcCount` rVFC 回调次数;`fails` 产出失败次数
|
|
54
|
+
*/
|
|
55
|
+
readonly debug: {
|
|
56
|
+
path: "pending" | "webgpu" | "webgl" | "fallback";
|
|
57
|
+
candidate: string;
|
|
58
|
+
locked: boolean;
|
|
59
|
+
probe: string;
|
|
60
|
+
updateCalls: number;
|
|
61
|
+
skipNotReady: number;
|
|
62
|
+
blitCount: number;
|
|
63
|
+
rvfcCount: number;
|
|
64
|
+
fails: number;
|
|
65
|
+
targetSize: string;
|
|
66
|
+
lastError: string;
|
|
67
|
+
};
|
|
68
|
+
private mode;
|
|
5
69
|
private device;
|
|
6
|
-
/**
|
|
7
|
-
private useBlit;
|
|
8
|
-
/** 中转失败(例如 importExternalTexture 抛错)后永久回退 */
|
|
70
|
+
/** 所有候选都不可用后置位,永久退回原 VideoTexture */
|
|
9
71
|
private broken;
|
|
72
|
+
private disposed;
|
|
73
|
+
private current;
|
|
74
|
+
private locked;
|
|
75
|
+
/** 被拉黑的候选及其解除时间(performance.now() 时间戳);到期后会重新参与探测 */
|
|
76
|
+
private readonly blacklist;
|
|
77
|
+
private probing;
|
|
78
|
+
private nextProbeAt;
|
|
79
|
+
private probeInterval;
|
|
80
|
+
private consecutiveFails;
|
|
81
|
+
/** 本轮连续失败的起点时间 */
|
|
82
|
+
private failingSince;
|
|
83
|
+
/** three 上传的输出纹理:image 在 VideoFrame / video / canvas 之间切换 */
|
|
84
|
+
private frameTexture;
|
|
85
|
+
private frameReady;
|
|
86
|
+
/** 挂在 frameTexture 上、需要在被替换时关闭的 VideoFrame */
|
|
87
|
+
private heldFrame;
|
|
88
|
+
private canvas;
|
|
89
|
+
private canvasContext;
|
|
90
|
+
/** WebGPU 的 blit 中间纹理及其 three 包装 */
|
|
10
91
|
private gpuTexture;
|
|
11
92
|
private externalTexture;
|
|
93
|
+
private externalReady;
|
|
12
94
|
private width;
|
|
13
95
|
private height;
|
|
14
|
-
/** 是否有未中转的新帧 */
|
|
15
96
|
private frameDirty;
|
|
16
|
-
/** 上一次中转时的 currentTime,配合 frameDirty 判断是否有新帧 */
|
|
17
97
|
private lastVideoTime;
|
|
18
98
|
private videoFrameCallbackId;
|
|
19
|
-
private
|
|
99
|
+
private glProbe;
|
|
100
|
+
private glProbeFailed;
|
|
101
|
+
private gpuProbe;
|
|
102
|
+
private probeCanvas;
|
|
103
|
+
/** 被 {@link forceCandidate} 强制指定后,不再自动探测 / 换源重探 */
|
|
104
|
+
private forced;
|
|
105
|
+
private readonly onSourceChange;
|
|
20
106
|
constructor(videoTexture: THREE.VideoTexture);
|
|
21
107
|
private get video();
|
|
22
108
|
private scheduleVideoFrameCallback;
|
|
23
109
|
/**
|
|
24
110
|
* 当前应被材质采样的纹理。
|
|
25
|
-
*
|
|
26
|
-
* - WebGPU 后端:中转纹理,首帧中转完成前为 1x1 黑色占位。
|
|
111
|
+
* 输出尚未就绪时返回 1x1 黑色占位(不会触发有问题的上传路径);识别不了后端或全部失败时返回原 `VideoTexture`。
|
|
27
112
|
*/
|
|
28
113
|
get texture(): THREE.Texture;
|
|
29
114
|
/**
|
|
30
|
-
*
|
|
115
|
+
* 有新视频帧时产出一次。应在 `onBeforeRender` 中调用,同一帧多次调用只会产出一次。
|
|
31
116
|
*/
|
|
32
117
|
update(renderer: unknown): void;
|
|
33
|
-
|
|
118
|
+
/**
|
|
119
|
+
* 强制使用某条候选路径(仅用于诊断 / 测试),传 `null` 恢复自动探测。
|
|
120
|
+
* 强制期间不探测、换视频也不重探;候选连续失败时仍会被拉黑并换下一条。
|
|
121
|
+
*/
|
|
122
|
+
forceCandidate(candidate: CandidateId | null): void;
|
|
123
|
+
private resolveMode;
|
|
124
|
+
private ensureFrameTexture;
|
|
125
|
+
private produce;
|
|
126
|
+
/** 把图像源交给 frameTexture,并关闭被替换掉的 VideoFrame */
|
|
127
|
+
private setFrame;
|
|
128
|
+
private drawCanvas;
|
|
129
|
+
private isBlacklisted;
|
|
130
|
+
private onProduceFailed;
|
|
34
131
|
private blit;
|
|
35
|
-
private
|
|
132
|
+
private ensureTarget;
|
|
133
|
+
private startProbe;
|
|
134
|
+
private runProbe;
|
|
135
|
+
private select;
|
|
136
|
+
private probeCandidate;
|
|
137
|
+
/** canvas2d 探测:把视频缩到 16x16 再读回 */
|
|
138
|
+
private probe2d;
|
|
139
|
+
/** WebGL 探测:用独立的小 WebGL2 上下文做 texImage2D → 绘制 → readPixels,行为与 three 的 WebGL 后端一致 */
|
|
140
|
+
private probeGL;
|
|
141
|
+
/** WebGPU 探测:external texture → 64x16 小目标 → 回读(异步) */
|
|
142
|
+
private probeGPU;
|
|
143
|
+
private releaseProbeResources;
|
|
144
|
+
private releaseOutputs;
|
|
36
145
|
dispose(): void;
|
|
37
146
|
}
|
|
38
147
|
/**
|
|
39
|
-
* 取得某个 `VideoTexture`
|
|
40
|
-
* `VideoTexture` 被 dispose
|
|
148
|
+
* 取得某个 `VideoTexture` 对应的桥(同一个 `VideoTexture` 共用一个)。
|
|
149
|
+
* `VideoTexture` 被 dispose 时桥一并释放,之后再取会新建。
|
|
41
150
|
*/
|
|
42
151
|
declare function getVideoTextureBridge(videoTexture: THREE.VideoTexture): VideoTextureBridge;
|
|
43
|
-
export { VideoTextureBridge, getVideoTextureBridge };
|
|
152
|
+
export { VideoTextureBridge, getVideoTextureBridge, type CandidateId };
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
type Message = string | number[] | ArrayBuffer | Uint8Array;
|
|
2
|
+
|
|
3
|
+
interface Hasher {
|
|
4
|
+
/**
|
|
5
|
+
* Update hash
|
|
6
|
+
*
|
|
7
|
+
* @param message The message you want to hash.
|
|
8
|
+
*/
|
|
9
|
+
update(message: Message): Hasher;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Return hash in hex string.
|
|
13
|
+
*/
|
|
14
|
+
hex(): string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Return hash in hex string.
|
|
18
|
+
*/
|
|
19
|
+
toString(): string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Return hash in ArrayBuffer.
|
|
23
|
+
*/
|
|
24
|
+
arrayBuffer(): ArrayBuffer;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Return hash in integer array.
|
|
28
|
+
*/
|
|
29
|
+
digest(): number[];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Return hash in integer array.
|
|
33
|
+
*/
|
|
34
|
+
array(): number[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface Hmac {
|
|
38
|
+
/**
|
|
39
|
+
* Computes a Hash-based message authentication code (HMAC) using a secret key
|
|
40
|
+
*
|
|
41
|
+
* @param secretKey The Secret Key
|
|
42
|
+
* @param message The message you want to hash.
|
|
43
|
+
*/
|
|
44
|
+
(secretKey: Message, message: Message): string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Create a hash object using a secret key.
|
|
48
|
+
*
|
|
49
|
+
* @param secretKey The Secret Key
|
|
50
|
+
*/
|
|
51
|
+
create(secretKey: Message): Hasher;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Create a hash object and hash message using a secret key
|
|
55
|
+
*
|
|
56
|
+
* @param secretKey The Secret Key
|
|
57
|
+
* @param message The message you want to hash.
|
|
58
|
+
*/
|
|
59
|
+
update(secretKey: Message, message: Message): Hasher;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Return hash in hex string.
|
|
63
|
+
*
|
|
64
|
+
* @param secretKey The Secret Key
|
|
65
|
+
* @param message The message you want to hash.
|
|
66
|
+
*/
|
|
67
|
+
hex(secretKey: Message, message: Message): string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Return hash in ArrayBuffer.
|
|
71
|
+
*
|
|
72
|
+
* @param secretKey The Secret Key
|
|
73
|
+
* @param message The message you want to hash.
|
|
74
|
+
*/
|
|
75
|
+
arrayBuffer(secretKey: Message, message: Message): ArrayBuffer;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Return hash in integer array.
|
|
79
|
+
*
|
|
80
|
+
* @param secretKey The Secret Key
|
|
81
|
+
* @param message The message you want to hash.
|
|
82
|
+
*/
|
|
83
|
+
digest(secretKey: Message, message: Message): number[];
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Return hash in integer array.
|
|
87
|
+
*
|
|
88
|
+
* @param secretKey The Secret Key
|
|
89
|
+
* @param message The message you want to hash.
|
|
90
|
+
*/
|
|
91
|
+
array(secretKey: Message, message: Message): number[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface Hash {
|
|
95
|
+
/**
|
|
96
|
+
* Hash and return hex string.
|
|
97
|
+
*
|
|
98
|
+
* @param message The message you want to hash.
|
|
99
|
+
*/
|
|
100
|
+
(message: Message): string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Create a hash object.
|
|
104
|
+
*/
|
|
105
|
+
create(): Hasher;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Create a hash object and hash message.
|
|
109
|
+
*
|
|
110
|
+
* @param message The message you want to hash.
|
|
111
|
+
*/
|
|
112
|
+
update(message: Message): Hasher;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Return hash in hex string.
|
|
116
|
+
*
|
|
117
|
+
* @param message The message you want to hash.
|
|
118
|
+
*/
|
|
119
|
+
hex(message: Message): string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Return hash in ArrayBuffer.
|
|
123
|
+
*
|
|
124
|
+
* @param message The message you want to hash.
|
|
125
|
+
*/
|
|
126
|
+
arrayBuffer(message: Message): ArrayBuffer;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Return hash in integer array.
|
|
130
|
+
*
|
|
131
|
+
* @param message The message you want to hash.
|
|
132
|
+
*/
|
|
133
|
+
digest(message: Message): number[];
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Return hash in integer array.
|
|
137
|
+
*
|
|
138
|
+
* @param message The message you want to hash.
|
|
139
|
+
*/
|
|
140
|
+
array(message: Message): number[];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* HMAC interface
|
|
144
|
+
*/
|
|
145
|
+
hmac: Hmac;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export var sha256: Hash;
|
|
149
|
+
export var sha224: Hash;
|
|
@@ -26,6 +26,12 @@ interface PanoCircleMeshInterface extends THREE.Object3D {
|
|
|
26
26
|
setProgress(progress: number): void;
|
|
27
27
|
opacity: number;
|
|
28
28
|
setOpacity(opacity: number): void;
|
|
29
|
+
/**
|
|
30
|
+
* 设置 HDR 提亮倍数(可选实现)
|
|
31
|
+
* @description 由控制器每帧同步:开启 HDR 时为 `parameter.maxDisplayBoost`,否则为 1。
|
|
32
|
+
* 实现方应将该倍数乘到输出 rgb 上(不影响 alpha)。
|
|
33
|
+
*/
|
|
34
|
+
setHDRBoost?(boost: number): void;
|
|
29
35
|
updateTime?(time: number, deltaTime: number): void;
|
|
30
36
|
/** 点击交互 */
|
|
31
37
|
tap?(): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/const
|
|
338
|
+
*/const require_runtime=require("../../_virtual/_rolldown/runtime.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);function calculateThreeMouse(mouseXY,element,viewport){let{top,left,width,height}=element.getBoundingClientRect();return viewport&&(left+=width*viewport.left,top+=height*(1-viewport.bottom-viewport.height),width*=viewport.width,height*=viewport.height),new three_webgpu.Vector2((mouseXY.x-left)/width*2-1,-(mouseXY.y-top)/height*2+1)}exports.calculateThreeMouse=calculateThreeMouse;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import*as
|
|
338
|
+
*/import*as THREE from"three/webgpu";function calculateThreeMouse(mouseXY,element,viewport){let{top,left,width,height}=element.getBoundingClientRect();return viewport&&(left+=width*viewport.left,top+=height*(1-viewport.bottom-viewport.height),width*=viewport.width,height*=viewport.height),new THREE.Vector2((mouseXY.x-left)/width*2-1,-(mouseXY.y-top)/height*2+1)}export{calculateThreeMouse};
|
package/five/utils/distance.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/function
|
|
338
|
+
*/function distance(p0,p1){return Math.sqrt(Math.pow(p0.x-p1.x,2)+Math.pow(p0.y-p1.y,2)+(`z`in p0?Math.pow(p0.z-p1.z,2):0))}exports.distance=distance;
|