@realsee/five-webgpu 1.0.0-alpha.14 → 1.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_rolldown/runtime.js +2 -2
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/index.AdaptiveLuminancePass.html +1 -1
- package/docs/classes/index.EyeDomeLightingPass.html +1 -1
- package/docs/classes/index.Five.html +1 -1
- package/docs/classes/index.FivePass.html +1 -1
- 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.Model.html +1 -1
- package/docs/classes/index.ModelScene.html +1 -1
- package/docs/classes/index.PBMCustomNode.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingObject.html +1 -1
- package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +1 -1
- package/docs/classes/index.PBMGroup.html +1 -1
- package/docs/classes/index.PBMMesh.html +1 -1
- package/docs/classes/index.PBMMeshBasicMaterial.html +1 -1
- package/docs/classes/index.PBMMeshBasicNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhongMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhongNodeMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhysicalMaterial.html +1 -1
- package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +1 -1
- package/docs/classes/index.PBMPanoFilter.html +1 -1
- package/docs/classes/index.PBMPointCloud.html +1 -1
- package/docs/classes/index.PBMPointCloudMaterial.html +1 -1
- package/docs/classes/index.PBMSkinnedMesh.html +1 -1
- package/docs/classes/index.PBMUpdateable.html +1 -1
- package/docs/classes/index.PanoCircleMesh.html +9 -5
- package/docs/classes/index.PanoCircleMeshCustom.html +9 -5
- package/docs/classes/index.PanoCircleMeshSolid.html +9 -5
- package/docs/classes/index.Parameter.html +1 -1
- package/docs/classes/index.Tile3D.html +1 -1
- package/docs/classes/index.TileNode.html +1 -1
- package/docs/classes/index.TrajectoryNode.html +1 -1
- package/docs/classes/index.WorkResolvedObserver.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/index.AddableObject.html +1 -1
- package/docs/interfaces/index.EventCallback.html +1 -1
- package/docs/interfaces/index.IPBMMaterial.html +1 -1
- package/docs/interfaces/index.ImageOptions.html +1 -1
- package/docs/interfaces/index.IntersectMesh.html +1 -1
- package/docs/interfaces/index.IntersectMeshInterface.html +1 -1
- package/docs/interfaces/index.Intersection.html +1 -1
- package/docs/interfaces/index.LooseWorkObserver.html +2 -2
- package/docs/interfaces/index.LooseWorkPanorama.html +2 -2
- package/docs/interfaces/index.LooseWorkWithExtrinsics.html +1 -1
- package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.MovePanoOptions.html +1 -1
- package/docs/interfaces/index.PanoCircleMeshInterface.html +8 -4
- package/docs/interfaces/index.PanoCircleMeshOptions.html +2 -2
- package/docs/interfaces/index.PanoCircleMeshSolidOptions.html +2 -2
- package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ParameterMaterialValue.html +1 -1
- package/docs/interfaces/index.ParameterTilesetValue.html +1 -1
- package/docs/interfaces/index.ParameterValue.html +1 -1
- package/docs/interfaces/index.Pose.html +1 -1
- package/docs/interfaces/index.ResolvedParameterValue.html +1 -1
- package/docs/interfaces/index.State.html +1 -1
- package/docs/interfaces/index.TextureOptions.html +1 -1
- package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/index.ViewLayer.html +1 -1
- package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +1 -1
- package/docs/interfaces/index.WorkCubeImage.html +1 -1
- package/docs/interfaces/index.WorkImage.html +1 -1
- package/docs/interfaces/index.WorkObserver.html +2 -2
- package/docs/interfaces/index.WorkObserverJson.html +2 -2
- package/docs/interfaces/index.WorkPanoramaJson.html +2 -2
- package/docs/interfaces/index.WorkTile.html +1 -1
- package/docs/interfaces/index.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/types/index.ParseOptions.html +1 -1
- package/five/chunks/at3d.js +2 -2
- package/five/chunks/at3d.mjs +2 -2
- package/five/chunks/dome.js +2 -2
- package/five/chunks/dome.mjs +2 -2
- package/five/chunks/domez.js +2 -2
- package/five/chunks/domez.mjs +2 -2
- package/five/chunks/fbx.js +2 -2
- package/five/chunks/fbx.mjs +2 -2
- package/five/chunks/fflate.js +2 -2
- package/five/chunks/fflate.mjs +2 -2
- package/five/chunks/glTF-helpers.js +2 -2
- package/five/chunks/glTF-helpers.mjs +2 -2
- package/five/chunks/gltf.js +2 -2
- package/five/chunks/gltf.mjs +2 -2
- package/five/chunks/imageBitmap.js +2 -2
- package/five/chunks/imageBitmap.mjs +2 -2
- package/five/chunks/imageSupport.js +2 -2
- package/five/chunks/imageSupport.mjs +2 -2
- package/five/chunks/lzma.js +2 -2
- package/five/chunks/lzma.mjs +2 -2
- package/five/chunks/memoryUsage.js +2 -2
- package/five/chunks/memoryUsage.mjs +2 -2
- package/five/chunks/minimal.js +2 -2
- package/five/chunks/minimal.mjs +2 -2
- package/five/chunks/pbm.js +2 -2
- package/five/chunks/pbm.mjs +2 -2
- package/five/chunks/pbmGaussianSplattingObject.js +2 -2
- package/five/chunks/pbmGaussianSplattingObject.mjs +2 -2
- package/five/chunks/pbmMeshMaterial.js +2 -2
- package/five/chunks/pbmMeshMaterial.mjs +2 -2
- package/five/chunks/pick.js +2 -2
- package/five/chunks/pick.mjs +2 -2
- package/five/chunks/ply.js +2 -2
- package/five/chunks/ply.mjs +2 -2
- package/five/chunks/spz.js +2 -2
- package/five/chunks/spz.mjs +2 -2
- package/five/controllers/panorama.d.ts +6 -0
- package/five/index.js +6 -6
- package/five/index.mjs +6 -6
- package/five/meshes/panoCircleMesh.d.ts +1 -0
- package/five/meshes/panoCircleMeshCustom.d.ts +1 -0
- package/five/meshes/panoCircleMeshSolid.d.ts +1 -0
- package/five/meshes/panoSphereMesh.d.ts +1 -0
- package/five/renderer/postprocessing/passes/pass.js +2 -2
- package/five/renderer/postprocessing/passes/pass.mjs +2 -2
- package/five/renderer/tools/full-screen-quad.js +2 -2
- package/five/renderer/tools/full-screen-quad.mjs +2 -2
- package/five/texture/initTexture.d.ts +8 -0
- package/five/types/panoCircleMeshInterface.d.ts +6 -0
- package/five/utils/calculateThreeMouse.js +2 -2
- package/five/utils/calculateThreeMouse.mjs +2 -2
- package/five/utils/distance.js +2 -2
- package/five/utils/distance.mjs +2 -2
- package/five/utils/isNil.js +2 -2
- package/five/utils/isNil.mjs +2 -2
- package/five/utils/uuid.js +2 -2
- package/five/utils/uuid.mjs +2 -2
- package/five/work/looseWorkType.d.ts +2 -2
- package/five/work/work.d.ts +1 -1
- package/five/work/workJsonType.d.ts +2 -2
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +1 -1
- package/plugins/BackgroundPlugin/Controller.js +2 -2
- package/plugins/BackgroundPlugin/Controller.mjs +2 -2
- package/plugins/BackgroundPlugin/index.js +2 -2
- package/plugins/BackgroundPlugin/index.mjs +2 -2
- package/plugins/BasePlugin/index.js +2 -2
- package/plugins/BasePlugin/index.mjs +2 -2
- package/plugins/CSS2DPlugin/Controller.js +2 -2
- package/plugins/CSS2DPlugin/Controller.mjs +2 -2
- package/plugins/CSS2DPlugin/index.js +2 -2
- package/plugins/CSS2DPlugin/index.mjs +2 -2
- package/plugins/CSS2DPlugin/style.css_raw.js +2 -2
- package/plugins/CSS2DPlugin/style.css_raw.mjs +2 -2
- package/plugins/CSS3DPlugin/Controller.js +2 -2
- package/plugins/CSS3DPlugin/Controller.mjs +2 -2
- package/plugins/CSS3DPlugin/index.js +2 -2
- package/plugins/CSS3DPlugin/index.mjs +2 -2
- package/plugins/CSS3DPlugin/style.css_raw.js +2 -2
- package/plugins/CSS3DPlugin/style.css_raw.mjs +2 -2
- package/plugins/FloorplanPlugin/Controller.js +2 -2
- package/plugins/FloorplanPlugin/Controller.mjs +2 -2
- package/plugins/FloorplanPlugin/index.js +2 -2
- package/plugins/FloorplanPlugin/index.mjs +2 -2
- package/plugins/FloorplanPlugin/render/assets.js +2 -2
- package/plugins/FloorplanPlugin/render/assets.mjs +2 -2
- package/plugins/FloorplanPlugin/render/index.js +2 -2
- package/plugins/FloorplanPlugin/render/index.mjs +2 -2
- package/plugins/FloorplanPlugin/render/isPointInPolygon.js +2 -2
- package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +2 -2
- package/plugins/FloorplanPlugin/render/renderFloor.js +2 -2
- package/plugins/FloorplanPlugin/render/renderFloor.mjs +2 -2
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +2 -2
- package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +2 -2
- package/plugins/FloorplanPlugin/render/style.css_raw.js +2 -2
- package/plugins/FloorplanPlugin/render/style.css_raw.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/changeMode.js +2 -2
- package/plugins/FloorplanPlugin/utils/changeMode.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +2 -2
- package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/correctFiveState.js +2 -2
- package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/equal.js +2 -2
- package/plugins/FloorplanPlugin/utils/equal.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/filter.js +2 -2
- package/plugins/FloorplanPlugin/utils/filter.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +2 -2
- package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/formatData.js +2 -2
- package/plugins/FloorplanPlugin/utils/formatData.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +2 -2
- package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/formatPosition.js +2 -2
- package/plugins/FloorplanPlugin/utils/formatPosition.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +2 -2
- package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/getPxmm.js +2 -2
- package/plugins/FloorplanPlugin/utils/getPxmm.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/isTruelyObject.js +2 -2
- package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/nearlyEqual.js +2 -2
- package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/polylabel.js +2 -2
- package/plugins/FloorplanPlugin/utils/polylabel.mjs +2 -2
- package/plugins/FloorplanPlugin/utils/to.js +2 -2
- package/plugins/FloorplanPlugin/utils/to.mjs +2 -2
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +2 -2
- package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +2 -2
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +2 -2
- package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Controller.js +2 -2
- package/plugins/Object3DHelperPlugin/Controller.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +2 -2
- package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +2 -2
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +2 -2
- package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +2 -2
- package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +2 -2
- package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +2 -2
- package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +2 -2
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +2 -2
- package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +2 -2
- package/plugins/Object3DHelperPlugin/constant.js +2 -2
- package/plugins/Object3DHelperPlugin/constant.mjs +2 -2
- package/plugins/Object3DHelperPlugin/index.js +2 -2
- package/plugins/Object3DHelperPlugin/index.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/direction.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/direction.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/solidGuide.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +2 -2
- package/plugins/Object3DHelperPlugin/utils/tipsDom.js +2 -2
- package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +2 -2
- package/plugins/PanoAnimePlugin/Controller.js +2 -2
- package/plugins/PanoAnimePlugin/Controller.mjs +2 -2
- package/plugins/PanoAnimePlugin/index.js +2 -2
- package/plugins/PanoAnimePlugin/index.mjs +2 -2
- package/plugins/WordPassPlugin/Controller.js +2 -2
- package/plugins/WordPassPlugin/Controller.mjs +2 -2
- package/plugins/WordPassPlugin/hersheyFont.js +2 -2
- package/plugins/WordPassPlugin/hersheyFont.mjs +2 -2
- package/plugins/WordPassPlugin/index.js +2 -2
- package/plugins/WordPassPlugin/index.mjs +2 -2
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +2 -2
- package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +2 -2
- package/plugins/WordPassPlugin/word-pass.js +3 -3
- package/plugins/WordPassPlugin/word-pass.mjs +3 -3
- package/plugins/index.js +2 -2
- package/plugins/index.mjs +2 -2
- package/plugins/thirdParty/CSS2DRenderer.js +2 -2
- package/plugins/thirdParty/CSS2DRenderer.mjs +2 -2
- package/plugins/thirdParty/CSS3DRenderer.js +2 -2
- package/plugins/thirdParty/CSS3DRenderer.mjs +2 -2
- package/plugins/thirdParty/doctorstrange-model.js +2 -2
- package/plugins/thirdParty/doctorstrange-model.mjs +2 -2
- package/plugins/thirdParty/domevents.js +2 -2
- package/plugins/thirdParty/domevents.mjs +2 -2
- package/plugins/utils/absoluteUrl.js +2 -2
- package/plugins/utils/absoluteUrl.mjs +2 -2
- package/plugins/utils/calculatePath.js +2 -2
- package/plugins/utils/calculatePath.mjs +2 -2
- package/plugins/utils/clamp.js +2 -2
- package/plugins/utils/clamp.mjs +2 -2
- package/plugins/utils/uuid.js +2 -2
- package/plugins/utils/uuid.mjs +2 -2
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +4 -4
- package/umd/five-react.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five.js +47 -47
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
|
@@ -24,6 +24,7 @@ declare class PanoCircleMesh extends THREE.Object3D implements PanoCircleMeshInt
|
|
|
24
24
|
private panoU;
|
|
25
25
|
constructor(options?: PanoCircleMeshOptions);
|
|
26
26
|
setProgress(progress: number): void;
|
|
27
|
+
setHDRBoost(boost: number): void;
|
|
27
28
|
setOpacity(opacity: number): void;
|
|
28
29
|
setCurrent(current: boolean): void;
|
|
29
30
|
setLoading(loading: boolean): void;
|
|
@@ -29,6 +29,7 @@ declare class PanoCircleMeshCustom extends THREE.Object3D implements PanoCircleM
|
|
|
29
29
|
private panoU;
|
|
30
30
|
constructor(options?: PanoCircleMeshCustomOptions);
|
|
31
31
|
setProgress(progress: number): void;
|
|
32
|
+
setHDRBoost(boost: number): void;
|
|
32
33
|
setOpacity(opacity: number): void;
|
|
33
34
|
setCurrent(current: boolean): void;
|
|
34
35
|
setLoading(loading: boolean): void;
|
|
@@ -23,6 +23,7 @@ declare class PanoCircleMeshSolid extends THREE.Object3D implements PanoCircleMe
|
|
|
23
23
|
private panoU;
|
|
24
24
|
constructor(options?: PanoCircleMeshSolidOptions);
|
|
25
25
|
setProgress(progress: number): void;
|
|
26
|
+
setHDRBoost(boost: number): void;
|
|
26
27
|
setOpacity(opacity: number): void;
|
|
27
28
|
setCurrent(current: boolean): void;
|
|
28
29
|
setLoading(loading: boolean): void;
|
|
@@ -18,6 +18,7 @@ declare class PanoSphereMesh extends THREE.Object3D implements PanoCircleMeshInt
|
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
constructor();
|
|
20
20
|
setProgress(progress: number): void;
|
|
21
|
+
setHDRBoost(boost: number): void;
|
|
21
22
|
setOpacity(opacity: number): void;
|
|
22
23
|
setCurrent(current: boolean): void;
|
|
23
24
|
setLoading(loading: boolean): void;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import * as THREE from "three/webgpu";
|
|
2
|
+
/**
|
|
3
|
+
* 提前把纹理上传到 GPU。
|
|
4
|
+
*
|
|
5
|
+
* three 的 `renderer.initTexture()` 要求 backend 已初始化,否则会抛错。
|
|
6
|
+
* 模型/瓦片加载流程可能早于 renderer 就绪,因此这里在未就绪时先等待:
|
|
7
|
+
* - InternalWebGPURenderer:等待 `ready`(含 init 之后安装的 WebGL 补丁);
|
|
8
|
+
* - 其他 WebGPURenderer:回退到 `init()`(重复调用返回同一个缓存 Promise)。
|
|
9
|
+
*/
|
|
2
10
|
export declare function initTexture<T extends THREE.Texture>(texture: T, renderer: THREE.WebGPURenderer): Promise<T>;
|
|
3
11
|
export declare function initTextures<T extends THREE.Texture[]>(textures: T, renderer: THREE.WebGPURenderer): Promise<T>;
|
|
@@ -26,6 +26,12 @@ interface PanoCircleMeshInterface extends THREE.Object3D {
|
|
|
26
26
|
setProgress(progress: number): void;
|
|
27
27
|
opacity: number;
|
|
28
28
|
setOpacity(opacity: number): void;
|
|
29
|
+
/**
|
|
30
|
+
* 设置 HDR 提亮倍数(可选实现)
|
|
31
|
+
* @description 由控制器每帧同步:开启 HDR 时为 `parameter.maxDisplayBoost`,否则为 1。
|
|
32
|
+
* 实现方应将该倍数乘到输出 rgb 上(不影响 alpha)。
|
|
33
|
+
*/
|
|
34
|
+
setHDRBoost?(boost: number): void;
|
|
29
35
|
updateTime?(time: number, deltaTime: number): void;
|
|
30
36
|
/** 点击交互 */
|
|
31
37
|
tap?(): Promise<void>;
|
package/five/utils/distance.js
CHANGED
package/five/utils/distance.mjs
CHANGED
package/five/utils/isNil.js
CHANGED
package/five/utils/isNil.mjs
CHANGED
package/five/utils/uuid.js
CHANGED
package/five/utils/uuid.mjs
CHANGED
|
@@ -18,7 +18,7 @@ export interface LooseWorkPanorama {
|
|
|
18
18
|
video?: LooseWorkVideo;
|
|
19
19
|
tiles?: number[];
|
|
20
20
|
size_list?: number[];
|
|
21
|
-
derived_id?: number;
|
|
21
|
+
derived_id?: number | string;
|
|
22
22
|
derived_id_str?: string;
|
|
23
23
|
hdr?: boolean;
|
|
24
24
|
gainmap_cfg?: string;
|
|
@@ -86,7 +86,7 @@ export interface LooseWorkObserver {
|
|
|
86
86
|
floor?: number;
|
|
87
87
|
floor_index?: number;
|
|
88
88
|
floorIndex?: number;
|
|
89
|
-
derived_id?: number;
|
|
89
|
+
derived_id?: number | string;
|
|
90
90
|
derived_id_str?: string;
|
|
91
91
|
}
|
|
92
92
|
export interface LooseWork {
|
package/five/work/work.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface WorkModelLayerJson {
|
|
|
33
33
|
export interface WorkObserverJson {
|
|
34
34
|
index: number;
|
|
35
35
|
floor_index: number;
|
|
36
|
-
derived_id: number;
|
|
36
|
+
derived_id: number | string;
|
|
37
37
|
derived_id_str: string;
|
|
38
38
|
position: number[];
|
|
39
39
|
standing_position: number[];
|
|
@@ -54,7 +54,7 @@ export interface WorkPanoramaJson {
|
|
|
54
54
|
index: number;
|
|
55
55
|
active?: boolean;
|
|
56
56
|
loadable?: boolean;
|
|
57
|
-
derived_id?: number;
|
|
57
|
+
derived_id?: number | string;
|
|
58
58
|
derived_id_str?: string;
|
|
59
59
|
up: string;
|
|
60
60
|
down: string;
|
package/gltf-loader/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/11/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(var keys=__getOwnPropNames(from),i=0,n=keys.length,key;i<n;i++)key=keys[i],!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:(k=>from[k]).bind(null,key),enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,`default`,{value:mod,enumerable:!0}):target,mod));let _realsee_five_webgpu=require("@realsee/five-webgpu"),three_webgpu=require("three/webgpu");three_webgpu=__toESM(three_webgpu,1);var GLTFObject=class extends three_webgpu.Group{constructor(rootObject){super(),this.needsRender=!0,rootObject&&rootObject.children.length&&this.add(...rootObject.children),this.mixer=new three_webgpu.AnimationMixer(this)}clone(){let cloned=super.clone(!0);return cloned.mixer=new three_webgpu.AnimationMixer(cloned),cloned.needsRender=!0,cloned}};function createGLTF(result){let scene=new GLTFObject(result.scene);return scene.position.copy(result.scene.position),scene.quaternion.copy(result.scene.quaternion),scene.scale.copy(result.scene.scale),Object.assign(Object.assign({},result),{scene,scenes:[scene]})}var GLTFLoader=class{static get version(){return`1.0.0-alpha.
|
|
338
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(var keys=__getOwnPropNames(from),i=0,n=keys.length,key;i<n;i++)key=keys[i],!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:(k=>from[k]).bind(null,key),enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,`default`,{value:mod,enumerable:!0}):target,mod));let _realsee_five_webgpu=require("@realsee/five-webgpu"),three_webgpu=require("three/webgpu");three_webgpu=__toESM(three_webgpu,1);var GLTFObject=class extends three_webgpu.Group{constructor(rootObject){super(),this.needsRender=!0,rootObject&&rootObject.children.length&&this.add(...rootObject.children),this.mixer=new three_webgpu.AnimationMixer(this)}clone(){let cloned=super.clone(!0);return cloned.mixer=new three_webgpu.AnimationMixer(cloned),cloned.needsRender=!0,cloned}};function createGLTF(result){let scene=new GLTFObject(result.scene);return scene.position.copy(result.scene.position),scene.quaternion.copy(result.scene.quaternion),scene.scale.copy(result.scene.scale),Object.assign(Object.assign({},result),{scene,scenes:[scene]})}var GLTFLoader=class{static get version(){return`1.0.0-alpha.15`}load(url,onLoad,onProgress,onError){(0,_realsee_five_webgpu.loadGltf)(url,{modelUpAxis:`Y`,upAxis:`Y`,onDownloadProgress(percent,loaded,total){onProgress&&onProgress(new ProgressEvent(`progress`,{lengthComputable:typeof total==`number`,loaded:loaded==null?0:loaded,total:total==null?0:total}))}}).then(result=>{onLoad(createGLTF(result))}).catch(error=>{onError?onError(new ErrorEvent(`error`,{error,message:error instanceof Error?error.message:String(error)})):console.error(error)})}};exports.GLTFLoader=GLTFLoader,exports.GLTFObject=GLTFObject;
|
package/gltf-loader/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/11/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import{loadGltf}from"@realsee/five-webgpu";import*as THREE from"three/webgpu";var GLTFObject=class extends THREE.Group{constructor(rootObject){super(),this.needsRender=!0,rootObject&&rootObject.children.length&&this.add(...rootObject.children),this.mixer=new THREE.AnimationMixer(this)}clone(){let cloned=super.clone(!0);return cloned.mixer=new THREE.AnimationMixer(cloned),cloned.needsRender=!0,cloned}};function createGLTF(result){let scene=new GLTFObject(result.scene);return scene.position.copy(result.scene.position),scene.quaternion.copy(result.scene.quaternion),scene.scale.copy(result.scene.scale),Object.assign(Object.assign({},result),{scene,scenes:[scene]})}var GLTFLoader=class{static get version(){return`1.0.0-alpha.
|
|
338
|
+
*/import{loadGltf}from"@realsee/five-webgpu";import*as THREE from"three/webgpu";var GLTFObject=class extends THREE.Group{constructor(rootObject){super(),this.needsRender=!0,rootObject&&rootObject.children.length&&this.add(...rootObject.children),this.mixer=new THREE.AnimationMixer(this)}clone(){let cloned=super.clone(!0);return cloned.mixer=new THREE.AnimationMixer(cloned),cloned.needsRender=!0,cloned}};function createGLTF(result){let scene=new GLTFObject(result.scene);return scene.position.copy(result.scene.position),scene.quaternion.copy(result.scene.quaternion),scene.scale.copy(result.scene.scale),Object.assign(Object.assign({},result),{scene,scenes:[scene]})}var GLTFLoader=class{static get version(){return`1.0.0-alpha.15`}load(url,onLoad,onProgress,onError){loadGltf(url,{modelUpAxis:`Y`,upAxis:`Y`,onDownloadProgress(percent,loaded,total){onProgress&&onProgress(new ProgressEvent(`progress`,{lengthComputable:typeof total==`number`,loaded:loaded==null?0:loaded,total:total==null?0:total}))}}).then(result=>{onLoad(createGLTF(result))}).catch(error=>{onError?onError(new ErrorEvent(`error`,{error,message:error instanceof Error?error.message:String(error)})):console.error(error)})}};export{GLTFLoader,GLTFObject};
|
package/line/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/11/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(var keys=__getOwnPropNames(from),i=0,n=keys.length,key;i<n;i++)key=keys[i],!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:(k=>from[k]).bind(null,key),enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,`default`,{value:mod,enumerable:!0}):target,mod));let three_webgpu=require("three/webgpu");three_webgpu=__toESM(three_webgpu,1);let three_addons_lines_webgpu_Line2_js=require("three/addons/lines/webgpu/Line2.js"),three_addons_lines_webgpu_LineSegments2_js=require("three/addons/lines/webgpu/LineSegments2.js"),three_addons_lines_LineGeometry_js=require("three/addons/lines/LineGeometry.js"),three_addons_lines_LineSegmentsGeometry_js=require("three/addons/lines/LineSegmentsGeometry.js");var DEFAULT_COLOR=14467195,POINT_SIZE=8,DEFAULT_LINEWIDTH=2,DEFAULT_DASHSCALE=20,sharedCircleTexture=null;function applyColor(material,value){value instanceof three_webgpu.Vector3?material.color.setRGB(value.x,value.y,value.z):material.color.set(value)}var FiveLine=class extends three_webgpu.Object3D{static get version(){return`1.0.0-alpha.
|
|
338
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(var keys=__getOwnPropNames(from),i=0,n=keys.length,key;i<n;i++)key=keys[i],!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:(k=>from[k]).bind(null,key),enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,`default`,{value:mod,enumerable:!0}):target,mod));let three_webgpu=require("three/webgpu");three_webgpu=__toESM(three_webgpu,1);let three_addons_lines_webgpu_Line2_js=require("three/addons/lines/webgpu/Line2.js"),three_addons_lines_webgpu_LineSegments2_js=require("three/addons/lines/webgpu/LineSegments2.js"),three_addons_lines_LineGeometry_js=require("three/addons/lines/LineGeometry.js"),three_addons_lines_LineSegmentsGeometry_js=require("three/addons/lines/LineSegmentsGeometry.js");var DEFAULT_COLOR=14467195,POINT_SIZE=8,DEFAULT_LINEWIDTH=2,DEFAULT_DASHSCALE=20,sharedCircleTexture=null;function applyColor(material,value){value instanceof three_webgpu.Vector3?material.color.setRGB(value.x,value.y,value.z):material.color.set(value)}var FiveLine=class extends three_webgpu.Object3D{static get version(){return`1.0.0-alpha.15`}constructor(vector0=new three_webgpu.Vector3,vector1=new three_webgpu.Vector3){super(),this.type=`FiveLine`,this.needsRender=!0;let lineGeometry=new three_addons_lines_LineGeometry_js.LineGeometry,lineMaterial=new three_webgpu.Line2NodeMaterial({color:DEFAULT_COLOR,linewidth:DEFAULT_LINEWIDTH,dashed:!1});lineMaterial.scale=DEFAULT_DASHSCALE,this.line=new three_addons_lines_webgpu_Line2_js.Line2(lineGeometry,lineMaterial);let pointsGeometry=new three_webgpu.BufferGeometry,pointsMaterial=new three_webgpu.PointsMaterial({color:DEFAULT_COLOR,size:POINT_SIZE,map:sharedCircleTexture||(sharedCircleTexture=new three_webgpu.TextureLoader().load(`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==`)),sizeAttenuation:!1,transparent:!0});this.points=new three_webgpu.Points(pointsGeometry,pointsMaterial),this.points.renderOrder=11,this.points.frustumCulled=!1,this.setPoints(vector0,vector1),this.add(this.line,this.points)}setPoints(vector0,vector1){let positions=[].concat(vector0.toArray(),vector1.toArray());this.updatePointsPositions(positions),this.updateLinePositions(positions),this.needsRender=!0}updatePointsPositions(positions){let geometry=this.points.geometry,existing=geometry.getAttribute(`position`);existing&&existing.array.length===positions.length?(existing.array.set(positions),existing.needsUpdate=!0):geometry.setAttribute(`position`,new three_webgpu.BufferAttribute(new Float32Array(positions),3))}updateLinePositions(positions){let geometry=this.line.geometry,instanceStart=geometry.getAttribute(`instanceStart`);if(!instanceStart||instanceStart.data.array.length!==positions.length){geometry.setPositions(positions),this.line.computeLineDistances();return}let buffer=instanceStart.data;buffer.array.set(positions),buffer.needsUpdate=!0,geometry.computeBoundingBox(),geometry.computeBoundingSphere(),this.updateLineDistances()}updateLineDistances(){let geometry=this.line.geometry,instanceDistance=geometry.getAttribute(`instanceDistanceStart`);if(!instanceDistance){this.line.computeLineDistances();return}let instanceStart=geometry.getAttribute(`instanceStart`),instanceEnd=geometry.getAttribute(`instanceEnd`),count=instanceStart.count,buffer=instanceDistance.data,array=buffer.array,start=new three_webgpu.Vector3,end=new three_webgpu.Vector3;for(let i=0,j=0;i<count;i++,j+=2)start.fromBufferAttribute(instanceStart,i),end.fromBufferAttribute(instanceEnd,i),array[j]=j===0?0:array[j-1],array[j+1]=array[j]+start.distanceTo(end);buffer.needsUpdate=!0}getPoints(){let array=this.points.geometry.attributes.position.array;return[new three_webgpu.Vector3(array[0],array[1],array[2]),new three_webgpu.Vector3(array[3],array[4],array[5])]}setMaterial(map){let lineMaterial=this.line.material;for(let name in map){if(!Object.prototype.hasOwnProperty.call(map,name))continue;let value=map[name];if(name===`color`)applyColor(lineMaterial,value);else if(name===`dashed`)lineMaterial.dashed=value;else if(name===`dashScale`)lineMaterial.scale=value;else if(name===`resolution`){let resolution=value;this.setResolution(resolution.x,resolution.y)}else lineMaterial[name]=value}this.needsRender=!0}setResolution(width,height){let resolution=this.line._resolution;resolution&&(resolution.x!==width||resolution.y!==height)&&(resolution.set(width,height),this.needsRender=!0)}};Object.assign(FiveLine.prototype,{isFiveLine:!0}),exports.Line=FiveLine,exports.LineGeometry=three_addons_lines_LineGeometry_js.LineGeometry,exports.LineSegmentsGeometry=three_addons_lines_LineSegmentsGeometry_js.LineSegmentsGeometry,exports.THREE_Line2=three_addons_lines_webgpu_Line2_js.Line2,exports.THREE_LineSegments2=three_addons_lines_webgpu_LineSegments2_js.LineSegments2;
|
package/line/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five-webgpu
|
|
4
|
-
* Generated: 2026/11/
|
|
5
|
-
* Version: 1.0.0-alpha.
|
|
4
|
+
* Generated: 2026/11/4
|
|
5
|
+
* Version: 1.0.0-alpha.15
|
|
6
6
|
* License:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
|
|
@@ -335,4 +335,4 @@
|
|
|
335
335
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
336
336
|
* Agreement and all related documents shall be drafted in English.
|
|
337
337
|
|
|
338
|
-
*/import*as THREE from"three/webgpu";import{Line2}from"three/addons/lines/webgpu/Line2.js";import{LineSegments2}from"three/addons/lines/webgpu/LineSegments2.js";import{LineGeometry}from"three/addons/lines/LineGeometry.js";import{LineSegmentsGeometry}from"three/addons/lines/LineSegmentsGeometry.js";var DEFAULT_COLOR=14467195,POINT_SIZE=8,DEFAULT_LINEWIDTH=2,DEFAULT_DASHSCALE=20,sharedCircleTexture=null;function applyColor(material,value){value instanceof THREE.Vector3?material.color.setRGB(value.x,value.y,value.z):material.color.set(value)}var FiveLine=class extends THREE.Object3D{static get version(){return`1.0.0-alpha.
|
|
338
|
+
*/import*as THREE from"three/webgpu";import{Line2}from"three/addons/lines/webgpu/Line2.js";import{LineSegments2}from"three/addons/lines/webgpu/LineSegments2.js";import{LineGeometry}from"three/addons/lines/LineGeometry.js";import{LineSegmentsGeometry}from"three/addons/lines/LineSegmentsGeometry.js";var DEFAULT_COLOR=14467195,POINT_SIZE=8,DEFAULT_LINEWIDTH=2,DEFAULT_DASHSCALE=20,sharedCircleTexture=null;function applyColor(material,value){value instanceof THREE.Vector3?material.color.setRGB(value.x,value.y,value.z):material.color.set(value)}var FiveLine=class extends THREE.Object3D{static get version(){return`1.0.0-alpha.15`}constructor(vector0=new THREE.Vector3,vector1=new THREE.Vector3){super(),this.type=`FiveLine`,this.needsRender=!0;let lineGeometry=new LineGeometry,lineMaterial=new THREE.Line2NodeMaterial({color:DEFAULT_COLOR,linewidth:DEFAULT_LINEWIDTH,dashed:!1});lineMaterial.scale=DEFAULT_DASHSCALE,this.line=new Line2(lineGeometry,lineMaterial);let pointsGeometry=new THREE.BufferGeometry,pointsMaterial=new THREE.PointsMaterial({color:DEFAULT_COLOR,size:POINT_SIZE,map:sharedCircleTexture||(sharedCircleTexture=new THREE.TextureLoader().load(`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==`)),sizeAttenuation:!1,transparent:!0});this.points=new THREE.Points(pointsGeometry,pointsMaterial),this.points.renderOrder=11,this.points.frustumCulled=!1,this.setPoints(vector0,vector1),this.add(this.line,this.points)}setPoints(vector0,vector1){let positions=[].concat(vector0.toArray(),vector1.toArray());this.updatePointsPositions(positions),this.updateLinePositions(positions),this.needsRender=!0}updatePointsPositions(positions){let geometry=this.points.geometry,existing=geometry.getAttribute(`position`);existing&&existing.array.length===positions.length?(existing.array.set(positions),existing.needsUpdate=!0):geometry.setAttribute(`position`,new THREE.BufferAttribute(new Float32Array(positions),3))}updateLinePositions(positions){let geometry=this.line.geometry,instanceStart=geometry.getAttribute(`instanceStart`);if(!instanceStart||instanceStart.data.array.length!==positions.length){geometry.setPositions(positions),this.line.computeLineDistances();return}let buffer=instanceStart.data;buffer.array.set(positions),buffer.needsUpdate=!0,geometry.computeBoundingBox(),geometry.computeBoundingSphere(),this.updateLineDistances()}updateLineDistances(){let geometry=this.line.geometry,instanceDistance=geometry.getAttribute(`instanceDistanceStart`);if(!instanceDistance){this.line.computeLineDistances();return}let instanceStart=geometry.getAttribute(`instanceStart`),instanceEnd=geometry.getAttribute(`instanceEnd`),count=instanceStart.count,buffer=instanceDistance.data,array=buffer.array,start=new THREE.Vector3,end=new THREE.Vector3;for(let i=0,j=0;i<count;i++,j+=2)start.fromBufferAttribute(instanceStart,i),end.fromBufferAttribute(instanceEnd,i),array[j]=j===0?0:array[j-1],array[j+1]=array[j]+start.distanceTo(end);buffer.needsUpdate=!0}getPoints(){let array=this.points.geometry.attributes.position.array;return[new THREE.Vector3(array[0],array[1],array[2]),new THREE.Vector3(array[3],array[4],array[5])]}setMaterial(map){let lineMaterial=this.line.material;for(let name in map){if(!Object.prototype.hasOwnProperty.call(map,name))continue;let value=map[name];if(name===`color`)applyColor(lineMaterial,value);else if(name===`dashed`)lineMaterial.dashed=value;else if(name===`dashScale`)lineMaterial.scale=value;else if(name===`resolution`){let resolution=value;this.setResolution(resolution.x,resolution.y)}else lineMaterial[name]=value}this.needsRender=!0}setResolution(width,height){let resolution=this.line._resolution;resolution&&(resolution.x!==width||resolution.y!==height)&&(resolution.set(width,height),this.needsRender=!0)}};Object.assign(FiveLine.prototype,{isFiveLine:!0});export{FiveLine as Line,LineGeometry,LineSegmentsGeometry,Line2 as THREE_Line2,LineSegments2 as THREE_LineSegments2};
|
package/package.json
CHANGED