@realsee/five 6.5.3 → 6.6.0-alpha.0
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 +31 -31
- 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 +2 -2
- 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/classes/sticker.Sticker.html +1 -1
- 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.FloorplanControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.LoosePanoWork.html +3 -2
- 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.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 +26 -26
- package/docs/interfaces/five.WorkCubeImage.html +8 -7
- package/docs/interfaces/five.WorkImage.html +12 -11
- 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 +11 -10
- package/docs/interfaces/five.WorkVideo.html +5 -4
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +9 -9
- package/docs/modules/five.html +10 -5
- package/docs/types/five.AjaxResponseType.html +1 -1
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
- package/docs/types/five.LooseWork.html +1 -1
- package/docs/types/five.LooseWorkInitial.html +1 -1
- package/docs/types/five.LooseWorkModel.html +1 -1
- package/docs/types/five.LooseWorkObserver.html +1 -1
- package/docs/types/five.LooseWorkWithExtrinsics.html +2 -2
- 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 +169 -80
- 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.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
|
+
declare type CubeSource = Record<typeof FACE_ORDER[number], string>;
|
|
268
|
+
|
|
267
269
|
export declare class CullingVolume {
|
|
268
270
|
static get MASK_OUTSIDE(): number;
|
|
269
271
|
static get MASK_INSIDE(): number;
|
|
@@ -376,6 +378,8 @@ export declare type EventTypes = Pick<ControllerEventTypes, typeof PROXY_CONTROL
|
|
|
376
378
|
"dispose"(): void;
|
|
377
379
|
};
|
|
378
380
|
|
|
381
|
+
declare const FACE_ORDER: readonly ["right", "left", "up", "down", "front", "back"];
|
|
382
|
+
|
|
379
383
|
export declare class Fetcher {
|
|
380
384
|
private options;
|
|
381
385
|
constructor(options?: NetworkOptions);
|
|
@@ -649,6 +653,7 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
649
653
|
/** 当前加载的 work 数据 */
|
|
650
654
|
get works(): Works;
|
|
651
655
|
get work(): Work;
|
|
656
|
+
get observers(): readonly WorkObserver[];
|
|
652
657
|
get models(): Models;
|
|
653
658
|
get model(): Model;
|
|
654
659
|
/**
|
|
@@ -715,10 +720,6 @@ export declare class Five extends Subscribe<EventTypes> {
|
|
|
715
720
|
* 获取显示用的画布(Canvas DOM节点)
|
|
716
721
|
*/
|
|
717
722
|
getElement(): HTMLCanvasElement | undefined;
|
|
718
|
-
/**
|
|
719
|
-
* 获取观测点
|
|
720
|
-
*/
|
|
721
|
-
get observers(): WorkResolvedObserver[];
|
|
722
723
|
/**
|
|
723
724
|
* 强制渲染
|
|
724
725
|
* @description
|
|
@@ -1142,8 +1143,6 @@ export declare interface GestureEvent extends StateEvent {
|
|
|
1142
1143
|
|
|
1143
1144
|
export declare type GestureTypes = "pan" | "tap" | "dbltap" | "pinch" | "press" | "mouseWheel" | "mouseMove";
|
|
1144
1145
|
|
|
1145
|
-
export declare function getFetcher(work: Work): Fetcher;
|
|
1146
|
-
|
|
1147
1146
|
export declare function getViewportScale(): number;
|
|
1148
1147
|
|
|
1149
1148
|
/**
|
|
@@ -1785,6 +1784,7 @@ export declare function loadX3p(url: string, options?: {
|
|
|
1785
1784
|
}): Promise<LoadResultType>;
|
|
1786
1785
|
|
|
1787
1786
|
export declare interface LoosePanoWork {
|
|
1787
|
+
name?: string;
|
|
1788
1788
|
code?: string;
|
|
1789
1789
|
up: string;
|
|
1790
1790
|
down: string;
|
|
@@ -1798,6 +1798,12 @@ export declare interface LoosePanoWork {
|
|
|
1798
1798
|
export declare type LooseWork = {
|
|
1799
1799
|
work_code?: string;
|
|
1800
1800
|
code?: string;
|
|
1801
|
+
resource_code?: string;
|
|
1802
|
+
basic_code?: string;
|
|
1803
|
+
vr_code?: string;
|
|
1804
|
+
workCode?: string;
|
|
1805
|
+
project_id?: string;
|
|
1806
|
+
name?: string;
|
|
1801
1807
|
modelAsync?: boolean;
|
|
1802
1808
|
initial?: LooseWorkInitial;
|
|
1803
1809
|
base_url?: string;
|
|
@@ -1805,6 +1811,7 @@ export declare type LooseWork = {
|
|
|
1805
1811
|
panorama?: {
|
|
1806
1812
|
base_url?: string;
|
|
1807
1813
|
pano_high_cube_base_url?: string;
|
|
1814
|
+
pano_cube_base_url?: string;
|
|
1808
1815
|
info?: LooseWorkPanorama[];
|
|
1809
1816
|
list?: LooseWorkPanorama[];
|
|
1810
1817
|
};
|
|
@@ -1814,9 +1821,17 @@ export declare type LooseWork = {
|
|
|
1814
1821
|
export declare type LooseWorkInitial = {
|
|
1815
1822
|
mode?: string;
|
|
1816
1823
|
pano_index?: number;
|
|
1824
|
+
panoIndex?: number;
|
|
1817
1825
|
pano?: number;
|
|
1818
1826
|
longitude?: number;
|
|
1819
1827
|
latitude?: number;
|
|
1828
|
+
fov?: number;
|
|
1829
|
+
distance?: number;
|
|
1830
|
+
offset?: number[] | {
|
|
1831
|
+
x: number;
|
|
1832
|
+
y: number;
|
|
1833
|
+
z: number;
|
|
1834
|
+
};
|
|
1820
1835
|
heading?: number;
|
|
1821
1836
|
};
|
|
1822
1837
|
|
|
@@ -1843,18 +1858,24 @@ export declare type LooseWorkModel = {
|
|
|
1843
1858
|
export declare type LooseWorkObserver = {
|
|
1844
1859
|
active?: boolean;
|
|
1845
1860
|
index?: number;
|
|
1846
|
-
visible_nodes
|
|
1847
|
-
|
|
1848
|
-
|
|
1861
|
+
visible_nodes?: number[];
|
|
1862
|
+
visibleNodes?: number[];
|
|
1863
|
+
accessible_nodes?: number[];
|
|
1864
|
+
accessibleNodes?: number[];
|
|
1865
|
+
quaternion?: {
|
|
1849
1866
|
y: number;
|
|
1850
1867
|
x: number;
|
|
1851
1868
|
z: number;
|
|
1852
1869
|
w: number;
|
|
1853
1870
|
};
|
|
1854
|
-
standing_position
|
|
1855
|
-
|
|
1871
|
+
standing_position?: number[];
|
|
1872
|
+
standingPosition?: number[];
|
|
1873
|
+
position?: number[];
|
|
1856
1874
|
floor?: number;
|
|
1857
1875
|
floor_index?: number;
|
|
1876
|
+
floorIndex?: number;
|
|
1877
|
+
derived_id?: number;
|
|
1878
|
+
derived_id_str?: string;
|
|
1858
1879
|
};
|
|
1859
1880
|
|
|
1860
1881
|
export declare type LooseWorkPanorama = {
|
|
@@ -1878,7 +1899,7 @@ export declare type LooseWorkVideo = {
|
|
|
1878
1899
|
size: number[];
|
|
1879
1900
|
};
|
|
1880
1901
|
|
|
1881
|
-
export declare type LooseWorkWithExtrinsics =
|
|
1902
|
+
export declare type LooseWorkWithExtrinsics = ParseOptions & {
|
|
1882
1903
|
/** work 数据 */
|
|
1883
1904
|
work: LooseWork;
|
|
1884
1905
|
};
|
|
@@ -2336,8 +2357,6 @@ export declare interface NetworkOptions {
|
|
|
2336
2357
|
requestProxy?: (url: string) => string | Promise<string>;
|
|
2337
2358
|
/** 网络消息追踪 */
|
|
2338
2359
|
networkSubscribe?: NetworkSubscribe;
|
|
2339
|
-
/** 安全域名 */
|
|
2340
|
-
allowHosts?: string[];
|
|
2341
2360
|
}
|
|
2342
2361
|
|
|
2343
2362
|
export declare type NetworkProgressCallback = (percent: number) => void;
|
|
@@ -2363,7 +2382,7 @@ export declare class NetworkResponseError extends Error {
|
|
|
2363
2382
|
constructor(source: string, type: NetworkType, status: number);
|
|
2364
2383
|
}
|
|
2365
2384
|
|
|
2366
|
-
export declare type NetworkState = "ok" | "preload" | "error" | "
|
|
2385
|
+
export declare type NetworkState = "ok" | "preload" | "error" | "timeout" | "forbidden";
|
|
2367
2386
|
|
|
2368
2387
|
export declare class NetworkSubscribe extends Subscribe<{
|
|
2369
2388
|
network(source: string, type: NetworkType, state: NetworkState, detail: string): void;
|
|
@@ -2376,7 +2395,7 @@ export declare class NetworkTimeoutError extends Error {
|
|
|
2376
2395
|
constructor(source: string, type: NetworkType, timeout: number);
|
|
2377
2396
|
}
|
|
2378
2397
|
|
|
2379
|
-
export declare type NetworkType = "XMLHttpRequest" | "
|
|
2398
|
+
export declare type NetworkType = "XMLHttpRequest" | "Image" | "Link";
|
|
2380
2399
|
|
|
2381
2400
|
export declare interface ObjectEvent extends BaseEvent {
|
|
2382
2401
|
object: THREE_2.Object3D;
|
|
@@ -2687,6 +2706,8 @@ declare interface ParameterMaterialValue {
|
|
|
2687
2706
|
receiveShadow: boolean;
|
|
2688
2707
|
/** 半透明叠加渲染*/
|
|
2689
2708
|
useAddBlend: boolean;
|
|
2709
|
+
/** 包围盒 */
|
|
2710
|
+
boundingBox: THREE_2.Box3;
|
|
2690
2711
|
}
|
|
2691
2712
|
export { ParameterMaterialValue as ModelMaterialValues }
|
|
2692
2713
|
export { ParameterMaterialValue }
|
|
@@ -2729,15 +2750,7 @@ declare interface ParameterValue extends ParameterMaterialValue, ParameterTilese
|
|
|
2729
2750
|
export { ParameterValue as PBMParameters }
|
|
2730
2751
|
export { ParameterValue }
|
|
2731
2752
|
|
|
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 = {
|
|
2753
|
+
export declare type ParseOptions = {
|
|
2741
2754
|
/** 位姿 */
|
|
2742
2755
|
transform?: THREE_2.Matrix4 | number[];
|
|
2743
2756
|
/** 重置 WorkCode */
|
|
@@ -2748,14 +2761,16 @@ export declare type ParseWorkOptions = {
|
|
|
2748
2761
|
shortPath?: boolean;
|
|
2749
2762
|
/** 资源使用 jsonp 方式发布 */
|
|
2750
2763
|
jsonp?: boolean;
|
|
2751
|
-
traverseResource?: (resource: {
|
|
2752
|
-
origin: string;
|
|
2753
|
-
absolute: string;
|
|
2754
|
-
relative: string;
|
|
2755
|
-
type: "panorama" | "texture" | "model";
|
|
2756
|
-
}) => void;
|
|
2757
2764
|
};
|
|
2758
2765
|
|
|
2766
|
+
/**
|
|
2767
|
+
* 解析 Work 数据
|
|
2768
|
+
* @param obj - work 数据,从如数开发者平台获取
|
|
2769
|
+
* @param options - 配置参数, 可以在此二次设置 baseURL 等参数
|
|
2770
|
+
* @returns - 签署过的 Work 数据结构
|
|
2771
|
+
*/
|
|
2772
|
+
export declare function parseWork(obj: Work | LoosePanoWork | LooseWork | string | any, options?: ParseOptions): Work;
|
|
2773
|
+
|
|
2759
2774
|
export declare type PBMAlphaMode = 'OPAQUE' | 'MASK' | 'BLEND';
|
|
2760
2775
|
|
|
2761
2776
|
export declare interface PBMClipperParameter {
|
|
@@ -3150,14 +3165,13 @@ export declare type RegionBoundingVolumeJson = {
|
|
|
3150
3165
|
region: number[];
|
|
3151
3166
|
};
|
|
3152
3167
|
|
|
3153
|
-
export declare function registerFetcher(work: Work, fetcher: Fetcher): Map<Work, Fetcher>;
|
|
3154
|
-
|
|
3155
3168
|
export declare interface RenderEvent extends BaseEvent {
|
|
3156
3169
|
needsRender: boolean;
|
|
3157
3170
|
}
|
|
3158
3171
|
|
|
3159
3172
|
export declare interface ResolvedParameterValue extends ParameterValue {
|
|
3160
3173
|
versions: string[];
|
|
3174
|
+
version: string;
|
|
3161
3175
|
}
|
|
3162
3176
|
|
|
3163
3177
|
/** Five 场景*/
|
|
@@ -3308,7 +3322,7 @@ export declare class TextureLoader {
|
|
|
3308
3322
|
timeout?: number;
|
|
3309
3323
|
fetcher: Fetcher;
|
|
3310
3324
|
}, 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:
|
|
3325
|
+
loadCubeTexture(sources: CubeSource, options: {
|
|
3312
3326
|
imageURL?: {
|
|
3313
3327
|
transform?: (source: string, options: ImageURLOptions) => string;
|
|
3314
3328
|
options?: ImageURLOptions;
|
|
@@ -3461,7 +3475,6 @@ export declare class Tile3DModel extends THREE_2.Object3D {
|
|
|
3461
3475
|
loadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3462
3476
|
unloadTrajectory(trajectory: Trajectory): Promise<void>;
|
|
3463
3477
|
intersectRaycaster(raycaster: THREE_2.Raycaster, filterFloorIndex?: undefined | null | number, sortByDistance?: boolean, target?: Intersection[]): Intersection[];
|
|
3464
|
-
private cloneSkipBackfaceObject;
|
|
3465
3478
|
update(renderer: THREE_2.WebGLRenderer, camera: Camera, modelScene: ModelScene, model: Model): boolean;
|
|
3466
3479
|
dispose(): void;
|
|
3467
3480
|
/**
|
|
@@ -3958,29 +3971,33 @@ export declare interface WebXRControllerParams {
|
|
|
3958
3971
|
|
|
3959
3972
|
export declare type WebXRControllerType = 'tap' | 'press' | 'axes' | 'buttonUp' | 'buttonDown';
|
|
3960
3973
|
|
|
3961
|
-
export declare
|
|
3962
|
-
/**
|
|
3963
|
-
|
|
3964
|
-
/** 根地址 */
|
|
3965
|
-
baseURL: string;
|
|
3974
|
+
export declare interface Work {
|
|
3975
|
+
/** 数据签发人 */
|
|
3976
|
+
issuer: string;
|
|
3966
3977
|
/** 编号 */
|
|
3967
3978
|
workCode: string;
|
|
3968
3979
|
/** 允许访问的安全域名 */
|
|
3969
|
-
allowHosts: string[];
|
|
3980
|
+
allowHosts: readonly string[];
|
|
3970
3981
|
/** 过期时间 */
|
|
3971
3982
|
expire: Date;
|
|
3983
|
+
/** 名称 */
|
|
3984
|
+
name: string;
|
|
3985
|
+
/** 根地址 */
|
|
3986
|
+
baseURL: string;
|
|
3972
3987
|
/** 初始化参数 */
|
|
3973
3988
|
initial: WorkInitial;
|
|
3989
|
+
/** 相对位姿 */
|
|
3990
|
+
transform: THREE_2.Matrix4;
|
|
3974
3991
|
/** 模型参数 */
|
|
3975
3992
|
model?: WorkModel;
|
|
3976
3993
|
/** 全景点位信息 */
|
|
3977
|
-
observers: WorkObserver[];
|
|
3978
|
-
|
|
3994
|
+
observers: readonly WorkObserver[];
|
|
3995
|
+
}
|
|
3996
|
+
|
|
3997
|
+
export declare class Work {
|
|
3998
|
+
jsonp: boolean;
|
|
3999
|
+
shortPath: boolean;
|
|
3979
4000
|
observerBox: THREE_2.Box3;
|
|
3980
|
-
/** 数据签发人 */
|
|
3981
|
-
issuer: string;
|
|
3982
|
-
/** 位姿修正 */
|
|
3983
|
-
transform: THREE_2.Matrix4;
|
|
3984
4001
|
/**
|
|
3985
4002
|
* 控制参数
|
|
3986
4003
|
* @deprecated 通过 work.transform 替换
|
|
@@ -3992,10 +4009,12 @@ export declare class Work {
|
|
|
3992
4009
|
*/
|
|
3993
4010
|
transform: THREE_2.Matrix4;
|
|
3994
4011
|
};
|
|
3995
|
-
/**
|
|
4012
|
+
/**
|
|
4013
|
+
* 原始数据
|
|
4014
|
+
* @deprecated 通过 work.toJSON 替换
|
|
4015
|
+
*/
|
|
3996
4016
|
raw: {
|
|
3997
4017
|
works: string[];
|
|
3998
|
-
options: string;
|
|
3999
4018
|
};
|
|
4000
4019
|
/**
|
|
4001
4020
|
* 解析 Work 数据
|
|
@@ -4004,11 +4023,14 @@ export declare class Work {
|
|
|
4004
4023
|
* @returns - 签署过的 Work 数据结构
|
|
4005
4024
|
*/
|
|
4006
4025
|
static parse: typeof parseWork;
|
|
4007
|
-
constructor(obj: Work | LoosePanoWork | LooseWork | (Work | LooseWork)[] | any, options:
|
|
4026
|
+
constructor(obj: Work | LoosePanoWork | LooseWork | (Work | LooseWork)[] | any, options: ParseOptions);
|
|
4027
|
+
getURL(source: string): string;
|
|
4028
|
+
verifyURL(source: string): boolean;
|
|
4008
4029
|
toJSON(): any;
|
|
4009
4030
|
}
|
|
4010
4031
|
|
|
4011
4032
|
export declare interface WorkCubeImage {
|
|
4033
|
+
work: Work;
|
|
4012
4034
|
/** 全景图 up */
|
|
4013
4035
|
up: string;
|
|
4014
4036
|
/** 全景图 down */
|
|
@@ -4026,9 +4048,9 @@ export declare interface WorkCubeImage {
|
|
|
4026
4048
|
/** 全景图 */
|
|
4027
4049
|
export declare interface WorkImage extends WorkCubeImage {
|
|
4028
4050
|
/** 分辨率表 */
|
|
4029
|
-
sizeList
|
|
4051
|
+
sizeList: readonly number[];
|
|
4030
4052
|
/** 瓦片信息 */
|
|
4031
|
-
tiles
|
|
4053
|
+
tiles: readonly WorkTile[];
|
|
4032
4054
|
}
|
|
4033
4055
|
|
|
4034
4056
|
/** 初始化位姿参数 */
|
|
@@ -4050,6 +4072,30 @@ export declare interface WorkInitial {
|
|
|
4050
4072
|
distance?: number;
|
|
4051
4073
|
}
|
|
4052
4074
|
|
|
4075
|
+
export declare interface WorkInitialJson {
|
|
4076
|
+
mode?: string;
|
|
4077
|
+
pano_index?: number;
|
|
4078
|
+
longitude?: number;
|
|
4079
|
+
latitude?: number;
|
|
4080
|
+
fov?: number;
|
|
4081
|
+
offset?: number[];
|
|
4082
|
+
distance?: number;
|
|
4083
|
+
}
|
|
4084
|
+
|
|
4085
|
+
export declare interface WorkJson {
|
|
4086
|
+
_signature: string;
|
|
4087
|
+
allow_hosts: string[];
|
|
4088
|
+
expire_at: string;
|
|
4089
|
+
code: string;
|
|
4090
|
+
name?: string;
|
|
4091
|
+
project_id?: string;
|
|
4092
|
+
base_url: string;
|
|
4093
|
+
initial?: WorkInitialJson;
|
|
4094
|
+
model?: WorkModelJson;
|
|
4095
|
+
observers?: WorkObserverJson[];
|
|
4096
|
+
panorama?: WorkPanoramasJson;
|
|
4097
|
+
}
|
|
4098
|
+
|
|
4053
4099
|
/** 模型数据 */
|
|
4054
4100
|
export declare interface WorkModel {
|
|
4055
4101
|
/** work */
|
|
@@ -4057,20 +4103,35 @@ export declare interface WorkModel {
|
|
|
4057
4103
|
/** 模型文件地址 at3d / domez */
|
|
4058
4104
|
file?: string;
|
|
4059
4105
|
/** 模型贴图文件地址 */
|
|
4060
|
-
textures?: string[];
|
|
4106
|
+
textures?: readonly string[];
|
|
4061
4107
|
/** 模型贴图文件地址的父目录 */
|
|
4062
4108
|
textureBase?: string;
|
|
4063
4109
|
/** 3d tile */
|
|
4064
|
-
layers: WorkModelLayer[];
|
|
4110
|
+
layers: readonly WorkModelLayer[];
|
|
4111
|
+
}
|
|
4112
|
+
|
|
4113
|
+
export declare interface WorkModelJson {
|
|
4114
|
+
file_url?: string;
|
|
4115
|
+
material_textures?: string[];
|
|
4116
|
+
material_base_url?: string;
|
|
4117
|
+
layers?: WorkModelLayerJson[];
|
|
4065
4118
|
}
|
|
4066
4119
|
|
|
4067
4120
|
export declare interface WorkModelLayer {
|
|
4121
|
+
work: Work;
|
|
4068
4122
|
type: 'point_cloud' | 'mesh';
|
|
4069
4123
|
name: string;
|
|
4070
4124
|
upAxis: string;
|
|
4071
4125
|
tileset: string;
|
|
4072
4126
|
}
|
|
4073
4127
|
|
|
4128
|
+
export declare interface WorkModelLayerJson {
|
|
4129
|
+
name?: string;
|
|
4130
|
+
type?: string;
|
|
4131
|
+
up_axis: string;
|
|
4132
|
+
tileset_url: string;
|
|
4133
|
+
}
|
|
4134
|
+
|
|
4074
4135
|
/** 每个点位的数据 */
|
|
4075
4136
|
export declare interface WorkObserver {
|
|
4076
4137
|
/** work */
|
|
@@ -4079,10 +4140,6 @@ export declare interface WorkObserver {
|
|
|
4079
4140
|
index: number;
|
|
4080
4141
|
/** 序号 */
|
|
4081
4142
|
panoIndex: number;
|
|
4082
|
-
/** 点位序号 */
|
|
4083
|
-
panoId: PanoId;
|
|
4084
|
-
/** 点位序号 */
|
|
4085
|
-
pano: Pano;
|
|
4086
4143
|
/** 点位所在楼层 */
|
|
4087
4144
|
floorIndex: number;
|
|
4088
4145
|
/** 点位 derived_id */
|
|
@@ -4098,13 +4155,9 @@ export declare interface WorkObserver {
|
|
|
4098
4155
|
/** 点位视频 */
|
|
4099
4156
|
video?: WorkVideo;
|
|
4100
4157
|
/** 可以看到的相关点位序号 */
|
|
4101
|
-
visibleNodes: number[];
|
|
4102
|
-
/** 可以看到的相关点位序号 */
|
|
4103
|
-
visibleIds: PanoId[];
|
|
4158
|
+
visibleNodes: readonly number[];
|
|
4104
4159
|
/** 可以连通的相关点位序号 */
|
|
4105
|
-
accessibleNodes: number[];
|
|
4106
|
-
/** 可以看到的相关点位序号 */
|
|
4107
|
-
accessibleIds: PanoId[];
|
|
4160
|
+
accessibleNodes: readonly number[];
|
|
4108
4161
|
/** 点位和模型的地面坐标 */
|
|
4109
4162
|
standingPosition: THREE_2.Vector3;
|
|
4110
4163
|
/** 点位和模型的观察点坐标 */
|
|
@@ -4113,32 +4166,65 @@ export declare interface WorkObserver {
|
|
|
4113
4166
|
quaternion: THREE_2.Quaternion;
|
|
4114
4167
|
/** 点位和模型的旋转对齐关系矩阵 */
|
|
4115
4168
|
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
4169
|
}
|
|
4125
4170
|
|
|
4126
|
-
export declare
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4171
|
+
export declare interface WorkObserverJson {
|
|
4172
|
+
index: number;
|
|
4173
|
+
floor_index: number;
|
|
4174
|
+
position: number[];
|
|
4175
|
+
standing_position: number[];
|
|
4176
|
+
quaternion: {
|
|
4177
|
+
x: number;
|
|
4178
|
+
y: number;
|
|
4179
|
+
z: number;
|
|
4180
|
+
w: number;
|
|
4181
|
+
};
|
|
4182
|
+
visible_nodes: number[];
|
|
4183
|
+
accessible_nodes: number[];
|
|
4184
|
+
}
|
|
4130
4185
|
|
|
4131
|
-
export declare interface
|
|
4186
|
+
export declare interface WorkPanoramaJson {
|
|
4187
|
+
index: number;
|
|
4188
|
+
active?: boolean;
|
|
4189
|
+
loadable?: boolean;
|
|
4190
|
+
derived_id?: number;
|
|
4191
|
+
derived_id_str?: string;
|
|
4192
|
+
size_list: number[];
|
|
4193
|
+
up: string;
|
|
4194
|
+
down: string;
|
|
4195
|
+
right: string;
|
|
4196
|
+
left: string;
|
|
4197
|
+
front: string;
|
|
4198
|
+
back: string;
|
|
4199
|
+
video?: {
|
|
4200
|
+
source: string;
|
|
4201
|
+
matrix: number[];
|
|
4202
|
+
size: number[];
|
|
4203
|
+
};
|
|
4204
|
+
}
|
|
4205
|
+
|
|
4206
|
+
export declare interface WorkPanoramasJson {
|
|
4207
|
+
count: number;
|
|
4208
|
+
list: WorkPanoramaJson[];
|
|
4209
|
+
}
|
|
4210
|
+
|
|
4211
|
+
export declare interface WorkResolvedObserver extends WorkObserver {
|
|
4132
4212
|
isResolved: true;
|
|
4213
|
+
panoId: PanoId;
|
|
4214
|
+
pano: Pano;
|
|
4215
|
+
accessibleIds: readonly PanoId[];
|
|
4216
|
+
visibleIds: readonly PanoId[];
|
|
4217
|
+
}
|
|
4218
|
+
|
|
4219
|
+
export declare class WorkResolvedObserver {
|
|
4220
|
+
constructor(observer: WorkObserver);
|
|
4133
4221
|
}
|
|
4134
4222
|
|
|
4135
4223
|
export declare type Works = ReadonlyArray<Work> & {
|
|
4136
|
-
resolvedObservers: WorkResolvedObserver[];
|
|
4137
|
-
resolvedObserverBox: THREE_2.Box3;
|
|
4138
4224
|
initial: WorkInitial;
|
|
4139
4225
|
getWork(workCode: string): Work | undefined;
|
|
4226
|
+
getObserver(pano: PanoId | Pano | number): WorkObserver | undefined;
|
|
4140
4227
|
getResolvedObserver(pano: PanoId | Pano | number): WorkResolvedObserver | undefined;
|
|
4141
|
-
update(): void;
|
|
4142
4228
|
};
|
|
4143
4229
|
|
|
4144
4230
|
export declare interface WorksEvent extends BaseEvent {
|
|
@@ -4157,8 +4243,11 @@ export declare interface WorkTile extends WorkCubeImage {
|
|
|
4157
4243
|
scale: number;
|
|
4158
4244
|
}
|
|
4159
4245
|
|
|
4246
|
+
export declare function workToJson(work: Work): WorkJson;
|
|
4247
|
+
|
|
4160
4248
|
/** 全景视频贴片 */
|
|
4161
4249
|
export declare interface WorkVideo {
|
|
4250
|
+
work: Work;
|
|
4162
4251
|
/** 视频源 url */
|
|
4163
4252
|
source: string;
|
|
4164
4253
|
/** 视频源变化矩阵 */
|