vis-core 0.33.3 → 0.33.5
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/dist/asyncToGenerator-DAj9B9-Q.js +1 -0
- package/dist/editor.d.ts +32545 -0
- package/dist/editor.js +1 -0
- package/dist/index.d.ts +314 -262
- package/dist/index.js +1 -21
- package/dist/io.d.ts +24 -0
- package/dist/io.js +1 -0
- package/dist/json-CWeSNhIM.js +21 -0
- package/dist/jsonFetch-CZU-BFk-.js +1 -0
- package/package.json +19 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,35 +1,54 @@
|
|
|
1
1
|
import { AmbientLightObject } from 'gl-draw';
|
|
2
|
+
import { ArcObject } from 'gl-draw';
|
|
3
|
+
import { ArcPathOptions } from 'gl-draw';
|
|
4
|
+
import { ArcPoint } from 'gl-draw';
|
|
5
|
+
import { ArcSpherePathOptions } from 'gl-draw';
|
|
2
6
|
import { BaseObject } from 'gl-draw';
|
|
7
|
+
import { baseObjectBounce } from 'gl-draw';
|
|
8
|
+
import { baseObjectBounceIn } from 'gl-draw';
|
|
9
|
+
import { baseObjectFadeIn } from 'gl-draw';
|
|
10
|
+
import { baseObjectFadeOut } from 'gl-draw';
|
|
3
11
|
import { default as default_2 } from 'gl-draw';
|
|
4
12
|
import { DirectionalLightObject } from 'gl-draw';
|
|
5
13
|
import { EventEmitter } from 'events';
|
|
6
14
|
import { ExtrudePolygonObject } from 'gl-draw';
|
|
7
15
|
import { FeatureCollection } from 'geojson';
|
|
8
16
|
import { GeoJsonProperties } from 'geojson';
|
|
17
|
+
import { GeometryDefinition } from 'gl-draw';
|
|
9
18
|
import { GeoProjection } from 'd3-geo';
|
|
10
19
|
import { GroupObject } from 'gl-draw';
|
|
11
20
|
import { HemisphereLightObject } from 'gl-draw';
|
|
12
21
|
import { Lead } from 'gl-draw';
|
|
13
22
|
import { LineObject } from 'gl-draw';
|
|
14
23
|
import { Listener } from 'events';
|
|
24
|
+
import { Matrix4 } from 'three';
|
|
15
25
|
import { MeshLineMaterial } from 'gl-draw';
|
|
16
26
|
import { MeshObject } from 'gl-draw';
|
|
27
|
+
import { ModelObject } from 'gl-draw';
|
|
17
28
|
import { MultiPolygon } from 'geojson';
|
|
18
29
|
import { NodeObject } from 'gl-draw';
|
|
30
|
+
import { Object3D } from 'three';
|
|
19
31
|
import { Pencil } from 'gl-draw';
|
|
20
|
-
import { PickFunctionsItem } from 'gl-draw';
|
|
21
32
|
import { PointLightObject } from 'gl-draw';
|
|
22
33
|
import { Polygon } from 'geojson';
|
|
23
34
|
import { Position } from 'geojson';
|
|
24
35
|
import { ProjectionOptions } from 'gl-draw';
|
|
25
36
|
import { RectAreaLightObject } from 'gl-draw';
|
|
37
|
+
import { remapSnapshotAnimationTracks } from 'gl-draw';
|
|
26
38
|
import { RestoreBaseObjectOptions } from 'gl-draw';
|
|
27
39
|
import { SceneSnapshot } from 'gl-draw';
|
|
40
|
+
import { sinusoidalInOut } from 'gl-draw';
|
|
28
41
|
import { SpotLightObject } from 'gl-draw';
|
|
29
42
|
import { SpriteObject } from 'gl-draw';
|
|
43
|
+
import { StructureResources } from 'gl-draw';
|
|
30
44
|
import * as THREE from 'three';
|
|
45
|
+
import { timeOut } from 'gl-draw';
|
|
46
|
+
import { TubeObject } from 'gl-draw';
|
|
31
47
|
import { default as TWEEN } from 'three/examples/jsm/libs/tween.module.js';
|
|
32
48
|
import { Tween } from 'three/examples/jsm/libs/tween.module.js';
|
|
49
|
+
import { TweenOptions } from 'gl-draw';
|
|
50
|
+
import { Vector3 } from 'three';
|
|
51
|
+
import { Vector3Tuple } from 'three';
|
|
33
52
|
import { Water } from './Water2';
|
|
34
53
|
|
|
35
54
|
declare class AmbientLight extends AmbientLightObject {
|
|
@@ -39,48 +58,31 @@ declare class AmbientLight extends AmbientLightObject {
|
|
|
39
58
|
export declare namespace animationUtils {
|
|
40
59
|
export {
|
|
41
60
|
timeOut,
|
|
42
|
-
TweenOptions,
|
|
43
61
|
sinusoidalInOut,
|
|
44
62
|
baseObjectFadeIn,
|
|
45
63
|
baseObjectFadeOut,
|
|
46
64
|
baseObjectBounceIn,
|
|
47
|
-
baseObjectBounce
|
|
65
|
+
baseObjectBounce,
|
|
66
|
+
TweenOptions
|
|
48
67
|
}
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
private pickTargetVersion;
|
|
62
|
-
private pickBindings;
|
|
63
|
-
addPickTarget(radius?: number, show?: boolean): Promise<Tube | undefined>;
|
|
64
|
-
/** Restored picking children are adopted instead of allocating a duplicate tube. */
|
|
65
|
-
rebuildFromScene(): Promise<void>;
|
|
66
|
-
dispose(): void;
|
|
67
|
-
protected createPointerBinding(type: PickFunctionsItem['type'], cb: PickFunctionsItem['cb']): () => void;
|
|
68
|
-
setColor(color: string): void;
|
|
69
|
-
animateIn({ duration, delay, repeat, onComplete, onRepeat, }?: {
|
|
70
|
-
duration?: number;
|
|
71
|
-
delay?: number;
|
|
72
|
-
repeat?: number;
|
|
73
|
-
onComplete?: (...args: any[]) => void;
|
|
74
|
-
onRepeat?: (count: number) => void;
|
|
75
|
-
}): void;
|
|
76
|
-
render(): void;
|
|
77
|
-
}
|
|
70
|
+
/** Merge a privately prepared clipboard subtree; existing equal rows remain shared. */
|
|
71
|
+
export declare function appendObjectDocument(before: VisSceneDocument, sceneId: string, snapshot: any, parentUuid: string, materialAdditions?: readonly MaterialAsset[]): VisSceneDocument;
|
|
72
|
+
|
|
73
|
+
export declare function appendScenesDocument(before: VisSceneDocument, scenes: readonly SceneViewportDocument[], materials?: readonly MaterialAsset[], prefabs?: readonly PrefabAsset[]): VisSceneDocument;
|
|
74
|
+
|
|
75
|
+
export { ArcPathOptions }
|
|
76
|
+
|
|
77
|
+
export { ArcPoint }
|
|
78
|
+
|
|
79
|
+
export { ArcSpherePathOptions }
|
|
78
80
|
|
|
79
81
|
declare class Area extends GroupObject {
|
|
80
82
|
objectType: string;
|
|
81
|
-
options:
|
|
83
|
+
options: Options_8;
|
|
82
84
|
area: ExtrudePolygonObject[];
|
|
83
|
-
constructor(options:
|
|
85
|
+
constructor(options: Options_8);
|
|
84
86
|
create(): Promise<void>;
|
|
85
87
|
rebuildFromScene(): void;
|
|
86
88
|
}
|
|
@@ -112,11 +114,13 @@ declare class Base_2 extends Camera {
|
|
|
112
114
|
sceneResources: default_2['sceneResources'];
|
|
113
115
|
tier0: boolean;
|
|
114
116
|
roomEnvMap?: THREE.Texture;
|
|
115
|
-
private roomEnvTarget?;
|
|
116
117
|
private roomEnvLease?;
|
|
117
118
|
visName: string;
|
|
118
119
|
private detectRes?;
|
|
119
120
|
private ownsPencil;
|
|
121
|
+
private renderingSuspensions;
|
|
122
|
+
/* Excluded from this release type: suspendRendering */
|
|
123
|
+
private acquireRenderingSuspensions;
|
|
120
124
|
publicDir: Record<string, string>;
|
|
121
125
|
private prefabAssets;
|
|
122
126
|
private prefabMaterials;
|
|
@@ -224,46 +228,6 @@ declare class Base_2 extends Camera {
|
|
|
224
228
|
dispose(): void;
|
|
225
229
|
}
|
|
226
230
|
|
|
227
|
-
declare const baseObjectBounce: (obj: BaseObject, up: string | undefined, to: number) => {
|
|
228
|
-
start: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
229
|
-
duration?: number | undefined;
|
|
230
|
-
repeat?: number | undefined;
|
|
231
|
-
repeatResolve?: number | undefined;
|
|
232
|
-
repeatDelay?: number | undefined;
|
|
233
|
-
}) => Promise<void>;
|
|
234
|
-
stop: () => void;
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
declare const baseObjectBounceIn: (obj: BaseObject, up?: string) => {
|
|
238
|
-
start: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
239
|
-
duration?: number | undefined;
|
|
240
|
-
repeat?: number | undefined;
|
|
241
|
-
repeatResolve?: number | undefined;
|
|
242
|
-
repeatDelay?: number | undefined;
|
|
243
|
-
}) => Promise<void>;
|
|
244
|
-
stop: () => void;
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
declare const baseObjectFadeIn: (obj: BaseObject) => {
|
|
248
|
-
start: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
249
|
-
duration?: number | undefined;
|
|
250
|
-
repeat?: number | undefined;
|
|
251
|
-
repeatResolve?: number | undefined;
|
|
252
|
-
repeatDelay?: number | undefined;
|
|
253
|
-
}) => Promise<void>;
|
|
254
|
-
stop: () => void;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
declare const baseObjectFadeOut: (obj: BaseObject) => {
|
|
258
|
-
start: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
259
|
-
duration?: number | undefined;
|
|
260
|
-
repeat?: number | undefined;
|
|
261
|
-
repeatResolve?: number | undefined;
|
|
262
|
-
repeatDelay?: number | undefined;
|
|
263
|
-
}) => Promise<void>;
|
|
264
|
-
stop: () => void;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
231
|
declare interface BaseOptions {
|
|
268
232
|
container: HTMLElement;
|
|
269
233
|
assetsPrefix?: string;
|
|
@@ -295,6 +259,9 @@ export declare interface BindMaterialAssetOptions {
|
|
|
295
259
|
alias?: string;
|
|
296
260
|
}
|
|
297
261
|
|
|
262
|
+
/** Bind explicit slots; no render graph is exported to discover the changed rows. */
|
|
263
|
+
declare function bindMaterialSlots(document: VisSceneDocument, sceneId: string, assignments: readonly MaterialSlotAssignment[], optionReplacements?: ReadonlyMap<string, ReadonlyMap<string, string>>, optionAssetId?: string): VisSceneDocument;
|
|
264
|
+
|
|
298
265
|
declare class Box extends MeshObject {
|
|
299
266
|
objectType: string;
|
|
300
267
|
create(): void;
|
|
@@ -302,8 +269,8 @@ declare class Box extends MeshObject {
|
|
|
302
269
|
|
|
303
270
|
declare class Building extends GroupObject {
|
|
304
271
|
objectType: string;
|
|
305
|
-
options:
|
|
306
|
-
constructor(options:
|
|
272
|
+
options: Options_6;
|
|
273
|
+
constructor(options: Options_6);
|
|
307
274
|
create(): Promise<void>;
|
|
308
275
|
rebuildFromScene(): void;
|
|
309
276
|
private gradientMaterials;
|
|
@@ -419,8 +386,8 @@ declare interface CityOptions {
|
|
|
419
386
|
|
|
420
387
|
declare class CityPlane extends MeshObject {
|
|
421
388
|
objectType: string;
|
|
422
|
-
options:
|
|
423
|
-
constructor(options:
|
|
389
|
+
options: Options_10;
|
|
390
|
+
constructor(options: Options_10);
|
|
424
391
|
plane: THREE.PlaneGeometry;
|
|
425
392
|
water?: Water;
|
|
426
393
|
create(): Promise<void>;
|
|
@@ -439,22 +406,38 @@ export declare function cloneSceneMaterials(document: VisSceneDocument, sourceId
|
|
|
439
406
|
/** Rebind internal targets while preserving links to scenes outside the copied set. */
|
|
440
407
|
export declare function cloneSceneWithIds(scene: SceneViewportDocument, ids: Map<string, string>): SceneViewportDocument;
|
|
441
408
|
|
|
409
|
+
/** Configuration and alias values are additional conservative resource roots. */
|
|
410
|
+
export declare function collectStructureResources(graph: Record<string, any>, roots: readonly Record<string, any>[], additionalReferences?: readonly unknown[]): StructureResources;
|
|
411
|
+
|
|
442
412
|
declare class ContinentsBg extends GroupObject {
|
|
443
413
|
objectType: string;
|
|
444
|
-
options:
|
|
414
|
+
options: Options_5;
|
|
445
415
|
mapArr: PlaneMap[];
|
|
446
|
-
constructor(options:
|
|
416
|
+
constructor(options: Options_5);
|
|
447
417
|
create(): Promise<void>;
|
|
448
|
-
getLocationPosition(location: [number, number], name?: string): [number, number, number] | undefined;
|
|
418
|
+
getLocationPosition(location: [number, number], name?: string, height?: number): [number, number, number] | undefined;
|
|
449
419
|
private calculatePosition;
|
|
450
420
|
render(): void;
|
|
451
421
|
rebuildFromScene(): void;
|
|
452
422
|
dispose(): void;
|
|
453
423
|
}
|
|
454
424
|
|
|
425
|
+
/** Copy only the copied branches; source nodes and existing resource rows keep
|
|
426
|
+
* their identity, including when several copies share one procedural geometry. */
|
|
427
|
+
export declare function copyNativeGeometries(document: VisSceneDocument, sceneId: string, pairs: readonly {
|
|
428
|
+
sourceUuid: string;
|
|
429
|
+
copyUuid: string;
|
|
430
|
+
}[], lead: BaseObject['lead']): VisSceneDocument;
|
|
431
|
+
|
|
432
|
+
/** The clipboard already owns its subtree. Capture the exact geometry shown in
|
|
433
|
+
* the editor so procedural create() cannot silently replace it after paste. */
|
|
434
|
+
export declare function copySnapshotGeometries(snapshot: any, source: BaseObject): void;
|
|
435
|
+
|
|
455
436
|
/** Explicit creation persists even with no aliases or object users. */
|
|
456
437
|
export declare function createMaterialAsset<T extends VisSceneDocument>(document: T, options: CreateMaterialAssetOptions): T;
|
|
457
438
|
|
|
439
|
+
declare function createMaterialAssetDocument(document: VisSceneDocument, options: CreateMaterialAssetOptions): VisSceneDocument;
|
|
440
|
+
|
|
458
441
|
export declare interface CreateMaterialAssetOptions {
|
|
459
442
|
id: string;
|
|
460
443
|
name: string;
|
|
@@ -479,12 +462,17 @@ export declare function createRuntimeSceneGraph(scene: SceneViewportDocument, op
|
|
|
479
462
|
/* Excluded from this release type: consumeInput */
|
|
480
463
|
}): Record<string, any>;
|
|
481
464
|
|
|
465
|
+
/** Reuse renderer indexes while retaining material asset aliases and prefab dependencies. */
|
|
466
|
+
export declare function createStructureResourceCollector(graph: Record<string, any>): (roots: readonly Record<string, any>[], additionalReferences?: readonly unknown[]) => StructureResources;
|
|
467
|
+
|
|
482
468
|
declare class DirectionalLight extends DirectionalLightObject {
|
|
483
469
|
constructor(...options: ConstructorParameters<typeof DirectionalLightObject>);
|
|
484
470
|
update(delta: number, elapsed: number): void;
|
|
485
471
|
render(): void;
|
|
486
472
|
}
|
|
487
473
|
|
|
474
|
+
declare function duplicateMaterialAssetDocument(document: VisSceneDocument, id: string, newId: string, mode: 'asset' | 'object' | 'scene', sceneId: string, objectId?: string, slot?: number): VisSceneDocument;
|
|
475
|
+
|
|
488
476
|
/** One-click copy and apply; preserve the source's user-visible scope. */
|
|
489
477
|
export declare function duplicateMaterialForObject<T extends VisSceneDocument>(document: T, options: Omit<BindMaterialAssetOptions, 'alias'> & {
|
|
490
478
|
objectId: string;
|
|
@@ -492,6 +480,23 @@ export declare function duplicateMaterialForObject<T extends VisSceneDocument>(d
|
|
|
492
480
|
name?: string;
|
|
493
481
|
}): T;
|
|
494
482
|
|
|
483
|
+
/** Duplicate object identities and their rig bindings, while borrowing immutable content resources. */
|
|
484
|
+
export declare function duplicateObjectsDocument(before: VisSceneDocument, sceneId: string, targets: readonly {
|
|
485
|
+
uuid: string;
|
|
486
|
+
parentUuid: string;
|
|
487
|
+
matrix?: number[];
|
|
488
|
+
matrixAutoUpdate?: boolean;
|
|
489
|
+
}[]): {
|
|
490
|
+
document: VisSceneDocument;
|
|
491
|
+
uuids: string[];
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
/** Duplicate only the selected page and its own material assets. */
|
|
495
|
+
export declare function duplicateSceneDocument(before: VisSceneDocument, sceneId: string, id: string, name?: string): {
|
|
496
|
+
document: VisSceneDocument;
|
|
497
|
+
id: string;
|
|
498
|
+
};
|
|
499
|
+
|
|
495
500
|
export declare type Earth = Earth_2;
|
|
496
501
|
|
|
497
502
|
declare class Earth_2 extends Base_2 {
|
|
@@ -510,15 +515,15 @@ declare class Earth_2 extends Base_2 {
|
|
|
510
515
|
Countries: typeof PlaneMap;
|
|
511
516
|
PlaneMap: typeof PlaneMap;
|
|
512
517
|
Point: Point;
|
|
513
|
-
Arc:
|
|
514
|
-
Model:
|
|
518
|
+
Arc: ArcObject;
|
|
519
|
+
Model: ModelObject;
|
|
515
520
|
Plane: Plane;
|
|
516
521
|
PlaneShadow: PlaneShadow;
|
|
517
522
|
Sphere: Sphere;
|
|
518
523
|
Sprite: Sprite;
|
|
519
524
|
Box: Box;
|
|
520
525
|
Circle: Circle;
|
|
521
|
-
Tube:
|
|
526
|
+
Tube: TubeObject;
|
|
522
527
|
Ring: Ring;
|
|
523
528
|
AmbientLight: AmbientLight;
|
|
524
529
|
DirectionalLight: DirectionalLight;
|
|
@@ -533,19 +538,28 @@ declare class Earth_2 extends Base_2 {
|
|
|
533
538
|
};
|
|
534
539
|
private rotationControls?;
|
|
535
540
|
private releaseRotationLock?;
|
|
541
|
+
private visibilityChecks?;
|
|
536
542
|
private readonly stopAutoRotate;
|
|
537
543
|
private readonly resumeAutoRotate;
|
|
538
544
|
protected onRuntimeReady(): Promise<void>;
|
|
539
545
|
protected onDispose(): void;
|
|
540
|
-
|
|
546
|
+
private getLocationFrame;
|
|
547
|
+
/** 球体表面的世界坐标;height 沿真实表面法线偏移,单位为世界单位。 */
|
|
548
|
+
getLocationPosition(location: [number, number], height?: number): [number, number, number];
|
|
549
|
+
/** 球对象原点对应的世界球心。 */
|
|
550
|
+
getCenter(): [number, number, number];
|
|
551
|
+
/** 几何的本地半径,用于创建同坐标空间的地图图层。 */
|
|
541
552
|
getRadius(): number;
|
|
542
|
-
|
|
553
|
+
/** 真球的世界半径;非均匀缩放或剪切形成椭球时不能用于球面路径。 */
|
|
554
|
+
getWorldRadius(): number;
|
|
555
|
+
private requireSurfaceTransform;
|
|
556
|
+
checkBehindEarth(objArr: () => BaseObject[], cb: (obj: BaseObject[], res: boolean[]) => any): () => void;
|
|
543
557
|
/**
|
|
544
558
|
* 设置物体在球面上的位置和旋转,使其垂直于球面
|
|
545
559
|
* @param object - 要设置的物体
|
|
546
560
|
* @param location - 经纬度 [经度, 纬度]
|
|
547
|
-
* @param height -
|
|
548
|
-
* @param upAxis -
|
|
561
|
+
* @param height - 沿球面世界法线的距离,默认为0
|
|
562
|
+
* @param upAxis - Plane 的本地面法线(默认 -Z,正面朝球心);其他对象的本地朝向轴(默认 Y)
|
|
549
563
|
*/
|
|
550
564
|
setObjectOnSphere(baseObject: BaseObject, location: [number, number], height?: number, upAxis?: [number, number, number]): void;
|
|
551
565
|
getSceneBindings(): EarthSceneBindings;
|
|
@@ -593,9 +607,16 @@ declare class Event_2 {
|
|
|
593
607
|
/** Expand at the editor import boundary so independently edited scenes own their data. */
|
|
594
608
|
export declare function expandSceneDocumentResources<T extends VisSceneDocument>(document: T): T;
|
|
595
609
|
|
|
610
|
+
/** Expand renderer pools, including snapshots retained as prefab baselines. */
|
|
611
|
+
export declare function expandStructureSnapshot<T extends Record<string, any>>(input: T): T;
|
|
612
|
+
|
|
596
613
|
/** Extract only this material's dependencies, without mutating the scene snapshot. */
|
|
597
614
|
export declare function extractMaterialDefinition(scene: SceneViewportDocument, materialUuid: string): Record<string, any>;
|
|
598
615
|
|
|
616
|
+
/** Extract current object resources without treating prefab baseline metadata as
|
|
617
|
+
* dependencies of the live object. Baselines remain in the copied metadata. */
|
|
618
|
+
export declare function extractObjectResourceGraph(graph: any, object: any): any;
|
|
619
|
+
|
|
599
620
|
declare const findAdcodeInfo: (adcode: number) => {
|
|
600
621
|
adcode: number;
|
|
601
622
|
lng: number;
|
|
@@ -626,6 +647,19 @@ export declare function getSceneDocument(document: VisSceneDocument, sceneId?: s
|
|
|
626
647
|
resolveResources?: boolean;
|
|
627
648
|
}): SceneViewportDocument;
|
|
628
649
|
|
|
650
|
+
/** An identity group shell keeps selected sibling objects and their transforms untouched. */
|
|
651
|
+
export declare function groupObjectsDocument(before: VisSceneDocument, sceneId: string, ids: readonly string[], options?: GroupObjectsDocumentOptions): {
|
|
652
|
+
document: VisSceneDocument;
|
|
653
|
+
uuid: string;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
export declare interface GroupObjectsDocumentOptions {
|
|
657
|
+
/** Display name; hosts may supply their localized default. */
|
|
658
|
+
name?: string;
|
|
659
|
+
/** Authored BaseObject user data, separate from generated constructor metadata. */
|
|
660
|
+
userData?: Record<string, any>;
|
|
661
|
+
}
|
|
662
|
+
|
|
629
663
|
declare class HemisphereLight extends HemisphereLightObject {
|
|
630
664
|
}
|
|
631
665
|
|
|
@@ -710,15 +744,15 @@ declare class Map_3 extends Base_2 {
|
|
|
710
744
|
Building: Building;
|
|
711
745
|
Road: Road;
|
|
712
746
|
Point: Point;
|
|
713
|
-
Arc:
|
|
714
|
-
Model:
|
|
747
|
+
Arc: ArcObject;
|
|
748
|
+
Model: ModelObject;
|
|
715
749
|
Plane: Plane;
|
|
716
750
|
PlaneShadow: PlaneShadow;
|
|
717
751
|
Sphere: Sphere;
|
|
718
752
|
Sprite: Sprite;
|
|
719
753
|
Box: Box;
|
|
720
754
|
Circle: Circle;
|
|
721
|
-
Tube:
|
|
755
|
+
Tube: TubeObject;
|
|
722
756
|
Ring: Ring;
|
|
723
757
|
AmbientLight: AmbientLight;
|
|
724
758
|
DirectionalLight: DirectionalLight;
|
|
@@ -734,6 +768,9 @@ declare class Map_3 extends Base_2 {
|
|
|
734
768
|
protected get defaultCameraUp(): THREE.Vector3;
|
|
735
769
|
protected onRuntimeReady(): Promise<void>;
|
|
736
770
|
protected prepareInitialCamera(): Promise<void>;
|
|
771
|
+
private mapBoundaryMatrix?;
|
|
772
|
+
private mapBoundaryEnabled?;
|
|
773
|
+
private refreshMapBoundary;
|
|
737
774
|
private updateMapBoundary;
|
|
738
775
|
/* Excluded from this release type: finalizeRegionGeometry */
|
|
739
776
|
private prepareCityVis;
|
|
@@ -759,12 +796,15 @@ declare class Map_3 extends Base_2 {
|
|
|
759
796
|
private labelGroupObject3dUserData;
|
|
760
797
|
eraseLabels(): void;
|
|
761
798
|
geAdcodePosition(adcode: number): [number, number, number] | undefined;
|
|
762
|
-
|
|
799
|
+
/** 地图顶面的世界坐标;height 沿顶面世界法线偏移,单位为世界单位。 */
|
|
800
|
+
getLocationPosition(location: [number, number], height?: number): [number, number, number];
|
|
801
|
+
private getMainMapLocationPosition;
|
|
802
|
+
private worldToObjectParent;
|
|
763
803
|
/**
|
|
764
804
|
* 设置物体在平面地图上的位置
|
|
765
805
|
* @param object - 要设置的物体
|
|
766
806
|
* @param location - 经纬度 [经度, 纬度]
|
|
767
|
-
* @param height -
|
|
807
|
+
* @param height - 沿地图顶面法线的世界距离,默认为0
|
|
768
808
|
*/
|
|
769
809
|
setObjectOnMap(object: BaseObject, location: [number, number], height?: number): void;
|
|
770
810
|
setObjectOnMapAreaByProperty(object: BaseObject, key: string, value: any, height?: number): void;
|
|
@@ -813,7 +853,7 @@ declare class Map_3 extends Base_2 {
|
|
|
813
853
|
/** undefined 表示沿用设计师构图;对象(包括全 0)表示宿主覆盖。 */
|
|
814
854
|
getSafeAreaInsets(): MapSafeAreaInsets | undefined;
|
|
815
855
|
setSafeAreaInsets(insets?: Partial<MapSafeAreaInsets>, options?: MapSafeAreaOptions): Promise<void>;
|
|
816
|
-
refitSafeAreaIfNeeded(options?: MapSafeAreaOptions): Promise<
|
|
856
|
+
refitSafeAreaIfNeeded(options?: MapSafeAreaOptions): Promise<boolean>;
|
|
817
857
|
findAdcodeInfo(adcode: number): {
|
|
818
858
|
adcode: number;
|
|
819
859
|
lng: number;
|
|
@@ -850,7 +890,7 @@ declare class Map_3 extends Base_2 {
|
|
|
850
890
|
/* Excluded from this release type: rebuildRegion */
|
|
851
891
|
private rebuildRegionGeometry;
|
|
852
892
|
/** 候选区域提交后的相机过渡,不参与场景序列化。 */
|
|
853
|
-
playRegionEnterTransition({ duration, sourceCamera, onPrepared, }: MapRegionEnterTransitionOptions): Promise<void>;
|
|
893
|
+
playRegionEnterTransition({ duration, sourceCamera, preparedCamera, onPrepared, }: MapRegionEnterTransitionOptions): Promise<void>;
|
|
854
894
|
/** Region rules are page-local runtime overrides of a saved material asset. */
|
|
855
895
|
private regionRuleMaterial;
|
|
856
896
|
private setRegionTexture;
|
|
@@ -858,6 +898,13 @@ declare class Map_3 extends Base_2 {
|
|
|
858
898
|
protected onDispose(): void;
|
|
859
899
|
}
|
|
860
900
|
|
|
901
|
+
export declare interface MapAnchor {
|
|
902
|
+
longitude: number;
|
|
903
|
+
latitude: number;
|
|
904
|
+
/** Must match mapCRS; this API does not convert WGS84/GCJ02/BD09. */
|
|
905
|
+
crs: string;
|
|
906
|
+
}
|
|
907
|
+
|
|
861
908
|
declare interface MapAssetSources {
|
|
862
909
|
worldGeojson: string;
|
|
863
910
|
worldLiteGeojson: string;
|
|
@@ -932,6 +979,7 @@ declare interface MapOptions extends BaseOptions {
|
|
|
932
979
|
polarAngle?: number;
|
|
933
980
|
azimuthAngle?: number;
|
|
934
981
|
worldPacificCentre?: boolean;
|
|
982
|
+
/** 同时限制平移范围、最近缩放距离,以及穿透地图和翻转到背面的视角。默认 true。 */
|
|
935
983
|
mapBoundary?: boolean;
|
|
936
984
|
mergeSide?: boolean;
|
|
937
985
|
/** switchMapRegion 时重建城市建筑、道路、河流等数据层。 */
|
|
@@ -949,6 +997,16 @@ declare interface MapOptions extends BaseOptions {
|
|
|
949
997
|
assetSources?: MapAssetSources;
|
|
950
998
|
}
|
|
951
999
|
|
|
1000
|
+
export declare interface MapPlacementOptions {
|
|
1001
|
+
mapCRS: string;
|
|
1002
|
+
/** Explicit ground meshes only. Exclude the model, roofs, helpers and hidden surfaces. */
|
|
1003
|
+
surfaces: Object3D[];
|
|
1004
|
+
/** Model's physical height; optional if already in map units. Z is model/map up. */
|
|
1005
|
+
heightMeters?: number;
|
|
1006
|
+
/** Clearance in map units along map Z. */
|
|
1007
|
+
clearance?: number;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
952
1010
|
export declare interface MapRegionBackInteraction {
|
|
953
1011
|
trigger: 'click' | 'clickOutside';
|
|
954
1012
|
objectId: string;
|
|
@@ -960,6 +1018,7 @@ export declare interface MapRegionBackInteraction {
|
|
|
960
1018
|
|
|
961
1019
|
declare interface MapRegionEnterTransitionOptions extends SceneEnterTransitionOptions {
|
|
962
1020
|
sourceCamera?: [number, number, number, number, number, number];
|
|
1021
|
+
/* Excluded from this release type: preparedCamera */
|
|
963
1022
|
}
|
|
964
1023
|
|
|
965
1024
|
export declare type MapRegionSceneResolver = (document: VisSceneDocument, adcode: number) => string | SceneViewportDocument | null | undefined | Promise<string | SceneViewportDocument | null | undefined>;
|
|
@@ -1033,9 +1092,26 @@ export declare interface MaterialDefinitionScope {
|
|
|
1033
1092
|
readonly properties: readonly string[];
|
|
1034
1093
|
}
|
|
1035
1094
|
|
|
1095
|
+
/** Copy-on-write operations for committed documents; callers own validation and transactions.
|
|
1096
|
+
* The normalization-aware project APIs use the same implementation after preparing their inputs.
|
|
1097
|
+
*/
|
|
1098
|
+
export declare const materialDocumentOperations: Readonly<{
|
|
1099
|
+
materialize: typeof materializeChangedAssets;
|
|
1100
|
+
create: typeof createMaterialAssetDocument;
|
|
1101
|
+
replace: typeof replaceMaterialAssetDocument;
|
|
1102
|
+
registerSceneMaterials: typeof registerSceneMaterials;
|
|
1103
|
+
bindSlots: typeof bindMaterialSlots;
|
|
1104
|
+
duplicate: typeof duplicateMaterialAssetDocument;
|
|
1105
|
+
promote: typeof promoteMaterialAssetDocument;
|
|
1106
|
+
remove: typeof removeMaterialAssetDocument;
|
|
1107
|
+
}>;
|
|
1108
|
+
|
|
1036
1109
|
/** One explicit mapping from an asset's authored resource UUIDs to runtime resource UUIDs. */
|
|
1037
1110
|
export declare function materializeAssetDefinition(asset: MaterialAsset, materialUuid?: string): Record<string, any>;
|
|
1038
1111
|
|
|
1112
|
+
/** Project only changed assets. Object trees and unrelated resource payloads stay borrowed. */
|
|
1113
|
+
declare function materializeChangedAssets(document: VisSceneDocument, assets: readonly MaterialAsset[], sceneIds?: ReadonlySet<string>): VisSceneDocument;
|
|
1114
|
+
|
|
1039
1115
|
/* Excluded from this release type: materializeOwnedProjectMaterials */
|
|
1040
1116
|
|
|
1041
1117
|
/** Mutate a detached working snapshot owned exclusively by the caller. */
|
|
@@ -1064,6 +1140,12 @@ export declare type MaterialScope = {
|
|
|
1064
1140
|
sceneId: string;
|
|
1065
1141
|
};
|
|
1066
1142
|
|
|
1143
|
+
export declare type MaterialSlotAssignment = {
|
|
1144
|
+
uuid: string;
|
|
1145
|
+
slot: number;
|
|
1146
|
+
assetId: string;
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1067
1149
|
export declare interface MaterialUsage {
|
|
1068
1150
|
assetId: string;
|
|
1069
1151
|
sceneId: string;
|
|
@@ -1074,6 +1156,11 @@ export declare interface MaterialUsage {
|
|
|
1074
1156
|
alias?: string;
|
|
1075
1157
|
}
|
|
1076
1158
|
|
|
1159
|
+
declare type MatrixState = {
|
|
1160
|
+
matrix: number[];
|
|
1161
|
+
matrixAutoUpdate?: boolean;
|
|
1162
|
+
};
|
|
1163
|
+
|
|
1077
1164
|
/** Save author edits without promoting page-local region textures into a shared definition. */
|
|
1078
1165
|
export declare function mergeAuthoredMaterialDefinition(savedDefinition: Record<string, any>, runtimeDefinition: Record<string, any>, options?: {
|
|
1079
1166
|
editedProperties?: string[];
|
|
@@ -1085,76 +1172,11 @@ export declare function mergeProjectMaterials(target: VisSceneDocument, incoming
|
|
|
1085
1172
|
idMap: Map<string, string>;
|
|
1086
1173
|
};
|
|
1087
1174
|
|
|
1088
|
-
declare class Model extends GroupObject {
|
|
1089
|
-
options: Options_7;
|
|
1090
|
-
mixer: THREE.AnimationMixer | null;
|
|
1091
|
-
clips: THREE.AnimationClip[];
|
|
1092
|
-
actions: THREE.AnimationAction[];
|
|
1093
|
-
actionStates: Record<string, boolean>;
|
|
1094
|
-
objectType: string;
|
|
1095
|
-
constructor(options: Options_7);
|
|
1096
|
-
create(): Promise<void>;
|
|
1097
|
-
render(): void;
|
|
1098
|
-
/**
|
|
1099
|
-
* Set animation clips for the model
|
|
1100
|
-
* @param clips Array of animation clips from GLTF
|
|
1101
|
-
*/
|
|
1102
|
-
setClips(clips: THREE.AnimationClip[]): void;
|
|
1103
|
-
/**
|
|
1104
|
-
* Play all animation clips
|
|
1105
|
-
*/
|
|
1106
|
-
playAllClips(): void;
|
|
1107
|
-
/**
|
|
1108
|
-
* Play a specific animation clip by name
|
|
1109
|
-
* @param clipName Name of the animation clip to play
|
|
1110
|
-
*/
|
|
1111
|
-
playClip(clipName: string): void;
|
|
1112
|
-
/**
|
|
1113
|
-
* Stop a specific animation clip by name
|
|
1114
|
-
* @param clipName Name of the animation clip to stop
|
|
1115
|
-
*/
|
|
1116
|
-
stopClip(clipName: string): void;
|
|
1117
|
-
/**
|
|
1118
|
-
* Stop all animation clips
|
|
1119
|
-
*/
|
|
1120
|
-
stopAllClips(): void;
|
|
1121
|
-
/**
|
|
1122
|
-
* Set the playback speed for all animations
|
|
1123
|
-
* @param speed Playback speed (1.0 = normal speed)
|
|
1124
|
-
*/
|
|
1125
|
-
setPlaybackSpeed(speed: number): void;
|
|
1126
|
-
/**
|
|
1127
|
-
* Get the current playback speed
|
|
1128
|
-
*/
|
|
1129
|
-
getPlaybackSpeed(): number;
|
|
1130
|
-
/**
|
|
1131
|
-
* Check if a specific animation is playing
|
|
1132
|
-
* @param clipName Name of the animation clip
|
|
1133
|
-
*/
|
|
1134
|
-
isPlaying(clipName: string): boolean;
|
|
1135
|
-
/**
|
|
1136
|
-
* Get all available animation clip names
|
|
1137
|
-
*/
|
|
1138
|
-
getClipNames(): string[];
|
|
1139
|
-
rebuildFromScene(): Promise<void>;
|
|
1140
|
-
instantiate(ops?: Parameters<GroupObject['instantiate']>[0]): Promise<this>;
|
|
1141
|
-
/**
|
|
1142
|
-
* Update animations - should be called in render loop
|
|
1143
|
-
* @param deltaTime Time elapsed since last frame
|
|
1144
|
-
*/
|
|
1145
|
-
update(deltaTime: number): void;
|
|
1146
|
-
/**
|
|
1147
|
-
* Dispose of resources including animation mixer
|
|
1148
|
-
*/
|
|
1149
|
-
dispose(): void;
|
|
1150
|
-
private syncPlayingClipNames;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
1175
|
declare class Mountain extends GroupObject {
|
|
1154
1176
|
objectType: string;
|
|
1155
|
-
options: Required<Omit<
|
|
1177
|
+
options: Required<Omit<Options_9, 'bbox'>> & Pick<Options_9, 'bbox'>;
|
|
1156
1178
|
extrudePolygon: ExtrudePolygonObject;
|
|
1157
|
-
constructor(options:
|
|
1179
|
+
constructor(options: Options_9);
|
|
1158
1180
|
geojson2Meta(geojson: GeoJSON_4): {
|
|
1159
1181
|
coords: Position[][];
|
|
1160
1182
|
properties: GeoJsonProperties;
|
|
@@ -1164,6 +1186,12 @@ declare class Mountain extends GroupObject {
|
|
|
1164
1186
|
rebuildFromScene(): void;
|
|
1165
1187
|
}
|
|
1166
1188
|
|
|
1189
|
+
/** Reparent/reorder roots with caller-computed local matrices, without copying their descendants. */
|
|
1190
|
+
export declare function moveObjectsDocument(before: VisSceneDocument, sceneId: string, ids: readonly string[], parentUuid: string, order: readonly string[], matrices: ReadonlyMap<string, MatrixState>): VisSceneDocument;
|
|
1191
|
+
|
|
1192
|
+
/** Keep saved texture/image identities stable across runtime namespace and revision changes. */
|
|
1193
|
+
export declare function normalizeMaterialDefinition<T extends Record<string, any>>(input: T): T;
|
|
1194
|
+
|
|
1167
1195
|
/* Excluded from this release type: normalizeOwnedProjectMaterials */
|
|
1168
1196
|
|
|
1169
1197
|
/** Bind serialized runtime materials and alias catalogs to authored assets. */
|
|
@@ -1208,44 +1236,6 @@ declare interface Options {
|
|
|
1208
1236
|
}
|
|
1209
1237
|
|
|
1210
1238
|
declare interface Options_10 {
|
|
1211
|
-
uuid?: string;
|
|
1212
|
-
jsonUrl: string;
|
|
1213
|
-
projection: {
|
|
1214
|
-
center: [number, number];
|
|
1215
|
-
scale: number;
|
|
1216
|
-
};
|
|
1217
|
-
cacheKey?: string;
|
|
1218
|
-
meters?: number;
|
|
1219
|
-
grey?: boolean;
|
|
1220
|
-
material?: MeshLineMaterial;
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
declare interface Options_11 {
|
|
1224
|
-
uuid?: string;
|
|
1225
|
-
jsonUrl: string;
|
|
1226
|
-
projection: {
|
|
1227
|
-
center: [number, number];
|
|
1228
|
-
scale: number;
|
|
1229
|
-
};
|
|
1230
|
-
material: THREE.Material;
|
|
1231
|
-
type: string;
|
|
1232
|
-
cacheKey?: string;
|
|
1233
|
-
oArr?: number[];
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
declare interface Options_12 {
|
|
1237
|
-
geojson: GeoJSON_4;
|
|
1238
|
-
projection: {
|
|
1239
|
-
center: [number, number];
|
|
1240
|
-
scale: number;
|
|
1241
|
-
rotate?: [number, number];
|
|
1242
|
-
projectionType?: 'mercator' | 'equirectangular' | 'winkel3';
|
|
1243
|
-
};
|
|
1244
|
-
depth?: number;
|
|
1245
|
-
bbox?: number[];
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
declare interface Options_13 {
|
|
1249
1239
|
width: number;
|
|
1250
1240
|
height: number;
|
|
1251
1241
|
material?: THREE.Material;
|
|
@@ -1266,35 +1256,7 @@ declare interface Options_4 {
|
|
|
1266
1256
|
sprite?: boolean;
|
|
1267
1257
|
}
|
|
1268
1258
|
|
|
1269
|
-
declare interface Options_5
|
|
1270
|
-
from: number[];
|
|
1271
|
-
to: number[];
|
|
1272
|
-
control1?: number[];
|
|
1273
|
-
control2?: number[];
|
|
1274
|
-
radius?: number;
|
|
1275
|
-
globe?: boolean;
|
|
1276
|
-
color?: string;
|
|
1277
|
-
lineWidth?: number;
|
|
1278
|
-
offsetLoop?: boolean;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
declare interface Options_6 {
|
|
1282
|
-
path?: THREE.Curve<THREE.Vector3>;
|
|
1283
|
-
radius?: number;
|
|
1284
|
-
multiplyScalar?: number;
|
|
1285
|
-
/** Compact saved inputs for an Arc's derived picking geometry. */
|
|
1286
|
-
arcControlPoints?: number[][];
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
declare interface Options_7 {
|
|
1290
|
-
src?: string;
|
|
1291
|
-
autoPlay?: boolean;
|
|
1292
|
-
playbackSpeed?: number;
|
|
1293
|
-
serializedClips?: SerializedClip[];
|
|
1294
|
-
playingClipNames?: string[];
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
declare interface Options_8 {
|
|
1259
|
+
declare interface Options_5 {
|
|
1298
1260
|
materialOptions: {
|
|
1299
1261
|
topMat: THREE.Material;
|
|
1300
1262
|
sideMat: THREE.Material;
|
|
@@ -1306,7 +1268,7 @@ declare interface Options_8 {
|
|
|
1306
1268
|
geojsonSource: string;
|
|
1307
1269
|
}
|
|
1308
1270
|
|
|
1309
|
-
declare interface
|
|
1271
|
+
declare interface Options_6 {
|
|
1310
1272
|
uuid?: string;
|
|
1311
1273
|
jsonUrl: string;
|
|
1312
1274
|
projection: {
|
|
@@ -1322,6 +1284,44 @@ declare interface Options_9 {
|
|
|
1322
1284
|
materialOptions?: Record<string, THREE.Material>;
|
|
1323
1285
|
}
|
|
1324
1286
|
|
|
1287
|
+
declare interface Options_7 {
|
|
1288
|
+
uuid?: string;
|
|
1289
|
+
jsonUrl: string;
|
|
1290
|
+
projection: {
|
|
1291
|
+
center: [number, number];
|
|
1292
|
+
scale: number;
|
|
1293
|
+
};
|
|
1294
|
+
cacheKey?: string;
|
|
1295
|
+
meters?: number;
|
|
1296
|
+
grey?: boolean;
|
|
1297
|
+
material?: MeshLineMaterial;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
declare interface Options_8 {
|
|
1301
|
+
uuid?: string;
|
|
1302
|
+
jsonUrl: string;
|
|
1303
|
+
projection: {
|
|
1304
|
+
center: [number, number];
|
|
1305
|
+
scale: number;
|
|
1306
|
+
};
|
|
1307
|
+
material: THREE.Material;
|
|
1308
|
+
type: string;
|
|
1309
|
+
cacheKey?: string;
|
|
1310
|
+
oArr?: number[];
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
declare interface Options_9 {
|
|
1314
|
+
geojson: GeoJSON_4;
|
|
1315
|
+
projection: {
|
|
1316
|
+
center: [number, number];
|
|
1317
|
+
scale: number;
|
|
1318
|
+
rotate?: [number, number];
|
|
1319
|
+
projectionType?: 'mercator' | 'equirectangular' | 'winkel3';
|
|
1320
|
+
};
|
|
1321
|
+
depth?: number;
|
|
1322
|
+
bbox?: number[];
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
1325
|
/** Pack an export copy only; preserve the editor's independent scene snapshots. */
|
|
1326
1326
|
export declare function packSceneDocumentResources<T extends VisSceneDocument>(document: T): T;
|
|
1327
1327
|
|
|
@@ -1330,6 +1330,14 @@ export declare function patchSceneStructureDocument(document: VisSceneDocument,
|
|
|
1330
1330
|
/** Validate every affected scene and both catalogs before exposing any saved state. */
|
|
1331
1331
|
export declare function patchSceneStructureTransactionDocument(document: VisSceneDocument, transaction: SceneStructureTransaction): VisSceneDocument;
|
|
1332
1332
|
|
|
1333
|
+
export declare interface PlanarMap {
|
|
1334
|
+
object3d: Object3D;
|
|
1335
|
+
options: {
|
|
1336
|
+
projection?: ProjectionOptions;
|
|
1337
|
+
conic?: boolean;
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1333
1341
|
declare class Plane extends MeshObject {
|
|
1334
1342
|
objectType: string;
|
|
1335
1343
|
create(): void;
|
|
@@ -1404,6 +1412,20 @@ declare class PlaneShadow extends MeshObject {
|
|
|
1404
1412
|
create(): Promise<void>;
|
|
1405
1413
|
}
|
|
1406
1414
|
|
|
1415
|
+
/** Read-only plan. Aligns the model bounds center in XY and lowest vertex to actual ground.
|
|
1416
|
+
* Apply the returned local matrix to a detached candidate, serialize, then import/replace once.
|
|
1417
|
+
*/
|
|
1418
|
+
export declare function planPlacement(model: Object3D, map: PlanarMap, anchor: MapAnchor, options: MapPlacementOptions): {
|
|
1419
|
+
localMatrix: Matrix4;
|
|
1420
|
+
worldMatrix: Matrix4;
|
|
1421
|
+
groundPoint: Vector3Tuple;
|
|
1422
|
+
groundObjectUuid: string;
|
|
1423
|
+
mapPosition: number[];
|
|
1424
|
+
scaleBasis: "local spherical approximation";
|
|
1425
|
+
xUnitsPerMeter: number;
|
|
1426
|
+
yUnitsPerMeter: number;
|
|
1427
|
+
};
|
|
1428
|
+
|
|
1407
1429
|
declare class Point extends BaseObject {
|
|
1408
1430
|
objectType: string;
|
|
1409
1431
|
options: Options_4;
|
|
@@ -1439,6 +1461,22 @@ export declare interface PreparedSceneStructure {
|
|
|
1439
1461
|
|
|
1440
1462
|
declare const preparedSceneStructure: unique symbol;
|
|
1441
1463
|
|
|
1464
|
+
export declare function prepareGeometryBinding(before: VisSceneDocument, sceneId: string, uuid: string, input: GeometryDefinition | null, override: boolean): VisSceneDocument;
|
|
1465
|
+
|
|
1466
|
+
/** Change one binding; a conflicting borrowed UUID must not overwrite its other users. */
|
|
1467
|
+
export declare function prepareGeometryEdit(before: VisSceneDocument, sceneId: string, uuid: string, input: GeometryDefinition | null): VisSceneDocument;
|
|
1468
|
+
|
|
1469
|
+
/** Uses the same projection and Y sign as PlaneMap geometry, then its world matrix. */
|
|
1470
|
+
export declare function projectLocation(map: PlanarMap, anchor: MapAnchor, mapCRS: string): {
|
|
1471
|
+
local: Vector3;
|
|
1472
|
+
world: Vector3;
|
|
1473
|
+
xUnitsPerMeter: number;
|
|
1474
|
+
yUnitsPerMeter: number;
|
|
1475
|
+
scaleBasis: "local spherical approximation";
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1478
|
+
declare function promoteMaterialAssetDocument(document: VisSceneDocument, id: string): VisSceneDocument;
|
|
1479
|
+
|
|
1442
1480
|
export declare function promoteMaterialToProject<T extends VisSceneDocument>(document: T, assetId: string): T;
|
|
1443
1481
|
|
|
1444
1482
|
declare class RectAreaLight extends RectAreaLightObject {
|
|
@@ -1459,6 +1497,15 @@ declare interface RegionTextureRule {
|
|
|
1459
1497
|
levels?: string[];
|
|
1460
1498
|
}
|
|
1461
1499
|
|
|
1500
|
+
/** Register imported definitions without normalizing or copying the existing project. */
|
|
1501
|
+
declare function registerSceneMaterials(document: VisSceneDocument, sceneId: string, onlyIds?: ReadonlySet<string>): VisSceneDocument;
|
|
1502
|
+
|
|
1503
|
+
/** Imported data is owned separately; scanning occupied IDs never copies current graphs. */
|
|
1504
|
+
export declare function remapImportedMaterials(before: VisSceneDocument, incoming: VisSceneDocument): VisSceneDocument;
|
|
1505
|
+
|
|
1506
|
+
/** Detached authored snapshots keep their copy links and relinquish source-asset resource identities. */
|
|
1507
|
+
export declare function remapOwnedSnapshotIdentity(snapshot: any, rootUuid?: string, sharedResourceIds?: ReadonlyMap<string, string>): any;
|
|
1508
|
+
|
|
1462
1509
|
export declare interface RemappedSceneDocument {
|
|
1463
1510
|
entrySceneId: string;
|
|
1464
1511
|
scenes: SceneViewportDocument[];
|
|
@@ -1480,8 +1527,22 @@ export declare function remapProjectMaterialIds<T extends VisSceneDocument>(docu
|
|
|
1480
1527
|
*/
|
|
1481
1528
|
export declare function remapSceneDocumentIds(document: VisSceneDocument, createSceneId: (scene: SceneViewportDocument, index: number) => string): RemappedSceneDocument;
|
|
1482
1529
|
|
|
1530
|
+
export { remapSnapshotAnimationTracks }
|
|
1531
|
+
|
|
1532
|
+
/** Copy an authored snapshot with fresh native and authored reference identities. */
|
|
1533
|
+
export declare function remapSnapshotIdentity(input: any, rootUuid?: string, sharedResourceIds?: ReadonlyMap<string, string>): any;
|
|
1534
|
+
|
|
1535
|
+
declare function removeMaterialAssetDocument(document: VisSceneDocument, id: string): VisSceneDocument;
|
|
1536
|
+
|
|
1537
|
+
/** Remove selected roots and prune only the authored rules that referred to them. */
|
|
1538
|
+
export declare function removeObjectsDocument(before: VisSceneDocument, sceneId: string, ids: readonly string[]): VisSceneDocument;
|
|
1539
|
+
|
|
1483
1540
|
export declare function removeProjectMaterial<T extends VisSceneDocument>(document: T, assetId: string): T;
|
|
1484
1541
|
|
|
1542
|
+
export declare function removeSceneDocument(before: VisSceneDocument, sceneId: string): VisSceneDocument;
|
|
1543
|
+
|
|
1544
|
+
declare function replaceMaterialAssetDocument(document: VisSceneDocument, asset: MaterialAsset): VisSceneDocument;
|
|
1545
|
+
|
|
1485
1546
|
declare class Ring extends MeshObject {
|
|
1486
1547
|
objectType: string;
|
|
1487
1548
|
create(): void;
|
|
@@ -1489,8 +1550,8 @@ declare class Ring extends MeshObject {
|
|
|
1489
1550
|
|
|
1490
1551
|
declare class Road extends GroupObject {
|
|
1491
1552
|
objectType: string;
|
|
1492
|
-
options:
|
|
1493
|
-
constructor(options:
|
|
1553
|
+
options: Options_7;
|
|
1554
|
+
constructor(options: Options_7);
|
|
1494
1555
|
linePrimary: LineObject[];
|
|
1495
1556
|
lineSecondary: LineObject[];
|
|
1496
1557
|
create(): Promise<void>;
|
|
@@ -1542,6 +1603,14 @@ declare interface SceneControlsOptions {
|
|
|
1542
1603
|
autoRotateSpeed?: number;
|
|
1543
1604
|
}
|
|
1544
1605
|
|
|
1606
|
+
export declare interface SceneDisplayContext {
|
|
1607
|
+
sceneId: string;
|
|
1608
|
+
/** 本次准备前已重新适配地图相机;false 的缓存页保留此前视角。 */
|
|
1609
|
+
cameraRefitted: boolean;
|
|
1610
|
+
/** 文档替换或 manager 销毁时取消准备。 */
|
|
1611
|
+
signal: AbortSignal;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1545
1614
|
export declare interface SceneDocumentMarker {
|
|
1546
1615
|
format: typeof SCENE_DOCUMENT_FORMAT;
|
|
1547
1616
|
schemaVersion: number;
|
|
@@ -1585,6 +1654,7 @@ export declare class SceneManager extends Event_2 {
|
|
|
1585
1654
|
private pencil?;
|
|
1586
1655
|
private safeAreaInsets?;
|
|
1587
1656
|
private generation;
|
|
1657
|
+
private displayPreparationAbort;
|
|
1588
1658
|
private documentIdentityRevision;
|
|
1589
1659
|
private preparedStructures;
|
|
1590
1660
|
private pendingInstances;
|
|
@@ -1596,6 +1666,11 @@ export declare class SceneManager extends Event_2 {
|
|
|
1596
1666
|
private assertGeneration;
|
|
1597
1667
|
private debugInteraction;
|
|
1598
1668
|
private enablePickDebug;
|
|
1669
|
+
private retireScenes;
|
|
1670
|
+
private discardSceneCandidates;
|
|
1671
|
+
/** Notifications cannot invalidate a transaction that has already committed. */
|
|
1672
|
+
private notifySceneObservers;
|
|
1673
|
+
private finishNavigation;
|
|
1599
1674
|
private disposeInactiveScenes;
|
|
1600
1675
|
/** Retire inactive pages after the host accepts navigation; failures never undo the active page. */
|
|
1601
1676
|
trimInactiveScenes(): unknown[];
|
|
@@ -1613,6 +1688,7 @@ export declare class SceneManager extends Event_2 {
|
|
|
1613
1688
|
setSafeAreaInsets(insets?: Partial<MapSafeAreaInsets>, options?: MapSafeAreaOptions): Promise<void>;
|
|
1614
1689
|
getSafeAreaInsets(): MapSafeAreaInsets | undefined;
|
|
1615
1690
|
private captureCamera;
|
|
1691
|
+
private prepareSceneDisplay;
|
|
1616
1692
|
private playTransition;
|
|
1617
1693
|
/** 更新可编辑文档,并释放已经不属于文档的非活动场景实例。 */
|
|
1618
1694
|
setDocument(document: VisSceneDocument): void;
|
|
@@ -1686,6 +1762,7 @@ export declare class SceneManager extends Event_2 {
|
|
|
1686
1762
|
switchScene(sceneId: string, options?: SwitchSceneOptions, hooks?: Record<string, any>): Promise<Base_2 | null>;
|
|
1687
1763
|
/**
|
|
1688
1764
|
* 恢复并缓存一个非活动场景,不改变当前场景、导航历史或相机。
|
|
1765
|
+
* 缓存至少保留当前页和本次预加载页;后续导航恢复配置的缓存上限。
|
|
1689
1766
|
*/
|
|
1690
1767
|
preloadScene(sceneId: string, hooks?: Record<string, any>): Promise<Base_2>;
|
|
1691
1768
|
/** 编辑器事务:在独立页面上修改参数并重建快照,成功后一起提交文档和实例。 */
|
|
@@ -1740,9 +1817,11 @@ export declare interface SceneManagerBehaviorOptions {
|
|
|
1740
1817
|
debugInteractions?: boolean;
|
|
1741
1818
|
/** 创建场景后、恢复 JSON 前调用。 */
|
|
1742
1819
|
prepareScene?: (scene: Base_2) => void;
|
|
1820
|
+
/** 场景与最终相机就绪后、提交和首帧绘制前等待宿主准备。失败时保留原场景。 */
|
|
1821
|
+
beforeSceneDisplay?: (scene: Base_2, context: SceneDisplayContext) => void | Promise<void>;
|
|
1743
1822
|
/** 是否保留非活动场景实例;编辑器可关闭以限制 GPU/内存占用。 */
|
|
1744
1823
|
cacheScenes?: boolean;
|
|
1745
|
-
/** Pages retained after navigation, including the active page; oldest inactive pages retire first. */
|
|
1824
|
+
/** Pages retained after navigation (default 8), including the active page; oldest inactive pages retire first. */
|
|
1746
1825
|
maxCachedScenes?: number;
|
|
1747
1826
|
/** 自定义分包场景读取器;可从 IndexedDB 等非 HTTP 存储按需读取。 */
|
|
1748
1827
|
loadScene?: (entry: SceneManifestEntry) => Promise<SceneViewportDocument>;
|
|
@@ -1916,18 +1995,6 @@ export declare interface SceneViewportPatch {
|
|
|
1916
1995
|
|
|
1917
1996
|
export declare function selectSceneDocument(document: VisSceneDocument, sceneId: string): VisSceneDocument;
|
|
1918
1997
|
|
|
1919
|
-
declare type SerializedClip = ReturnType<(typeof THREE.AnimationClip)['toJSON']>;
|
|
1920
|
-
|
|
1921
|
-
declare const sinusoidalInOut: ({ owner, onUpdate, onComplete, onCancel, backwards, }?: TweenOptions) => {
|
|
1922
|
-
start: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
1923
|
-
duration?: number | undefined;
|
|
1924
|
-
repeat?: number | undefined;
|
|
1925
|
-
repeatResolve?: number | undefined;
|
|
1926
|
-
repeatDelay?: number | undefined;
|
|
1927
|
-
}) => Promise<void>;
|
|
1928
|
-
stop: () => void;
|
|
1929
|
-
};
|
|
1930
|
-
|
|
1931
1998
|
declare class Sphere extends MeshObject {
|
|
1932
1999
|
radius: number;
|
|
1933
2000
|
options: any;
|
|
@@ -1977,6 +2044,8 @@ declare class Sprite extends SpriteObject {
|
|
|
1977
2044
|
|
|
1978
2045
|
export declare function stripMaterialAssetBinding<T extends Record<string, any>>(material: T): T;
|
|
1979
2046
|
|
|
2047
|
+
export { StructureResources }
|
|
2048
|
+
|
|
1980
2049
|
export declare interface SwitchSceneOptions {
|
|
1981
2050
|
/** 返回历史时不再记录当前场景。 */
|
|
1982
2051
|
recordHistory?: boolean;
|
|
@@ -1986,30 +2055,13 @@ export declare interface SwitchSceneOptions {
|
|
|
1986
2055
|
|
|
1987
2056
|
export { THREE }
|
|
1988
2057
|
|
|
1989
|
-
declare const timeOut: (ms: number) => Promise<any>;
|
|
1990
|
-
|
|
1991
|
-
declare class Tube extends MeshObject {
|
|
1992
|
-
objectType: string;
|
|
1993
|
-
options: Options_6;
|
|
1994
|
-
constructor(options: Options_6);
|
|
1995
|
-
create(): void;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
2058
|
export { TWEEN }
|
|
1999
2059
|
|
|
2000
2060
|
export { Tween }
|
|
2001
2061
|
|
|
2002
|
-
declare interface TweenOptions {
|
|
2003
|
-
owner?: Pick<Pencil, 'animations'>;
|
|
2004
|
-
onUpdate?: (value: number) => void;
|
|
2005
|
-
onComplete?: () => void;
|
|
2006
|
-
onCancel?: () => void;
|
|
2007
|
-
backwards?: boolean;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
2062
|
export declare function updateProjectMaterial<T extends VisSceneDocument>(document: T, assetId: string, patch: Partial<Pick<MaterialAsset, 'name' | 'material' | 'locked'>>): T;
|
|
2011
2063
|
|
|
2012
|
-
export declare const VERSION = "0.33.
|
|
2064
|
+
export declare const VERSION = "0.33.5";
|
|
2013
2065
|
|
|
2014
2066
|
export declare interface VisSceneDocument extends SceneDocumentMarker {
|
|
2015
2067
|
entrySceneId: string;
|