task(E4): event template catalog - kino/banquet/standing/podium presets

This commit is contained in:
Agent Zero
2026-08-27 23:10:27 +02:00
parent c3b976758c
commit 214e57c9a5
@@ -186,6 +186,44 @@ export const tableTool = makePlaceTool('table', 'Tisch', '\u25cb',
export const stageTool = makePlaceTool('stage', 'Bühne', '\u25ad', export const stageTool = makePlaceTool('stage', 'Bühne', '\u25ad',
(x, y, layerId) => seating.createStage(x, y, layerId), 'Bühne'); (x, y, layerId) => seating.createStage(x, y, layerId), 'Bühne');
// ─────────────────────────────────────────────────────────────
// Task E4: Vorlagenkatalog — vorkonfigurierte Event-Bestuhlungs-
// Sets als Klick-Platzierer mit Standard-Abmessungen.
// ─────────────────────────────────────────────────────────────
export const kinoTemplateTool = makePlaceTool('tpl-kino', 'Kino-Reihen', '\u2500\u2500',
(x, y, layerId) => {
const rows: CADElement[] = [];
for (let r = 0; r < 5; r++) {
rows.push(...seating.createSeatingRow(x, y + r * 120, layerId, { count: 15, spacing: 55 }));
}
return rows;
}, 'Kino-Bestuhlung (5×15)');
export const banquetTemplateTool = makePlaceTool('tpl-bankett', 'Bankett-Rundtisch', '\u25cb',
(x, y, layerId) => {
const els: CADElement[] = [];
els.push(seating.createTable(x, y, layerId, { width: 180, height: 180 }));
for (let i = 0; i < 8; i++) {
const angle = (2 * Math.PI * i) / 8;
els.push(seating.createChair(x + 140 * Math.cos(angle), y + 140 * Math.sin(angle), layerId));
}
return els;
}, 'Bankett-Rundtisch (8 Stühle)');
export const standingTableTemplateTool = makePlaceTool('tpl-standing', 'Stehtisch', '\u25d1',
(x, y, layerId) => {
const els: CADElement[] = [];
els.push(seating.createTable(x, y, layerId, { width: 80, height: 80 }));
for (let i = 0; i < 5; i++) {
const angle = (2 * Math.PI * i) / 5;
els.push(seating.createChair(x + 70 * Math.cos(angle), y + 70 * Math.sin(angle), layerId));
}
return els;
}, 'Stehtisch (5 Stühle)');
export const podiumTemplateTool = makePlaceTool('tpl-podium', 'Podest', '\u25ac',
(x, y, layerId) => seating.createStage(x, y, layerId, { width: 300, height: 200 }), 'Podest');
// ───────────────────────────────────────────────────────────── // ─────────────────────────────────────────────────────────────
// Arc-Row (Task E2): Reihen entlang Kreisbogen um Bühnenpunkt. // Arc-Row (Task E2): Reihen entlang Kreisbogen um Bühnenpunkt.
// Klick 1: Zentrum (Bühne). Drag: Radius + Startwinkel. // Klick 1: Zentrum (Bühne). Drag: Radius + Startwinkel.
@@ -252,5 +290,5 @@ export const eventToolsV2Plugin: PluginV2 = {
category: 'elements', category: 'elements',
enabledByDefault: true, enabledByDefault: true,
}, },
tools: [chairTool, seatingRowToolDrag, seatingBlockToolDrag, tableTool, stageTool, arcRowTool], tools: [chairTool, seatingRowToolDrag, seatingBlockToolDrag, tableTool, stageTool, arcRowTool, kinoTemplateTool, banquetTemplateTool, standingTableTemplateTool, podiumTemplateTool],
}; };