@realsee/five-webgpu 1.0.0-alpha.12 → 1.0.0-alpha.14
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 +41 -32
- package/docs/classes/index.FivePass.html +1 -1
- package/docs/classes/index.FiveRenderer.html +7 -2
- 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 -5
- 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 +9 -9
- package/docs/classes/index.PBMGaussianSplattingObject.html +49 -11
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +71 -16
- 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 +1 -1
- package/docs/classes/index.PanoCircleMeshCustom.html +1 -1
- package/docs/classes/index.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/index.Parameter.html +24 -22
- package/docs/classes/index.Scene.html +1 -1
- package/docs/classes/index.Subscribe.html +1 -1
- package/docs/classes/index.Tile3D.html +22 -22
- package/docs/classes/index.TileNode.html +2 -2
- 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.DeviceProfile.html +2 -2
- 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.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.PBMGaussianSplattingNodeMaterialOptions.html +3 -3
- package/docs/interfaces/index.PanoCircleMeshInterface.html +1 -1
- 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 +8 -6
- package/docs/interfaces/index.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/index.ParameterValue.html +21 -19
- package/docs/interfaces/index.Pose.html +1 -1
- package/docs/interfaces/index.RenderEvent.html +1 -1
- package/docs/interfaces/index.ResolvedParameterValue.html +22 -20
- package/docs/interfaces/index.SplatData.html +10 -6
- 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.Tile3DOptions.html +2 -2
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ViewLayer.html +22 -22
- 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 +13 -0
- 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/xrPanorama.d.ts +13 -0
- package/five/core/internalWebGPURenderer.d.ts +0 -3
- package/five/core/panoVideo.d.ts +2 -0
- package/five/core/webglBlendEquationFix.d.ts +41 -0
- package/five/gaussian-splatting/arena/splatArena.d.ts +227 -0
- package/five/gaussian-splatting/cullConstants.d.ts +68 -0
- package/five/gaussian-splatting/hybridConstants.d.ts +60 -0
- package/five/gaussian-splatting/instancePacking.d.ts +46 -0
- package/five/gaussian-splatting/mirrors/layoutMirror.d.ts +44 -0
- package/five/gaussian-splatting/mirrors/mirrorBuffer.d.ts +72 -0
- package/five/gaussian-splatting/mirrors/mirrorSet.d.ts +17 -0
- package/five/gaussian-splatting/mirrors/objectParamsMirror.d.ts +35 -0
- package/five/gaussian-splatting/mirrors/transformMirror.d.ts +26 -0
- package/five/gaussian-splatting/pipelines/gpuSortPipeline.d.ts +5 -31
- package/five/gaussian-splatting/pipelines/pipelineMode.d.ts +1 -2
- package/five/gaussian-splatting/sh-core/codec.d.ts +13 -0
- package/five/gaussian-splatting/sh-core/constants.d.ts +29 -0
- package/five/gaussian-splatting/sh-core/index.d.ts +4 -0
- package/five/gaussian-splatting/sh-core/rebakePolicy.d.ts +20 -0
- package/five/gaussian-splatting/sh-core/texelRange.d.ts +18 -0
- package/five/gaussian-splatting/shAssembler.d.ts +14 -0
- package/five/gaussian-splatting/shBakeScheduler.d.ts +26 -0
- package/five/gaussian-splatting/shBaker.d.ts +44 -0
- package/five/gaussian-splatting/shTileResource.d.ts +22 -0
- package/five/gaussian-splatting/splatAssembler.d.ts +1 -1
- package/five/gaussian-splatting/transformStore.d.ts +2 -2
- package/five/gaussian-splatting/worker/decodeWorker.d.ts +72 -0
- package/five/index.d.ts +0 -1
- package/five/index.js +138 -640
- package/five/index.mjs +229 -29261
- 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/ply.d.ts +22 -6
- package/five/model/loaders/spz.d.ts +9 -49
- package/five/model/loaders/spz.worker.d.ts +37 -0
- package/five/model/materials/pbmGaussianSplattingNodeMaterial.d.ts +6 -12
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +91 -6
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +357 -15
- package/five/model/parameter.d.ts +4 -0
- package/five/renderer/compute-renderers/binned/binned-core.d.ts +45 -2
- package/five/renderer/compute-renderers/binned/binned-pipelines.d.ts +82 -1
- package/five/renderer/compute-renderers/color-space.d.ts +13 -0
- package/five/renderer/compute-renderers/composite-pipelines.d.ts +36 -0
- package/five/renderer/compute-renderers/frame-plan.d.ts +166 -0
- package/five/renderer/compute-renderers/gsplat-hybrid-renderer.d.ts +386 -0
- package/five/renderer/compute-renderers/pointcloud-compute-renderer.d.ts +101 -16
- package/five/renderer/compute-renderers/shaders/composite-blend.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/gsplatHybridIndirect.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/gsplatProjector.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/gsplatQuad.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/write-additive.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/write-blend.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/write-opaque.d.ts +2 -0
- package/five/renderer/compute-renderers/tile-uniform-writer.d.ts +70 -0
- package/five/renderer/compute-renderers/transparency-buffers.d.ts +59 -0
- package/five/renderer/compute-renderers/transparency-math.d.ts +70 -0
- package/five/renderer/compute-renderers/transparency-settings.d.ts +24 -0
- package/five/renderer/compute-renderers/uniform-layout.d.ts +11 -2
- package/five/renderer/five-renderer.d.ts +28 -3
- 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/videoTextureBridge.d.ts +152 -0
- package/five/thirdparty/sha256.d.ts +149 -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/work.d.ts +0 -7
- package/five/work/workJsonType.d.ts +0 -2
- 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.d.ts +6 -0
- 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.d.ts +7 -0
- package/sticker/index.js +46 -3
- package/sticker/index.mjs +43 -103
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +3 -3
- package/umd/five-react.js +2 -2
- package/umd/five-sticker.js +46 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five.js +216 -179
- 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 -1
- package/five/certificates/hardware.d.ts +0 -1
- package/five/gaussian-splatting/shStore.d.ts +0 -22
- package/five/thirdparty/jsrsasign.d.ts +0 -753
- package/five/work/keychain.d.ts +0 -5
- package/five/work/verify.d.ts +0 -7
- package/five/work/workVerify.d.ts +0 -2
- /package/five/{work/_ALLOW_HOST.d.ts → renderer/compute-renderers/shaders/composite-additive.d.ts} +0 -0
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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{DirectionGroup
|
|
338
|
+
*/import{DirectionGroup}from"./direction.mjs";import{RENDER_ORDER}from"../constant.mjs";import*as THREE from"three/webgpu";var CenterHandle=class extends DirectionGroup{constructor(param){var _a,_b;super(`plane`),this.name=`CenterHandle`,this.faceNormals=[new THREE.Vector3(1,0,0),new THREE.Vector3(-1,0,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,-1,0),new THREE.Vector3(0,0,1),new THREE.Vector3(0,0,-1)],this.baseColor=new THREE.Color((_a=param==null?void 0:param.color)==null?16419862:_a);let centerSize=(_b=param==null?void 0:param.size)==null?.05:_b,brightColor=new THREE.Color(16755008).convertSRGBToLinear();this.faceMaterials=Array.from({length:6},()=>new THREE.MeshBasicMaterial({color:brightColor,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1,side:THREE.FrontSide}));let centerGeometry=new THREE.BoxGeometry(centerSize,centerSize,centerSize),cube=new THREE.Mesh(centerGeometry,this.faceMaterials);cube.direction=`plane`,cube.renderOrder=RENDER_ORDER.MOVE_HELPER_CENTER,cube.name=`center-plane-handle`,this.cube=cube,this.add(this.cube)}update(camera){let cameraDirection=new THREE.Vector3().subVectors(camera.position,this.cube.getWorldPosition(new THREE.Vector3)).normalize(),worldQuaternion=this.cube.getWorldQuaternion(new THREE.Quaternion),faceAngles=this.faceNormals.map((normal,index)=>{let dotProduct=normal.clone().applyQuaternion(worldQuaternion).dot(cameraDirection);return{index,angle:Math.acos(Math.abs(dotProduct))}});faceAngles.sort((a,b)=>a.angle-b.angle);let colors=[new THREE.Color(16755008).convertSRGBToLinear(),new THREE.Color(16419862).convertSRGBToLinear(),new THREE.Color(13921032).convertSRGBToLinear()];faceAngles.forEach((item,sortedIndex)=>{let colorIndex=Math.floor(sortedIndex/2);this.faceMaterials[item.index].color.copy(colors[colorIndex])})}};export{CenterHandle};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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"),require_direction=require("./direction.js"),require_constant=require("../constant.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var PlaneHandle=class extends require_direction.DirectionGroup{constructor(params){var _a,_b,_c;super(params.direction),this.name=`PlaneHandle`;let size=(_a=params.size)==null?.12:_a,offset=(_b=params.offset)==null?.12:_b,color=new three_webgpu.Color((_c=params.color)==null?16776960:_c),geometry=new three_webgpu.BoxGeometry(size,size,.005),material=new three_webgpu.MeshBasicMaterial({color,transparent:!0,opacity:.4,depthTest:!1,depthWrite:!1,side:three_webgpu.DoubleSide});switch(this.handle=new three_webgpu.Mesh(geometry,material),this.handle.direction=params.direction,this.handle.renderOrder=require_constant.RENDER_ORDER.MOVE_HELPER_ARROW,this.handle.name=`plane-handle-${params.direction}`,params.direction){case`xy`:this.handle.position.set(offset,offset,0);break;case`xz`:this.handle.position.set(offset,0,offset),this.handle.rotation.x=-Math.PI/2;break;case`yz`:this.handle.position.set(0,offset,offset),this.handle.rotation.y=Math.PI/2;break}this.add(this.handle)}};exports.PlaneHandle=PlaneHandle;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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{DirectionGroup
|
|
338
|
+
*/import{DirectionGroup}from"./direction.mjs";import{RENDER_ORDER}from"../constant.mjs";import*as THREE from"three/webgpu";var PlaneHandle=class extends DirectionGroup{constructor(params){var _a,_b,_c;super(params.direction),this.name=`PlaneHandle`;let size=(_a=params.size)==null?.12:_a,offset=(_b=params.offset)==null?.12:_b,color=new THREE.Color((_c=params.color)==null?16776960:_c),geometry=new THREE.BoxGeometry(size,size,.005),material=new THREE.MeshBasicMaterial({color,transparent:!0,opacity:.4,depthTest:!1,depthWrite:!1,side:THREE.DoubleSide});switch(this.handle=new THREE.Mesh(geometry,material),this.handle.direction=params.direction,this.handle.renderOrder=RENDER_ORDER.MOVE_HELPER_ARROW,this.handle.name=`plane-handle-${params.direction}`,params.direction){case`xy`:this.handle.position.set(offset,offset,0);break;case`xz`:this.handle.position.set(offset,0,offset),this.handle.rotation.x=-Math.PI/2;break;case`yz`:this.handle.position.set(0,offset,offset),this.handle.rotation.y=Math.PI/2;break}this.add(this.handle)}};export{PlaneHandle};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 calculateScaleByCamera(camera,position,limit){let distance=camera.position.distanceTo(position),fov=camera.fov,cameraDistance=camera.distance||3,distanceScale=distance/3,fovScale=fov/90,cameraDistanceScale=cameraDistance/3,scale=distanceScale*fovScale*cameraDistanceScale,min=(limit==null?void 0:limit.min)||.6,max=limit==null?void 0:limit.max;return min&&scale<min?min:max&&scale>max?max:scale}exports.default=calculateScaleByCamera;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 calculateScaleByCamera(camera,position,limit){let distance=camera.position.distanceTo(position),fov=camera.fov,cameraDistance=camera.distance||3,distanceScale=distance/3,fovScale=fov/90,cameraDistanceScale=cameraDistance/3,scale=distanceScale*fovScale*cameraDistanceScale,min=(limit==null?void 0:limit.min)||.6,max=limit==null?void 0:limit.max;return min&&scale<min?min:max&&scale>max?max:scale}export{calculateScaleByCamera as default};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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
|
-
*/let
|
|
338
|
+
*/let _realsee_five_webgpu=require("@realsee/five-webgpu");var map=new Map;function cameraHooks(camera){if(map.has(camera))return map.get(camera).hooks;let cameraHooks=new _realsee_five_webgpu.Subscribe,cancelAnimationFrameId=null,cameraPose,animate=()=>{cancelAnimationFrameId=requestAnimationFrame(animate);let newCameraPose=camera.projectionMatrix.toArray().join(`,`)+camera.matrixWorld.toArray().join(`,`);newCameraPose!==cameraPose&&(cameraPose=newCameraPose,cameraHooks.emit(`cameraUpdate`))};return animate(),map.set(camera,{hooks:cameraHooks,dispose:()=>{map.delete(camera),cancelAnimationFrame(cancelAnimationFrameId)}}),cameraHooks}exports.cameraHooks=cameraHooks;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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{Subscribe
|
|
338
|
+
*/import{Subscribe}from"@realsee/five-webgpu";var map=new Map;function cameraHooks(camera){if(map.has(camera))return map.get(camera).hooks;let cameraHooks=new Subscribe,cancelAnimationFrameId=null,cameraPose,animate=()=>{cancelAnimationFrameId=requestAnimationFrame(animate);let newCameraPose=camera.projectionMatrix.toArray().join(`,`)+camera.matrixWorld.toArray().join(`,`);newCameraPose!==cameraPose&&(cameraPose=newCameraPose,cameraHooks.emit(`cameraUpdate`))};return animate(),map.set(camera,{hooks:cameraHooks,dispose:()=>{map.delete(camera),cancelAnimationFrame(cancelAnimationFrameId)}}),cameraHooks}export{cameraHooks};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 DirectionGroup=class extends three_webgpu.Group{constructor(direction){super(),this.direction=direction||`x`}};three_webgpu.Line;var DirectionMesh=class extends three_webgpu.Mesh{constructor(geometry,material,direction){super(geometry,material),this.direction=direction||`x`}};exports.DirectionGroup=DirectionGroup,exports.DirectionMesh=DirectionMesh;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 DirectionGroup=class extends THREE.Group{constructor(direction){super(),this.direction=direction||`x`}};THREE.Line;var DirectionMesh=class extends THREE.Mesh{constructor(geometry,material,direction){super(geometry,material),this.direction=direction||`x`}};export{DirectionGroup,DirectionMesh};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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"),require_calculateThreeMouse=require("../../../five/utils/calculateThreeMouse.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);function getMouseRaycaster(camera,mouse,element){if(!mouse||!element||!camera)return;let threeMouse=require_calculateThreeMouse.calculateThreeMouse(mouse,element);if(Math.abs(threeMouse.x)===1||Math.abs(threeMouse.y)===1)return;let raycaster=new three_webgpu.Raycaster;return raycaster.setFromCamera(threeMouse,camera),raycaster.params.Points&&(raycaster.params.Points.threshold=.1),raycaster}exports.getMouseRaycaster=getMouseRaycaster;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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{calculateThreeMouse
|
|
338
|
+
*/import{calculateThreeMouse}from"../../../five/utils/calculateThreeMouse.mjs";import*as THREE from"three/webgpu";function getMouseRaycaster(camera,mouse,element){if(!mouse||!element||!camera)return;let threeMouse=calculateThreeMouse(mouse,element);if(Math.abs(threeMouse.x)===1||Math.abs(threeMouse.y)===1)return;let raycaster=new THREE.Raycaster;return raycaster.setFromCamera(threeMouse,camera),raycaster.params.Points&&(raycaster.params.Points.threshold=.1),raycaster}export{getMouseRaycaster};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 getOrthographicCameraDirection(pose){let{latitude,longitude}=pose,vector=new three_webgpu.Vector3;return HalfPI-latitude<.03?vector.set(0,1,0):isSame(0,longitude)?vector.set(0,0,1):isSame(Math.PI,longitude)?vector.set(0,0,-1):isSame(HalfPI,longitude)?vector.set(1,0,0):vector.set(-1,0,0),vector}var HalfPI=Number((Math.PI/2).toFixed(5));function isSame(v1,v2){return typeof v1!=`number`||typeof v2!=`number`?!1:Math.abs(v1-v2)<.001}exports.getOrthographicCameraDirection=getOrthographicCameraDirection;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 getOrthographicCameraDirection(pose){let{latitude,longitude}=pose,vector=new THREE.Vector3;return HalfPI-latitude<.03?vector.set(0,1,0):isSame(0,longitude)?vector.set(0,0,1):isSame(Math.PI,longitude)?vector.set(0,0,-1):isSame(HalfPI,longitude)?vector.set(1,0,0):vector.set(-1,0,0),vector}var HalfPI=Number((Math.PI/2).toFixed(5));function isSame(v1,v2){return typeof v1!=`number`||typeof v2!=`number`?!1:Math.abs(v1-v2)<.001}export{getOrthographicCameraDirection};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 setObjectQuaternion(object,quaternion,rotateCenter){if(rotateCenter){let v=new three_webgpu.Vector3().subVectors(object.position,rotateCenter).applyQuaternion(object.quaternion.clone().invert()).applyQuaternion(quaternion).add(rotateCenter);object.position.copy(v)}object.quaternion.copy(quaternion)}exports.default=setObjectQuaternion;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 setObjectQuaternion(object,quaternion,rotateCenter){if(rotateCenter){let v=new THREE.Vector3().subVectors(object.position,rotateCenter).applyQuaternion(object.quaternion.clone().invert()).applyQuaternion(quaternion).add(rotateCenter);object.position.copy(v)}object.quaternion.copy(quaternion)}export{setObjectQuaternion as default};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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"),require_constant=require("../constant.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);function computeGuideLength(camera,center){let viewWidth=10,viewHeight=10,persp=camera.isPerspectiveCamera,ortho=camera.isOrthographicCamera;if(persp){let cam=camera,distance=cam.position.distanceTo(center),vFov=cam.fov*Math.PI/180;viewHeight=2*Math.tan(vFov/2)*distance,viewWidth=viewHeight*cam.aspect}else if(ortho){let cam=camera;viewWidth=Math.abs(cam.right-cam.left),viewHeight=Math.abs(cam.top-cam.bottom)}let diag=Math.sqrt(viewWidth*viewWidth+viewHeight*viewHeight),baseLength=diag*.8,minLen=Math.min(viewWidth,viewHeight)*.25,maxLen=diag*1.2;return Math.max(minLen,Math.min(baseLength,maxLen))}var SolidGuideLine=class{constructor(camera,container,defaults){this.camera=camera,this.container=container,this.defaults=Object.assign({},defaults||{})}createSolidLine(center,direction,options){let merged=Object.assign(Object.assign({color:16777215,renderOrder:require_constant.RENDER_ORDER.DRAG_GUIDE_LINE},this.defaults),options||{}),dir=direction.clone().normalize(),length=this.computeInfiniteLineLength(center),start=center.clone().add(dir.clone().multiplyScalar(-length)),end=center.clone().add(dir.clone().multiplyScalar(length)),positions=new Float32Array([start.x,start.y,start.z,end.x,end.y,end.z]),geometry=new three_webgpu.BufferGeometry;geometry.setAttribute(`position`,new three_webgpu.BufferAttribute(positions,3));let material=new three_webgpu.LineBasicMaterial({color:merged.color,depthTest:!1,depthWrite:!1,transparent:!0,opacity:.65}),line=new three_webgpu.Line(geometry,material);return line.renderOrder=merged.renderOrder,line}updateSolidLine(line,center,direction,options){let dir=direction.clone().normalize(),length=this.computeInfiniteLineLength(center),start=center.clone().add(dir.clone().multiplyScalar(-length)),end=center.clone().add(dir.clone().multiplyScalar(length)),positions=new Float32Array([start.x,start.y,start.z,end.x,end.y,end.z]),geometry=line.geometry,attr=geometry.getAttribute(`position`);attr&&attr.itemSize===3&&attr.array.length===positions.length?(attr.array.set(positions),attr.needsUpdate=!0):geometry.setAttribute(`position`,new three_webgpu.BufferAttribute(positions,3)),(options==null?void 0:options.color)!==void 0&&line.material.color.setHex(options.color)}computeInfiniteLineLength(center){return computeGuideLength(this.camera,center)*10}dispose(line){if(!line)return;line.geometry.dispose();let material=line.material;Array.isArray(material)?material.forEach(m=>m.dispose()):material.dispose()}updateDefaults(options){this.defaults=Object.assign(Object.assign({},this.defaults),options)}};exports.SolidGuideLine=SolidGuideLine,exports.computeGuideLength=computeGuideLength;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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{RENDER_ORDER
|
|
338
|
+
*/import{RENDER_ORDER}from"../constant.mjs";import*as THREE from"three/webgpu";function computeGuideLength(camera,center){let viewWidth=10,viewHeight=10,persp=camera.isPerspectiveCamera,ortho=camera.isOrthographicCamera;if(persp){let cam=camera,distance=cam.position.distanceTo(center),vFov=cam.fov*Math.PI/180;viewHeight=2*Math.tan(vFov/2)*distance,viewWidth=viewHeight*cam.aspect}else if(ortho){let cam=camera;viewWidth=Math.abs(cam.right-cam.left),viewHeight=Math.abs(cam.top-cam.bottom)}let diag=Math.sqrt(viewWidth*viewWidth+viewHeight*viewHeight),baseLength=diag*.8,minLen=Math.min(viewWidth,viewHeight)*.25,maxLen=diag*1.2;return Math.max(minLen,Math.min(baseLength,maxLen))}var SolidGuideLine=class{constructor(camera,container,defaults){this.camera=camera,this.container=container,this.defaults=Object.assign({},defaults||{})}createSolidLine(center,direction,options){let merged=Object.assign(Object.assign({color:16777215,renderOrder:RENDER_ORDER.DRAG_GUIDE_LINE},this.defaults),options||{}),dir=direction.clone().normalize(),length=this.computeInfiniteLineLength(center),start=center.clone().add(dir.clone().multiplyScalar(-length)),end=center.clone().add(dir.clone().multiplyScalar(length)),positions=new Float32Array([start.x,start.y,start.z,end.x,end.y,end.z]),geometry=new THREE.BufferGeometry;geometry.setAttribute(`position`,new THREE.BufferAttribute(positions,3));let material=new THREE.LineBasicMaterial({color:merged.color,depthTest:!1,depthWrite:!1,transparent:!0,opacity:.65}),line=new THREE.Line(geometry,material);return line.renderOrder=merged.renderOrder,line}updateSolidLine(line,center,direction,options){let dir=direction.clone().normalize(),length=this.computeInfiniteLineLength(center),start=center.clone().add(dir.clone().multiplyScalar(-length)),end=center.clone().add(dir.clone().multiplyScalar(length)),positions=new Float32Array([start.x,start.y,start.z,end.x,end.y,end.z]),geometry=line.geometry,attr=geometry.getAttribute(`position`);attr&&attr.itemSize===3&&attr.array.length===positions.length?(attr.array.set(positions),attr.needsUpdate=!0):geometry.setAttribute(`position`,new THREE.BufferAttribute(positions,3)),(options==null?void 0:options.color)!==void 0&&line.material.color.setHex(options.color)}computeInfiniteLineLength(center){return computeGuideLength(this.camera,center)*10}dispose(line){if(!line)return;line.geometry.dispose();let material=line.material;Array.isArray(material)?material.forEach(m=>m.dispose()):material.dispose()}updateDefaults(options){this.defaults=Object.assign(Object.assign({},this.defaults),options)}};export{SolidGuideLine,computeGuideLength};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 createElement(style,tagName){return setStyle(document.createElement(tagName==null?`div`:tagName),style)}function setStyle(element,style){if(!style)return element;for(let key in style)key&&style[key]&&(element.style[key]=style[key]);return element}function tipsDom(style){let element=createElement(Object.assign({position:`absolute`,display:`block`,borderRadius:`4px`,paddingTop:`1px`,paddingBottom:`1px`,paddingLeft:`4px`,paddingRight:`4px`,pointerEvents:`none`,userSelect:`none`,zIndex:`99999`,backgroundColor:`rgba(0,0,0,0.7)`,fontSize:`12px`,color:`#fff`,letterSpacing:`0`,lineHeight:`18px`},style)),show=()=>{element.style.display!==`block`&&element.style.top&&element.style.left&&(element.style.display=`block`)};return{element,show,hide:()=>{element.style.display=`none`,element.style.top=``,element.style.left=``},setLeftTop:(left,top)=>{element.style.left=left,element.style.top=top,show()}}}exports.createElement=createElement,exports.setStyle=setStyle,exports.tipsDom=tipsDom;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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 createElement(style,tagName){return setStyle(document.createElement(tagName==null?`div`:tagName),style)}function setStyle(element,style){if(!style)return element;for(let key in style)key&&style[key]&&(element.style[key]=style[key]);return element}function tipsDom(style){let element=createElement(Object.assign({position:`absolute`,display:`block`,borderRadius:`4px`,paddingTop:`1px`,paddingBottom:`1px`,paddingLeft:`4px`,paddingRight:`4px`,pointerEvents:`none`,userSelect:`none`,zIndex:`99999`,backgroundColor:`rgba(0,0,0,0.7)`,fontSize:`12px`,color:`#fff`,letterSpacing:`0`,lineHeight:`18px`},style)),show=()=>{element.style.display!==`block`&&element.style.top&&element.style.left&&(element.style.display=`block`)};return{element,show,hide:()=>{element.style.display=`none`,element.style.top=``,element.style.left=``},setLeftTop:(left,top)=>{element.style.left=left,element.style.top=top,show()}}}export{createElement,setStyle,tipsDom};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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"),require_index=require("../BasePlugin/index.js"),require_clamp=require("../utils/clamp.js");let tslib=require("tslib"),_realsee_five_webgpu=require("@realsee/five-webgpu"),three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);let three_tsl=require("three/tsl");function createPanoAnimeMaterial(){let u={map:(0,three_tsl.texture)(new three_webgpu.Texture),progress:(0,three_tsl.uniform)(0),opacity:(0,three_tsl.uniform)(0)},fragment=(0,three_tsl.Fn)(()=>{let vUv=(0,three_tsl.uv)(),vPosition=(0,three_tsl.varying)(three_tsl.positionGeometry);(0,three_tsl.Discard)(vUv.y.greaterThan(u.progress));let image=u.map.sample(vUv),base=(0,three_tsl.vec4)((0,three_tsl.vec3)(1,1,1),u.progress.sub(vPosition.y).mul(.7)),withImage=base.add((0,three_tsl.vec4)(image.rgb,image.a.mul(vPosition.y.oneMinus()))),color=(0,three_tsl.select)(u.progress.equal(1),withImage,base);return(0,three_tsl.vec4)(color.rgb,color.a.mul(u.opacity))}),material=new three_webgpu.NodeMaterial;return material.fragmentNode=fragment(),material.transparent=!0,material.depthTest=!1,{material,u}}var MULTIPLE=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],CANVAS_WIDTH=512,CANVAS_HEIGHT=512,LINE_LENGTH=128,Controller=class extends require_index.BasePlugin.Controller{get config(){return Object.assign({},this._config)}updateState(state,userAction){let prevState=this.state;this.state=Object.assign(Object.assign({},this.state),state),this.hooks.emit(`stateChange`,{state:this.state,prevState,userAction})}updateConfig(config,options={}){var _a;let prevConfig=this.config,newConfig=Object.assign(Object.assign({},prevConfig),config);this._config=newConfig,this.hooks.emit(`configChange`,{prevConfig,config:newConfig,userAction:(_a=options.userAction)==null?!0:_a})}constructor(five,params){super(five),this.group=new three_webgpu.Group,this.materialUniforms=createPanoAnimeMaterial(),this.mesh=(()=>{let geometry=new three_webgpu.CylinderGeometry(.12,.12,1,32,1,!0);return geometry.translate(0,.5,0),new three_webgpu.Mesh(geometry,this.materialUniforms.material)})(),this.panoMesh=new _realsee_five_webgpu.PanoCircleMesh({scale:1.5}),this.stop=()=>{},this.drawLine=(index,deltaTime)=>{if(!this.ctx)return;let x=(()=>{var _a;return 32*((_a=MULTIPLE[index])==null?0:_a)})(),y=(1-(deltaTime+index*150)%1200/1200)*640,linearGradient=this.ctx.createLinearGradient(0,y-LINE_LENGTH,0,y);linearGradient.addColorStop(0,`rgba(255,255,255,0)`),linearGradient.addColorStop(.5,`rgba(255,255,255,1)`),linearGradient.addColorStop(1,`rgba(255,255,255,0)`),this.ctx.fillStyle=linearGradient,this.ctx.fillRect(x,y-LINE_LENGTH,3,LINE_LENGTH)},this.anime=time=>{if(!this.ctx||!this.startTime)return;this.ctx.clearRect(0,0,CANVAS_WIDTH,CANVAS_HEIGHT);for(let i=0;i<16;i++)this.drawLine(i,time-this.startTime);let progress=require_clamp.clamp((time-this.startTime)/1e3,0,1),opacity=require_clamp.clamp((time-this.startTime)/300,0,this.config.maxOpacity);this.panoMesh.setOpacity(opacity),this.materialUniforms.u.progress.value=progress,this.materialUniforms.u.opacity.value=opacity,this.canvasTexture&&(this.canvasTexture.needsUpdate=!0),this.five.needsRender=!0},this.dispose=()=>{this.disable()},this.five=five;let defaultState={enabled:!1,visible:!0};this.state=Object.assign(defaultState,params==null?void 0:params.initialState);let config=Object.assign(Object.assign({},params==null?void 0:params.config),{maxOpacity:1});this._config=config,!(typeof document>`u`)&&(this.canvas=document.createElement(`canvas`),this.ctx=this.canvas.getContext(`2d`),this.canvas.width=CANVAS_WIDTH,this.canvas.height=CANVAS_HEIGHT,this.ctx.shadowColor=`rgba(255,255,255,0.5)`,this.ctx.shadowBlur=6,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.canvasTexture=new three_webgpu.CanvasTexture(this.canvas),this.materialUniforms.u.map.value=this.canvasTexture,this.group.add(this.mesh),this.panoMesh.setProgress(1),this.panoMesh.setOpacity(0),this.group.add(this.panoMesh),this.state.enabled&&this._enable({userAction:!1}))}load(data){return(0,tslib.__awaiter)(this,void 0,void 0,function*(){})}_enable(options){this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.five.ready().then(()=>{this.five.scene.add(this.group),this.stop=_realsee_five_webgpu.AnimationFrameLoop.shared.add((time,deltaTime)=>{this.startTime||(this.startTime=time),this.panoMesh.updateTime(time,deltaTime),this.anime(time)})})}_disable(options){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0}enable(options){var _a;if(!this.ctx||this.state.enabled||!this.five.observers[this.five.state.panoIndex])return;let userAction=(_a=options==null?void 0:options.userAction)==null?!0:_a;this.updateState({enabled:!0},userAction),this._enable({userAction})}disable(options){var _a;if(this.state.enabled===!1)return;let userAction=(_a=options==null?void 0:options.userAction)==null?!0:_a;this.updateState({enabled:!1},userAction),this._disable({userAction})}setState(state,options={}){let prevState=this.state,userAction=options.userAction===void 0?!0:options.userAction;if(this.updateState(state,userAction),state.enabled!==void 0&&prevState.enabled!==state.enabled){let options={userAction};state.enabled?this._enable(options):this._disable(options)}}};exports.Controller=Controller;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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{BasePlugin
|
|
338
|
+
*/import{BasePlugin}from"../BasePlugin/index.mjs";import{clamp as clamp$1}from"../utils/clamp.mjs";import{__awaiter}from"tslib";import{AnimationFrameLoop,PanoCircleMesh}from"@realsee/five-webgpu";import*as THREE from"three/webgpu";import{Discard,Fn,positionGeometry,select,texture,uniform,uv,varying,vec3,vec4}from"three/tsl";function createPanoAnimeMaterial(){let u={map:texture(new THREE.Texture),progress:uniform(0),opacity:uniform(0)},fragment=Fn(()=>{let vUv=uv(),vPosition=varying(positionGeometry);Discard(vUv.y.greaterThan(u.progress));let image=u.map.sample(vUv),base=vec4(vec3(1,1,1),u.progress.sub(vPosition.y).mul(.7)),withImage=base.add(vec4(image.rgb,image.a.mul(vPosition.y.oneMinus()))),color=select(u.progress.equal(1),withImage,base);return vec4(color.rgb,color.a.mul(u.opacity))}),material=new THREE.NodeMaterial;return material.fragmentNode=fragment(),material.transparent=!0,material.depthTest=!1,{material,u}}var MULTIPLE=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],CANVAS_WIDTH=512,CANVAS_HEIGHT=512,LINE_LENGTH=128,Controller=class extends BasePlugin.Controller{get config(){return Object.assign({},this._config)}updateState(state,userAction){let prevState=this.state;this.state=Object.assign(Object.assign({},this.state),state),this.hooks.emit(`stateChange`,{state:this.state,prevState,userAction})}updateConfig(config,options={}){var _a;let prevConfig=this.config,newConfig=Object.assign(Object.assign({},prevConfig),config);this._config=newConfig,this.hooks.emit(`configChange`,{prevConfig,config:newConfig,userAction:(_a=options.userAction)==null?!0:_a})}constructor(five,params){super(five),this.group=new THREE.Group,this.materialUniforms=createPanoAnimeMaterial(),this.mesh=(()=>{let geometry=new THREE.CylinderGeometry(.12,.12,1,32,1,!0);return geometry.translate(0,.5,0),new THREE.Mesh(geometry,this.materialUniforms.material)})(),this.panoMesh=new PanoCircleMesh({scale:1.5}),this.stop=()=>{},this.drawLine=(index,deltaTime)=>{if(!this.ctx)return;let x=(()=>{var _a;return 32*((_a=MULTIPLE[index])==null?0:_a)})(),y=(1-(deltaTime+index*150)%1200/1200)*640,linearGradient=this.ctx.createLinearGradient(0,y-LINE_LENGTH,0,y);linearGradient.addColorStop(0,`rgba(255,255,255,0)`),linearGradient.addColorStop(.5,`rgba(255,255,255,1)`),linearGradient.addColorStop(1,`rgba(255,255,255,0)`),this.ctx.fillStyle=linearGradient,this.ctx.fillRect(x,y-LINE_LENGTH,3,LINE_LENGTH)},this.anime=time=>{if(!this.ctx||!this.startTime)return;this.ctx.clearRect(0,0,CANVAS_WIDTH,CANVAS_HEIGHT);for(let i=0;i<16;i++)this.drawLine(i,time-this.startTime);let progress=clamp$1((time-this.startTime)/1e3,0,1),opacity=clamp$1((time-this.startTime)/300,0,this.config.maxOpacity);this.panoMesh.setOpacity(opacity),this.materialUniforms.u.progress.value=progress,this.materialUniforms.u.opacity.value=opacity,this.canvasTexture&&(this.canvasTexture.needsUpdate=!0),this.five.needsRender=!0},this.dispose=()=>{this.disable()},this.five=five;let defaultState={enabled:!1,visible:!0};this.state=Object.assign(defaultState,params==null?void 0:params.initialState);let config=Object.assign(Object.assign({},params==null?void 0:params.config),{maxOpacity:1});this._config=config,!(typeof document>`u`)&&(this.canvas=document.createElement(`canvas`),this.ctx=this.canvas.getContext(`2d`),this.canvas.width=CANVAS_WIDTH,this.canvas.height=CANVAS_HEIGHT,this.ctx.shadowColor=`rgba(255,255,255,0.5)`,this.ctx.shadowBlur=6,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.canvasTexture=new THREE.CanvasTexture(this.canvas),this.materialUniforms.u.map.value=this.canvasTexture,this.group.add(this.mesh),this.panoMesh.setProgress(1),this.panoMesh.setOpacity(0),this.group.add(this.panoMesh),this.state.enabled&&this._enable({userAction:!1}))}load(data){return __awaiter(this,void 0,void 0,function*(){})}_enable(options){this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.five.ready().then(()=>{this.five.scene.add(this.group),this.stop=AnimationFrameLoop.shared.add((time,deltaTime)=>{this.startTime||(this.startTime=time),this.panoMesh.updateTime(time,deltaTime),this.anime(time)})})}_disable(options){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0}enable(options){var _a;if(!this.ctx||this.state.enabled||!this.five.observers[this.five.state.panoIndex])return;let userAction=(_a=options==null?void 0:options.userAction)==null?!0:_a;this.updateState({enabled:!0},userAction),this._enable({userAction})}disable(options){var _a;if(this.state.enabled===!1)return;let userAction=(_a=options==null?void 0:options.userAction)==null?!0:_a;this.updateState({enabled:!1},userAction),this._disable({userAction})}setState(state,options={}){let prevState=this.state,userAction=options.userAction===void 0?!0:options.userAction;if(this.updateState(state,userAction),state.enabled!==void 0&&prevState.enabled!==state.enabled){let options={userAction};state.enabled?this._enable(options):this._disable(options)}}};export{Controller};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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_Controller=require("./Controller.js");var PanoAnimePlugin=(five,params)=>new require_Controller.Controller(five,params);exports.PanoAnimePlugin=PanoAnimePlugin;
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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{Controller
|
|
338
|
+
*/import{Controller}from"./Controller.mjs";var PanoAnimePlugin=(five,params)=>new Controller(five,params);export{PanoAnimePlugin};
|
|
@@ -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/3
|
|
5
|
+
* Version: 1.0.0-alpha.14
|
|
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"),require_index=require("../BasePlugin/index.js"),require_word_pass=require("./word-pass.js"),require_textToStrokeOrderStrokes=require("./textToStrokeOrderStrokes.js");let tslib=require("tslib"),three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var Controller=class extends require_index.BasePlugin.Controller{updateState(state,userAction){let prevState=this.state;this.state=Object.assign(Object.assign({},this.state),state),this.hooks.emit(`stateChange`,{state:this.state,prevState,userAction})}constructor(five,params){var _a,_b;super(five),this.dispose=()=>{this.disable(),this.wordPass.dispose()},this.five=five;let defaultState={enabled:!1,visible:!0};this.state=Object.assign(defaultState,params==null?void 0:params.initialState);let outputType=(_b=(_a=params==null?void 0:params.config)==null?void 0:_a.outputType)==null?five.enableHDR?three_webgpu.HalfFloatType:three_webgpu.UnsignedByteType:_b;this.wordPass=new require_word_pass.WordPass(five.camera,outputType),this.state.enabled&&this._enable()}load(){return(0,tslib.__awaiter)(this,void 0,void 0,function*(){})}_enable(){this.five.addPass(this.wordPass),this.wordPass.enabled=this.state.visible,this.five.needsRender=!0}_disable(){this.five.removePass(this.wordPass),this.wordPass.clearWords(),this.five.needsRender=!0}enable(options){var _a;if(this.state.enabled)return;let userAction=(_a=options==null?void 0:options.userAction)==null?!0:_a;this.updateState({enabled:!0},userAction),this._enable()}disable(options){var _a;if(this.state.enabled===!1)return;let userAction=(_a=options==null?void 0:options.userAction)==null?!0:_a;this.updateState({enabled:!1},userAction),this._disable()}setState(state,options={}){var _a;let prevState=this.state,userAction=(_a=options.userAction)==null?!0:_a;this.updateState(state,userAction),state.enabled!==void 0&&prevState.enabled!==state.enabled&&(state.enabled?this._enable():this._disable()),state.visible!==void 0&&prevState.visible!==state.visible&&(this.wordPass.enabled=state.visible,this.five.needsRender=!0)}setWords(words){let ids=this.wordPass.setWords(words);return this.five.needsRender=!0,ids}addWord(...words){let ids=this.wordPass.addWord(...words);return this.five.needsRender=!0,ids}removeWord(...ids){let removed=this.wordPass.removeWord(...ids);return this.five.needsRender=!0,removed}setWord(params){this.wordPass.setWord(params),this.five.needsRender=!0}clearWords(){this.wordPass.clearWords(),this.five.needsRender=!0}hasWord(id){return this.wordPass.hasWord(id)}setMaxDisplayBoost(value){this.wordPass.setMaxDisplayBoost(value),this.five.needsRender=!0}writeText(text_1){return(0,tslib.__awaiter)(this,arguments,void 0,function*(text,options={}){let{size,letterSpacing,lineSpacing,normal,up,center,position,smooth,smoothSubdivisions,cdnBaseUrl,charDataLoader,latinScale}=options,style=(0,tslib.__rest)(options,[`size`,`letterSpacing`,`lineSpacing`,`normal`,`up`,`center`,`position`,`smooth`,`smoothSubdivisions`,`cdnBaseUrl`,`charDataLoader`,`latinScale`]),strokes=yield require_textToStrokeOrderStrokes.textToStrokeOrderStrokes(text,{size,letterSpacing,lineSpacing,normal,up,center,position,smooth,smoothSubdivisions,cdnBaseUrl,charDataLoader,latinScale});this.state.enabled||this.enable(),style.id!==void 0&&this.hasWord(style.id)&&this.removeWord(style.id);let[wordId]=this.addWord(Object.assign(Object.assign({},style),{strokes}));return wordId})}};exports.Controller=Controller;
|