@threekit-tools/treble 0.0.90 → 0.0.91-next-01
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.
- package/dist/Treble/Treble.d.ts +2 -2
- package/dist/Treble/Treble.js +2 -2
- package/dist/Treble/index.d.ts +1 -1
- package/dist/Treble/index.js +1 -1
- package/dist/components/BreatheAnimation/index.js +2 -2
- package/dist/components/TurntableAnimation/index.js +2 -2
- package/dist/components/containers/formInputContainer.js +3 -3
- package/dist/hooks/useAttribute/index.js +1 -5
- package/dist/hooks/useConfigurationChangeStatus/index.d.ts +2 -0
- package/dist/hooks/{usePlayerLoadingStatus → useConfigurationChangeStatus}/index.js +2 -2
- package/dist/hooks/useNestedConfigurator/index.js +1 -2
- package/dist/hooks/usePlayerReady/index.d.ts +2 -0
- package/dist/hooks/{useAnimationStart → usePlayerReady}/index.js +2 -2
- package/dist/hooks/useSpaces/Canvas.d.ts +37 -0
- package/dist/hooks/useSpaces/Canvas.js +199 -0
- package/dist/hooks/useSpaces/SpacesLayout.d.ts +11 -0
- package/dist/hooks/useSpaces/SpacesLayout.js +74 -0
- package/dist/hooks/useSpaces/SpacesState.d.ts +162 -0
- package/dist/hooks/useSpaces/SpacesState.js +1791 -0
- package/dist/hooks/useSpaces/constants.d.ts +44 -0
- package/dist/hooks/useSpaces/constants.js +105 -0
- package/dist/hooks/{useRoomBuilder → useSpaces}/dataHandlers.d.ts +6 -4
- package/dist/hooks/{useRoomBuilder → useSpaces}/dataHandlers.js +104 -42
- package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/clearCanvas.js +9 -0
- package/dist/hooks/useSpaces/draw/drawBackground.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/drawBackground.js +12 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.js +53 -0
- package/dist/hooks/useSpaces/draw/drawDoors.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawDoors.js +93 -0
- package/dist/hooks/useSpaces/draw/drawFloor.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawFloor.js +36 -0
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGrid.js +31 -0
- package/dist/hooks/useSpaces/draw/drawGuides.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGuides.js +23 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.js +72 -0
- package/dist/hooks/useSpaces/draw/drawVertices.d.ts +8 -0
- package/dist/hooks/useSpaces/draw/drawVertices.js +61 -0
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +10 -0
- package/dist/hooks/useSpaces/draw/drawWalls.js +64 -0
- package/dist/hooks/useSpaces/draw/drawWindows.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawWindows.js +82 -0
- package/dist/hooks/useSpaces/draw/index.d.ts +11 -0
- package/dist/hooks/useSpaces/draw/index.js +129 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.js +17 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.js +8 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +11 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +16 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.js +6 -0
- package/dist/hooks/useSpaces/geometry/findLoops.d.ts +6 -0
- package/dist/hooks/{useRoomBuilder → useSpaces/geometry}/findLoops.js +14 -9
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +23 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +10 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +11 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +43 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +9 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +20 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.js +15 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +16 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +17 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.js +9 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +12 -0
- package/dist/hooks/useSpaces/geometry/index.d.ts +30 -0
- package/dist/hooks/useSpaces/geometry/index.js +64 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +21 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +25 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +12 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +9 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +28 -0
- package/dist/hooks/useSpaces/index.d.ts +76 -0
- package/dist/hooks/useSpaces/index.js +475 -0
- package/dist/hooks/useSpaces/themes/blueprint.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/blueprint.js +96 -0
- package/dist/hooks/useSpaces/themes/default.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/default.js +96 -0
- package/dist/hooks/{useRoomBuilder/themes.d.ts → useSpaces/themes/index.d.ts} +3 -4
- package/dist/hooks/useSpaces/themes/index.js +21 -0
- package/dist/hooks/useSpaces/themes/light.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/light.js +96 -0
- package/dist/hooks/{useRoomBuilder → useSpaces}/types.d.ts +131 -35
- package/dist/hooks/{useRoomBuilder → useSpaces}/types.js +13 -1
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +61 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +42 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +52 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.js +37 -0
- package/dist/hooks/useSpaces/validators/index.d.ts +15 -0
- package/dist/hooks/useSpaces/validators/index.js +40 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +31 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +19 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.js +26 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +4 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +41 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +54 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.js +10 -0
- package/dist/hooks/{useRoomBuilder → useSpaces/validators}/messaging.js +1 -1
- package/dist/icons/AngleSnapping.d.ts +3 -0
- package/dist/icons/AngleSnapping.js +28 -0
- package/dist/icons/Center.d.ts +3 -0
- package/dist/icons/Center.js +24 -0
- package/dist/icons/Draw.js +3 -3
- package/dist/icons/GridSnapping.d.ts +3 -0
- package/dist/icons/GridSnapping.js +28 -0
- package/dist/icons/LayoutAlt.d.ts +3 -0
- package/dist/icons/LayoutAlt.js +21 -0
- package/dist/icons/Magnet.d.ts +3 -0
- package/dist/icons/Magnet.js +27 -0
- package/dist/icons/Player3D.d.ts +3 -0
- package/dist/icons/Player3D.js +21 -0
- package/dist/icons/Save.d.ts +3 -0
- package/dist/icons/Save.js +21 -0
- package/dist/icons/UnitCm.d.ts +3 -0
- package/dist/icons/UnitCm.js +22 -0
- package/dist/icons/UnitFeet.d.ts +3 -0
- package/dist/icons/UnitFeet.js +22 -0
- package/dist/icons/UnitInch.d.ts +3 -0
- package/dist/icons/UnitInch.js +22 -0
- package/dist/icons/UnitMeter.d.ts +3 -0
- package/dist/icons/UnitMeter.js +21 -0
- package/dist/icons/Window.js +4 -4
- package/dist/icons/index.js +22 -0
- package/dist/icons/types.d.ts +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/index.js +35 -7
- package/dist/store/attributes.d.ts +1 -0
- package/dist/store/index.d.ts +39 -8
- package/dist/store/index.js +3 -1
- package/dist/store/product.js +4 -7
- package/dist/store/spaces.d.ts +47 -0
- package/dist/store/spaces.js +197 -0
- package/dist/store/treble.d.ts +1 -1
- package/dist/store/treble.js +24 -26
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
- package/dist/hooks/useAnimationStart/index.d.ts +0 -2
- package/dist/hooks/usePlayerLoadingStatus/index.d.ts +0 -2
- package/dist/hooks/useRoomBuilder/RoomBuilderState.d.ts +0 -95
- package/dist/hooks/useRoomBuilder/RoomBuilderState.js +0 -1237
- package/dist/hooks/useRoomBuilder/constants.d.ts +0 -41
- package/dist/hooks/useRoomBuilder/constants.js +0 -48
- package/dist/hooks/useRoomBuilder/draw.d.ts +0 -55
- package/dist/hooks/useRoomBuilder/draw.js +0 -573
- package/dist/hooks/useRoomBuilder/findLoops.d.ts +0 -5
- package/dist/hooks/useRoomBuilder/geometry.d.ts +0 -33
- package/dist/hooks/useRoomBuilder/geometry.js +0 -325
- package/dist/hooks/useRoomBuilder/index.d.ts +0 -40
- package/dist/hooks/useRoomBuilder/index.js +0 -303
- package/dist/hooks/useRoomBuilder/themes.js +0 -273
- package/dist/hooks/useRoomBuilder/validators.d.ts +0 -36
- package/dist/hooks/useRoomBuilder/validators.js +0 -362
- /package/dist/Treble/{snapshots.d.ts → snapshot.d.ts} +0 -0
- /package/dist/Treble/{snapshots.js → snapshot.js} +0 -0
- /package/dist/hooks/{useRoomBuilder → useSpaces/validators}/messaging.d.ts +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { RootState, ThreekitDispatch } from './index';
|
|
2
|
+
import { IConfiguration } from '../types';
|
|
3
|
+
import { ICoordinate2D, IModes, IUnits } from '../hooks/useSpaces/types';
|
|
4
|
+
interface ILayout {
|
|
5
|
+
label: string;
|
|
6
|
+
configuration: IConfiguration;
|
|
7
|
+
loop: Array<ICoordinate2D[]>;
|
|
8
|
+
}
|
|
9
|
+
interface IAttributeMap {
|
|
10
|
+
walls: string;
|
|
11
|
+
startX: string;
|
|
12
|
+
startZ: string;
|
|
13
|
+
endX: string;
|
|
14
|
+
endZ: string;
|
|
15
|
+
}
|
|
16
|
+
export interface SpacesState {
|
|
17
|
+
mode: IModes;
|
|
18
|
+
layouts: Array<ILayout>;
|
|
19
|
+
unit: IUnits;
|
|
20
|
+
zoom: null | number;
|
|
21
|
+
translation: null | ICoordinate2D;
|
|
22
|
+
showDimensions: boolean;
|
|
23
|
+
angleSnappingEnabled: boolean;
|
|
24
|
+
guideSnappingEnabled: boolean;
|
|
25
|
+
gridSnappingEnabled: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const setLayouts: import("@reduxjs/toolkit").ActionCreatorWithPayload<ILayout[], string>;
|
|
28
|
+
export declare const setZoom: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>;
|
|
29
|
+
export declare const setUnit: import("@reduxjs/toolkit").ActionCreatorWithPayload<IUnits, string>;
|
|
30
|
+
export declare const setTranslation: import("@reduxjs/toolkit").ActionCreatorWithPayload<ICoordinate2D, string>;
|
|
31
|
+
export declare const setMode: import("@reduxjs/toolkit").ActionCreatorWithPayload<IModes, string>;
|
|
32
|
+
export declare const setShowDimensions: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
33
|
+
export declare const setAngleSnappingEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
34
|
+
export declare const setGuideSnappingEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
35
|
+
export declare const setGridSnappingEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
36
|
+
declare const reducer: import("redux").Reducer<SpacesState, import("redux").AnyAction>;
|
|
37
|
+
export declare const getMode: (state: RootState) => IModes;
|
|
38
|
+
export declare const getLayouts: (state: RootState) => Array<ILayout>;
|
|
39
|
+
export declare const getUnit: (state: RootState) => IUnits;
|
|
40
|
+
export declare const getZoom: (state: RootState) => number | null;
|
|
41
|
+
export declare const getTranslation: (state: RootState) => ICoordinate2D | null;
|
|
42
|
+
export declare const getShowDimensions: (state: RootState) => boolean;
|
|
43
|
+
export declare const getAngleSnappingEnabled: (state: RootState) => boolean;
|
|
44
|
+
export declare const getGuideSnappingEnabled: (state: RootState) => boolean;
|
|
45
|
+
export declare const getGridSnappingEnabled: (state: RootState) => boolean;
|
|
46
|
+
export declare const hydrateLayouts: (configurationIds: Array<string>, attributeMap: IAttributeMap) => (dispatch: ThreekitDispatch, getState: () => RootState) => Promise<void>;
|
|
47
|
+
export default reducer;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
+
if (ar || !(i in from)) {
|
|
52
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
+
ar[i] = from[i];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
+
};
|
|
58
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
|
+
};
|
|
61
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
+
exports.hydrateLayouts = exports.getGridSnappingEnabled = exports.getGuideSnappingEnabled = exports.getAngleSnappingEnabled = exports.getShowDimensions = exports.getTranslation = exports.getZoom = exports.getUnit = exports.getLayouts = exports.getMode = exports.setGridSnappingEnabled = exports.setGuideSnappingEnabled = exports.setAngleSnappingEnabled = exports.setShowDimensions = exports.setMode = exports.setTranslation = exports.setUnit = exports.setZoom = exports.setLayouts = void 0;
|
|
63
|
+
var toolkit_1 = require("@reduxjs/toolkit");
|
|
64
|
+
var api_1 = __importDefault(require("../api"));
|
|
65
|
+
var types_1 = require("../hooks/useSpaces/types");
|
|
66
|
+
var geometry_1 = require("../hooks/useSpaces/geometry");
|
|
67
|
+
exports.setLayouts = (0, toolkit_1.createAction)('treble/spaces/set-layouts');
|
|
68
|
+
exports.setZoom = (0, toolkit_1.createAction)('treble/spaces/set-zoom');
|
|
69
|
+
exports.setUnit = (0, toolkit_1.createAction)('treble/spaces/set-unit');
|
|
70
|
+
exports.setTranslation = (0, toolkit_1.createAction)('treble/spaces/set-translation');
|
|
71
|
+
exports.setMode = (0, toolkit_1.createAction)('treble/spaces/set-mode');
|
|
72
|
+
exports.setShowDimensions = (0, toolkit_1.createAction)('treble/spaces/set-show-dimensions');
|
|
73
|
+
exports.setAngleSnappingEnabled = (0, toolkit_1.createAction)('treble/spaces/set-angle-snapping-enabled');
|
|
74
|
+
exports.setGuideSnappingEnabled = (0, toolkit_1.createAction)('treble/spaces/set-guide-snapping-enabled');
|
|
75
|
+
exports.setGridSnappingEnabled = (0, toolkit_1.createAction)('treble/spaces/set-grid-snapping-enabled');
|
|
76
|
+
var initialState = {
|
|
77
|
+
mode: types_1.IModes.SELECT,
|
|
78
|
+
layouts: [],
|
|
79
|
+
unit: types_1.IUnits.FEET,
|
|
80
|
+
zoom: null,
|
|
81
|
+
translation: null,
|
|
82
|
+
showDimensions: true,
|
|
83
|
+
angleSnappingEnabled: true,
|
|
84
|
+
guideSnappingEnabled: true,
|
|
85
|
+
gridSnappingEnabled: true,
|
|
86
|
+
};
|
|
87
|
+
var reducer = (0, toolkit_1.createSlice)({
|
|
88
|
+
name: 'spaces',
|
|
89
|
+
initialState: initialState,
|
|
90
|
+
extraReducers: function (builder) {
|
|
91
|
+
builder.addCase(exports.setMode, function (state, action) {
|
|
92
|
+
return __assign(__assign({}, state), { mode: action.payload });
|
|
93
|
+
});
|
|
94
|
+
builder.addCase(exports.setLayouts, function (state, action) {
|
|
95
|
+
return __assign(__assign({}, state), { layouts: action.payload });
|
|
96
|
+
});
|
|
97
|
+
builder.addCase(exports.setUnit, function (state, action) {
|
|
98
|
+
return __assign(__assign({}, state), { unit: action.payload });
|
|
99
|
+
});
|
|
100
|
+
builder.addCase(exports.setZoom, function (state, action) {
|
|
101
|
+
return __assign(__assign({}, state), { zoom: action.payload });
|
|
102
|
+
});
|
|
103
|
+
builder.addCase(exports.setTranslation, function (state, action) {
|
|
104
|
+
return __assign(__assign({}, state), { translation: action.payload });
|
|
105
|
+
});
|
|
106
|
+
builder.addCase(exports.setShowDimensions, function (state, action) {
|
|
107
|
+
return __assign(__assign({}, state), { showDimensions: action.payload });
|
|
108
|
+
});
|
|
109
|
+
builder.addCase(exports.setAngleSnappingEnabled, function (state, action) {
|
|
110
|
+
return __assign(__assign({}, state), { angleSnappingEnabled: action.payload });
|
|
111
|
+
});
|
|
112
|
+
builder.addCase(exports.setGuideSnappingEnabled, function (state, action) {
|
|
113
|
+
return __assign(__assign({}, state), { guideSnappingEnabled: action.payload });
|
|
114
|
+
});
|
|
115
|
+
builder.addCase(exports.setGridSnappingEnabled, function (state, action) {
|
|
116
|
+
return __assign(__assign({}, state), { gridSnappingEnabled: action.payload });
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
reducers: {},
|
|
120
|
+
}).reducer;
|
|
121
|
+
var getMode = function (state) { return state.spaces.mode; };
|
|
122
|
+
exports.getMode = getMode;
|
|
123
|
+
var getLayouts = function (state) {
|
|
124
|
+
return state.spaces.layouts;
|
|
125
|
+
};
|
|
126
|
+
exports.getLayouts = getLayouts;
|
|
127
|
+
var getUnit = function (state) { return state.spaces.unit; };
|
|
128
|
+
exports.getUnit = getUnit;
|
|
129
|
+
var getZoom = function (state) { return state.spaces.zoom; };
|
|
130
|
+
exports.getZoom = getZoom;
|
|
131
|
+
var getTranslation = function (state) { return state.spaces.translation; };
|
|
132
|
+
exports.getTranslation = getTranslation;
|
|
133
|
+
var getShowDimensions = function (state) {
|
|
134
|
+
return state.spaces.showDimensions;
|
|
135
|
+
};
|
|
136
|
+
exports.getShowDimensions = getShowDimensions;
|
|
137
|
+
var getAngleSnappingEnabled = function (state) {
|
|
138
|
+
return state.spaces.angleSnappingEnabled;
|
|
139
|
+
};
|
|
140
|
+
exports.getAngleSnappingEnabled = getAngleSnappingEnabled;
|
|
141
|
+
var getGuideSnappingEnabled = function (state) {
|
|
142
|
+
return state.spaces.guideSnappingEnabled;
|
|
143
|
+
};
|
|
144
|
+
exports.getGuideSnappingEnabled = getGuideSnappingEnabled;
|
|
145
|
+
var getGridSnappingEnabled = function (state) {
|
|
146
|
+
return state.spaces.gridSnappingEnabled;
|
|
147
|
+
};
|
|
148
|
+
exports.getGridSnappingEnabled = getGridSnappingEnabled;
|
|
149
|
+
var hydrateLayouts = function (configurationIds, attributeMap) {
|
|
150
|
+
return function (dispatch, getState) { return __awaiter(void 0, void 0, void 0, function () {
|
|
151
|
+
var state, layoutIds, configurationResponses, prepped;
|
|
152
|
+
var _a;
|
|
153
|
+
return __generator(this, function (_b) {
|
|
154
|
+
switch (_b.label) {
|
|
155
|
+
case 0:
|
|
156
|
+
state = getState();
|
|
157
|
+
if (state.spaces.layouts.length)
|
|
158
|
+
return [2];
|
|
159
|
+
layoutIds = __spreadArray([], configurationIds, true);
|
|
160
|
+
if ((_a = state.product.metadata) === null || _a === void 0 ? void 0 : _a._layouts)
|
|
161
|
+
state.product.metadata._layouts
|
|
162
|
+
.split(',')
|
|
163
|
+
.forEach(function (id) { return layoutIds.push(id.trim()); });
|
|
164
|
+
return [4, Promise.all(layoutIds.map(function (configId) { return api_1.default.configurations.fetch(configId); }))];
|
|
165
|
+
case 1:
|
|
166
|
+
configurationResponses = _b.sent();
|
|
167
|
+
prepped = configurationResponses.map(function (response) {
|
|
168
|
+
var _a;
|
|
169
|
+
var wallsAttribute = response.data.variant[attributeMap.walls];
|
|
170
|
+
var walls = wallsAttribute.map(function (wallAttribute) {
|
|
171
|
+
var wallConfig = wallAttribute.configuration;
|
|
172
|
+
var wall = [
|
|
173
|
+
[
|
|
174
|
+
wallConfig[attributeMap.startX],
|
|
175
|
+
wallConfig[attributeMap.startZ],
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
wallConfig[attributeMap.endX],
|
|
179
|
+
wallConfig[attributeMap.endZ],
|
|
180
|
+
],
|
|
181
|
+
];
|
|
182
|
+
return wall;
|
|
183
|
+
});
|
|
184
|
+
return {
|
|
185
|
+
label: ((_a = response.data.metadata) === null || _a === void 0 ? void 0 : _a.label) || 'Layout',
|
|
186
|
+
configuration: response.data.variant,
|
|
187
|
+
loop: (0, geometry_1.findLoops)(walls).inner,
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
dispatch((0, exports.setLayouts)(prepped));
|
|
191
|
+
return [2];
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}); };
|
|
195
|
+
};
|
|
196
|
+
exports.hydrateLayouts = hydrateLayouts;
|
|
197
|
+
exports.default = reducer;
|
package/dist/store/treble.d.ts
CHANGED
|
@@ -64,6 +64,6 @@ export declare const getLoadingProgress: (state: RootState) => undefined | numbe
|
|
|
64
64
|
export declare const getPlayerInteraction: (state: RootState) => undefined | boolean;
|
|
65
65
|
export declare const initPlayer: (config: IPlayerInit) => (dispatch: ThreekitDispatch, getState: () => RootState) => Promise<void>;
|
|
66
66
|
export declare const launch: (launchConfig?: Partial<ILaunchConfig>) => (dispatch: ThreekitDispatch) => Promise<void>;
|
|
67
|
-
export declare const unloadPlayer: (
|
|
67
|
+
export declare const unloadPlayer: (dispatch: ThreekitDispatch) => Promise<string>;
|
|
68
68
|
export declare const reloadPlayer: (config: undefined | string | Pick<IReloadConfig, 'assetId' | 'stageId' | 'configurationId' | 'configuration'>) => (dispatch: ThreekitDispatch, getState: () => RootState) => Promise<void>;
|
|
69
69
|
export default reducer;
|
package/dist/store/treble.js
CHANGED
|
@@ -186,9 +186,8 @@ var initPlayer = function (config) {
|
|
|
186
186
|
orgId = player.enableApi(types_1.PRIVATE_APIS.PLAYER).orgId;
|
|
187
187
|
connection_1.default.connect({ orgId: orgId });
|
|
188
188
|
cacheParameters = player.cacheParameters;
|
|
189
|
-
if (cacheParameters)
|
|
189
|
+
if (cacheParameters)
|
|
190
190
|
connection_1.default.connect({ cacheParameters: cacheParameters });
|
|
191
|
-
}
|
|
192
191
|
if (window.threekit) {
|
|
193
192
|
window.threekit = Object.assign(window.threekit, {
|
|
194
193
|
player: player,
|
|
@@ -231,14 +230,20 @@ var initPlayer = function (config) {
|
|
|
231
230
|
if (window.threekit.treble._debugMode)
|
|
232
231
|
(0, utils_1.runDebugger)();
|
|
233
232
|
window.threekit.player.on('setConfiguration', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
234
|
-
var
|
|
233
|
+
var state, previousAttributes, attributes, configuration, updatedAttributes;
|
|
235
234
|
var _a;
|
|
236
235
|
return __generator(this, function (_b) {
|
|
237
236
|
switch (_b.label) {
|
|
238
237
|
case 0:
|
|
239
|
-
|
|
240
|
-
previousAttributes = Object.values(attributes);
|
|
241
|
-
|
|
238
|
+
state = getState();
|
|
239
|
+
previousAttributes = Object.values(state.attributes);
|
|
240
|
+
attributes = window.threekit.configurator.getDisplayAttributes();
|
|
241
|
+
configuration = window.threekit.configurator.getFullConfiguration();
|
|
242
|
+
updatedAttributes = attributes.map(function (attr) {
|
|
243
|
+
return Object.assign({}, attr, configuration[attr.name]
|
|
244
|
+
? { value: configuration[attr.name] }
|
|
245
|
+
: undefined);
|
|
246
|
+
});
|
|
242
247
|
dispatch((0, attributes_1.setAttributes)(updatedAttributes));
|
|
243
248
|
return [4, ((_a = EVENTS.postConfigurationChange) === null || _a === void 0 ? void 0 : _a.call(EVENTS, updatedAttributes, {}, previousAttributes))];
|
|
244
249
|
case 1:
|
|
@@ -255,7 +260,7 @@ var initPlayer = function (config) {
|
|
|
255
260
|
exports.initPlayer = initPlayer;
|
|
256
261
|
var launch = function (launchConfig) {
|
|
257
262
|
return function (dispatch) { return __awaiter(void 0, void 0, void 0, function () {
|
|
258
|
-
var config, productId, credentials, productsRaw, products, threekitEnv, serverUrl, playerConfig, envCredentials, _a, assetIdRaw, stageId, configurationId, initialConfigurationRaw, assetId, threekitDomainRaw, authToken, el, threekitDomain, initialConfiguration, updatedAssetId, params, configId, configuration;
|
|
263
|
+
var config, productId, credentials, productsRaw, products, threekitEnv, serverUrl, playerConfig, envCredentials, _a, assetIdRaw, stageId, configurationId, initialConfigurationRaw, assetId, threekitDomainRaw, authToken, playerScriptUrl, el, threekitDomain, initialConfiguration, updatedAssetId, params, configId, configuration;
|
|
259
264
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
260
265
|
return __generator(this, function (_j) {
|
|
261
266
|
switch (_j.label) {
|
|
@@ -319,7 +324,7 @@ var launch = function (launchConfig) {
|
|
|
319
324
|
_a = products[productId][threekitEnv] || {}, assetIdRaw = _a.assetId, stageId = _a.stageId, configurationId = _a.configurationId, initialConfigurationRaw = _a.initialConfiguration;
|
|
320
325
|
assetId = (launchConfig === null || launchConfig === void 0 ? void 0 : launchConfig.assetId) || assetIdRaw;
|
|
321
326
|
threekitDomainRaw = envCredentials.threekitDomain || "".concat(threekitEnv, ".threekit.com");
|
|
322
|
-
authToken = envCredentials.publicToken;
|
|
327
|
+
authToken = envCredentials.publicToken, playerScriptUrl = envCredentials.playerScriptUrl;
|
|
323
328
|
if (playerConfig.elementId) {
|
|
324
329
|
el = document.getElementById(playerConfig.elementId);
|
|
325
330
|
if (el)
|
|
@@ -357,7 +362,8 @@ var launch = function (launchConfig) {
|
|
|
357
362
|
return [2, console.error('missing assetId')];
|
|
358
363
|
return [4, new Promise(function (resolve) {
|
|
359
364
|
var script = document.createElement('script');
|
|
360
|
-
script.src =
|
|
365
|
+
script.src =
|
|
366
|
+
playerScriptUrl || "".concat(threekitDomain, "/app/js/threekit-player-bundle.js");
|
|
361
367
|
script.id = 'threekit-player-bundle';
|
|
362
368
|
script.onload = function () { return resolve(); };
|
|
363
369
|
document.head.appendChild(script);
|
|
@@ -392,22 +398,14 @@ var launch = function (launchConfig) {
|
|
|
392
398
|
}); };
|
|
393
399
|
};
|
|
394
400
|
exports.launch = launch;
|
|
395
|
-
var unloadPlayer = function (
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
dispatch((0, product_1.setMetadata)({}));
|
|
404
|
-
return [4, window.threekit.player.unload()];
|
|
405
|
-
case 1:
|
|
406
|
-
_a.sent();
|
|
407
|
-
return [2];
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
}); }; };
|
|
401
|
+
var unloadPlayer = function (dispatch) {
|
|
402
|
+
dispatch((0, exports.setThreekitInitialized)(false));
|
|
403
|
+
dispatch((0, exports.setPlayerLoading)(true));
|
|
404
|
+
dispatch((0, attributes_1.setAttributes)([]));
|
|
405
|
+
dispatch((0, product_1.setName)(''));
|
|
406
|
+
dispatch((0, product_1.setMetadata)({}));
|
|
407
|
+
return window.threekit.player.unload();
|
|
408
|
+
};
|
|
411
409
|
exports.unloadPlayer = unloadPlayer;
|
|
412
410
|
var reloadPlayer = function (config) {
|
|
413
411
|
return function (dispatch, getState) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -444,7 +442,7 @@ var reloadPlayer = function (config) {
|
|
|
444
442
|
playerConfig = Object.assign({}, constants_1.DEFAULT_PLAYER_CONFIG, trebleConfig.player);
|
|
445
443
|
el = document.getElementById(state.treble.playerElId);
|
|
446
444
|
if (!state.treble.isThreekitInitialized) return [3, 6];
|
|
447
|
-
return [4, dispatch(
|
|
445
|
+
return [4, dispatch(exports.unloadPlayer)];
|
|
448
446
|
case 5:
|
|
449
447
|
_a.sent();
|
|
450
448
|
_a.label = 6;
|
package/dist/types.d.ts
CHANGED
|
@@ -280,6 +280,10 @@ export interface IThreekitConfigurator {
|
|
|
280
280
|
setConfiguration: (configuration: ISetConfiguration | IConfiguration) => Promise<IConfiguration>;
|
|
281
281
|
getPrice: (pricebookId: string, currency: string) => number;
|
|
282
282
|
getDisplayAttributes: (config?: IDisplayAttributeConfig) => Array<IThreekitDisplayAttribute>;
|
|
283
|
+
getNestedConfigurator: (path: string | Array<string | number>) => IThreekitConfigurator | undefined;
|
|
284
|
+
getFullConfiguration: () => IConfiguration;
|
|
285
|
+
setFullConfiguration: (configuration: IConfiguration) => Promise<void>;
|
|
286
|
+
on: (eventName: string, callback: () => void) => void;
|
|
283
287
|
}
|
|
284
288
|
export interface IThreekitScene {
|
|
285
289
|
PHASES: {
|
|
@@ -318,6 +322,7 @@ export interface IThreekitPlayer {
|
|
|
318
322
|
enableApi: <T extends PRIVATE_APIS>(api: T) => T extends PRIVATE_APIS.PLAYER ? IThreekitPrivatePlayer : any;
|
|
319
323
|
snapshotAsync: (snapshotConfig: ISnapshotConfig) => Promise<string>;
|
|
320
324
|
unload: () => Promise<string>;
|
|
325
|
+
uploadImage: (image: File) => Promise<string>;
|
|
321
326
|
cacheParameters: ICacheParameters;
|
|
322
327
|
}
|
|
323
328
|
export interface IThreekitPrivateConfigurator extends IThreekitConfigurator {
|
|
@@ -382,6 +387,7 @@ export interface ICredential {
|
|
|
382
387
|
publicToken: string;
|
|
383
388
|
publishStage?: string;
|
|
384
389
|
threekitDomain?: string;
|
|
390
|
+
playerScriptUrl?: string;
|
|
385
391
|
}
|
|
386
392
|
export interface ICredentials extends Record<string, ICredential> {
|
|
387
393
|
}
|
package/package.json
CHANGED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { IWalls, IVerticesState, ICoordinate2D, IFeature, IFeatures, ICoordinatesLine, IRoomBuilderStateProps, IElementAddress, IFeatureName, IVertex, IFeaturesHydrated, IElementUi, IElementName, IActiveElement, IEnclosedSpace } from './types';
|
|
2
|
-
import type { IHydratedAttribute } from '../../types';
|
|
3
|
-
export declare class RoomBuilderState {
|
|
4
|
-
private _config;
|
|
5
|
-
private _attributesState;
|
|
6
|
-
private _newWall;
|
|
7
|
-
private _activeElement;
|
|
8
|
-
private _selectedElement;
|
|
9
|
-
private _highlightedElement;
|
|
10
|
-
private _errorElement;
|
|
11
|
-
private _showDimensions;
|
|
12
|
-
private _angleSnappingEnabled;
|
|
13
|
-
private _state;
|
|
14
|
-
constructor(config: IRoomBuilderStateProps);
|
|
15
|
-
get walls(): IWalls;
|
|
16
|
-
set walls(walls: IWalls);
|
|
17
|
-
get wallCount(): number;
|
|
18
|
-
get wallLines(): ICoordinatesLine[];
|
|
19
|
-
get vertices(): IVerticesState;
|
|
20
|
-
set vertices(vertices: IVerticesState);
|
|
21
|
-
get verticesList(): Array<IVertex>;
|
|
22
|
-
get features(): IFeatures;
|
|
23
|
-
set features(features: IFeatures);
|
|
24
|
-
get getHydratedFeatures(): undefined | IFeaturesHydrated;
|
|
25
|
-
get featureCount(): number;
|
|
26
|
-
get activeElement(): IActiveElement | null;
|
|
27
|
-
get selectedElement(): null | IElementAddress;
|
|
28
|
-
set selectedElement(element: null | IElementAddress);
|
|
29
|
-
get showDimensions(): boolean;
|
|
30
|
-
set showDimensions(val: boolean);
|
|
31
|
-
get angleSnappingEnabled(): boolean;
|
|
32
|
-
set angleSnappingEnabled(val: boolean);
|
|
33
|
-
get enclosedSpaces(): Array<IEnclosedSpace>;
|
|
34
|
-
private getWall;
|
|
35
|
-
private addWall;
|
|
36
|
-
private addWalls;
|
|
37
|
-
private updateWall;
|
|
38
|
-
private getWallConnectionCount;
|
|
39
|
-
private getWallConnectionsHydrated;
|
|
40
|
-
private getWallDimensions;
|
|
41
|
-
private getWallDetailedDimensions;
|
|
42
|
-
private getAllWallDimensions;
|
|
43
|
-
private shiftAllFeaturesOnWall;
|
|
44
|
-
private addFeatureToWall;
|
|
45
|
-
private removeFeatureFromWall;
|
|
46
|
-
private splitWall;
|
|
47
|
-
deleteWall(index: number): void;
|
|
48
|
-
private getFirstVacantLocation;
|
|
49
|
-
getWallUiAnchorPoint(index: number): undefined | ICoordinate2D;
|
|
50
|
-
private getVertex;
|
|
51
|
-
private getWallsConnectedToVertex;
|
|
52
|
-
private repositionVertex;
|
|
53
|
-
private getFeatureType;
|
|
54
|
-
private setFeatureType;
|
|
55
|
-
private getFeature;
|
|
56
|
-
private updateFeature;
|
|
57
|
-
private repositionFeature;
|
|
58
|
-
addFeature(type: IFeatureName, feature: Omit<IFeature, 'path' | 'connectedTo' | 'offset'> & {
|
|
59
|
-
offset?: number;
|
|
60
|
-
}, addToWallIndex?: number): void;
|
|
61
|
-
deleteFeature(type: IFeatureName, index: number): void;
|
|
62
|
-
private getHydratedFeature;
|
|
63
|
-
getFeatureUiAnchorPoint(type: IFeatureName, index: number): undefined | ICoordinate2D;
|
|
64
|
-
deleteElement(type: IElementName, index: number): void;
|
|
65
|
-
private getVertexInProximity;
|
|
66
|
-
private getWallInProximity;
|
|
67
|
-
private snapPointToVertex;
|
|
68
|
-
private snapPointToWall;
|
|
69
|
-
private snapPointToAbsoluteAngle;
|
|
70
|
-
private snapVertexToAbsoluteAngle;
|
|
71
|
-
private getFeatureAtPoint;
|
|
72
|
-
private getElementAtPoint;
|
|
73
|
-
getClickedElement(point: ICoordinate2D): undefined | IElementUi;
|
|
74
|
-
private getPointProximity;
|
|
75
|
-
private reevaluateFeatureConnections;
|
|
76
|
-
private pushStateToConfigurator;
|
|
77
|
-
setAttributesToState(attributes?: Record<string, IHydratedAttribute>): void;
|
|
78
|
-
deleteAll(): void;
|
|
79
|
-
private resetInternalState;
|
|
80
|
-
highlightElementIfInProximity(canvas: HTMLCanvasElement, point: ICoordinate2D): void;
|
|
81
|
-
startDrawNewWall(startPoint: ICoordinate2D): void;
|
|
82
|
-
drawNewWall(canvas: HTMLCanvasElement, endPoint: ICoordinate2D): void;
|
|
83
|
-
cancelDrawNewWall(canvas: HTMLCanvasElement): void;
|
|
84
|
-
finishDrawNewWall(canvas: HTMLCanvasElement, assetId: string): Promise<void>;
|
|
85
|
-
private moveActiveVertex;
|
|
86
|
-
private finishMoveActiveVertex;
|
|
87
|
-
private moveActiveFeature;
|
|
88
|
-
private finishMoveActiveFeature;
|
|
89
|
-
selectElementIfInProximity(canvas: HTMLCanvasElement, point: ICoordinate2D): void;
|
|
90
|
-
moveActiveElement(canvas: HTMLCanvasElement, moveToPoint: ICoordinate2D): void;
|
|
91
|
-
finishMoveActiveElement(canvas: HTMLCanvasElement): void;
|
|
92
|
-
cancelMoveActiveElement(canvas: HTMLCanvasElement): void;
|
|
93
|
-
drawRoom(canvas: HTMLCanvasElement | null): void;
|
|
94
|
-
}
|
|
95
|
-
export default RoomBuilderState;
|