project organization
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// Base
|
||||
export { BaseNode, generateId, objectId, nodeType, Material } from "./base"
|
||||
|
||||
// Nodes
|
||||
export { SiteNode } from "./nodes/site"
|
||||
export { BuildingNode } from "./nodes/building"
|
||||
export { LevelNode } from "./nodes/level"
|
||||
export { WallNode } from "./nodes/wall"
|
||||
export { ItemNode } from "./nodes/item"
|
||||
|
||||
// Union types
|
||||
export { AnyNode } from "./types"
|
||||
export type { AnyNodeType, AnyNodeId } from "./types"
|
||||
|
||||
// Camera
|
||||
export { CameraSchema } from "./camera"
|
||||
@@ -6,7 +6,7 @@ import { WallNode } from "./wall";
|
||||
export const LevelNode = BaseNode.extend({
|
||||
id: objectId("level"),
|
||||
type: nodeType("level"),
|
||||
children: z.array(z.discriminatedUnion("type", [WallNode])).default([]),
|
||||
children: z.array(WallNode.shape.id).default([]),
|
||||
// Specific props
|
||||
level: z.number().default(0),
|
||||
}).describe(
|
||||
|
||||
Reference in New Issue
Block a user