Update architecture.md with persisted project structure details
This commit is contained in:
@@ -372,15 +372,22 @@ Rules:
|
|||||||
- no three.js object references
|
- no three.js object references
|
||||||
- should be testable in isolation
|
- should be testable in isolation
|
||||||
|
|
||||||
Example structure:
|
Example persisted project structure:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
interface SceneDocument {
|
interface ProjectDocument {
|
||||||
version: number;
|
version: number;
|
||||||
world: WorldSettings;
|
activeSceneId: string;
|
||||||
|
scenes: Record<string, ProjectScene>;
|
||||||
materials: Record<string, MaterialDef>;
|
materials: Record<string, MaterialDef>;
|
||||||
textures: Record<string, TextureDef>;
|
textures: Record<string, TextureDef>;
|
||||||
assets: Record<string, AssetRecord>;
|
assets: Record<string, AssetRecord>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ProjectScene {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
world: WorldSettings;
|
||||||
brushes: Record<string, Brush>;
|
brushes: Record<string, Brush>;
|
||||||
modelInstances: Record<string, ModelInstance>;
|
modelInstances: Record<string, ModelInstance>;
|
||||||
entities: Record<string, EntityInstance>;
|
entities: Record<string, EntityInstance>;
|
||||||
@@ -838,6 +845,8 @@ At that point, the user-facing save/load format should be a **project package**
|
|||||||
- `scene.json`
|
- `scene.json`
|
||||||
- referenced asset payloads
|
- referenced asset payloads
|
||||||
|
|
||||||
|
`scene.json` may still contain multiple authored scenes inside one project document; the file name does not imply a single loaded runtime scene.
|
||||||
|
|
||||||
Recommended logical shape:
|
Recommended logical shape:
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
|
|||||||
Reference in New Issue
Block a user