floor-editor-ts 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,8 @@ export interface FurnitureItem {
67
67
  material?: string;
68
68
  locked?: boolean;
69
69
  heatmapMatrix?: any;
70
+ hasPerson?: boolean;
71
+ showHeatmap?: boolean;
70
72
  }
71
73
  export interface ElementGroup {
72
74
  id: string;
@@ -4,6 +4,17 @@ import { ProjectSettings } from '../../../lib/stores/settings';
4
4
  export declare function wallLength(w: Wall): number;
5
5
  export declare function wallPointAt(w: Wall, t: number): Point;
6
6
  export declare function wallTangentAt(w: Wall, t: number): Point;
7
+ export interface FloorBounds {
8
+ minX: number;
9
+ minY: number;
10
+ maxX: number;
11
+ maxY: number;
12
+ width: number;
13
+ height: number;
14
+ }
15
+ export declare function getFloorBounds(floor: Floor, options?: {
16
+ includeWallThickness?: boolean;
17
+ }): FloorBounds | null;
7
18
  export declare function drawGrid(cs: CanvasState, showGrid: boolean, snapToGrid: boolean, gridSize: number): void;
8
19
  export declare function drawWall(cs: CanvasState, w: Wall, selected: boolean, showDimensions: boolean, dimSettings: ProjectSettings): void;
9
20
  export declare function drawDoorOnWall(cs: CanvasState, wall: Wall, door: Door): void;
@@ -32,3 +43,4 @@ export declare function drawMinimap(cs: CanvasState, minimapCanvas: HTMLCanvasEl
32
43
  maxX: number;
33
44
  maxY: number;
34
45
  } | null): void;
46
+ export declare function drawFloorHeatmap(cs: CanvasState, floor: Floor, heatmapMatrix: number[][], detectedRooms: Room[]): void;
@@ -3,10 +3,11 @@
3
3
  * Each function draws within a normalized rect: (-w/2, -d/2) to (w/2, d/2)
4
4
  * where w = width*zoom, d = depth*zoom. Context is already translated & rotated.
5
5
  */
6
+ export declare const getHeatmapColor: (t: number, alpha?: number) => string;
6
7
  /**
7
8
  * Draw an architectural top-down icon for the given furniture item.
8
9
  * Context should already be translated to center and rotated.
9
10
  * @param w - pixel width (catalogWidth * zoom)
10
11
  * @param d - pixel depth (catalogDepth * zoom)
11
12
  */
12
- export declare function drawFurnitureIcon(ctx: CanvasRenderingContext2D, catalogId: string, w: number, d: number, color: string, strokeColor: string, heatmapMatrix?: any, hasPerson?: boolean): void;
13
+ export declare function drawFurnitureIcon(ctx: CanvasRenderingContext2D, catalogId: string, w: number, d: number, color: string, strokeColor: string, heatmapMatrix?: any, hasPerson?: boolean, showHeatmap?: boolean): void;
@@ -0,0 +1 @@
1
+ export declare const SAMPLE_HEATMAP_32X32: number[][];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "floor-editor-ts",
3
3
  "private": false,
4
- "version": "1.0.7",
4
+ "version": "1.0.9",
5
5
  "type": "module",
6
6
  "main": "./dist/floor-editor.es.js",
7
7
  "module": "./dist/floor-editor.es.js",