UNPKG

kitchen-simulator

Version:

It is a kitchen simulator (self-contained micro-frontend).

363 lines (362 loc) 8.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.animateObject = animateObject; exports.beginDraggingItem = beginDraggingItem; exports.beginDraggingItem3D = beginDraggingItem3D; exports.beginRotatingItem = beginRotatingItem; exports.beginRotatingItem3D = beginRotatingItem3D; exports.duplicateSelected = duplicateSelected; exports.editWidth = editWidth; exports.endCreatingCabinet = endCreatingCabinet; exports.endDraggingItem = endDraggingItem; exports.endDraggingItem3D = endDraggingItem3D; exports.endDrawingItem = endDrawingItem; exports.endLoading = endLoading; exports.endRotatingItem = endRotatingItem; exports.endRotatingItem3D = endRotatingItem3D; exports.removeReplacingSupport = removeReplacingSupport; exports.replaceItem = replaceItem; exports.replaceSubmodule = replaceSubmodule; exports.selectItem = selectItem; exports.selectToolDrawingItem = selectToolDrawingItem; exports.selectToolDrawingItem3D = selectToolDrawingItem3D; exports.setApplianceMaterial = setApplianceMaterial; exports.setBacksplash = setBacksplash; exports.setBacksplashVisible = setBacksplashVisible; exports.setCounterTop = setCounterTop; exports.setDoorHandle = setDoorHandle; exports.setDoorStyle = setDoorStyle; exports.setHandleMaterial = setHandleMaterial; exports.setInitialDoorStyle = setInitialDoorStyle; exports.setModelling = setModelling; exports.setMolding = setMolding; exports.setMoveStatus = setMoveStatus; exports.setRotateStatus = setRotateStatus; exports.setWallColor = setWallColor; exports.storeDistArray = storeDistArray; exports.toggleLoadingCabinet = toggleLoadingCabinet; exports.updateDraggingItem = updateDraggingItem; exports.updateDraggingItem3DX = updateDraggingItem3DX; exports.updateDraggingItem3DY = updateDraggingItem3DY; exports.updateDraggingItemChanged = updateDraggingItemChanged; exports.updateDrawingItem = updateDrawingItem; exports.updateItemsAltitude = updateItemsAltitude; exports.updateMolding = updateMolding; exports.updatePopupOpen = updatePopupOpen; exports.updateRotatingItem = updateRotatingItem; exports.updateRotatingItemChanged = updateRotatingItemChanged; exports.validateItemPositions = validateItemPositions; var _constants = require("../constants"); function storeDistArray(layerID, itemID, distArray) { return { type: _constants.STORE_DIST_ARRAY, layerID: layerID, itemID: itemID, distArray: distArray }; } function validateItemPositions(layerID) { return { type: _constants.VALIDATE_ITEM_POSTIONS, layerID: layerID }; } function endLoading() { return { type: _constants.END_LOADING }; } function toggleLoadingCabinet() { return { type: _constants.TOGGLE_LOADING_CABINET }; } function editWidth(newWidth, layerID, itemID) { return { type: _constants.EDIT_WIDTH, newWidth: newWidth, layerID: layerID, itemID: itemID }; } function duplicateSelected(currentObject) { return { type: _constants.DUPLICATE_SELECTED, currentObject: currentObject }; } function replaceItem(selectedPos, currentObject, selectedObject) { return { type: _constants.REPLACE_ITEM, selectedPos: selectedPos, currentObject: currentObject, selectedObject: selectedObject }; } function selectItem(layerID, itemID) { return { type: _constants.SELECT_ITEM, layerID: layerID, itemID: itemID }; } function endCreatingCabinet() { return { type: _constants.END_CREATING_CABINET }; } function updatePopupOpen(value) { return { type: _constants.UPDATE_POPUP_OPEN, value: value }; } function selectToolDrawingItem(sceneComponentType) { return { type: _constants.SELECT_TOOL_DRAWING_ITEM, sceneComponentType: sceneComponentType }; } function selectToolDrawingItem3D(sceneComponentType) { return { type: _constants.SELECT_TOOL_DRAWING_ITEM_3D, sceneComponentType: sceneComponentType }; } function updateDrawingItem(layerID, x, y) { return { type: _constants.UPDATE_DRAWING_ITEM, layerID: layerID, x: x, y: y }; } function endDrawingItem(layerID, x, y) { return { type: _constants.END_DRAWING_ITEM, layerID: layerID, x: x, y: y }; } function beginDraggingItem(layerID, itemID, x, y) { return { type: _constants.BEGIN_DRAGGING_ITEM, layerID: layerID, itemID: itemID, x: x, y: y }; } function beginDraggingItem3D(layerID, itemID, x, y) { return { type: _constants.BEGIN_DRAGGING_ITEM_3D, layerID: layerID, itemID: itemID, x: x, y: y }; } function updateDraggingItem(x, y) { return { type: _constants.UPDATE_DRAGGING_ITEM, x: x, y: y }; } function updateDraggingItemChanged(x, y, layerID, itemID) { return { type: _constants.UPDATE_DRAGGING_ITEM_CHANGED, x: x, y: y, layerID: layerID, itemID: itemID }; } function updateDraggingItem3DX(x) { return { type: _constants.UPDATE_DRAGGING_ITEM_3DX, x: x }; } function updateDraggingItem3DY(y) { return { type: _constants.UPDATE_DRAGGING_ITEM_3DY, y: y }; } function endDraggingItem(x, y) { return { type: _constants.END_DRAGGING_ITEM, x: x, y: y }; } function endDraggingItem3D() { return { type: _constants.END_DRAGGING_ITEM_3D }; } function beginRotatingItem(layerID, itemID, x, y) { return { type: _constants.BEGIN_ROTATING_ITEM, layerID: layerID, itemID: itemID, x: x, y: y }; } function beginRotatingItem3D(layerID, itemID, x, y, centerX, centerY) { return { type: _constants.BEGIN_ROTATING_ITEM_3D, layerID: layerID, itemID: itemID, x: x, y: y, centerX: centerX, centerY: centerY }; } function updateRotatingItem(x, y) { return { type: _constants.UPDATE_ROTATING_ITEM, x: x, y: y }; } function updateRotatingItemChanged(rotation, layerID, itemID) { return { type: _constants.UPDATE_ROTATING_ITEM_CHANGED, rotation: rotation, layerID: layerID, itemID: itemID }; } function endRotatingItem(x, y) { return { type: _constants.END_ROTATING_ITEM, x: x, y: y }; } function endRotatingItem3D(x, y) { return { type: _constants.END_ROTATING_ITEM_3D, x: x, y: y }; } function replaceSubmodule(url) { return { type: _constants.REPLACE_SUBMODULE, url: url }; } function animateObject(value) { return { type: _constants.ANIMATE_OBJECT, value: value }; } function removeReplacingSupport() { return { type: _constants.REMOVE_REPLACE_SUBMODULE }; } function updateItemsAltitude(layerID, itemID, value) { return { type: _constants.ITEM_MOVE_UP, layerID: layerID, itemID: itemID, value: value }; } function setDoorStyle(doorStyle, itemCDS, isAll) { return { type: _constants.SET_DOOR_STYLE, doorStyle: doorStyle, itemCDS: itemCDS, isAll: isAll }; } function setCounterTop(counterTop) { return { type: _constants.SET_COUNTER_TOP, counterTop: counterTop }; } function setHandleMaterial(material) { return { type: _constants.SET_HANDLE_MATERIAL, material: material }; } function setDoorHandle(texture) { return { type: _constants.SET_DOOR_HANDLE, doorHandle: texture }; } function setWallColor(texture) { return { type: _constants.SET_WALL_COLOR, wallColor: texture }; } function setMolding(texture, isAll) { return { type: _constants.SET_MOLDING, molding: texture, isAll: isAll }; } function updateMolding() { return { type: _constants.UPDATE_MOLDING }; } function setBacksplash(texture) { return { type: _constants.SET_BACKSPLASH, backsplash: texture }; } function setBacksplashVisible(itemID, value) { return { type: _constants.SET_BACKSPLASH_VISIBLE, backsplashVisible: value, itemID: itemID }; } function setApplianceMaterial(material) { return { type: _constants.SET_APPLIANCE_MATERIAL, material: material }; } function setModelling(model) { return { type: _constants.SET_MODELLING, model: model }; } function setInitialDoorStyle(doorStyle) { return { type: _constants.SET_INITIAL_DOOR_STYLE, doorStyle: doorStyle }; } function setMoveStatus(status) { return { type: _constants.SET_MOVE_STATUS, status: status }; } function setRotateStatus(status) { return { type: _constants.SET_ROTATE_STATUS, status: status }; }