feat: add outlet direction (horizontal/vertical), wall light styles, floor textures, and stretch ceiling

- Add configurable outlet direction (horizontal/vertical) stored in metadata
- Add wall light style variants (classic, pendant-globe, sconce-up, sconce-down)
- Add PBR floor textures including natural oak
- Add stretch ceiling offset support with DB migration
- Add furniture surface texture selection
- Add canvas theme colors utility for dark mode support
- Update projection views with improved rendering
- Add EN and RU translations for all new properties
This commit is contained in:
2026-04-12 20:52:49 +03:00
parent d8a914bf2a
commit 521ea5e85b
34 changed files with 1278 additions and 162 deletions
+10
View File
@@ -67,6 +67,9 @@ const roomRoutes: FastifyPluginAsync = async (fastify: FastifyInstance) => {
wallHeight: input.wallHeight ?? 2.7,
plinthHeight: input.plinthHeight ?? 0.06,
plinthThickness: input.plinthThickness ?? 0.01,
...(input.stretchCeilingOffset !== undefined && {
stretchCeilingOffset: input.stretchCeilingOffset,
}),
order: input.order ?? 0,
// posX/posY added in schema migration; client regeneration required
...(input.posX !== undefined && { posX: input.posX }),
@@ -156,6 +159,9 @@ const roomRoutes: FastifyPluginAsync = async (fastify: FastifyInstance) => {
...(input.wallHeight !== undefined && { wallHeight: input.wallHeight }),
...(input.plinthHeight !== undefined && { plinthHeight: input.plinthHeight }),
...(input.plinthThickness !== undefined && { plinthThickness: input.plinthThickness }),
...(input.stretchCeilingOffset !== undefined && {
stretchCeilingOffset: input.stretchCeilingOffset,
}),
...(input.order !== undefined && { order: input.order }),
...(input.posX !== undefined && { posX: input.posX }),
...(input.posY !== undefined && { posY: input.posY }),
@@ -237,6 +243,8 @@ const roomRoutes: FastifyPluginAsync = async (fastify: FastifyInstance) => {
wallHeight: source.wallHeight,
plinthHeight: source.plinthHeight,
plinthThickness: source.plinthThickness,
stretchCeilingOffset:
(((source as Record<string, unknown>).stretchCeilingOffset as number | undefined) ?? 0),
order: nextOrder,
posX: source.posX,
posY: source.posY,
@@ -376,6 +384,7 @@ function toRoomResponse(room: {
wallHeight: number;
plinthHeight: number;
plinthThickness: number;
stretchCeilingOffset?: number | null;
order: number;
posX?: number | null;
posY?: number | null;
@@ -394,6 +403,7 @@ function toRoomResponse(room: {
wallHeight: room.wallHeight,
plinthHeight: room.plinthHeight,
plinthThickness: room.plinthThickness,
stretchCeilingOffset: room.stretchCeilingOffset ?? 0,
order: room.order,
posX: room.posX ?? 0,
posY: room.posY ?? 0,