@threekit-tools/treble 0.0.89-next-004 → 0.0.89-next-005

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.
@@ -36,8 +36,8 @@ function drawGrid(canvas, styles) {
36
36
  if (!ctx)
37
37
  return;
38
38
  ctx.strokeStyle = styles.lineColor;
39
- var numHorizontalLines = Math.ceil(canvas.width / styles.gridStepGap);
40
- var numVerticalLines = Math.ceil(canvas.height / styles.gridStepGap);
39
+ var numHorizontalLines = Math.ceil(canvas.height / styles.gridStepGap);
40
+ var numVerticalLines = Math.ceil(canvas.width / styles.gridStepGap);
41
41
  for (var i = 0; i < numHorizontalLines; i++) {
42
42
  var y = i * styles.gridStepGap;
43
43
  ctx.lineWidth =
@@ -4,6 +4,7 @@ import type { IElementName, IElementPublic, IRoomBuilderHookProps } from './type
4
4
  import { IModes, IUnits, IElements } from './types';
5
5
  import { IThemes } from './themes';
6
6
  interface IUseRoomBuilder {
7
+ drawRoom: () => void;
7
8
  canvasRef: React.RefObject<HTMLCanvasElement>;
8
9
  [IElements.WALL]?: IHydratedAttributeArray;
9
10
  [IElements.WINDOW]?: IHydratedAttributeArray;
@@ -258,6 +258,7 @@ var useRoomBuilder = function (props) {
258
258
  setSelectedElement(null);
259
259
  };
260
260
  return {
261
+ drawRoom: drawRoom,
261
262
  canvasRef: canvasRef,
262
263
  selectedElement: selectedElement === null
263
264
  ? selectedElement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.89-next-004",
3
+ "version": "0.0.89-next-005",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [