@threekit-tools/treble 0.0.92 → 0.0.94-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/Treble/snapshot.d.ts +2 -2
- package/dist/Treble/snapshot.js +1 -1
- package/dist/hooks/useNestedConfigurator/index.js +1 -2
- package/dist/hooks/useSnapshot/index.d.ts +1 -1
- package/dist/hooks/useSpaces/SpacesState.d.ts +15 -2
- package/dist/hooks/useSpaces/SpacesState.js +85 -22
- package/dist/hooks/useSpaces/constants.d.ts +17 -2
- package/dist/hooks/useSpaces/constants.js +58 -37
- package/dist/hooks/useSpaces/dataHandlers.d.ts +22 -4
- package/dist/hooks/useSpaces/dataHandlers.js +197 -40
- package/dist/hooks/useSpaces/draw/drawDoors.js +1 -1
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +1 -1
- package/dist/hooks/useSpaces/draw/drawGrid.js +4 -1
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +3 -2
- package/dist/hooks/useSpaces/draw/drawWalls.js +6 -4
- package/dist/hooks/useSpaces/index.d.ts +13 -0
- package/dist/hooks/useSpaces/index.js +269 -126
- package/dist/hooks/useSpaces/types.d.ts +52 -13
- package/dist/icons/Boundary.d.ts +3 -0
- package/dist/icons/{Ruler copy.js → Boundary.js} +7 -8
- package/dist/icons/Draw.js +3 -3
- package/dist/icons/RulerBlank.js +2 -2
- package/dist/icons/RulerDetailed.js +2 -2
- package/dist/icons/Window.js +4 -4
- package/dist/icons/index.js +28 -0
- package/dist/index.d.ts +17 -2
- package/dist/index.js +35 -5
- package/dist/store/attributes.d.ts +2 -1
- package/dist/store/index.d.ts +41 -10
- package/dist/store/index.js +3 -1
- package/dist/store/product.js +4 -7
- package/dist/store/spaces.d.ts +32 -5
- package/dist/store/spaces.js +164 -7
- package/dist/store/treble.d.ts +1 -1
- package/dist/store/treble.js +14 -21
- package/dist/store/wishlist.d.ts +2 -20
- package/dist/types.d.ts +3 -1
- package/package.json +1 -2
- package/dist/Treble/snapshots.d.ts +0 -22
- package/dist/Treble/snapshots.js +0 -247
- 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/dataHandlers.d.ts +0 -18
- package/dist/hooks/useRoomBuilder/dataHandlers.js +0 -187
- 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/findLoops.js +0 -99
- 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/messaging.d.ts +0 -8
- package/dist/hooks/useRoomBuilder/messaging.js +0 -18
- package/dist/hooks/useRoomBuilder/themes.d.ts +0 -12
- package/dist/hooks/useRoomBuilder/themes.js +0 -273
- package/dist/hooks/useRoomBuilder/types.d.ts +0 -238
- package/dist/hooks/useRoomBuilder/types.js +0 -36
- package/dist/hooks/useRoomBuilder/validators.d.ts +0 -36
- package/dist/hooks/useRoomBuilder/validators.js +0 -362
- package/dist/icons/Ruler copy.d.ts +0 -3
- package/dist/icons/RulerDetailed copy.d.ts +0 -3
- package/dist/icons/RulerDetailed copy.js +0 -27
package/dist/Treble/snapshots.js
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var api_1 = __importDefault(require("../api"));
|
|
43
|
-
var constants_1 = require("../constants");
|
|
44
|
-
var types_1 = require("../types");
|
|
45
|
-
var utils_1 = require("../utils");
|
|
46
|
-
var DEFAULT_CAMERA_CONFIG = {
|
|
47
|
-
filename: "snapshot",
|
|
48
|
-
size: { width: 1920, height: 1080 },
|
|
49
|
-
format: types_1.SNAPSHOT_FORMATS.PNG,
|
|
50
|
-
attributeName: constants_1.ATTRIBUTES_RESERVED.camera,
|
|
51
|
-
output: types_1.SNAPSHOT_OUTPUTS.BLOB,
|
|
52
|
-
useStage: false,
|
|
53
|
-
};
|
|
54
|
-
var cameraValues;
|
|
55
|
-
var getCameraValue = function (configurator, cameraAttrName) {
|
|
56
|
-
if (cameraAttrName === void 0) { cameraAttrName = constants_1.ATTRIBUTES_RESERVED.camera; }
|
|
57
|
-
var attribute = configurator
|
|
58
|
-
.getDisplayAttributes()
|
|
59
|
-
.find(function (el) { return el.name === cameraAttrName; });
|
|
60
|
-
if (!attribute)
|
|
61
|
-
return undefined;
|
|
62
|
-
return attribute.value;
|
|
63
|
-
};
|
|
64
|
-
var getCamerasMap = function (configurator, cameraAttrName) {
|
|
65
|
-
if (cameraAttrName === void 0) { cameraAttrName = constants_1.ATTRIBUTES_RESERVED.camera; }
|
|
66
|
-
if (cameraValues)
|
|
67
|
-
return cameraValues;
|
|
68
|
-
var attribute = configurator
|
|
69
|
-
.getDisplayAttributes()
|
|
70
|
-
.find(function (el) { return el.name === cameraAttrName; });
|
|
71
|
-
if (!attribute) {
|
|
72
|
-
cameraValues = {};
|
|
73
|
-
return cameraValues;
|
|
74
|
-
}
|
|
75
|
-
var cameraAttribute = attribute;
|
|
76
|
-
cameraAttribute.values.forEach(function (el) {
|
|
77
|
-
var _a;
|
|
78
|
-
var value = cameraAttribute.type === types_1.ATTRIBUTE_TYPES.ASSET
|
|
79
|
-
? { assetId: el.assetId }
|
|
80
|
-
: el.value;
|
|
81
|
-
cameraValues = Object.assign(cameraValues || {}, (_a = {},
|
|
82
|
-
_a[el.label] = value,
|
|
83
|
-
_a));
|
|
84
|
-
}, {});
|
|
85
|
-
return cameraValues;
|
|
86
|
-
};
|
|
87
|
-
var getSnapshot = function (_a) {
|
|
88
|
-
var size = _a.size, format = _a.format;
|
|
89
|
-
return window.threekit.player.snapshotAsync({
|
|
90
|
-
size: size,
|
|
91
|
-
mimeType: "image/".concat(types_1.SNAPSHOT_FORMATS[format]),
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
var getSnapshots = function (cameras, snapshotConfig) { return __awaiter(void 0, void 0, void 0, function () {
|
|
95
|
-
var attributeName, size, format, configurator, _a, camerasMap, snapshots;
|
|
96
|
-
return __generator(this, function (_b) {
|
|
97
|
-
switch (_b.label) {
|
|
98
|
-
case 0:
|
|
99
|
-
attributeName = snapshotConfig.attributeName || DEFAULT_CAMERA_CONFIG.attributeName;
|
|
100
|
-
size = snapshotConfig.size || DEFAULT_CAMERA_CONFIG.size;
|
|
101
|
-
format = snapshotConfig.format || DEFAULT_CAMERA_CONFIG.format;
|
|
102
|
-
if (!(snapshotConfig === null || snapshotConfig === void 0 ? void 0 : snapshotConfig.useStage)) return [3, 2];
|
|
103
|
-
return [4, window.threekit.player.getStageConfigurator()];
|
|
104
|
-
case 1:
|
|
105
|
-
_a = _b.sent();
|
|
106
|
-
return [3, 3];
|
|
107
|
-
case 2:
|
|
108
|
-
_a = window.threekit.configurator;
|
|
109
|
-
_b.label = 3;
|
|
110
|
-
case 3:
|
|
111
|
-
configurator = _a;
|
|
112
|
-
camerasMap = getCamerasMap(configurator, attributeName);
|
|
113
|
-
if (!camerasMap)
|
|
114
|
-
return [2, Promise.resolve([])];
|
|
115
|
-
snapshots = [];
|
|
116
|
-
return [2, cameras.reduce(function (snapshotPromise, camera) {
|
|
117
|
-
return snapshotPromise.then(function () {
|
|
118
|
-
return new Promise(function (resolve) { return __awaiter(void 0, void 0, void 0, function () {
|
|
119
|
-
var snapshotStr;
|
|
120
|
-
var _a;
|
|
121
|
-
return __generator(this, function (_b) {
|
|
122
|
-
switch (_b.label) {
|
|
123
|
-
case 0:
|
|
124
|
-
if (!camera) return [3, 2];
|
|
125
|
-
return [4, configurator.setConfiguration((_a = {},
|
|
126
|
-
_a[attributeName] = camerasMap[camera],
|
|
127
|
-
_a))];
|
|
128
|
-
case 1:
|
|
129
|
-
_b.sent();
|
|
130
|
-
_b.label = 2;
|
|
131
|
-
case 2: return [4, getSnapshot({ size: size, format: format })];
|
|
132
|
-
case 3:
|
|
133
|
-
snapshotStr = _b.sent();
|
|
134
|
-
snapshots.push(snapshotStr);
|
|
135
|
-
resolve(snapshots);
|
|
136
|
-
return [2];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}); });
|
|
140
|
-
});
|
|
141
|
-
}, Promise.resolve(snapshots))];
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}); };
|
|
145
|
-
var takeSnapshots = function (camerasList, snapshotsConfig) { return __awaiter(void 0, void 0, void 0, function () {
|
|
146
|
-
var filename, size, format, attributeName, output, configurator, _a, cameras, snapshotsRaw, snapshotData, camerasMap_1, currentCamera, cameraPosition, _b, attachments, response, urlsArray, snapshotBlobs, snapshotFiles;
|
|
147
|
-
var _c;
|
|
148
|
-
return __generator(this, function (_d) {
|
|
149
|
-
switch (_d.label) {
|
|
150
|
-
case 0:
|
|
151
|
-
filename = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.filename) || DEFAULT_CAMERA_CONFIG.filename;
|
|
152
|
-
size = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.size) || DEFAULT_CAMERA_CONFIG.size;
|
|
153
|
-
format = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.format) || DEFAULT_CAMERA_CONFIG.format;
|
|
154
|
-
attributeName = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.attributeName) || DEFAULT_CAMERA_CONFIG.attributeName;
|
|
155
|
-
output = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.output) || DEFAULT_CAMERA_CONFIG.output;
|
|
156
|
-
if (!(snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.useStage)) return [3, 2];
|
|
157
|
-
return [4, window.threekit.player.getStageConfigurator()];
|
|
158
|
-
case 1:
|
|
159
|
-
_a = _d.sent();
|
|
160
|
-
return [3, 3];
|
|
161
|
-
case 2:
|
|
162
|
-
_a = window.threekit.configurator;
|
|
163
|
-
_d.label = 3;
|
|
164
|
-
case 3:
|
|
165
|
-
configurator = _a;
|
|
166
|
-
cameras = Array.isArray(camerasList) ? camerasList : [camerasList];
|
|
167
|
-
if (!(cameras.length === 1 && cameras[0] === undefined)) return [3, 5];
|
|
168
|
-
return [4, getSnapshot({ size: size, format: format })];
|
|
169
|
-
case 4:
|
|
170
|
-
snapshotData = _d.sent();
|
|
171
|
-
snapshotsRaw = [snapshotData];
|
|
172
|
-
return [3, 8];
|
|
173
|
-
case 5:
|
|
174
|
-
camerasMap_1 = getCamerasMap(configurator, attributeName);
|
|
175
|
-
if (!camerasMap_1)
|
|
176
|
-
return [2, null];
|
|
177
|
-
cameras = cameras.filter(function (el) { return el === undefined || Object.keys(camerasMap_1).includes(el); });
|
|
178
|
-
currentCamera = getCameraValue(configurator, attributeName);
|
|
179
|
-
cameraPosition = (0, utils_1.getCameraPosition)(window.threekit.player.camera);
|
|
180
|
-
return [4, getSnapshots(cameras, snapshotsConfig)];
|
|
181
|
-
case 6:
|
|
182
|
-
snapshotsRaw = _d.sent();
|
|
183
|
-
return [4, configurator.setConfiguration((_c = {},
|
|
184
|
-
_c[attributeName] = currentCamera,
|
|
185
|
-
_c))];
|
|
186
|
-
case 7:
|
|
187
|
-
_d.sent();
|
|
188
|
-
(0, utils_1.setCameraPosition)(window.threekit.player.camera, cameraPosition);
|
|
189
|
-
_d.label = 8;
|
|
190
|
-
case 8:
|
|
191
|
-
_b = output;
|
|
192
|
-
switch (_b) {
|
|
193
|
-
case types_1.SNAPSHOT_OUTPUTS.URL: return [3, 9];
|
|
194
|
-
case types_1.SNAPSHOT_OUTPUTS.DOWNLOAD: return [3, 11];
|
|
195
|
-
case types_1.SNAPSHOT_OUTPUTS.BLOB: return [3, 12];
|
|
196
|
-
case types_1.SNAPSHOT_OUTPUTS.FILE: return [3, 13];
|
|
197
|
-
case types_1.SNAPSHOT_OUTPUTS.DATA_URL: return [3, 14];
|
|
198
|
-
}
|
|
199
|
-
return [3, 14];
|
|
200
|
-
case 9:
|
|
201
|
-
attachments = snapshotsRaw.reduce(function (output, el, idx) {
|
|
202
|
-
var _a;
|
|
203
|
-
var cameraName = (camerasList === null || camerasList === void 0 ? void 0 : camerasList[idx])
|
|
204
|
-
? (0, utils_1.regularToKebabCase)(camerasList[idx] || 'default')
|
|
205
|
-
: filename;
|
|
206
|
-
var preppedFilename = cameraName === filename
|
|
207
|
-
? "".concat(filename, ".").concat(format)
|
|
208
|
-
: "".concat(filename, "-").concat(cameraName, ".").concat(format);
|
|
209
|
-
var file = (0, utils_1.dataURItoFile)(el, preppedFilename);
|
|
210
|
-
return Object.assign(output, (_a = {}, _a[cameraName] = file, _a));
|
|
211
|
-
}, {});
|
|
212
|
-
return [4, api_1.default.configurations.save({
|
|
213
|
-
assetId: window.threekit.player.assetId,
|
|
214
|
-
configuration: window.threekit.configurator.getConfiguration(),
|
|
215
|
-
attachments: attachments,
|
|
216
|
-
})];
|
|
217
|
-
case 10:
|
|
218
|
-
response = _d.sent();
|
|
219
|
-
urlsArray = Object.values(response.data.attachments);
|
|
220
|
-
return [2, Promise.resolve(urlsArray)];
|
|
221
|
-
case 11:
|
|
222
|
-
snapshotsRaw.forEach(function (snapshotBlob, idx) {
|
|
223
|
-
var cameraName = (camerasList === null || camerasList === void 0 ? void 0 : camerasList[idx])
|
|
224
|
-
? "-".concat((0, utils_1.regularToKebabCase)(camerasList[idx] || 'default'))
|
|
225
|
-
: '';
|
|
226
|
-
(0, utils_1.downloadSnapshot)(snapshotBlob, "".concat(filename).concat(cameraName, ".").concat(format));
|
|
227
|
-
});
|
|
228
|
-
return [2, Promise.resolve()];
|
|
229
|
-
case 12:
|
|
230
|
-
snapshotBlobs = snapshotsRaw.map(function (el) { return (0, utils_1.dataURItoBlob)(el); });
|
|
231
|
-
return [2, Promise.resolve(snapshotBlobs)];
|
|
232
|
-
case 13:
|
|
233
|
-
snapshotFiles = snapshotsRaw.map(function (el, idx) {
|
|
234
|
-
var cameraName = (camerasList === null || camerasList === void 0 ? void 0 : camerasList[idx])
|
|
235
|
-
? "-".concat((0, utils_1.regularToKebabCase)(camerasList[idx] || 'default'))
|
|
236
|
-
: '';
|
|
237
|
-
return (0, utils_1.dataURItoFile)(el, "".concat(filename).concat(cameraName, ".").concat(format));
|
|
238
|
-
});
|
|
239
|
-
return [2, Promise.resolve(snapshotFiles)];
|
|
240
|
-
case 14: return [2, Promise.resolve(snapshotsRaw)];
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
}); };
|
|
244
|
-
exports.default = {
|
|
245
|
-
getSnapshot: getSnapshot,
|
|
246
|
-
takeSnapshots: takeSnapshots,
|
|
247
|
-
};
|
|
@@ -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;
|