draft spatial grid

This commit is contained in:
wass08
2026-01-18 10:54:02 +09:00
parent 4994384db5
commit 8bf933ed36
13 changed files with 604 additions and 19 deletions
+5
View File
@@ -16,6 +16,7 @@ const assetSchema = z.object({
});
export type AssetInput = z.input<typeof assetSchema>;
export type Asset = z.infer<typeof assetSchema>;
export const ItemNode = BaseNode.extend({
id: objectId("item"),
@@ -24,6 +25,10 @@ export const ItemNode = BaseNode.extend({
rotation: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
side: z.enum(["front", "back"]).optional(),
// Wall attachment properties (only used when asset.attachTo is "wall" or "wall-side")
wallId: z.string().optional(),
wallT: z.number().optional(), // 0-1 parametric position along wall
asset: assetSchema,
}).describe(dedent`Item node - used to represent a item in the building
- position: position in level coordinate system (or parent coordinate system if attached)