@realsee/five 6.5.4 → 6.6.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.Fetcher.html +2 -2
- package/docs/classes/five.Five.html +57 -58
- package/docs/classes/five.Model.html +15 -15
- package/docs/classes/five.ModelScene.html +7 -7
- package/docs/classes/five.NetworkAbortError.html +2 -2
- package/docs/classes/five.NetworkFirbiddenError.html +2 -2
- package/docs/classes/five.NetworkProxyError.html +2 -2
- package/docs/classes/five.NetworkResponseError.html +2 -2
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/classes/five.NetworkTimeoutError.html +2 -2
- package/docs/classes/five.Parameter.html +22 -20
- package/docs/classes/five.TextureLoader.html +1 -1
- package/docs/classes/five.Tile3DModel.html +26 -26
- package/docs/classes/five.Work.html +23 -19
- package/docs/classes/five.WorkResolvedObserver.html +40 -0
- package/docs/functions/five.createWorks.html +1 -1
- package/docs/functions/five.loadPbm.html +1 -1
- package/docs/functions/five.parseWork.html +2 -2
- package/docs/functions/five.workToJson.html +1 -0
- package/docs/functions/react.useFiveCurrentObserver.html +2 -2
- package/docs/functions/react.useFiveModelReadyState.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +6 -8
- package/docs/interfaces/five.FiveInitArgs.html +30 -30
- package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ImageOptions.html +1 -1
- package/docs/interfaces/five.Intersection.html +2 -2
- package/docs/interfaces/five.LoosePanoWork.html +3 -2
- package/docs/interfaces/five.LooseWork.html +15 -0
- package/docs/interfaces/five.LooseWorkInitial.html +11 -0
- package/docs/interfaces/five.LooseWorkModel.html +6 -0
- package/docs/interfaces/five.LooseWorkObserver.html +16 -0
- package/docs/interfaces/five.LooseWorkPanorama.html +13 -0
- package/docs/interfaces/five.LooseWorkVideo.html +4 -0
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +13 -0
- package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.NetworkOptions.html +5 -7
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.ParameterMaterialValue.html +5 -3
- package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
- package/docs/interfaces/five.ParameterValue.html +19 -17
- package/docs/interfaces/five.ResolvedParameterValue.html +21 -18
- package/docs/interfaces/five.TextureOptions.html +14 -14
- package/docs/interfaces/five.Tile3DModelLoaderOptions.html +2 -2
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +4 -4
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +8 -8
- package/docs/interfaces/five.ViewLayer.html +25 -25
- package/docs/interfaces/five.WorkCubeImage.html +8 -13
- package/docs/interfaces/five.WorkImage.html +7 -12
- package/docs/interfaces/five.WorkInitial.html +8 -8
- package/docs/interfaces/five.WorkInitialJson.html +8 -0
- package/docs/interfaces/five.WorkJson.html +12 -0
- package/docs/interfaces/five.WorkModel.html +6 -6
- package/docs/interfaces/five.WorkModelJson.html +5 -0
- package/docs/interfaces/five.WorkModelLayer.html +3 -2
- package/docs/interfaces/five.WorkModelLayerJson.html +5 -0
- package/docs/interfaces/five.WorkObserver.html +18 -34
- package/docs/interfaces/five.WorkObserverJson.html +8 -0
- package/docs/interfaces/five.WorkPanoramaJson.html +14 -0
- package/docs/interfaces/five.WorkPanoramasJson.html +3 -0
- package/docs/interfaces/five.WorkTile.html +6 -11
- package/docs/interfaces/five.WorkVideo.html +5 -4
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/react.FiveInjectionTypes.html +3 -3
- package/docs/modules/five.html +18 -12
- package/docs/types/five.AjaxResponseType.html +1 -1
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
- package/docs/types/five.CubeFace.html +1 -0
- package/docs/types/five.NetWorkMeta.html +1 -1
- package/docs/types/five.NetworkError.html +1 -1
- package/docs/types/five.NetworkErrorCallback.html +1 -1
- package/docs/types/five.NetworkProgressCallback.html +1 -1
- package/docs/types/five.NetworkResponse.html +1 -1
- package/docs/types/five.NetworkState.html +1 -1
- package/docs/types/five.NetworkSuccessCallback.html +1 -1
- package/docs/types/five.NetworkType.html +1 -1
- package/docs/types/five.ParseOptions.html +6 -0
- package/docs/types/five.PostProcessingType.html +1 -1
- package/docs/types/five.Works.html +1 -1
- package/five/index.d.ts +184 -131
- package/five/index.js +65 -65
- package/five/index.mjs +6688 -6415
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +146 -146
- package/line/index.js +3 -3
- package/line/index.mjs +10 -10
- package/package.json +1 -1
- package/plugins/index.js +2 -2
- package/plugins/index.mjs +2 -2
- package/react/index.d.ts +3 -3
- package/react/index.js +3 -3
- package/react/index.mjs +4 -4
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +7 -7
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +2 -2
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +3 -3
- package/umd/five.js +65 -65
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +3 -3
- package/vue/index.mjs +4 -4
- package/work-downloader/index.js +3 -3
- package/work-downloader/index.mjs +234 -225
- package/docs/functions/five.getFetcher.html +0 -1
- package/docs/functions/five.registerFetcher.html +0 -1
- package/docs/interfaces/five.WorkResolvedObserver.html +0 -42
- package/docs/types/five.LooseWork.html +0 -1
- package/docs/types/five.LooseWorkInitial.html +0 -1
- package/docs/types/five.LooseWorkModel.html +0 -1
- package/docs/types/five.LooseWorkObserver.html +0 -1
- package/docs/types/five.LooseWorkPanorama.html +0 -1
- package/docs/types/five.LooseWorkVideo.html +0 -1
- package/docs/types/five.LooseWorkWithExtrinsics.html +0 -2
- package/docs/types/five.ParseWorkOptions.html +0 -6
- package/docs/variables/five.workRawMapping.html +0 -1
package/five/index.d.ts
CHANGED
|
@@ -264,6 +264,8 @@ export declare function createDebugBoundingMesh(boundingVolume: BoundingVolume,
|
|
|
264
264
|
|
|
265
265
|
export declare function createWorks(workArray: Work[]): Works;
|
|
266
266
|
|
|
267
|
+
export declare type CubeFace = 'right' | 'left' | 'up' | 'down' | 'front' | 'back';
|
|
268
|
+
|
|
267
269
|
export declare class CullingVolume {
|
|
268
270
|
static get MASK_OUTSIDE(): number;
|
|
269
271
|
static get MASK_INSIDE(): number;
|
|
@@ -649,6 +651,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
649
651
|
/** 当前加载的 work 数据 */
|
|
650
652
|
get works(): Works;
|
|
651
653
|
get work(): Work;
|
|
654
|
+
get observers(): readonly WorkObserver[];
|
|
652
655
|
get models(): Models;
|
|
653
656
|
get model(): Model;
|
|
654
657
|
/**
|
|
@@ -715,10 +718,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
715
718
|
* 获取显示用的画布(Canvas DOM节点)
|
|
716
719
|
*/
|
|
717
720
|
getElement(): HTMLCanvasElement | undefined;
|
|
718
|
-
/**
|
|
719
|
-
* 获取观测点
|
|
720
|
-
*/
|
|
721
|
-
get observers(): WorkResolvedObserver[];
|
|
722
721
|
/**
|
|
723
722
|
* 强制渲染
|
|
724
723
|
* @description
|
|
@@ -1142,8 +1141,6 @@ export declare interface GestureEvent extends StateEvent {
|
|
|
1142
1141
|
|
|
1143
1142
|
export declare type GestureTypes = "pan" | "tap" | "dbltap" | "pinch" | "press" | "mouseWheel" | "mouseMove";
|
|
1144
1143
|
|
|
1145
|
-
export declare function getFetcher(work: Work): Fetcher;
|
|
1146
|
-
|
|
1147
1144
|
export declare function getViewportScale(): number;
|
|
1148
1145
|
|
|
1149
1146
|
/**
|
|
@@ -1225,7 +1222,7 @@ export declare interface Intersection extends THREE_2.Intersection {
|
|
|
1225
1222
|
/** 楼层 */
|
|
1226
1223
|
floor: number;
|
|
1227
1224
|
model?: Model;
|
|
1228
|
-
viewLayer?:
|
|
1225
|
+
viewLayer?: ViewLayer;
|
|
1229
1226
|
}
|
|
1230
1227
|
|
|
1231
1228
|
export declare class IntersectMesh extends THREE_2.Object3D implements IntersectMeshInterface {
|
|
@@ -1785,6 +1782,7 @@ export declare function loadX3p(url: string, options?: {
|
|
|
1785
1782
|
}): Promise<LoadResultType>;
|
|
1786
1783
|
|
|
1787
1784
|
export declare interface LoosePanoWork {
|
|
1785
|
+
name?: string;
|
|
1788
1786
|
code?: string;
|
|
1789
1787
|
up: string;
|
|
1790
1788
|
down: string;
|
|
@@ -1795,9 +1793,15 @@ export declare interface LoosePanoWork {
|
|
|
1795
1793
|
size: number;
|
|
1796
1794
|
}
|
|
1797
1795
|
|
|
1798
|
-
export declare
|
|
1796
|
+
export declare interface LooseWork {
|
|
1799
1797
|
work_code?: string;
|
|
1800
1798
|
code?: string;
|
|
1799
|
+
resource_code?: string;
|
|
1800
|
+
basic_code?: string;
|
|
1801
|
+
vr_code?: string;
|
|
1802
|
+
workCode?: string;
|
|
1803
|
+
project_id?: string;
|
|
1804
|
+
name?: string;
|
|
1801
1805
|
modelAsync?: boolean;
|
|
1802
1806
|
initial?: LooseWorkInitial;
|
|
1803
1807
|
base_url?: string;
|
|
@@ -1805,22 +1809,31 @@ export declare type LooseWork = {
|
|
|
1805
1809
|
panorama?: {
|
|
1806
1810
|
base_url?: string;
|
|
1807
1811
|
pano_high_cube_base_url?: string;
|
|
1812
|
+
pano_cube_base_url?: string;
|
|
1808
1813
|
info?: LooseWorkPanorama[];
|
|
1809
1814
|
list?: LooseWorkPanorama[];
|
|
1810
1815
|
};
|
|
1811
1816
|
observers?: LooseWorkObserver[];
|
|
1812
|
-
}
|
|
1817
|
+
}
|
|
1813
1818
|
|
|
1814
|
-
export declare
|
|
1819
|
+
export declare interface LooseWorkInitial {
|
|
1815
1820
|
mode?: string;
|
|
1816
1821
|
pano_index?: number;
|
|
1822
|
+
panoIndex?: number;
|
|
1817
1823
|
pano?: number;
|
|
1818
1824
|
longitude?: number;
|
|
1819
1825
|
latitude?: number;
|
|
1826
|
+
fov?: number;
|
|
1827
|
+
distance?: number;
|
|
1828
|
+
offset?: number[] | {
|
|
1829
|
+
x: number;
|
|
1830
|
+
y: number;
|
|
1831
|
+
z: number;
|
|
1832
|
+
};
|
|
1820
1833
|
heading?: number;
|
|
1821
|
-
}
|
|
1834
|
+
}
|
|
1822
1835
|
|
|
1823
|
-
export declare
|
|
1836
|
+
export declare interface LooseWorkModel {
|
|
1824
1837
|
file_url?: string;
|
|
1825
1838
|
material_textures?: string[];
|
|
1826
1839
|
material_base_url?: string;
|
|
@@ -1838,50 +1851,50 @@ export declare type LooseWorkModel = {
|
|
|
1838
1851
|
tileset_url: string;
|
|
1839
1852
|
}
|
|
1840
1853
|
];
|
|
1841
|
-
}
|
|
1854
|
+
}
|
|
1842
1855
|
|
|
1843
|
-
export declare
|
|
1856
|
+
export declare interface LooseWorkObserver {
|
|
1844
1857
|
active?: boolean;
|
|
1845
1858
|
index?: number;
|
|
1846
|
-
visible_nodes
|
|
1847
|
-
|
|
1848
|
-
|
|
1859
|
+
visible_nodes?: number[];
|
|
1860
|
+
visibleNodes?: number[];
|
|
1861
|
+
accessible_nodes?: number[];
|
|
1862
|
+
accessibleNodes?: number[];
|
|
1863
|
+
quaternion?: {
|
|
1849
1864
|
y: number;
|
|
1850
1865
|
x: number;
|
|
1851
1866
|
z: number;
|
|
1852
1867
|
w: number;
|
|
1853
1868
|
};
|
|
1854
|
-
standing_position
|
|
1855
|
-
|
|
1869
|
+
standing_position?: number[];
|
|
1870
|
+
standingPosition?: number[];
|
|
1871
|
+
position?: number[];
|
|
1856
1872
|
floor?: number;
|
|
1857
1873
|
floor_index?: number;
|
|
1858
|
-
|
|
1874
|
+
floorIndex?: number;
|
|
1875
|
+
derived_id?: number;
|
|
1876
|
+
derived_id_str?: string;
|
|
1877
|
+
}
|
|
1859
1878
|
|
|
1860
|
-
export declare
|
|
1879
|
+
export declare interface LooseWorkPanorama extends Record<CubeFace, string> {
|
|
1861
1880
|
active?: boolean;
|
|
1862
1881
|
loadable?: boolean;
|
|
1863
1882
|
index?: number;
|
|
1864
|
-
up: string;
|
|
1865
|
-
down: string;
|
|
1866
|
-
right: string;
|
|
1867
|
-
left: string;
|
|
1868
|
-
front: string;
|
|
1869
|
-
back: string;
|
|
1870
1883
|
video?: LooseWorkVideo;
|
|
1871
1884
|
tiles?: number[];
|
|
1872
1885
|
size_list?: number[];
|
|
1873
|
-
}
|
|
1886
|
+
}
|
|
1874
1887
|
|
|
1875
|
-
export declare
|
|
1888
|
+
export declare interface LooseWorkVideo {
|
|
1876
1889
|
source: string;
|
|
1877
1890
|
matrix: number[];
|
|
1878
1891
|
size: number[];
|
|
1879
|
-
}
|
|
1892
|
+
}
|
|
1880
1893
|
|
|
1881
|
-
export declare
|
|
1894
|
+
export declare interface LooseWorkWithExtrinsics extends ParseOptions {
|
|
1882
1895
|
/** work 数据 */
|
|
1883
1896
|
work: LooseWork;
|
|
1884
|
-
}
|
|
1897
|
+
}
|
|
1885
1898
|
|
|
1886
1899
|
export declare function makeBoundingVolume(header: BoundingVolumeJson | BoundingVolume): BoundingVolume;
|
|
1887
1900
|
|
|
@@ -2336,8 +2349,6 @@ export declare interface NetworkOptions {
|
|
|
2336
2349
|
requestProxy?: (url: string) => string | Promise<string>;
|
|
2337
2350
|
/** 网络消息追踪 */
|
|
2338
2351
|
networkSubscribe?: NetworkSubscribe;
|
|
2339
|
-
/** 安全域名 */
|
|
2340
|
-
allowHosts?: string[];
|
|
2341
2352
|
}
|
|
2342
2353
|
|
|
2343
2354
|
export declare type NetworkProgressCallback = (percent: number) => void;
|
|
@@ -2363,7 +2374,7 @@ export declare class NetworkResponseError extends Error {
|
|
|
2363
2374
|
constructor(source: string, type: NetworkType, status: number);
|
|
2364
2375
|
}
|
|
2365
2376
|
|
|
2366
|
-
export declare type NetworkState = "ok" | "preload" | "error" | "
|
|
2377
|
+
export declare type NetworkState = "ok" | "preload" | "error" | "timeout" | "forbidden";
|
|
2367
2378
|
|
|
2368
2379
|
export declare class NetworkSubscribe extends Subscribe<{
|
|
2369
2380
|
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
@@ -2376,7 +2387,7 @@ export declare class NetworkTimeoutError extends Error {
|
|
|
2376
2387
|
constructor(source: string, type: NetworkType, timeout: number);
|
|
2377
2388
|
}
|
|
2378
2389
|
|
|
2379
|
-
export declare type NetworkType = "XMLHttpRequest" | "
|
|
2390
|
+
export declare type NetworkType = "XMLHttpRequest" | "Image" | "Link";
|
|
2380
2391
|
|
|
2381
2392
|
export declare interface ObjectEvent extends BaseEvent {
|
|
2382
2393
|
object: THREE_2.Object3D;
|
|
@@ -2687,6 +2698,8 @@ declare interface ParameterMaterialValue {
|
|
|
2687
2698
|
receiveShadow: boolean;
|
|
2688
2699
|
/** 半透明叠加渲染*/
|
|
2689
2700
|
useAddBlend: boolean;
|
|
2701
|
+
/** 包围盒 */
|
|
2702
|
+
boundingBox: THREE_2.Box3;
|
|
2690
2703
|
}
|
|
2691
2704
|
export { ParameterMaterialValue as ModelMaterialValues }
|
|
2692
2705
|
export { ParameterMaterialValue }
|
|
@@ -2729,15 +2742,7 @@ declare interface ParameterValue extends ParameterMaterialValue, ParameterTilese
|
|
|
2729
2742
|
export { ParameterValue as PBMParameters }
|
|
2730
2743
|
export { ParameterValue }
|
|
2731
2744
|
|
|
2732
|
-
|
|
2733
|
-
* 解析 Work 数据
|
|
2734
|
-
* @param obj - work 数据,从如数开发者平台获取
|
|
2735
|
-
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
2736
|
-
* @returns - 签署过的 Work 数据结构
|
|
2737
|
-
*/
|
|
2738
|
-
export declare function parseWork(obj: Work | LoosePanoWork | LooseWork | string | any, options?: ParseWorkOptions): Work;
|
|
2739
|
-
|
|
2740
|
-
export declare type ParseWorkOptions = {
|
|
2745
|
+
export declare type ParseOptions = {
|
|
2741
2746
|
/** 位姿 */
|
|
2742
2747
|
transform?: THREE_2.Matrix4 | number[];
|
|
2743
2748
|
/** 重置 WorkCode */
|
|
@@ -2748,14 +2753,16 @@ export declare type ParseWorkOptions = {
|
|
|
2748
2753
|
shortPath?: boolean;
|
|
2749
2754
|
/** 资源使用 jsonp 方式发布 */
|
|
2750
2755
|
jsonp?: boolean;
|
|
2751
|
-
traverseResource?: (resource: {
|
|
2752
|
-
origin: string;
|
|
2753
|
-
absolute: string;
|
|
2754
|
-
relative: string;
|
|
2755
|
-
type: "panorama" | "texture" | "model";
|
|
2756
|
-
}) => void;
|
|
2757
2756
|
};
|
|
2758
2757
|
|
|
2758
|
+
/**
|
|
2759
|
+
* 解析 Work 数据
|
|
2760
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
2761
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
2762
|
+
* @returns - 签署过的 Work 数据结构
|
|
2763
|
+
*/
|
|
2764
|
+
export declare function parseWork(obj: Work | LoosePanoWork | LooseWork | string | any, options?: ParseOptions): Work;
|
|
2765
|
+
|
|
2759
2766
|
export declare type PBMAlphaMode = 'OPAQUE' | 'MASK' | 'BLEND';
|
|
2760
2767
|
|
|
2761
2768
|
export declare interface PBMClipperParameter {
|
|
@@ -3150,14 +3157,13 @@ export declare type RegionBoundingVolumeJson = {
|
|
|
3150
3157
|
region: number[];
|
|
3151
3158
|
};
|
|
3152
3159
|
|
|
3153
|
-
export declare function registerFetcher(work: Work, fetcher: Fetcher): Map<Work, Fetcher>;
|
|
3154
|
-
|
|
3155
3160
|
export declare interface RenderEvent extends BaseEvent {
|
|
3156
3161
|
needsRender: boolean;
|
|
3157
3162
|
}
|
|
3158
3163
|
|
|
3159
3164
|
export declare interface ResolvedParameterValue extends ParameterValue {
|
|
3160
3165
|
versions: string[];
|
|
3166
|
+
version: string;
|
|
3161
3167
|
}
|
|
3162
3168
|
|
|
3163
3169
|
/** Five 场景*/
|
|
@@ -3308,7 +3314,7 @@ export declare class TextureLoader {
|
|
|
3308
3314
|
timeout?: number;
|
|
3309
3315
|
fetcher: Fetcher;
|
|
3310
3316
|
}, onLoad?: (response: NetworkResponse<THREE_2.Texture>) => void, onError?: (error: Error) => void, onProgress?: (percent: number) => void, renderer?: THREE_2.WebGLRenderer): Promise<NetworkResponse<THREE_2.Texture>>;
|
|
3311
|
-
loadCubeTexture(sources:
|
|
3317
|
+
loadCubeTexture(sources: Record<CubeFace, string>, options: {
|
|
3312
3318
|
imageURL?: {
|
|
3313
3319
|
transform?: (source: string, options: ImageURLOptions) => string;
|
|
3314
3320
|
options?: ImageURLOptions;
|
|
@@ -3326,27 +3332,11 @@ export declare class TextureLoader {
|
|
|
3326
3332
|
}
|
|
3327
3333
|
|
|
3328
3334
|
/**
|
|
3329
|
-
*
|
|
3335
|
+
* 材质的图片参数
|
|
3330
3336
|
*/
|
|
3331
|
-
export declare interface TextureOptions {
|
|
3332
|
-
/**
|
|
3333
|
-
* url 地址转化
|
|
3334
|
-
* @param url - 原始地址
|
|
3335
|
-
* @param options - 当前地址参数
|
|
3336
|
-
* @returns 转化后地址
|
|
3337
|
-
*/
|
|
3338
|
-
transform?: (url: string, options: ImageURLOptions) => string;
|
|
3339
|
-
/** 图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024 */
|
|
3340
|
-
size?: number;
|
|
3341
|
-
/** 图片质量参数(0-100) */
|
|
3342
|
-
quality?: number;
|
|
3343
|
-
/** 图片格式参数 */
|
|
3344
|
-
format?: "jpg" | "png" | "heif" | "webp" | "avif";
|
|
3337
|
+
export declare interface TextureOptions extends ImageOptions {
|
|
3345
3338
|
/** 针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true */
|
|
3346
3339
|
autoResize?: boolean;
|
|
3347
|
-
/** 锐化参数 海外不支持 */
|
|
3348
|
-
sharpen?: number;
|
|
3349
|
-
mappings?: ImageURLMappings;
|
|
3350
3340
|
}
|
|
3351
3341
|
|
|
3352
3342
|
export declare class Tile {
|
|
@@ -3461,7 +3451,6 @@ export declare class Tile3DModel extends THREE_2.Object3D {
|
|
|
3461
3451
|
loadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3462
3452
|
unloadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3463
3453
|
intersectRaycaster(raycaster: THREE_2.Raycaster, filterFloorIndex?: undefined | null | number, sortByDistance?: boolean, target?: Intersection[]): Intersection[];
|
|
3464
|
-
private cloneSkipBackfaceObject;
|
|
3465
3454
|
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene, model: Model): boolean;
|
|
3466
3455
|
dispose(): void;
|
|
3467
3456
|
/**
|
|
@@ -3958,29 +3947,33 @@ export declare interface WebXRControllerParams {
|
|
|
3958
3947
|
|
|
3959
3948
|
export declare type WebXRControllerType = 'tap' | 'press' | 'axes' | 'buttonUp' | 'buttonDown';
|
|
3960
3949
|
|
|
3961
|
-
export declare
|
|
3962
|
-
/**
|
|
3963
|
-
|
|
3964
|
-
/** 根地址 */
|
|
3965
|
-
baseURL: string;
|
|
3950
|
+
export declare interface Work {
|
|
3951
|
+
/** 数据签发人 */
|
|
3952
|
+
issuer: string;
|
|
3966
3953
|
/** 编号 */
|
|
3967
3954
|
workCode: string;
|
|
3968
3955
|
/** 允许访问的安全域名 */
|
|
3969
|
-
allowHosts: string[];
|
|
3956
|
+
allowHosts: readonly string[];
|
|
3970
3957
|
/** 过期时间 */
|
|
3971
3958
|
expire: Date;
|
|
3959
|
+
/** 名称 */
|
|
3960
|
+
name: string;
|
|
3961
|
+
/** 根地址 */
|
|
3962
|
+
baseURL: string;
|
|
3972
3963
|
/** 初始化参数 */
|
|
3973
3964
|
initial: WorkInitial;
|
|
3965
|
+
/** 相对位姿 */
|
|
3966
|
+
transform: THREE_2.Matrix4;
|
|
3974
3967
|
/** 模型参数 */
|
|
3975
3968
|
model?: WorkModel;
|
|
3976
3969
|
/** 全景点位信息 */
|
|
3977
|
-
observers: WorkObserver[];
|
|
3978
|
-
|
|
3970
|
+
observers: readonly WorkObserver[];
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
export declare class Work {
|
|
3974
|
+
jsonp: boolean;
|
|
3975
|
+
shortPath: boolean;
|
|
3979
3976
|
observerBox: THREE_2.Box3;
|
|
3980
|
-
/** 数据签发人 */
|
|
3981
|
-
issuer: string;
|
|
3982
|
-
/** 位姿修正 */
|
|
3983
|
-
transform: THREE_2.Matrix4;
|
|
3984
3977
|
/**
|
|
3985
3978
|
* 控制参数
|
|
3986
3979
|
* @deprecated 通过 work.transform 替换
|
|
@@ -3992,10 +3985,12 @@ export declare class Work {
|
|
|
3992
3985
|
*/
|
|
3993
3986
|
transform: THREE_2.Matrix4;
|
|
3994
3987
|
};
|
|
3995
|
-
/**
|
|
3988
|
+
/**
|
|
3989
|
+
* 原始数据
|
|
3990
|
+
* @deprecated 通过 work.toJSON 替换
|
|
3991
|
+
*/
|
|
3996
3992
|
raw: {
|
|
3997
3993
|
works: string[];
|
|
3998
|
-
options: string;
|
|
3999
3994
|
};
|
|
4000
3995
|
/**
|
|
4001
3996
|
* 解析 Work 数据
|
|
@@ -4004,31 +3999,22 @@ export declare class Work {
|
|
|
4004
3999
|
* @returns - 签署过的 Work 数据结构
|
|
4005
4000
|
*/
|
|
4006
4001
|
static parse: typeof parseWork;
|
|
4007
|
-
constructor(obj: Work | LoosePanoWork | LooseWork | (Work | LooseWork)[] | any, options:
|
|
4002
|
+
constructor(obj: Work | LoosePanoWork | LooseWork | (Work | LooseWork)[] | any, options: ParseOptions);
|
|
4003
|
+
getURL(source: string): string;
|
|
4004
|
+
verifyURL(source: string): boolean;
|
|
4008
4005
|
toJSON(): any;
|
|
4009
4006
|
}
|
|
4010
4007
|
|
|
4011
|
-
export declare interface WorkCubeImage {
|
|
4012
|
-
|
|
4013
|
-
up: string;
|
|
4014
|
-
/** 全景图 down */
|
|
4015
|
-
down: string;
|
|
4016
|
-
/** 全景图 right */
|
|
4017
|
-
right: string;
|
|
4018
|
-
/** 全景图 left */
|
|
4019
|
-
left: string;
|
|
4020
|
-
/** 全景图 front */
|
|
4021
|
-
front: string;
|
|
4022
|
-
/** 全景图 back */
|
|
4023
|
-
back: string;
|
|
4008
|
+
export declare interface WorkCubeImage extends Record<CubeFace, string> {
|
|
4009
|
+
work: Work;
|
|
4024
4010
|
}
|
|
4025
4011
|
|
|
4026
4012
|
/** 全景图 */
|
|
4027
4013
|
export declare interface WorkImage extends WorkCubeImage {
|
|
4028
4014
|
/** 分辨率表 */
|
|
4029
|
-
sizeList
|
|
4015
|
+
sizeList: readonly number[];
|
|
4030
4016
|
/** 瓦片信息 */
|
|
4031
|
-
tiles
|
|
4017
|
+
tiles: readonly WorkTile[];
|
|
4032
4018
|
}
|
|
4033
4019
|
|
|
4034
4020
|
/** 初始化位姿参数 */
|
|
@@ -4050,6 +4036,30 @@ export declare interface WorkInitial {
|
|
|
4050
4036
|
distance?: number;
|
|
4051
4037
|
}
|
|
4052
4038
|
|
|
4039
|
+
export declare interface WorkInitialJson {
|
|
4040
|
+
mode?: string;
|
|
4041
|
+
pano_index?: number;
|
|
4042
|
+
longitude?: number;
|
|
4043
|
+
latitude?: number;
|
|
4044
|
+
fov?: number;
|
|
4045
|
+
offset?: number[];
|
|
4046
|
+
distance?: number;
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4049
|
+
export declare interface WorkJson {
|
|
4050
|
+
_signature: string;
|
|
4051
|
+
allow_hosts: string[];
|
|
4052
|
+
expire_at: string;
|
|
4053
|
+
code: string;
|
|
4054
|
+
name?: string;
|
|
4055
|
+
project_id?: string;
|
|
4056
|
+
base_url: string;
|
|
4057
|
+
initial?: WorkInitialJson;
|
|
4058
|
+
model?: WorkModelJson;
|
|
4059
|
+
observers?: WorkObserverJson[];
|
|
4060
|
+
panorama?: WorkPanoramasJson;
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4053
4063
|
/** 模型数据 */
|
|
4054
4064
|
export declare interface WorkModel {
|
|
4055
4065
|
/** work */
|
|
@@ -4057,20 +4067,35 @@ export declare interface WorkModel {
|
|
|
4057
4067
|
/** 模型文件地址 at3d / domez */
|
|
4058
4068
|
file?: string;
|
|
4059
4069
|
/** 模型贴图文件地址 */
|
|
4060
|
-
textures?: string[];
|
|
4070
|
+
textures?: readonly string[];
|
|
4061
4071
|
/** 模型贴图文件地址的父目录 */
|
|
4062
4072
|
textureBase?: string;
|
|
4063
4073
|
/** 3d tile */
|
|
4064
|
-
layers: WorkModelLayer[];
|
|
4074
|
+
layers: readonly WorkModelLayer[];
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4077
|
+
export declare interface WorkModelJson {
|
|
4078
|
+
file_url?: string;
|
|
4079
|
+
material_textures?: string[];
|
|
4080
|
+
material_base_url?: string;
|
|
4081
|
+
layers?: WorkModelLayerJson[];
|
|
4065
4082
|
}
|
|
4066
4083
|
|
|
4067
4084
|
export declare interface WorkModelLayer {
|
|
4085
|
+
work: Work;
|
|
4068
4086
|
type: 'point_cloud' | 'mesh';
|
|
4069
4087
|
name: string;
|
|
4070
4088
|
upAxis: string;
|
|
4071
4089
|
tileset: string;
|
|
4072
4090
|
}
|
|
4073
4091
|
|
|
4092
|
+
export declare interface WorkModelLayerJson {
|
|
4093
|
+
name?: string;
|
|
4094
|
+
type?: string;
|
|
4095
|
+
up_axis: string;
|
|
4096
|
+
tileset_url: string;
|
|
4097
|
+
}
|
|
4098
|
+
|
|
4074
4099
|
/** 每个点位的数据 */
|
|
4075
4100
|
export declare interface WorkObserver {
|
|
4076
4101
|
/** work */
|
|
@@ -4079,10 +4104,6 @@ export declare interface WorkObserver {
|
|
|
4079
4104
|
index: number;
|
|
4080
4105
|
/** 序号 */
|
|
4081
4106
|
panoIndex: number;
|
|
4082
|
-
/** 点位序号 */
|
|
4083
|
-
panoId: PanoId;
|
|
4084
|
-
/** 点位序号 */
|
|
4085
|
-
pano: Pano;
|
|
4086
4107
|
/** 点位所在楼层 */
|
|
4087
4108
|
floorIndex: number;
|
|
4088
4109
|
/** 点位 derived_id */
|
|
@@ -4098,13 +4119,9 @@ export declare interface WorkObserver {
|
|
|
4098
4119
|
/** 点位视频 */
|
|
4099
4120
|
video?: WorkVideo;
|
|
4100
4121
|
/** 可以看到的相关点位序号 */
|
|
4101
|
-
visibleNodes: number[];
|
|
4102
|
-
/** 可以看到的相关点位序号 */
|
|
4103
|
-
visibleIds: PanoId[];
|
|
4122
|
+
visibleNodes: readonly number[];
|
|
4104
4123
|
/** 可以连通的相关点位序号 */
|
|
4105
|
-
accessibleNodes: number[];
|
|
4106
|
-
/** 可以看到的相关点位序号 */
|
|
4107
|
-
accessibleIds: PanoId[];
|
|
4124
|
+
accessibleNodes: readonly number[];
|
|
4108
4125
|
/** 点位和模型的地面坐标 */
|
|
4109
4126
|
standingPosition: THREE_2.Vector3;
|
|
4110
4127
|
/** 点位和模型的观察点坐标 */
|
|
@@ -4113,32 +4130,65 @@ export declare interface WorkObserver {
|
|
|
4113
4130
|
quaternion: THREE_2.Quaternion;
|
|
4114
4131
|
/** 点位和模型的旋转对齐关系矩阵 */
|
|
4115
4132
|
matrix: THREE_2.Matrix4;
|
|
4116
|
-
/** 点位和模型的地面坐标 */
|
|
4117
|
-
getResolvedStandingPosition(target: THREE_2.Vector3): typeof target;
|
|
4118
|
-
/** 点位和模型的观察点坐标 */
|
|
4119
|
-
getResolvedPosition(target: THREE_2.Vector3): typeof target;
|
|
4120
|
-
/** 点位和模型的旋转对齐关系四元数 */
|
|
4121
|
-
getResolvedQuaternion(target: THREE_2.Quaternion): typeof target;
|
|
4122
|
-
/** 点位和模型的旋转对齐关系矩阵 */
|
|
4123
|
-
getResolvedMatrix(target: THREE_2.Matrix4): typeof target;
|
|
4124
4133
|
}
|
|
4125
4134
|
|
|
4126
|
-
export declare
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4135
|
+
export declare interface WorkObserverJson {
|
|
4136
|
+
index: number;
|
|
4137
|
+
floor_index: number;
|
|
4138
|
+
position: number[];
|
|
4139
|
+
standing_position: number[];
|
|
4140
|
+
quaternion: {
|
|
4141
|
+
x: number;
|
|
4142
|
+
y: number;
|
|
4143
|
+
z: number;
|
|
4144
|
+
w: number;
|
|
4145
|
+
};
|
|
4146
|
+
visible_nodes: number[];
|
|
4147
|
+
accessible_nodes: number[];
|
|
4148
|
+
}
|
|
4130
4149
|
|
|
4131
|
-
export declare interface
|
|
4150
|
+
export declare interface WorkPanoramaJson {
|
|
4151
|
+
index: number;
|
|
4152
|
+
active?: boolean;
|
|
4153
|
+
loadable?: boolean;
|
|
4154
|
+
derived_id?: number;
|
|
4155
|
+
derived_id_str?: string;
|
|
4156
|
+
size_list: number[];
|
|
4157
|
+
up: string;
|
|
4158
|
+
down: string;
|
|
4159
|
+
right: string;
|
|
4160
|
+
left: string;
|
|
4161
|
+
front: string;
|
|
4162
|
+
back: string;
|
|
4163
|
+
video?: {
|
|
4164
|
+
source: string;
|
|
4165
|
+
matrix: number[];
|
|
4166
|
+
size: number[];
|
|
4167
|
+
};
|
|
4168
|
+
}
|
|
4169
|
+
|
|
4170
|
+
export declare interface WorkPanoramasJson {
|
|
4171
|
+
count: number;
|
|
4172
|
+
list: WorkPanoramaJson[];
|
|
4173
|
+
}
|
|
4174
|
+
|
|
4175
|
+
export declare interface WorkResolvedObserver extends WorkObserver {
|
|
4132
4176
|
isResolved: true;
|
|
4177
|
+
panoId: PanoId;
|
|
4178
|
+
pano: Pano;
|
|
4179
|
+
accessibleIds: readonly PanoId[];
|
|
4180
|
+
visibleIds: readonly PanoId[];
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
export declare class WorkResolvedObserver {
|
|
4184
|
+
constructor(observer: WorkObserver);
|
|
4133
4185
|
}
|
|
4134
4186
|
|
|
4135
4187
|
export declare type Works = ReadonlyArray<Work> & {
|
|
4136
|
-
resolvedObservers: WorkResolvedObserver[];
|
|
4137
|
-
resolvedObserverBox: THREE_2.Box3;
|
|
4138
4188
|
initial: WorkInitial;
|
|
4139
4189
|
getWork(workCode: string): Work | undefined;
|
|
4190
|
+
getObserver(pano: PanoId | Pano | number): WorkObserver | undefined;
|
|
4140
4191
|
getResolvedObserver(pano: PanoId | Pano | number): WorkResolvedObserver | undefined;
|
|
4141
|
-
update(): void;
|
|
4142
4192
|
};
|
|
4143
4193
|
|
|
4144
4194
|
export declare interface WorksEvent extends BaseEvent {
|
|
@@ -4157,8 +4207,11 @@ export declare interface WorkTile extends WorkCubeImage {
|
|
|
4157
4207
|
scale: number;
|
|
4158
4208
|
}
|
|
4159
4209
|
|
|
4210
|
+
export declare function workToJson(work: Work): WorkJson;
|
|
4211
|
+
|
|
4160
4212
|
/** 全景视频贴片 */
|
|
4161
4213
|
export declare interface WorkVideo {
|
|
4214
|
+
work: Work;
|
|
4162
4215
|
/** 视频源 url */
|
|
4163
4216
|
source: string;
|
|
4164
4217
|
/** 视频源变化矩阵 */
|