@adea-ai/asset-manifests 0.10.8
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/README.md +5 -0
- package/package.json +20 -0
- package/src/index.ts +95 -0
- package/tsconfig.json +5 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adea-ai/asset-manifests",
|
|
3
|
+
"version": "0.10.8",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"development": "./src/index.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"lint": "eslint .",
|
|
16
|
+
"build": "tsc -p tsconfig.json",
|
|
17
|
+
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
|
|
18
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export type SceneAvailability = "ready" | "planned";
|
|
2
|
+
|
|
3
|
+
export type SceneZone = {
|
|
4
|
+
id: string;
|
|
5
|
+
assetUrl: string;
|
|
6
|
+
/** Optional collision layer that follows this visual zone. */
|
|
7
|
+
collisionAssetUrl?: string;
|
|
8
|
+
/** Additional visual layers that load and unload with this zone. */
|
|
9
|
+
assetUrls?: readonly string[];
|
|
10
|
+
/** Exact-triangle field colliders that load and unload with this zone. */
|
|
11
|
+
collisionAssetUrls?: readonly string[];
|
|
12
|
+
preload?: boolean;
|
|
13
|
+
/** Load the zone automatically when the player enters this radius. */
|
|
14
|
+
preloadDistance?: number;
|
|
15
|
+
/** Optional transform for a model authored in local building space. */
|
|
16
|
+
transform?: {
|
|
17
|
+
position?: readonly [number, number, number];
|
|
18
|
+
quaternion?: readonly [number, number, number, number];
|
|
19
|
+
scale?: readonly [number, number, number];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type SceneStartPosition = {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
z: number;
|
|
27
|
+
yaw?: number;
|
|
28
|
+
pitch?: number;
|
|
29
|
+
/** Keep an authored start height instead of snapping to the first ray hit. */
|
|
30
|
+
snapToGround?: boolean;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type StaticFieldAssetUrls = {
|
|
34
|
+
foliage?: string;
|
|
35
|
+
props?: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type AssignedPropManifestPlacement = {
|
|
39
|
+
id?: string;
|
|
40
|
+
p?: readonly [number, number, number];
|
|
41
|
+
q?: readonly [number, number, number, number];
|
|
42
|
+
s?: readonly [number, number, number];
|
|
43
|
+
footprint?: readonly [number, number];
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type AssignedPropManifestAsset = {
|
|
47
|
+
assetUrl: string;
|
|
48
|
+
defaultScale: number;
|
|
49
|
+
footprint?: readonly [number, number];
|
|
50
|
+
placementSurface?: "floor" | "wall";
|
|
51
|
+
wallMountHeight?: number;
|
|
52
|
+
floorLift?: number;
|
|
53
|
+
placeableOnTop?: boolean;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** Runtime-only room content for props already assigned to a scene. */
|
|
57
|
+
export type AssignedPropsManifest = {
|
|
58
|
+
version?: number;
|
|
59
|
+
scene?: string;
|
|
60
|
+
assets: Record<string, AssignedPropManifestAsset>;
|
|
61
|
+
placements: Record<string, AssignedPropManifestPlacement[]>;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type SceneManifest = {
|
|
65
|
+
id: string;
|
|
66
|
+
label: string;
|
|
67
|
+
availability?: SceneAvailability;
|
|
68
|
+
entryAssetUrl: string;
|
|
69
|
+
/** Optional id for making the initially loaded asset unloadable as a zone. */
|
|
70
|
+
entryZoneId?: string;
|
|
71
|
+
/** Keep the entry collision layer active while visual zones transition. */
|
|
72
|
+
preserveEntryCollision?: boolean;
|
|
73
|
+
collisionAssetUrl?: string;
|
|
74
|
+
/** Additional collision layers kept active for multi-level scenes. */
|
|
75
|
+
additionalCollisionAssetUrls?: readonly string[];
|
|
76
|
+
additionalAssetUrls?: readonly string[];
|
|
77
|
+
zones?: SceneZone[];
|
|
78
|
+
startPosition?: SceneStartPosition;
|
|
79
|
+
/** Build-generated instanced fields for static scenes (preferred over runtime manifests). */
|
|
80
|
+
staticFieldAssetUrls?: StaticFieldAssetUrls;
|
|
81
|
+
/** Render-free exact-triangle companions for the generated static fields. */
|
|
82
|
+
staticFieldCollisionAssetUrls?: StaticFieldAssetUrls;
|
|
83
|
+
/** Optional foliage placement manifest (instanced from the foliage catalog at runtime). */
|
|
84
|
+
foliageManifestUrl?: string;
|
|
85
|
+
/** Optional props placement manifest (instanced from the props catalog at runtime). */
|
|
86
|
+
propsManifestUrl?: string;
|
|
87
|
+
/** Runtime-only manifest for props explicitly assigned to this workspace. */
|
|
88
|
+
assignedPropsManifestUrl?: string;
|
|
89
|
+
/** Public URL for persisted authored-object editor overrides. */
|
|
90
|
+
editorOverridesUrl?: string;
|
|
91
|
+
/** Optional repository-relative source path for persisted overrides. */
|
|
92
|
+
editorOverridesSourcePath?: string;
|
|
93
|
+
/** Optional repository-relative public copy path for persisted overrides. */
|
|
94
|
+
editorOverridesPublicPath?: string;
|
|
95
|
+
};
|