@realsee/five-webgpu 1.0.0-alpha.1 → 1.0.0-alpha.10
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/README.md +9 -9
- package/_virtual/_rolldown/runtime.js +255 -0
- package/ai_guides/README.md +2 -2
- package/ai_guides/api.md +9 -8
- package/ai_guides/features/camera-animation.md +1 -1
- package/ai_guides/features/clipper.md +1 -1
- package/ai_guides/features/coordinate-system.md +1 -1
- package/ai_guides/features/event.md +1 -2
- package/ai_guides/features/five.md +81 -12
- package/ai_guides/features/gesture.md +3 -3
- package/ai_guides/features/get-screen-pixels.md +1 -1
- package/ai_guides/features/image-options.md +3 -3
- package/ai_guides/features/load-external-model.md +15 -15
- package/ai_guides/features/load-progress.md +2 -2
- package/ai_guides/features/material.md +35 -8
- package/ai_guides/features/mode.md +28 -31
- package/ai_guides/features/model.md +1 -1
- package/ai_guides/features/pano-filter.md +3 -3
- package/ai_guides/features/pano-tile.md +2 -2
- package/ai_guides/features/raycast.md +1 -1
- package/ai_guides/features/screen-project.md +1 -1
- package/ai_guides/features/state.md +3 -3
- package/ai_guides/features/ultra-hdr.md +41 -32
- package/ai_guides/features/work.md +2 -2
- package/ai_guides/quick-start.md +3 -3
- package/ai_guides/release_notes/6.6.md +2 -2
- package/ai_guides/release_notes/6.7.md +1 -1
- package/ai_guides/release_notes/6.8.md +3 -3
- package/ai_guides/support.md +0 -4
- 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.EffectComposer.html +1 -1
- package/docs/classes/index.EyeDomeLightingPass.html +1 -1
- package/docs/classes/index.Five.html +77 -68
- package/docs/classes/index.FivePass.html +1 -1
- package/docs/classes/index.FiveRenderer.html +2 -2
- package/docs/classes/index.FlowingFireworks3DPass.html +7 -3
- package/docs/classes/index.FlowingLight2DPass.html +6 -3
- package/docs/classes/index.FlowingLight3DPass.html +6 -3
- package/docs/classes/index.GaussianBlurPass.html +1 -1
- package/docs/classes/index.InternalWebGPURenderer.html +17 -3
- 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 +57 -0
- package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +9 -6
- package/docs/classes/index.PBMGaussianSplattingObject.html +18 -4
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +41 -11
- package/docs/classes/index.PBMGroup.html +1 -1
- package/docs/classes/index.PBMMesh.html +1 -1
- package/docs/classes/index.PBMMeshBasicMaterial.html +19 -6
- package/docs/classes/index.PBMMeshBasicNodeMaterial.html +31 -8
- package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +19 -6
- package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +31 -8
- package/docs/classes/index.PBMMeshPhongMaterial.html +19 -6
- package/docs/classes/index.PBMMeshPhongNodeMaterial.html +31 -8
- package/docs/classes/index.PBMMeshPhysicalMaterial.html +19 -6
- package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +31 -8
- package/docs/classes/index.PBMPanoFilter.html +8 -8
- package/docs/classes/index.PBMPointCloud.html +6 -7
- package/docs/classes/index.PBMPointCloudMaterial.html +83 -0
- 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 +5 -5
- package/docs/classes/index.PanoCircleMeshSolid.html +1 -1
- package/docs/classes/index.Parameter.html +61 -53
- package/docs/classes/index.Scene.html +1 -1
- package/docs/classes/index.Subscribe.html +1 -1
- package/docs/classes/index.TextureLoader.html +4 -1
- package/docs/classes/index.Tile3D.html +23 -21
- package/docs/classes/index.TileNode.html +1 -1
- package/docs/classes/index.Tileset.html +4 -4
- package/docs/classes/index.TrajectoryNode.html +3 -3
- package/docs/classes/index.Work.html +20 -18
- package/docs/classes/index.WorkResolvedObserver.html +22 -22
- package/docs/classes/index.XRButton.html +3 -0
- package/docs/documents/README.html +2 -2
- package/docs/documents/api.html +11 -10
- package/docs/documents/features_camera-animation.html +1 -1
- package/docs/documents/features_clipper.html +1 -1
- package/docs/documents/features_coordinate-system.html +1 -1
- package/docs/documents/features_event.html +1 -2
- package/docs/documents/features_five.html +53 -11
- package/docs/documents/features_gesture.html +3 -3
- package/docs/documents/features_get-screen-pixels.html +1 -1
- package/docs/documents/features_image-options.html +3 -3
- package/docs/documents/features_load-external-model.html +13 -13
- package/docs/documents/features_load-progress.html +1 -1
- package/docs/documents/features_material.html +20 -9
- package/docs/documents/features_mode.html +30 -15
- package/docs/documents/features_model.html +1 -1
- package/docs/documents/features_pano-filter.html +3 -3
- package/docs/documents/features_pano-tile.html +2 -2
- package/docs/documents/features_raycast.html +1 -1
- package/docs/documents/features_screen-project.html +1 -1
- package/docs/documents/features_state.html +2 -2
- package/docs/documents/features_ultra-hdr.html +50 -44
- package/docs/documents/features_work.html +2 -2
- package/docs/documents/quick-start.html +2 -2
- package/docs/documents/release_notes_6.6.html +2 -2
- package/docs/documents/release_notes_6.7.html +1 -1
- package/docs/documents/release_notes_6.8.html +3 -3
- package/docs/documents/support.html +1 -3
- package/docs/functions/index.customNodesCacheKey.html +3 -0
- package/docs/functions/index.parseWork.html +1 -1
- package/docs/functions/index.workToJson.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/index.AddableObject.html +1 -1
- package/docs/interfaces/index.AjaxOptions.html +1 -1
- package/docs/interfaces/index.BaseEvent.html +2 -2
- package/docs/interfaces/index.Clock.html +24 -0
- package/docs/interfaces/index.DeviceProfile.html +8 -0
- package/docs/interfaces/index.EventCallback.html +49 -47
- package/docs/interfaces/index.FiveInitArgs.html +65 -41
- package/docs/interfaces/index.GainmapCfgData.html +15 -0
- package/docs/interfaces/index.GestureEvent.html +2 -2
- package/docs/interfaces/index.IPBMMaterial.html +18 -5
- package/docs/interfaces/index.ImageOptions.html +1 -1
- package/docs/interfaces/index.IntersectEvent.html +2 -2
- 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.LoosePanoWork.html +2 -2
- package/docs/interfaces/index.LooseWork.html +2 -2
- package/docs/interfaces/index.LooseWorkInitial.html +2 -2
- package/docs/interfaces/index.LooseWorkModel.html +2 -2
- package/docs/interfaces/index.LooseWorkObserver.html +2 -2
- package/docs/interfaces/index.LooseWorkPanorama.html +4 -3
- package/docs/interfaces/index.LooseWorkWithExtrinsics.html +15 -9
- package/docs/interfaces/index.ModeChangeEvent.html +2 -2
- package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ModelEvent.html +2 -2
- package/docs/interfaces/index.ModelSceneEvent.html +2 -2
- package/docs/interfaces/index.ModelTileEvent.html +2 -2
- 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 +2 -2
- package/docs/interfaces/index.NetworkResponseError.html +1 -1
- package/docs/interfaces/index.NetworkTimeoutError.html +1 -1
- package/docs/interfaces/index.ObjectEvent.html +2 -2
- package/docs/interfaces/index.PBMClipperParameter.html +2 -2
- package/docs/interfaces/index.PBMCustomNodeContext.html +87 -0
- package/docs/interfaces/index.PBMCustomNodeOptions.html +10 -0
- package/docs/interfaces/index.PBMCustomNodePanoContext.html +20 -0
- package/docs/interfaces/index.PBMCustomNodeSlots.html +31 -0
- package/docs/interfaces/index.PBMGaussianSplattingNodeMaterialOptions.html +4 -0
- package/docs/interfaces/index.PBMPanoDepth.html +5 -5
- package/docs/interfaces/index.PBMPanoFilterValue.html +2 -2
- package/docs/interfaces/index.PBMPanoGainmap.html +6 -0
- package/docs/interfaces/index.PBMPanoPicture.html +9 -8
- package/docs/interfaces/index.PBMRefinedScreen.html +2 -2
- package/docs/interfaces/index.PanoCircleMeshCustomOptions.html +2 -2
- package/docs/interfaces/index.PanoCircleMeshInterface.html +1 -1
- package/docs/interfaces/index.PanoEvent.html +2 -2
- package/docs/interfaces/index.PanoPrepareEvent.html +15 -0
- package/docs/interfaces/index.PanoTextureEvent.html +2 -2
- package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ParameterMaterialValue.html +46 -38
- package/docs/interfaces/index.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/index.ParameterValue.html +60 -52
- package/docs/interfaces/index.Pose.html +1 -1
- package/docs/interfaces/index.RenderEvent.html +2 -2
- package/docs/interfaces/index.ResolvedParameterValue.html +60 -52
- package/docs/interfaces/index.SplatData.html +10 -5
- package/docs/interfaces/index.State.html +1 -1
- package/docs/interfaces/index.StateEvent.html +2 -2
- package/docs/interfaces/index.TextureOptions.html +1 -1
- package/docs/interfaces/index.TilesetOptions.html +7 -2
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +37 -0
- package/docs/interfaces/index.ViewLayer.html +23 -21
- package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +10 -0
- package/docs/interfaces/index.WorkCubeImage.html +5 -9
- package/docs/interfaces/index.WorkImage.html +8 -12
- package/docs/interfaces/index.WorkInitial.html +8 -8
- package/docs/interfaces/index.WorkModel.html +8 -8
- package/docs/interfaces/index.WorkModelLayer.html +6 -6
- package/docs/interfaces/index.WorkObserver.html +23 -23
- package/docs/interfaces/index.WorkPanoramaJson.html +3 -2
- package/docs/interfaces/index.WorkTile.html +8 -12
- package/docs/interfaces/index.WorksEvent.html +2 -2
- package/docs/interfaces/index.XRControllerEvent.html +2 -2
- package/docs/interfaces/index.XRGestureEvent.html +2 -2
- package/docs/interfaces/index.XRPanoramaControllerCustomInitArgs.html +52 -0
- package/docs/interfaces/index.XRSessionEvent.html +2 -2
- package/docs/modules/index.html +1 -1
- package/docs/types/index.ControllerCustomInitTypes.html +4 -2
- package/docs/types/index.ControllerEventTypes.html +25 -23
- package/docs/types/index.DeviceProfileOverride.html +5 -0
- package/docs/types/index.EventTypes.html +26 -26
- package/docs/types/index.FlowingFireworks3DPassLine.html +5 -2
- package/docs/types/index.FlowingLight2DPassLine.html +4 -2
- package/docs/types/index.FlowingLight3DPassLine.html +7 -2
- package/docs/types/index.FlowingLightLineInput.html +12 -0
- package/docs/types/index.Mode.html +6 -3
- package/docs/types/index.OutputTextureDataType.html +1 -1
- package/docs/types/index.PBMColorStyle.html +1 -1
- package/docs/types/index.PBMCustomNodeTargetType.html +2 -0
- package/docs/types/index.PBMPointBack.html +1 -1
- package/docs/types/index.PBMPointShape.html +1 -1
- package/docs/types/index.PBMPointSize.html +1 -1
- package/docs/types/index.PBMRoofStyle.html +6 -0
- package/docs/types/index.ParseOptions.html +14 -8
- package/docs/types/index.XRMachineType.html +7 -0
- package/docs/variables/index.GSPLAT_PIPELINE_AUTO.html +2 -0
- package/docs/variables/index.GSPLAT_PIPELINE_RASTER_CPU_SORT.html +2 -0
- package/docs/variables/index.GSPLAT_PIPELINE_RASTER_GPU_SORT.html +2 -0
- package/docs/variables/index.PBMVertexMarkFlag.html +4 -0
- package/docs/variables/index.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
- package/docs/variables/index.controllersDefaultInitArgs.html +1 -1
- package/five/application/controllers.d.ts +8 -0
- package/five/application/events.d.ts +1 -1
- package/five/application/five.d.ts +15 -1
- package/five/application/fiveInitArgs.d.ts +32 -1
- package/five/application/mode.d.ts +8 -1
- package/five/cardboard/helper.d.ts +2 -0
- package/five/cardboard/index.d.ts +13 -0
- package/five/cardboard/sensor.d.ts +158 -0
- package/five/controllers/base.d.ts +3 -0
- package/five/controllers/events.d.ts +5 -3
- package/five/controllers/panorama.d.ts +2 -2
- package/five/controllers/vrPanorama.d.ts +56 -0
- package/five/controllers/xrPanorama.d.ts +506 -0
- package/five/core/internalWebGPURenderer.d.ts +23 -1
- package/five/core/panoVideo.d.ts +4 -1
- package/five/core/tiling.d.ts +40 -9
- package/five/core/webglAsyncReadFix.d.ts +25 -0
- package/five/gaussian-splatting/gpu-sort/prefixSumKernel.d.ts +65 -0
- package/five/gaussian-splatting/gpu-sort/radixSortModule.d.ts +128 -0
- package/five/gaussian-splatting/gpu-sort/shaders/radixHistogram.d.ts +2 -0
- package/five/gaussian-splatting/gpu-sort/shaders/radixReorder.d.ts +2 -0
- package/five/gaussian-splatting/gpu-sort/shaders/sortKeygen.d.ts +2 -0
- package/five/gaussian-splatting/gpu-sort/sortAdapter.d.ts +234 -0
- package/five/gaussian-splatting/layerRegistry.d.ts +17 -0
- package/five/gaussian-splatting/pipelines/cpuSortPipeline.d.ts +159 -0
- package/five/gaussian-splatting/pipelines/gpuSortPipeline.d.ts +98 -0
- package/five/gaussian-splatting/pipelines/gsplatPipeline.d.ts +104 -0
- package/five/gaussian-splatting/pipelines/pipelineMode.d.ts +42 -0
- package/five/gaussian-splatting/pipelines/sortThrottle.d.ts +45 -0
- package/five/gaussian-splatting/shStore.d.ts +22 -0
- package/five/gaussian-splatting/splatAssembler.d.ts +69 -0
- package/five/gaussian-splatting/transformStore.d.ts +37 -0
- package/five/gaussian-splatting/wasm/sort.d.ts +4 -3
- package/five/index.d.ts +8 -2
- package/five/index.js +403 -343
- package/five/index.mjs +9531 -4900
- package/five/meshes/panoCircleMeshCustom.d.ts +1 -0
- package/five/model/index.d.ts +3 -2
- package/five/model/loaders/spz.d.ts +50 -2
- package/five/model/materials/nodes/pbmMeshBasicNodeMaterial.d.ts +2 -0
- package/five/model/materials/nodes/pbmMeshPanoOnlyNodeMaterial.d.ts +2 -0
- package/five/model/materials/nodes/pbmMeshPhongNodeMaterial.d.ts +2 -0
- package/five/model/materials/nodes/pbmMeshPhysicalNodeMaterial.d.ts +2 -0
- package/five/model/materials/pbmGaussianSplattingNodeMaterial.d.ts +12 -5
- package/five/model/materials/pbmMaterial.d.ts +288 -6
- package/five/model/materials/pbmMeshMaterial.d.ts +0 -9
- package/five/model/materials/pbmPointCloudNodeMaterial.d.ts +1 -1
- package/five/model/materials/tsl/defines.d.ts +8 -2
- package/five/model/materials/tsl/outputBuilder.d.ts +8 -15
- package/five/model/materials/tsl/panoColor.d.ts +8 -2
- package/five/model/materials/tsl/utils.d.ts +13 -0
- package/five/model/objects/pbmGaussianSplattingObject.d.ts +30 -4
- package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +113 -48
- package/five/model/objects/pbmPointCloud.d.ts +0 -1
- package/five/model/objects/pbmPointCloudObject.d.ts +1 -1
- package/five/model/parameter.d.ts +20 -5
- package/five/model/tile3d/index.d.ts +2 -0
- package/five/model/tile3d/tileset.d.ts +5 -0
- package/five/model/tile3d/trajectory-content.d.ts +53 -0
- package/five/renderer/compute-renderers/binned/binned-core.d.ts +46 -0
- package/five/renderer/compute-renderers/binned/binned-pipelines.d.ts +10 -0
- package/five/renderer/compute-renderers/binned/shaders/args-builder.d.ts +2 -0
- package/five/renderer/compute-renderers/binned/shaders/classify.d.ts +2 -0
- package/five/renderer/compute-renderers/binned/shaders/coop.d.ts +2 -0
- package/five/renderer/compute-renderers/pointcloud-compute-renderer.d.ts +14 -38
- package/five/renderer/compute-renderers/shaders/lib/color.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/cull.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/encode.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/point-setup.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/point-size.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/raster.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/size-class.d.ts +2 -0
- package/five/renderer/compute-renderers/shaders/lib/tile-bindings.d.ts +2 -0
- package/five/renderer/compute-renderers/uniform-layout.d.ts +23 -0
- package/five/renderer/five-renderer.d.ts +2 -0
- package/five/renderer/index.d.ts +1 -1
- package/five/renderer/postprocessing/index.d.ts +1 -1
- package/five/renderer/postprocessing/passes/flowing-fireworks-3d-pass.d.ts +23 -0
- package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +2 -0
- package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +23 -0
- package/five/renderer/postprocessing/passes/pass.js +255 -0
- package/five/renderer/postprocessing/passes/pass.mjs +255 -0
- package/five/renderer/tools/full-screen-quad.js +255 -0
- package/five/renderer/tools/full-screen-quad.mjs +255 -0
- package/five/texture/loader.d.ts +6 -0
- package/five/types/cube.d.ts +0 -1
- package/five/utils/calculateThreeMouse.js +255 -0
- package/five/utils/calculateThreeMouse.mjs +255 -0
- package/five/utils/detector.d.ts +11 -1
- package/five/utils/distance.js +255 -0
- package/five/utils/distance.mjs +255 -0
- package/five/utils/error.d.ts +1 -0
- package/five/utils/event.d.ts +26 -3
- package/five/utils/gainmap-data.d.ts +23 -0
- package/five/utils/isNil.js +255 -0
- package/five/utils/isNil.mjs +255 -0
- package/five/utils/ktx2.d.ts +3 -3
- package/five/utils/uuid.js +255 -0
- package/five/utils/uuid.mjs +255 -0
- package/five/webxr/XRControllerModelFactory.d.ts +55 -0
- package/five/webxr/buttonStateMachine.d.ts +31 -0
- package/five/webxr/deviceProfile.d.ts +70 -0
- package/five/webxr/inputSourceTracker.d.ts +59 -0
- package/five/webxr/referenceSpace.d.ts +60 -0
- package/five/webxr/renderTargetBridge.d.ts +45 -0
- package/five/webxr/xrButton.d.ts +4 -0
- package/five/webxr/xrManager.d.ts +174 -0
- package/five/work/index.d.ts +1 -1
- package/five/work/looseWorkType.d.ts +2 -1
- package/five/work/work.d.ts +30 -7
- package/five/work/workJsonType.d.ts +2 -1
- package/gltf-loader/gltf-object.d.ts +17 -0
- package/gltf-loader/index.d.ts +45 -0
- package/gltf-loader/index.js +255 -0
- package/gltf-loader/index.mjs +302 -0
- package/line/circle_png.d.ts +1 -0
- package/line/index.d.ts +49 -0
- package/line/index.js +255 -0
- package/line/index.mjs +340 -0
- package/llms.txt +1 -1
- package/package.json +34 -5
- package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
- package/plugins/BackgroundPlugin/Controller.js +276 -0
- package/plugins/BackgroundPlugin/Controller.mjs +276 -0
- package/plugins/BackgroundPlugin/index.d.ts +5 -0
- package/plugins/BackgroundPlugin/index.js +255 -0
- package/plugins/BackgroundPlugin/index.mjs +255 -0
- package/plugins/BackgroundPlugin/typings.d.ts +44 -0
- package/plugins/BasePlugin/index.d.ts +1 -1
- package/plugins/BasePlugin/index.js +255 -0
- package/plugins/BasePlugin/index.mjs +255 -0
- package/plugins/CSS2DPlugin/Controller.d.ts +59 -0
- package/plugins/CSS2DPlugin/Controller.js +255 -0
- package/plugins/CSS2DPlugin/Controller.mjs +255 -0
- package/plugins/CSS2DPlugin/index.d.ts +5 -0
- package/plugins/CSS2DPlugin/index.js +255 -0
- package/plugins/CSS2DPlugin/index.mjs +255 -0
- package/plugins/CSS2DPlugin/style.css_raw.js +275 -0
- package/plugins/CSS2DPlugin/style.css_raw.mjs +275 -0
- package/plugins/CSS2DPlugin/typing.d.ts +31 -0
- package/plugins/CSS3DPlugin/Controller.d.ts +64 -0
- package/plugins/CSS3DPlugin/Controller.js +255 -0
- package/plugins/CSS3DPlugin/Controller.mjs +255 -0
- package/plugins/CSS3DPlugin/index.d.ts +5 -0
- package/plugins/CSS3DPlugin/index.js +255 -0
- package/plugins/CSS3DPlugin/index.mjs +255 -0
- package/plugins/CSS3DPlugin/style.css_raw.js +274 -0
- package/plugins/CSS3DPlugin/style.css_raw.mjs +274 -0
- package/plugins/CSS3DPlugin/typing.d.ts +33 -0
- package/plugins/FloorplanPlugin/Controller.d.ts +100 -0
- package/plugins/FloorplanPlugin/Controller.js +255 -0
- package/plugins/FloorplanPlugin/Controller.mjs +255 -0
- package/plugins/FloorplanPlugin/index.d.ts +6 -0
- package/plugins/FloorplanPlugin/index.js +255 -0
- package/plugins/FloorplanPlugin/index.mjs +255 -0
- package/plugins/FloorplanPlugin/render/assets.d.ts +9 -0
- package/plugins/FloorplanPlugin/render/assets.js +255 -0
- package/plugins/FloorplanPlugin/render/assets.mjs +255 -0
- package/plugins/FloorplanPlugin/render/index.d.ts +35 -0
- package/plugins/FloorplanPlugin/render/index.js +255 -0
- package/plugins/FloorplanPlugin/render/index.mjs +255 -0
- package/plugins/FloorplanPlugin/render/isPointInPolygon.d.ts +5 -0
- package/plugins/FloorplanPlugin/render/isPointInPolygon.js +255 -0
- package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +255 -0
- package/plugins/FloorplanPlugin/render/renderFloor.d.ts +22 -0
- package/plugins/FloorplanPlugin/render/renderFloor.js +255 -0
- package/plugins/FloorplanPlugin/render/renderFloor.mjs +255 -0
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.d.ts +10 -0
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +255 -0
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +255 -0
- package/plugins/FloorplanPlugin/render/style.css_raw.js +585 -0
- package/plugins/FloorplanPlugin/render/style.css_raw.mjs +585 -0
- package/plugins/FloorplanPlugin/typing.d.ts +156 -0
- package/plugins/FloorplanPlugin/typings/floorplanData.d.ts +112 -0
- package/plugins/FloorplanPlugin/typings/floorplanJson.d.ts +167 -0
- package/plugins/FloorplanPlugin/typings/floorplanServerData.d.ts +78 -0
- package/plugins/FloorplanPlugin/typings/index.d.ts +3 -0
- package/plugins/FloorplanPlugin/utils/changeMode.d.ts +5 -0
- package/plugins/FloorplanPlugin/utils/changeMode.js +255 -0
- package/plugins/FloorplanPlugin/utils/changeMode.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +255 -0
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/correctFiveState.d.ts +11 -0
- package/plugins/FloorplanPlugin/utils/correctFiveState.js +255 -0
- package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/equal.d.ts +9 -0
- package/plugins/FloorplanPlugin/utils/equal.js +255 -0
- package/plugins/FloorplanPlugin/utils/equal.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/filter.d.ts +8 -0
- package/plugins/FloorplanPlugin/utils/filter.js +255 -0
- package/plugins/FloorplanPlugin/utils/filter.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +255 -0
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/formatData.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/formatData.js +255 -0
- package/plugins/FloorplanPlugin/utils/formatData.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.d.ts +20 -0
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +255 -0
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/formatPosition.d.ts +33 -0
- package/plugins/FloorplanPlugin/utils/formatPosition.js +255 -0
- package/plugins/FloorplanPlugin/utils/formatPosition.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.d.ts +6 -0
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +255 -0
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/getPxmm.d.ts +19 -0
- package/plugins/FloorplanPlugin/utils/getPxmm.js +255 -0
- package/plugins/FloorplanPlugin/utils/getPxmm.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/isTruelyObject.d.ts +4 -0
- package/plugins/FloorplanPlugin/utils/isTruelyObject.js +255 -0
- package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/nearlyEqual.d.ts +8 -0
- package/plugins/FloorplanPlugin/utils/nearlyEqual.js +255 -0
- package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/polylabel.d.ts +8 -0
- package/plugins/FloorplanPlugin/utils/polylabel.js +255 -0
- package/plugins/FloorplanPlugin/utils/polylabel.mjs +255 -0
- package/plugins/FloorplanPlugin/utils/to.d.ts +5 -0
- package/plugins/FloorplanPlugin/utils/to.js +255 -0
- package/plugins/FloorplanPlugin/utils/to.mjs +255 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +1 -1
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +255 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +255 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +1 -1
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +255 -0
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Controller.d.ts +99 -0
- package/plugins/Object3DHelperPlugin/Controller.js +255 -0
- package/plugins/Object3DHelperPlugin/Controller.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.d.ts +139 -0
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.d.ts +66 -0
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.d.ts +61 -0
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +255 -0
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +255 -0
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.d.ts +17 -0
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +255 -0
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.d.ts +97 -0
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +255 -0
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.d.ts +16 -0
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +255 -0
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.d.ts +37 -0
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +255 -0
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +255 -0
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.d.ts +93 -0
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +255 -0
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +255 -0
- package/plugins/Object3DHelperPlugin/constant.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/constant.js +255 -0
- package/plugins/Object3DHelperPlugin/constant.mjs +255 -0
- package/plugins/Object3DHelperPlugin/index.d.ts +6 -0
- package/plugins/Object3DHelperPlugin/index.js +255 -0
- package/plugins/Object3DHelperPlugin/index.mjs +255 -0
- package/plugins/Object3DHelperPlugin/typing.d.ts +143 -0
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.d.ts +22 -0
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.d.ts +23 -0
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.d.ts +19 -0
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.d.ts +3 -0
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/direction.d.ts +14 -0
- package/plugins/Object3DHelperPlugin/utils/direction.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/direction.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.d.ts +5 -0
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/solidGuide.d.ts +27 -0
- package/plugins/Object3DHelperPlugin/utils/solidGuide.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +255 -0
- package/plugins/Object3DHelperPlugin/utils/tipsDom.d.ts +8 -0
- package/plugins/Object3DHelperPlugin/utils/tipsDom.js +255 -0
- package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +255 -0
- package/plugins/PanoAnimePlugin/Controller.d.ts +49 -0
- package/plugins/PanoAnimePlugin/Controller.js +255 -0
- package/plugins/PanoAnimePlugin/Controller.mjs +255 -0
- package/plugins/PanoAnimePlugin/index.d.ts +5 -0
- package/plugins/PanoAnimePlugin/index.js +255 -0
- package/plugins/PanoAnimePlugin/index.mjs +255 -0
- package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
- package/plugins/WordPassPlugin/Controller.d.ts +62 -0
- package/plugins/WordPassPlugin/Controller.js +255 -0
- package/plugins/WordPassPlugin/Controller.mjs +255 -0
- package/plugins/WordPassPlugin/hersheyFont.d.ts +11 -0
- package/plugins/WordPassPlugin/hersheyFont.js +255 -0
- package/plugins/WordPassPlugin/hersheyFont.mjs +255 -0
- package/plugins/WordPassPlugin/index.d.ts +7 -0
- package/plugins/WordPassPlugin/index.js +255 -0
- package/plugins/WordPassPlugin/index.mjs +255 -0
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.d.ts +82 -0
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +256 -0
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +256 -0
- package/plugins/WordPassPlugin/typing.d.ts +109 -0
- package/plugins/WordPassPlugin/word-pass.d.ts +172 -0
- package/plugins/WordPassPlugin/word-pass.js +255 -0
- package/plugins/WordPassPlugin/word-pass.mjs +255 -0
- package/plugins/index.d.ts +8 -0
- package/plugins/index.js +3 -3
- package/plugins/index.mjs +3 -287
- package/plugins/thirdParty/CSS2DRenderer.d.ts +37 -0
- package/plugins/thirdParty/CSS2DRenderer.js +255 -0
- package/plugins/thirdParty/CSS2DRenderer.mjs +255 -0
- package/plugins/thirdParty/CSS3DRenderer.d.ts +45 -0
- package/plugins/thirdParty/CSS3DRenderer.js +255 -0
- package/plugins/thirdParty/CSS3DRenderer.mjs +255 -0
- package/plugins/thirdParty/OrbitControls.d.ts +78 -0
- package/plugins/thirdParty/doctorstrange-model.d.ts +92 -0
- package/plugins/thirdParty/doctorstrange-model.js +610 -0
- package/plugins/thirdParty/doctorstrange-model.mjs +610 -0
- package/plugins/thirdParty/domevents.d.ts +36 -0
- package/plugins/thirdParty/domevents.js +255 -0
- package/plugins/thirdParty/domevents.mjs +255 -0
- package/plugins/utils/absoluteUrl.js +255 -0
- package/plugins/utils/absoluteUrl.mjs +255 -0
- package/plugins/utils/calculatePath.d.ts +3 -0
- package/plugins/utils/calculatePath.js +255 -0
- package/plugins/utils/calculatePath.mjs +255 -0
- package/plugins/utils/clamp.d.ts +2 -0
- package/plugins/utils/clamp.js +255 -0
- package/plugins/utils/clamp.mjs +255 -0
- package/plugins/utils/uuid.d.ts +2 -0
- package/plugins/utils/uuid.js +255 -0
- package/plugins/utils/uuid.mjs +255 -0
- package/react/context.d.ts +1 -1
- package/react/createProvider.d.ts +1 -1
- package/react/fiveApp.d.ts +1 -1
- package/react/hooks/unsafe__useFiveInstance.d.ts +1 -1
- package/react/hooks/useFiveAction.d.ts +1 -1
- package/react/hooks/useFiveCurrentObserver.d.ts +1 -1
- package/react/hooks/useFiveCurrentState.d.ts +1 -1
- package/react/hooks/useFiveEventCallback.d.ts +1 -1
- package/react/hooks/useFiveModelEffect.d.ts +1 -1
- package/react/hooks/useFiveModelIntersectRaycaster.d.ts +1 -1
- package/react/hooks/useFivePlugin.d.ts +1 -1
- package/react/hooks/useFiveSceneEffect.d.ts +1 -1
- package/react/hooks/useFiveState.d.ts +1 -1
- package/react/hooks/useFiveWork.d.ts +1 -1
- package/react/index.js +3 -3
- package/react/index.mjs +3 -3
- package/react/withFive.d.ts +1 -1
- package/sticker/geometry.d.ts +3 -0
- package/sticker/index.d.ts +68 -0
- package/sticker/index.js +255 -0
- package/sticker/index.mjs +358 -0
- package/umd/five-gltf-loader.js +255 -0
- package/umd/five-line.js +322 -0
- package/umd/five-plugins.js +817 -3
- package/umd/five-react.js +3 -3
- package/umd/five-sticker.js +255 -0
- package/umd/five-vfx.js +323 -0
- package/umd/five.js +472 -412
- package/vfx/airflow/airflow.d.ts +18 -0
- package/vfx/common/simplex-noise.d.ts +2 -0
- package/vfx/frame/frame.d.ts +27 -0
- package/vfx/index.d.ts +7 -0
- package/vfx/index.js +255 -0
- package/vfx/index.mjs +738 -0
- package/vfx/particle/instance.d.ts +36 -0
- package/vfx/particle/particle.d.ts +119 -0
- package/vfx/particle/utils.d.ts +11 -0
- package/vfx/particle-gpu/particle.d.ts +75 -0
- package/vfx/particle-gpu/utils.d.ts +11 -0
- package/vfx/spotLight/spotLight.d.ts +15 -0
- package/work-downloader/components/model-3d-tile.d.ts +2 -0
- package/work-downloader/components/model.d.ts +3 -0
- package/work-downloader/components/observer.d.ts +9 -0
- package/work-downloader/download.d.ts +16 -0
- package/work-downloader/index.d.ts +2 -0
- package/work-downloader/index.js +255 -0
- package/work-downloader/index.mjs +595 -0
- package/work-downloader/type.d.ts +28 -0
- package/work-downloader/utils/download-to-file.d.ts +1 -0
- package/work-downloader/utils/image-processing.d.ts +7 -0
- package/work-downloader/utils/join-url.d.ts +2 -0
- package/work-downloader/utils/log.d.ts +1 -0
- package/work-downloader/utils/relative-url.d.ts +1 -0
- package/docs/interfaces/index.PBMHDRConfig.html +0 -12
- package/five/gaussian-splatting/util/renderData.d.ts +0 -66
- package/five/gaussian-splatting/worker/dataWorker.d.ts +0 -1
- package/five/three-version-check.d.ts +0 -1
- package/five/utils/hdr-data.d.ts +0 -13
- package/five/utils/shaderContentFix.d.ts +0 -7
- /package/five/{renderer/compute-renderers/shaders/rasterize.d.ts → gaussian-splatting/gpu-sort/shaders/prefixSum.d.ts} +0 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* @realsee/five-webgpu
|
|
4
|
+
* Generated: 10/26/2026
|
|
5
|
+
* Version: 1.0.0-alpha.10
|
|
6
|
+
* Terms:
|
|
7
|
+
* Realsee SDK License Agreement
|
|
8
|
+
* Update: July 28, 2021
|
|
9
|
+
* THIS LICENSE AGREEMENT BETWEEN YOU AND 【BEIKE REALSEE TECHNOLOGY (HK)
|
|
10
|
+
* LIMITED】(“Realsee”) FORMS A LEGALLY BINDING CONTRACT BETWEEN YOU AND REALSEE IN
|
|
11
|
+
* RELATION TO YOUR USE OF THE SDK. This License Agreement accompanies the Realsee
|
|
12
|
+
* Software Development Kit(s) for the software and related explanatory materials
|
|
13
|
+
* (the "SDK") and includes any upgrades, modified versions, updates, additions,
|
|
14
|
+
* and copies of the SDK licensed to You by Realsee.
|
|
15
|
+
* BY DOWNLOADING, INSTALLING, OR OTHERWISE ACCESSING OR USING THE SDK, YOU AGREE
|
|
16
|
+
* THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THIS AGREEMENT. YOU ARE
|
|
17
|
+
* AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO
|
|
18
|
+
* THE TERMS AND CONDITIONS STATED BELOW.
|
|
19
|
+
* This Agreement applies to Your use of the SDK in the country in which You
|
|
20
|
+
* legally install it (“Territory”) and is subject to the laws of such Territory
|
|
21
|
+
* and further subject to Section 12 below. Different terms, conditions, and
|
|
22
|
+
* limitations may apply to the use of the SDK in any additional countries.
|
|
23
|
+
* 1. DEFINITIONS.
|
|
24
|
+
* “Agreement” means this Realsee SDK License Agreement.
|
|
25
|
+
* “Developer”, “You” and “Your” means the person(s) or entity acquiring or using
|
|
26
|
+
* the SDK or otherwise exercising rights under the terms of this Agreement.
|
|
27
|
+
* “Documentation” means the technical or other specifications or documentation
|
|
28
|
+
* that Realsee may provide to You for use in connection with the SDK.
|
|
29
|
+
* “Integrated Product” means any software, website, or on-line service developed
|
|
30
|
+
* by You based on or using the SDK (collectively, the “Integrated Product”).
|
|
31
|
+
* “Intellectual Property” means any patents, patent rights, trademarks, service
|
|
32
|
+
* marks, registered and unregistered designs, applications for any of the
|
|
33
|
+
* foregoing, copyright, and any other similar protected rights in any country and
|
|
34
|
+
* to the extent recognised by any relevant jurisdiction as intellectual property,
|
|
35
|
+
* trade secrets, know-how and confidential information. Realsee reserves all
|
|
36
|
+
* rights not expressly granted to You.
|
|
37
|
+
* “Realsee” means [Beike Realsee Technology (HK) Limited, a company incorporated
|
|
38
|
+
* and validly existing under the laws of Hong Kong].
|
|
39
|
+
* “SDK” means the Realsee-proprietary Software Development Kits (SDK) provided
|
|
40
|
+
* hereunder, includes all development tools (including any compiler and debugger),
|
|
41
|
+
* application programming interfaces (“APIs”), libraries, binary utilities, header
|
|
42
|
+
* files, Documentation, content, data, code samples, and other materials provided
|
|
43
|
+
* to You in connection with this Agreement, whether delivered through a download,
|
|
44
|
+
* or any other media or form, and is licensed, not sold, to You by Realsee for use
|
|
45
|
+
* only under the terms of this Agreement. The terms of this Agreement will govern
|
|
46
|
+
* any updates provided by Realsee that replace and/or supplement the original SDK
|
|
47
|
+
* delivered to You, unless such update is accompanied by a separate license, in
|
|
48
|
+
* which case the terms of such license will govern.
|
|
49
|
+
* 2. LICENSED USES AND RESTRICTIONS.
|
|
50
|
+
* 2.1 Subject to the restrictions contained in this Section 2, Realsee grants to
|
|
51
|
+
* You during the term, a limited, non-exclusive, revocable, non-sublicensable,
|
|
52
|
+
* non-transferable license to install and use the SDK within the Territory only
|
|
53
|
+
* for the purpose of internal development.
|
|
54
|
+
* 2.2 Restrictions. You acknowledge and agree that, You shall not, and shall
|
|
55
|
+
* ensure that Your affiliates, employees, agents, representatives, officers,
|
|
56
|
+
* representatives, and subcontractors do not (directly or indirectly):
|
|
57
|
+
* 2.2.1 decompile, reverse engineer, disassemble or attempt to derive the source
|
|
58
|
+
* code of, those components of the SDK provided in object code form, or any part
|
|
59
|
+
* thereof;
|
|
60
|
+
* 2.2.2 remove, alter, or obscure any copyright notice or other proprietary rights
|
|
61
|
+
* notice on any part of the SDK;
|
|
62
|
+
* 2.2.3 sell, assign, pledge, rent, lease, lend, upload to or host on any website
|
|
63
|
+
* or server for use by any third party except You, redistribute, or sublicense the
|
|
64
|
+
* SDK (or any part thereof), or operate the SDK (or any part thereof) in the
|
|
65
|
+
* capacity of a service bureau or other hosted services provider, in whole or in
|
|
66
|
+
* part, nor may You enable others to do so;
|
|
67
|
+
* 2.2.4 or alter, modify, customize or improve the SDK, or any part thereof;
|
|
68
|
+
* 2.2.5 use the SDK (or any part thereof) for any illegal purpose, in any manner
|
|
69
|
+
* that is inconsistent with the terms of this Agreement, or to engage in any
|
|
70
|
+
* illegal activity;
|
|
71
|
+
* 2.2.6 use the SDK (or any part thereof) in any manner that may damage the
|
|
72
|
+
* operation of Realsee’s products or services; or
|
|
73
|
+
* 2.2.7 use the SDK or any information contained therein or otherwise provided by
|
|
74
|
+
* Realsee for the purpose of developing, or having developed, any product
|
|
75
|
+
* competitive with any Realsee product or service, as determined by Realsee in its
|
|
76
|
+
* sole discretion;
|
|
77
|
+
* 2.2.8 include any portion of the SDK in Your Developer products.
|
|
78
|
+
* 2.3 Realsee has the right to impose reasonable conditions such as a reasonable
|
|
79
|
+
* fee for use of the SDK in Integrated Product in the future.
|
|
80
|
+
* 2.4 You may make a limited number of copies of the SDK to be used by Your
|
|
81
|
+
* employees or consultants as provided herein, and not for general business
|
|
82
|
+
* purposes, and such employees or consultants shall be subject to the obligations
|
|
83
|
+
* and restrictions in this Agreement.
|
|
84
|
+
* 2.5 All licenses not expressly granted in this Agreement are reserved and no
|
|
85
|
+
* other licenses, immunity, or rights, express or implied, are granted by Realsee,
|
|
86
|
+
* by implication, estoppel, or otherwise.
|
|
87
|
+
* 3. CONFIDENTIALITY.
|
|
88
|
+
* The SDK and all source code, Documentation, specifications, engineering details,
|
|
89
|
+
* and related information pertaining to the SDK, whether in oral, written,
|
|
90
|
+
* graphic, or electronic form, are and shall remain the confidential and
|
|
91
|
+
* proprietary information of Realsee or its licensors (collectively, the
|
|
92
|
+
* “Confidential Information”). You shall (i) disclose Confidential Information to
|
|
93
|
+
* only those directors and employees (collectively, “Affiliates”) whose duties
|
|
94
|
+
* justify their need to know such information and who have been clearly informed
|
|
95
|
+
* of their obligation to maintain the confidential, proprietary, and/or trade
|
|
96
|
+
* secret status of such Confidential Information; and (ii) use Confidential
|
|
97
|
+
* Information solely in accordance with the license granted hereunder. In any
|
|
98
|
+
* event, You and Your Affiliates shall treat Confidential Information as strictly
|
|
99
|
+
* confidential and shall use the same care to prevent disclosure of such
|
|
100
|
+
* information as You use with respect to Your own similar confidential and/or
|
|
101
|
+
* proprietary information, which shall not be less than the care a reasonable
|
|
102
|
+
* person would use under similar circumstances. All Confidential Information, and
|
|
103
|
+
* any copies thereof, shall be returned promptly to Realsee upon request. You
|
|
104
|
+
* shall ensure that Your Affiliates comply with the provisions of this Section 3,
|
|
105
|
+
* and You shall be liable for any breach of this Section 3 resulting from the act
|
|
106
|
+
* or omission of any of Your Affiliates. You shall not disclose Confidential
|
|
107
|
+
* Information to any third party, including, without limitation, any of Your
|
|
108
|
+
* subcontractors.
|
|
109
|
+
* 4. PROPRIETARY RIGHTS.
|
|
110
|
+
* 4.1 As between You and Realsee, Realsee and/or its licensors retain ownership of
|
|
111
|
+
* all right, title, and interest in, to, and under the SDK, including, without
|
|
112
|
+
* limitation, all patents, copyrights, trade secrets, trademarks and other
|
|
113
|
+
* intellectual property and other proprietary rights therein, and reserve all
|
|
114
|
+
* rights not expressly granted to You.
|
|
115
|
+
* 4.2 The items contained in the SDK are the intellectual property of Realsee and
|
|
116
|
+
* its licensors and are protected by PRC copyright and patent law, international
|
|
117
|
+
* treaty provisions and applicable laws of the country in which it is being used.
|
|
118
|
+
* You agree to protect all copyright and other ownership interests of Realsee
|
|
119
|
+
* and/or its licensors in all items in the SDK supplied under this License
|
|
120
|
+
* Agreement. You agree that all copies of the items in the SDK, reproduced for any
|
|
121
|
+
* reason by You, contain the same copyright notices, and other proprietary notices
|
|
122
|
+
* as appropriate, as appear on or in the original items delivered by Realsee in
|
|
123
|
+
* the SDK. Realsee and/or its licensors retain title and ownership of the items in
|
|
124
|
+
* the SDK, the media on which it is loaded, and all subsequent copies, regardless
|
|
125
|
+
* of the form or media in or on which the original and other copies may exist.
|
|
126
|
+
* Except as stated above, this Agreement does not grant You any rights to patents,
|
|
127
|
+
* copyrights, trade secrets, trademarks or any other rights in respect to the
|
|
128
|
+
* items in the SDK.
|
|
129
|
+
* 5. TERM AND TERMINATION.
|
|
130
|
+
* 5.1 This Agreement is effective until terminated. Realsee has the right to
|
|
131
|
+
* terminate this Agreement immediately, without judicial intervention, if You fail
|
|
132
|
+
* to comply with any term herein. Upon any such termination You must remove all
|
|
133
|
+
* full and partial copies of the items in the SDK from Your computer and
|
|
134
|
+
* discontinue the use of the items in the SDK.
|
|
135
|
+
* 5.2 Realsee may at any time, terminate the Agreement with You if: (A) You have
|
|
136
|
+
* breached any provision of the Agreement; or (B) Realsee is required to do so by
|
|
137
|
+
* law; or (C) Realsee decides to no longer provide the SDK or certain parts of the
|
|
138
|
+
* SDK to users in the country in which You are resident or from which You use the
|
|
139
|
+
* service, or the provision of the SDK or certain SDK services to You by Realsee
|
|
140
|
+
* is, in Realsee's sole discretion, no longer legally or commercially viable.
|
|
141
|
+
* 5.3 When the Agreement comes to an end, all of the legal rights, obligations and
|
|
142
|
+
* liabilities that You and Realsee have benefited from, been subject to (or which
|
|
143
|
+
* have accrued over time whilst the Agreement has been in force) or which are
|
|
144
|
+
* expressed to continue indefinitely, shall be unaffected by this cessation, and
|
|
145
|
+
* the provisions of Section 3, 4, 6, 7 and 8 shall continue to apply to such
|
|
146
|
+
* rights, obligations and liabilities indefinitely.
|
|
147
|
+
* 6. DISCLAIMER OF WARRANTY.
|
|
148
|
+
* YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE
|
|
149
|
+
* LAW, USE OF THE SDK (OR ANY PART THEREOF) IS AT YOUR SOLE RISK AND THAT THE
|
|
150
|
+
* ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS
|
|
151
|
+
* WITH YOU. REALSEE LICENSES THE SDK TO YOU ONLY ON AN "AS-IS" BASIS. REALSEE
|
|
152
|
+
* MAKES NO REPRESENTATION WITH RESPECT TO THE ADEQUACY OF ANY ITEMS IN THE SDK,
|
|
153
|
+
* WHETHER OR NOT USED BY YOU IN THE DEVELOPMENT OF INTEGRATED PRODUCT, FOR ANY
|
|
154
|
+
* PARTICULAR PURPOSE OR WITH RESPECT TO THEIR ADEQUACY TO PRODUCE ANY PARTICULAR
|
|
155
|
+
* RESULT. REALSEE AND ITS LICENSORS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING
|
|
156
|
+
* OUT OF THIS AGREEMENT OR FROM THE DISTRIBUTION OR USE OF INTEGRATED PRODUCT
|
|
157
|
+
* CONTAINING PORTIONS OF THE SDK. REALSEE AND ITS LICENSORS DISCLAIM ALL
|
|
158
|
+
* WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
|
|
159
|
+
* CONDITIONS OR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
160
|
+
* OR NONINFRINGEMENT OF ANY THIRD PARTY RIGHT IN RESPECT OF THE ITEMS IN THE SDK
|
|
161
|
+
* OR ANY SERVICES RELATED TO THE SDK.
|
|
162
|
+
* REALSEE IS UNDER NO OBLIGATION TO PROVIDE ANY SUPPORT UNDER THIS LICENSE
|
|
163
|
+
* AGREEMENT, INCLUDING UPGRADES OR FUTURE VERSIONS OF THE SDK OR ANY PORTIONS
|
|
164
|
+
* THEREOF, TO YOU, END USER OR TO ANY OTHER PARTY.
|
|
165
|
+
* 7. LIMITATION OF LIABILITY.
|
|
166
|
+
* TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN NO EVENT WILL REALSEE OR ITS
|
|
167
|
+
* LICENSORS BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, INDIRECT, OR
|
|
168
|
+
* CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE,
|
|
169
|
+
* LOSS OF BUSINESS, REVENUE, OR PROFITS, LOSS OF OPPORTUNITY (WHETHER DIRECT OR
|
|
170
|
+
* INDIRECT), CORRUPTION OR LOSS OF DATA, LOSS OF REPUTATION OR SAVINGS, DOWNTIME,
|
|
171
|
+
* OR DAMAGE TO, LOSS OF OR REPLACEMENT OF DATA OR TRANSACTIONS, COST OF
|
|
172
|
+
* PROCUREMENT OF SUBSTITUTE SERVICES, BUSINESS INTERRUPTION, OR ANY OTHER
|
|
173
|
+
* COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OR INABILITY
|
|
174
|
+
* TO USE THE SDK (OR ANY PART THEREOF), ANY INTEGRATED PRODUCT, OR ANY THIRD PARTY
|
|
175
|
+
* SOFTWARE, APPLICATIONS, OR SERVICES IN CONJUNCTION WITH THE SDK (OR ANY PART
|
|
176
|
+
* THEREOF), HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT,
|
|
177
|
+
* OR OTHERWISE) AND EVEN IF REALSEE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
178
|
+
* DAMAGES. IN NO EVENT WILL REALSEE’S TOTAL LIABILITY TO YOU FOR ALL DAMAGES
|
|
179
|
+
* EXCEED ONE HUNDRED DOLLARS ($100.00). THE FOREGOING LIMITATIONS WILL APPLY EVEN
|
|
180
|
+
* IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. THE LIMITATIONS
|
|
181
|
+
* CONTAINED IN SECTIONS 6 AND THIS SECTION 7 ARE A FUNDAMENTAL PART OF THE BASIS
|
|
182
|
+
* OF REALSEE’S BARGAIN HEREUNDER, AND REALSEE WOULD NOT ENTER INTO THIS AGREEMENT
|
|
183
|
+
* OR PROVIDE YOU WITH ACCESS TO THE SDK ABSENT SUCH LIMITATIONS.
|
|
184
|
+
* 8. INDEMNIFICATION.
|
|
185
|
+
* To the extent permitted by applicable law, You agree to indemnify, defend and
|
|
186
|
+
* hold harmless Realsee, its affiliates and each of their directors, officers,
|
|
187
|
+
* employees, independent contractors, and agents (each a “Realsee Indemnified
|
|
188
|
+
* Party”) from any and all claims, losses, liabilities, damages, expenses, and
|
|
189
|
+
* costs (including without limitation attorneys’ fees and court costs) incurred by
|
|
190
|
+
* a Realsee Indemnified Party as a result of: (i) Your non-compliance with any
|
|
191
|
+
* terms of this Agreement; (ii) Your use of the SDK (or any part thereof); or
|
|
192
|
+
* (iii) Your use of any Integrated Product, including any claim that Integrated
|
|
193
|
+
* Product infringes the copyright, trademark, trade secret or other intellectual
|
|
194
|
+
* property right of a third party.
|
|
195
|
+
* 9. ACKNOWLEDGEMENTS.
|
|
196
|
+
* Portions of the SDK may utilize or include third party software and other
|
|
197
|
+
* copyrighted material. Acknowledgments, licensing terms, and disclaimers for such
|
|
198
|
+
* material are contained in Documentation for the SDK or may otherwise accompany
|
|
199
|
+
* such material, and Your use of such materials governed by their respective
|
|
200
|
+
* terms. In the event of conflict between the terms of this Agreement and an
|
|
201
|
+
* applicable open source or third party agreement, the open source or third party
|
|
202
|
+
* agreement will control solely with respect to the open source software or third
|
|
203
|
+
* party software. Moreover, You shall not subject any items (including not limited
|
|
204
|
+
* to source code, object code, and any software) included in the SDK to any open
|
|
205
|
+
* source license.
|
|
206
|
+
* 10. NON-BLOCKING OF REALSEE DEVELOPMENT.
|
|
207
|
+
* You acknowledge that Realsee is currently developing or may develop technologies
|
|
208
|
+
* and products in the future that have or may have design and/or functionality
|
|
209
|
+
* similar to Integrated Product that You may develop based on Your license herein.
|
|
210
|
+
* Nothing in this Agreement shall impair, limit or curtail Realsee's right to
|
|
211
|
+
* continue with its development, maintenance and/or distribution of Realsee's
|
|
212
|
+
* technology or products.
|
|
213
|
+
* 11. GENERAL.
|
|
214
|
+
* 11.1 Export Control. You may not use or otherwise export or re-export the SDK
|
|
215
|
+
* (or any part thereof) except as authorized by United States law and the laws of
|
|
216
|
+
* the jurisdiction(s) in which the SDK (or any part thereof) was obtained. In
|
|
217
|
+
* particular, but without limitation, the SDK may not be exported or re-exported
|
|
218
|
+
* (i) into any U.S. embargoed countries or (ii) to anyone on the U.S. Treasury
|
|
219
|
+
* Department's list of Specially Designated Nationals or the U.S. Department of
|
|
220
|
+
* Commerce Denied Person's List or Entity List. By using the SDK (or any part
|
|
221
|
+
* thereof), You represent and warrant that You are not located in any such country
|
|
222
|
+
* or on any such list.
|
|
223
|
+
* 11.2 Governing Law. This Agreement and the rights of the parties hereunder shall
|
|
224
|
+
* be governed by and construed in accordance with the laws of People’s Republic of
|
|
225
|
+
* China (for purpose of this Agreement, excluding Hong Kong, Taiwan, and Macau),
|
|
226
|
+
* without reference to its conflict of laws principles. Any dispute, controversy
|
|
227
|
+
* or claim arising from or in connection with this Agreement, or the breach,
|
|
228
|
+
* termination or invalidity thereof, shall be submitted to China International
|
|
229
|
+
* Economic and Trade Arbitration Commission (“CIETAC”) for arbitration in Beijing
|
|
230
|
+
* which shall be conducted in accordance with the CIETAC's arbitration rules in
|
|
231
|
+
* effect at the time of applying for arbitration. The arbitral award is final and
|
|
232
|
+
* binding upon both parties.
|
|
233
|
+
* 11.3 Severability. If any provision of this Agreement is held by a court of
|
|
234
|
+
* competent jurisdiction to be unenforceable for any reason, the remaining
|
|
235
|
+
* provisions hereof will be unaffected and remain in full force and effect.
|
|
236
|
+
* 11.4. Modifications. Realsee reserves the right, from time to time, with or
|
|
237
|
+
* without notice to You, to make revisions to this Agreement in our sole and
|
|
238
|
+
* absolute discretion. The most current version of this Agreement will supersede
|
|
239
|
+
* all previous versions and shall be made available on the website where the SDK
|
|
240
|
+
* is made available, or by such other means as Realsee may determine in its
|
|
241
|
+
* discretion. Any modified versions of this Agreement hereto shall take effect
|
|
242
|
+
* from the time that it is made available. You shall be responsible for regularly
|
|
243
|
+
* checking for notice of any such modifications. You agree that Your continued use
|
|
244
|
+
* of the SDK constitutes Your agreement to the modified Agreement.
|
|
245
|
+
* 11.5 Relationship of the Parties. This Agreement will not be construed as
|
|
246
|
+
* creating an agency, partnership, joint venture, fiduciary duty, or any other
|
|
247
|
+
* form of legal association between You and Realsee, and You will not represent to
|
|
248
|
+
* the contrary, whether expressly, by implication, appearance, or otherwise.
|
|
249
|
+
* 11.6 Entire Agreement; Governing Language. This Agreement constitutes the entire
|
|
250
|
+
* agreement between You and Realsee with respect to the use of the SDK licensed
|
|
251
|
+
* hereunder and supersedes all prior understandings regarding such subject matter.
|
|
252
|
+
* No amendment to or modification of this Agreement will be binding unless in
|
|
253
|
+
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
|
+
* Agreement and all related documents shall be drafted in English.
|
|
255
|
+
*/function e(){return((1+Math.random())*65536|0).toString(16).substring(1)}function t(){return(e()+e()+`-`+e()+`-4`+e().substr(0,3)+`-`+e()+`-`+e()+e()+e()).toLowerCase()}export{t as uuid};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Object3D } from 'three/webgpu';
|
|
2
|
+
import * as THREE from 'three/webgpu';
|
|
3
|
+
/**
|
|
4
|
+
* @description Builds a motion controller with components and visual responses based on the
|
|
5
|
+
* supplied profile description. Data is polled from the xrInputSource's gamepad.
|
|
6
|
+
* @author Nell Waliczek / https://github.com/NellWaliczek
|
|
7
|
+
*/
|
|
8
|
+
declare class MotionController {
|
|
9
|
+
/**
|
|
10
|
+
* @param {Object} xrInputSource - The XRInputSource to build the MotionController around
|
|
11
|
+
* @param {Object} profile - The best matched profile description for the supplied xrInputSource
|
|
12
|
+
* @param {Object} assetUrl
|
|
13
|
+
*/
|
|
14
|
+
xrInputSource: XRInputSource;
|
|
15
|
+
assetUrl: string;
|
|
16
|
+
id: any;
|
|
17
|
+
layoutDescription: any;
|
|
18
|
+
components: any;
|
|
19
|
+
constructor(xrInputSource: XRInputSource, profile: any, assetUrl: string);
|
|
20
|
+
get gripSpace(): XRSpace | undefined;
|
|
21
|
+
get targetRaySpace(): XRSpace;
|
|
22
|
+
/**
|
|
23
|
+
* @description Returns a subset of component data for simplified debugging
|
|
24
|
+
*/
|
|
25
|
+
get data(): any[];
|
|
26
|
+
/**
|
|
27
|
+
* @description Poll for updated data based on current gamepad state
|
|
28
|
+
*/
|
|
29
|
+
updateFromGamepad(): void;
|
|
30
|
+
}
|
|
31
|
+
declare class XRControllerModel extends Object3D {
|
|
32
|
+
motionController: MotionController | null;
|
|
33
|
+
envMap: THREE.Texture | null;
|
|
34
|
+
constructor();
|
|
35
|
+
setEnvironmentMap(envMap: THREE.Texture): this;
|
|
36
|
+
/**
|
|
37
|
+
* Polls data from the XRInputSource and updates the model's components to match
|
|
38
|
+
* the real world data
|
|
39
|
+
*/
|
|
40
|
+
updateMatrixWorld(force: boolean): void;
|
|
41
|
+
}
|
|
42
|
+
declare class XRControllerModelFactory {
|
|
43
|
+
path: string;
|
|
44
|
+
_assetCache: any;
|
|
45
|
+
gltfLoader: {
|
|
46
|
+
load: (url: string, callback: (result: {
|
|
47
|
+
scene: THREE.Object3D;
|
|
48
|
+
}) => void) => any;
|
|
49
|
+
} | null;
|
|
50
|
+
constructor(gltfLoader?: {
|
|
51
|
+
load: () => any;
|
|
52
|
+
} | null);
|
|
53
|
+
createControllerModel(controller: any): XRControllerModel;
|
|
54
|
+
}
|
|
55
|
+
export { XRControllerModelFactory };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type ButtonName = 'A' | 'B' | 'X' | 'Y' | 'LeftTrigger' | 'RightTrigger' | 'LeftPinch' | 'RightPinch';
|
|
2
|
+
export type ButtonEventType = 'buttonDown' | 'press' | 'buttonUp' | 'tap';
|
|
3
|
+
export interface ButtonEvent {
|
|
4
|
+
type: ButtonEventType;
|
|
5
|
+
name: ButtonName;
|
|
6
|
+
source: XRInputSource;
|
|
7
|
+
time: number;
|
|
8
|
+
duration: number;
|
|
9
|
+
}
|
|
10
|
+
/** 区分 tap 与 press 的阈值(毫秒):时长 < 300 为 tap,>= 300(含恰好 300)为 press */
|
|
11
|
+
export declare const TAP_PRESS_THRESHOLD_MS = 300;
|
|
12
|
+
export declare class ButtonStateMachine {
|
|
13
|
+
/** 以输入源对象为外层键;使用 Map 以便 removeSource / reset 遍历 */
|
|
14
|
+
private readonly states;
|
|
15
|
+
/**
|
|
16
|
+
* 采样一个按键,返回按派发顺序排列的事件(可能为空)。
|
|
17
|
+
* 严格遵循设计 4.5 的状态转移表。
|
|
18
|
+
*/
|
|
19
|
+
sample(source: XRInputSource, name: ButtonName, pressed: boolean, time: number): ButtonEvent[];
|
|
20
|
+
/**
|
|
21
|
+
* 输入源被移除:该输入源每个按下中的键只派发 buttonUp(不派发 tap / press),
|
|
22
|
+
* 并清除该输入源的全部状态。
|
|
23
|
+
*/
|
|
24
|
+
removeSource(source: XRInputSource, time: number): ButtonEvent[];
|
|
25
|
+
/**
|
|
26
|
+
* 会话结束:全部按下中的键只派发 buttonUp(不派发 tap / press),并清空全部状态。
|
|
27
|
+
*/
|
|
28
|
+
reset(time: number): ButtonEvent[];
|
|
29
|
+
/** 删除单个键的状态;输入源下无按下键时一并移除外层条目 */
|
|
30
|
+
private deleteState;
|
|
31
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export type DeviceType = 'Pico' | 'Oculus' | 'VP' | 'Default';
|
|
2
|
+
/** 对外事件(`machineType`)中出现的设备类型,不含 `Default`。 */
|
|
3
|
+
export type PublicMachineType = 'Pico' | 'Oculus' | 'VP';
|
|
4
|
+
/** 手柄按键 / 轴映射与模型选择(需求 11.11)。 */
|
|
5
|
+
export interface DeviceProfile {
|
|
6
|
+
/** `gamepad.buttons` 下标,`null` 表示不映射(VP) */
|
|
7
|
+
buttons: {
|
|
8
|
+
trigger: number | null;
|
|
9
|
+
grip: number | null;
|
|
10
|
+
primary: number | null;
|
|
11
|
+
secondary: number | null;
|
|
12
|
+
pinch: number | null;
|
|
13
|
+
};
|
|
14
|
+
/** `gamepad.axes` 下标,`null` 表示不映射 */
|
|
15
|
+
axes: {
|
|
16
|
+
x: number | null;
|
|
17
|
+
y: number | null;
|
|
18
|
+
};
|
|
19
|
+
/** `'auto'`:由 `XRControllerModelFactory` 按 profiles 加载;`'none'`:不加载模型 */
|
|
20
|
+
model: 'auto' | 'none';
|
|
21
|
+
}
|
|
22
|
+
/** 调用方对 {@link DeviceProfile} 的按字段覆盖(需求 11.4)。 */
|
|
23
|
+
export type DeviceProfileOverride = {
|
|
24
|
+
buttons?: Partial<DeviceProfile['buttons']>;
|
|
25
|
+
axes?: Partial<DeviceProfile['axes']>;
|
|
26
|
+
model?: DeviceProfile['model'];
|
|
27
|
+
};
|
|
28
|
+
/** 非法覆盖字段的告警回调,参数为字段名,例如 `'buttons.trigger'`、`'axes.x'`、`'model'`。 */
|
|
29
|
+
export type DeviceProfileWarn = (field: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* 四种设备类型的默认 Device_Profile(深冻结,只读)。
|
|
32
|
+
*
|
|
33
|
+
* 需要可修改的副本时使用 {@link resolveProfile}。
|
|
34
|
+
*/
|
|
35
|
+
export declare const DEFAULT_PROFILES: Readonly<Record<DeviceType, Readonly<DeviceProfile>>>;
|
|
36
|
+
/**
|
|
37
|
+
* 通过 UA 判定设备类型(需求 11.3)。
|
|
38
|
+
*
|
|
39
|
+
* 判定顺序,命中第一个即返回:
|
|
40
|
+
* 1. UA 含 `PICO` 或 `Pico`(区分大小写)→ `Pico`(Pico 4 的 UA 同时含 `OculusBrowser`,必须先判 Pico)
|
|
41
|
+
* 2. UA 含 `Macintosh` 且 `maxTouchPoints === 5` → `VP`
|
|
42
|
+
* 3. UA 含 `Oculus` → `Oculus`
|
|
43
|
+
* 4. 其它 → `Default`
|
|
44
|
+
*
|
|
45
|
+
* 参数缺省时读取 `navigator.userAgent` / `navigator.maxTouchPoints`;读取抛错一律返回 `Default`,永不抛错。
|
|
46
|
+
*
|
|
47
|
+
* @param ua - User-Agent,缺省取 `navigator.userAgent`
|
|
48
|
+
* @param maxTouchPoints - 最大触点数,缺省取 `navigator.maxTouchPoints`
|
|
49
|
+
*/
|
|
50
|
+
export declare function detectDeviceType(ua?: string, maxTouchPoints?: number): DeviceType;
|
|
51
|
+
/**
|
|
52
|
+
* 生成实际生效的 Device_Profile(需求 11.4)。
|
|
53
|
+
*
|
|
54
|
+
* - 先深拷贝 `type` 对应的默认值(未知类型回落 `Default`),不修改 {@link DEFAULT_PROFILES}。
|
|
55
|
+
* - 覆盖字段为合法值(`null` 或 ≥ 0 的整数)才覆盖;非法下标回落默认值并调用 `warn(字段名)`。
|
|
56
|
+
* - `model` 只接受 `'auto'` / `'none'`,非法回落默认值并 `warn('model')`。
|
|
57
|
+
* - 未提供(`undefined`)的字段保留默认值,不告警。
|
|
58
|
+
*
|
|
59
|
+
* @param type - 设备类型
|
|
60
|
+
* @param override - 调用方覆盖
|
|
61
|
+
* @param warn - 非法字段告警回调,参数为字段名(如 `'buttons.trigger'`)
|
|
62
|
+
* @returns 新对象,可自由修改
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveProfile(type: DeviceType, override?: DeviceProfileOverride, warn?: DeviceProfileWarn): DeviceProfile;
|
|
65
|
+
/**
|
|
66
|
+
* 把内部设备类型映射为事件中 `machineType` 的公开取值(需求 13.1)。
|
|
67
|
+
*
|
|
68
|
+
* `Default` 映射为 `'Pico'`,与迁移前“其余归为 Pico”的行为一致;其余原样返回。
|
|
69
|
+
*/
|
|
70
|
+
export declare function toPublicMachineType(device: DeviceType): PublicMachineType;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as THREE from "three/webgpu";
|
|
2
|
+
/**
|
|
3
|
+
* 单个输入源的追踪条目。
|
|
4
|
+
*/
|
|
5
|
+
export interface TrackedInput {
|
|
6
|
+
/** 对应的 XR 输入源(条目的键,与 `session.inputSources` 下标无关) */
|
|
7
|
+
source: XRInputSource;
|
|
8
|
+
/** target ray 节点,位置/朝向直接写世界值(已加 offset) */
|
|
9
|
+
targetRay: THREE.Object3D;
|
|
10
|
+
/** grip 节点,位置/朝向直接写世界值(已加 offset) */
|
|
11
|
+
grip: THREE.Object3D;
|
|
12
|
+
/** 最近一次 target ray 成功更新(pose 非空)时的帧号 */
|
|
13
|
+
rayFrame: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class InputSourceTracker {
|
|
16
|
+
/** 所有手柄节点的父节点;调用方负责把它加入 scene,`clear()` 不会移除它自身 */
|
|
17
|
+
readonly root: THREE.Group<THREE.Object3DEventMap>;
|
|
18
|
+
private readonly _entries;
|
|
19
|
+
/** `fill` 用的临时向量,避免每次调用分配 */
|
|
20
|
+
private readonly _dir;
|
|
21
|
+
/**
|
|
22
|
+
* 为 `inputsourceschange` 中 `added` 的输入源新增追踪条目。
|
|
23
|
+
* 已存在的输入源被忽略(不重建节点)。新节点初始不可见,待首个有效 pose 到来后显示。
|
|
24
|
+
*/
|
|
25
|
+
add(sources: readonly XRInputSource[]): void;
|
|
26
|
+
/**
|
|
27
|
+
* 删除 `inputsourceschange` 中 `removed` 的输入源条目,并把节点从 `root` 移除。
|
|
28
|
+
*
|
|
29
|
+
* @returns 实际被删除的条目(未追踪的输入源不会出现在结果中)
|
|
30
|
+
*/
|
|
31
|
+
remove(sources: readonly XRInputSource[]): TrackedInput[];
|
|
32
|
+
update(frame: XRFrame, ref: XRReferenceSpace, offset: THREE.Vector3, frameNo: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* 隐藏全部节点,保持上一帧的位置与朝向不变(需求 6.10:Head_Pose 为 `null` 时调用)。
|
|
35
|
+
* 不触碰 `rayFrame`,由 `fill` 对 `visible` 的检查保证不会再填充射线。
|
|
36
|
+
*/
|
|
37
|
+
hideAll(): void;
|
|
38
|
+
/**
|
|
39
|
+
* 用指定输入源本帧的 target ray 填充复用的 Raycaster(需求 6.8)。
|
|
40
|
+
*
|
|
41
|
+
* 仅当该输入源有条目、`rayFrame === frameNo` 且 target ray 节点可见时才写入:
|
|
42
|
+
* origin 为节点世界位置,direction 为局部 -Z 经世界旋转后的单位向量。
|
|
43
|
+
* 否则不修改 `raycaster`。
|
|
44
|
+
*
|
|
45
|
+
* @returns 本帧是否已填充
|
|
46
|
+
*/
|
|
47
|
+
fill(source: XRInputSource, raycaster: THREE.Raycaster, frameNo: number): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 清空全部追踪条目,并把所有节点从 `root` 移除(需求 6.11)。
|
|
50
|
+
* `root` 自身不移除,由调用方管理。
|
|
51
|
+
*/
|
|
52
|
+
clear(): void;
|
|
53
|
+
/** 当前全部追踪条目(键为 `XRInputSource` 对象) */
|
|
54
|
+
entries(): ReadonlyMap<XRInputSource, TrackedInput>;
|
|
55
|
+
/**
|
|
56
|
+
* 把参考空间位姿写入节点:位置加 offset、朝向直接取 pose,并同步世界矩阵。
|
|
57
|
+
*/
|
|
58
|
+
private _applyPose;
|
|
59
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** 单个类型的失败原因:被拒绝 / 超时。 */
|
|
2
|
+
export type ReferenceSpaceFailureReason = 'rejected' | 'timeout';
|
|
3
|
+
/** 一次失败的尝试记录。 */
|
|
4
|
+
export interface ReferenceSpaceFailure {
|
|
5
|
+
type: XRReferenceSpaceType;
|
|
6
|
+
reason: ReferenceSpaceFailureReason;
|
|
7
|
+
}
|
|
8
|
+
/** 解析结果。 */
|
|
9
|
+
export interface ResolvedReferenceSpace {
|
|
10
|
+
/** 实际采用的参考空间对象 */
|
|
11
|
+
space: XRReferenceSpace;
|
|
12
|
+
/** 实际采用的类型 */
|
|
13
|
+
type: XRReferenceSpaceType;
|
|
14
|
+
/** 采用之前失败的类型(按尝试顺序) */
|
|
15
|
+
failures: ReferenceSpaceFailure[];
|
|
16
|
+
}
|
|
17
|
+
/** 解析选项。 */
|
|
18
|
+
export interface ResolveReferenceSpaceOptions {
|
|
19
|
+
/** 单次请求的超时毫秒数,默认 5000 */
|
|
20
|
+
timeoutMs?: number;
|
|
21
|
+
/** 会话是否已提前结束;每次 await 之后检查,为真则抛出 aborted 错误 */
|
|
22
|
+
isAborted?: () => boolean;
|
|
23
|
+
/** 注入的 setTimeout,便于假计时器;默认使用全局 setTimeout */
|
|
24
|
+
schedule?: (callback: () => void, ms: number) => unknown;
|
|
25
|
+
/** 注入的 clearTimeout,与 schedule 配对;默认使用全局 clearTimeout */
|
|
26
|
+
clear?: (handle: any) => void;
|
|
27
|
+
}
|
|
28
|
+
/** 全部类型失败时抛出的错误:附带按尝试顺序排列的 `attempts`。 */
|
|
29
|
+
export interface ReferenceSpaceExhaustedError extends Error {
|
|
30
|
+
attempts: ReferenceSpaceFailure[];
|
|
31
|
+
}
|
|
32
|
+
/** 会话提前结束时抛出的错误:带 `aborted: true` 标记。 */
|
|
33
|
+
export interface ReferenceSpaceAbortedError extends Error {
|
|
34
|
+
aborted: true;
|
|
35
|
+
}
|
|
36
|
+
/** 单次请求默认超时(毫秒)。 */
|
|
37
|
+
export declare const DEFAULT_REFERENCE_SPACE_TIMEOUT_MS = 5000;
|
|
38
|
+
/** 判断一个错误是否为「会话在参考空间解析前已结束」。 */
|
|
39
|
+
export declare function isReferenceSpaceAbortedError(error: unknown): error is ReferenceSpaceAbortedError;
|
|
40
|
+
/**
|
|
41
|
+
* 构造降级链:`[preferred, 'local', 'viewer']` 去重并保持顺序,且以 'viewer' 收尾。
|
|
42
|
+
*
|
|
43
|
+
* 去重后在第一个 'viewer' 处截断:期望类型为 'viewer' 时链仅含 'viewer',
|
|
44
|
+
* 不会在 viewer 失败后再多请求一次 'local'(需求 10.1)。
|
|
45
|
+
*
|
|
46
|
+
* @param preferred - 期望的参考空间类型
|
|
47
|
+
* @returns 降级链(preferred 为 'local' 时 ['local','viewer'];为 'viewer' 时 ['viewer'];
|
|
48
|
+
* 其它类型 x 时 [x,'local','viewer'])
|
|
49
|
+
*/
|
|
50
|
+
export declare function buildChain(preferred: XRReferenceSpaceType): XRReferenceSpaceType[];
|
|
51
|
+
/**
|
|
52
|
+
* 解析参考空间:按降级链串行请求,采用第一个成功的类型。
|
|
53
|
+
*
|
|
54
|
+
* @param session - 当前 XRSession
|
|
55
|
+
* @param preferred - 期望的参考空间类型
|
|
56
|
+
* @param opts - 超时、中止检查与计时器注入
|
|
57
|
+
* @returns 采用的空间、类型与此前的失败记录
|
|
58
|
+
* @throws 会话提前结束时抛出 `aborted: true` 的错误;全部失败时抛出带 `attempts` 的错误
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveReferenceSpace(session: XRSession, preferred: XRReferenceSpaceType, opts?: ResolveReferenceSpaceOptions): Promise<ResolvedReferenceSpace>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as THREE from "three/webgpu";
|
|
2
|
+
/** 每只眼的渲染信息:viewport 为 XRViewport 语义(左下原点的 x, y, width, height) */
|
|
3
|
+
export interface BridgeEye {
|
|
4
|
+
camera: THREE.PerspectiveCamera;
|
|
5
|
+
viewport: THREE.Vector4;
|
|
6
|
+
}
|
|
7
|
+
export interface RenderTargetBridgeOptions {
|
|
8
|
+
/** 眼图集 MSAA 采样数,默认 0 */
|
|
9
|
+
atlasSamples?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class RenderTargetBridge {
|
|
12
|
+
private readonly renderer;
|
|
13
|
+
private readonly atlasSamples;
|
|
14
|
+
private resources;
|
|
15
|
+
private warnedRevision;
|
|
16
|
+
private _outputBufferType;
|
|
17
|
+
private readonly clearColorScratch;
|
|
18
|
+
private readonly viewportScratch;
|
|
19
|
+
constructor(renderer: THREE.WebGPURenderer, opts?: RenderTargetBridgeOptions);
|
|
20
|
+
/** `init` 时读取的 `renderer.getOutputBufferType()`(未初始化为 `null`),只供诊断(风险 R5)。 */
|
|
21
|
+
get outputBufferType(): number | null;
|
|
22
|
+
/**
|
|
23
|
+
* 检查 three 内部 API 是否存在、四个标志位值是否符合预期(需求 4.6)。
|
|
24
|
+
* 缺失或不符时抛出含全部问题名称与 `THREE.REVISION` 的错误。
|
|
25
|
+
*/
|
|
26
|
+
verify(): void;
|
|
27
|
+
/** 检查 Eye_Camera 与 renderer 的 `coordinateSystem` 一致(design「进入时校验 camera.coordinateSystem」)。 */
|
|
28
|
+
verifyCameras(cameras: ReadonlyArray<THREE.Camera>): void;
|
|
29
|
+
/** 为 layer 创建眼图集、XR 输出目标与解析 quad;重复调用会先释放旧资源。 */
|
|
30
|
+
init(layer: XRWebGLLayer): void;
|
|
31
|
+
/**
|
|
32
|
+
* 一帧:清图集 → 逐眼渲染 → 解析。任何异常在 `finally` 恢复 renderer 状态后原样抛出(需求 4.7)。
|
|
33
|
+
* `eyes[i].viewport` 是 XRViewport 语义(左下原点)。
|
|
34
|
+
*/
|
|
35
|
+
renderFrame(layer: XRWebGLLayer, scene: THREE.Scene, eyes: ReadonlyArray<BridgeEye>): void;
|
|
36
|
+
/** 幂等释放(需求 4.4):目标各 dispose 至多一次,输出目标与 XR framebuffer 复位为 `null`。 */
|
|
37
|
+
dispose(): void;
|
|
38
|
+
/** 尺寸或 baseLayer 变化(或尚未创建)时重建,返回当前可用的资源(需求 4.8)。 */
|
|
39
|
+
private syncResources;
|
|
40
|
+
private build;
|
|
41
|
+
/** 释放当前资源(不动 renderer 状态;状态由 renderFrame 的 finally 与 dispose 负责)。 */
|
|
42
|
+
private releaseResources;
|
|
43
|
+
/** 检测 `EXT_color_buffer_float` / `EXT_color_buffer_half_float`;拿不到 GL 上下文时按不支持处理。 */
|
|
44
|
+
private supportsHalfFloat;
|
|
45
|
+
}
|