vis-core 0.33.0 → 0.33.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/dist/index.d.ts +19 -9
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ declare class Area extends GroupObject {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/** Validation is read-only and does not materialize or allocate runtime resources. */
|
|
90
|
-
export declare function assertProjectMaterials(document: Pick<VisSceneDocument, 'schemaVersion' | 'scenes' | 'materialLibrary' | 'prefabLibrary'>): void;
|
|
90
|
+
export declare function assertProjectMaterials(document: Pick<VisSceneDocument, 'schemaVersion' | 'scenes' | 'materialLibrary' | 'prefabLibrary' | '_resourcePool'>): void;
|
|
91
91
|
|
|
92
92
|
/** vis-core 的运行时入口只接受编辑平台导出的完整场景文档。 */
|
|
93
93
|
export declare function assertRuntimeSceneDocument(value: unknown): asserts value is VisSceneDocument & Record<string, any>;
|
|
@@ -1001,7 +1001,7 @@ export declare interface MaterialAsset {
|
|
|
1001
1001
|
revision: number;
|
|
1002
1002
|
scope: MaterialScope;
|
|
1003
1003
|
name: string;
|
|
1004
|
-
/**
|
|
1004
|
+
/** Complete Material.toJSON(); schema 6 exports may pool image/texture payloads. */
|
|
1005
1005
|
material: Record<string, any>;
|
|
1006
1006
|
locked?: boolean;
|
|
1007
1007
|
}
|
|
@@ -1481,11 +1481,14 @@ declare interface RuntimeImageAsset {
|
|
|
1481
1481
|
|
|
1482
1482
|
export declare const SCENE_DOCUMENT_FORMAT: "vis-scene";
|
|
1483
1483
|
|
|
1484
|
-
|
|
1484
|
+
/** Schema 6 extends the document pool to authored material dependencies. */
|
|
1485
|
+
export declare const SCENE_DOCUMENT_RESOURCE_POOL_SCHEMA_VERSION: 6;
|
|
1486
|
+
|
|
1487
|
+
export declare const SCENE_DOCUMENT_SCHEMA_VERSION: 6;
|
|
1485
1488
|
|
|
1486
1489
|
export declare const SCENE_MANIFEST_FORMAT: "vis-scene-manifest";
|
|
1487
1490
|
|
|
1488
|
-
export declare const SCENE_MANIFEST_SCHEMA_VERSION:
|
|
1491
|
+
export declare const SCENE_MANIFEST_SCHEMA_VERSION: 3;
|
|
1489
1492
|
|
|
1490
1493
|
export declare interface SceneBackInteraction {
|
|
1491
1494
|
trigger: 'click' | 'clickOutside';
|
|
@@ -1562,6 +1565,7 @@ export declare class SceneManager extends Event_2 {
|
|
|
1562
1565
|
private identityTrackedScenes;
|
|
1563
1566
|
private prefabOperations;
|
|
1564
1567
|
private transactionCacheDepth;
|
|
1568
|
+
private materialLibraryResources?;
|
|
1565
1569
|
private invalidatePendingOperations;
|
|
1566
1570
|
private assertGeneration;
|
|
1567
1571
|
private debugInteraction;
|
|
@@ -1581,6 +1585,10 @@ export declare class SceneManager extends Event_2 {
|
|
|
1581
1585
|
private playTransition;
|
|
1582
1586
|
/** 更新可编辑文档,并释放已经不属于文档的非活动场景实例。 */
|
|
1583
1587
|
setDocument(document: VisSceneDocument): void;
|
|
1588
|
+
/** Standalone material consumers cannot retain document-level pool references. */
|
|
1589
|
+
private resolvedMaterialLibrary;
|
|
1590
|
+
/** Keep scene payloads lazy, while independent material APIs own a resolved catalog. */
|
|
1591
|
+
private ownDocument;
|
|
1584
1592
|
private syncPrefabLibraries;
|
|
1585
1593
|
/**
|
|
1586
1594
|
* Replace the complete metadata projection for existing scenes without
|
|
@@ -1906,8 +1914,8 @@ declare class SphereShadow extends MeshObject {
|
|
|
1906
1914
|
}
|
|
1907
1915
|
|
|
1908
1916
|
/**
|
|
1909
|
-
* Creates
|
|
1910
|
-
*
|
|
1917
|
+
* Creates independently fetchable scene JSON values. Manifest 3 owns shared
|
|
1918
|
+
* payloads so scene and catalog copies do not multiply the deployed bytes.
|
|
1911
1919
|
*/
|
|
1912
1920
|
export declare function splitSceneDocument(document: VisSceneDocument, options?: {
|
|
1913
1921
|
sceneDirectory?: string;
|
|
@@ -1970,12 +1978,12 @@ declare interface TweenOptions {
|
|
|
1970
1978
|
|
|
1971
1979
|
export declare function updateProjectMaterial<T extends VisSceneDocument>(document: T, assetId: string, patch: Partial<Pick<MaterialAsset, 'name' | 'material' | 'locked'>>): T;
|
|
1972
1980
|
|
|
1973
|
-
export declare const VERSION = "0.33.
|
|
1981
|
+
export declare const VERSION = "0.33.1";
|
|
1974
1982
|
|
|
1975
1983
|
export declare interface VisSceneDocument extends SceneDocumentMarker {
|
|
1976
1984
|
entrySceneId: string;
|
|
1977
1985
|
scenes: SceneViewportDocument[];
|
|
1978
|
-
/** Schema 3:
|
|
1986
|
+
/** Schema 3: scene payloads; schema 6 also shares material-library payloads. */
|
|
1979
1987
|
_resourcePool?: any[];
|
|
1980
1988
|
/** Schema 4: serializable definitions shared by explicit asset identity. */
|
|
1981
1989
|
materialLibrary?: MaterialAsset[];
|
|
@@ -1989,10 +1997,12 @@ export declare interface VisSceneDocument extends SceneDocumentMarker {
|
|
|
1989
1997
|
|
|
1990
1998
|
export declare interface VisSceneManifest {
|
|
1991
1999
|
format: typeof SCENE_MANIFEST_FORMAT;
|
|
1992
|
-
schemaVersion: 1 | typeof SCENE_MANIFEST_SCHEMA_VERSION;
|
|
2000
|
+
schemaVersion: 1 | 2 | typeof SCENE_MANIFEST_SCHEMA_VERSION;
|
|
1993
2001
|
entrySceneId: string;
|
|
1994
2002
|
scenes: SceneManifestEntry[];
|
|
1995
2003
|
materialLibrary?: MaterialAsset[];
|
|
2004
|
+
/** Manifest 3: payloads referenced by the material catalog and scene files. */
|
|
2005
|
+
_resourcePool?: any[];
|
|
1996
2006
|
/** Externalized image files, relative to the manifest URL. */
|
|
1997
2007
|
imageAssets?: string[];
|
|
1998
2008
|
/** Reusable definitions. Only assets with sdkKey are available for SDK instantiation. */
|