import { AdvancedDynamicTexture } from '@babylonjs/gui/2D/advancedDynamicTexture'; import { ViewpointCamInfo } from '.'; import { Material } from '@babylonjs/core/Materials/material'; import { Mesh } from '@babylonjs/core/Meshes/mesh'; import { TransformNode } from '@babylonjs/core/Meshes/transformNode'; import { Button } from '@babylonjs/gui/2D/controls/button'; import { HQS_Node } from './parser/types'; import { Ellipse } from '@babylonjs/gui/2D/controls/ellipse'; import { TextBlock } from '@babylonjs/gui/2D/controls/textBlock'; import { RTVAnalyzeData } from './store/types'; import { ApiConfig } from '@crystaldesign/diva-core'; import { HQS_Transform } from './parser/types'; export interface FreePlacesOnGrids { accessoire3DName: string; articleCodex: string; basketId: string; plannedOptions: { [codex: string]: string; }; elementId?: string; grids: { [gridName: string]: { freeCells: number[]; idx: number; }; }; } export interface PlannedPlacesOnGrids { shelf3DName: string; elementId?: string; basketId: string; catalogCodex: string; grids: { [gridName: string]: { accessories: ShelfAccessories[]; idx: number; }; }; iln: string; plannedOptions: { [codex: string]: string; }; } export interface ShelfAccessories { accessorie3DName: string; articleCodex: string; basketId: string; index: number; plannedOptions: { [key: string]: string; }; noDelete: boolean; noMove: boolean; } export type TabGroupTypes = 'PLANNER' | 'PLANNER_2.0' | 'ACC' | 'ACC_PLANNER' | 'OPTION' | 'SUMMARY' | 'STATICROOMLIST' | 'SHELFPLANNER' | 'DOORPLANNER' | 'PRODUCTS' | 'PROMOTED'; export interface GeneralPlanningState { grids: Grid[]; selectedElement?: SelectedElement; } export interface Grid { index: number; matrix: Cell[][]; columnSizes: number | number[]; rowSizes: number | number[]; overlapping?: { gridIndex: number; myRows?: number[]; myCloums?: number[]; theirRows: number[]; theirCloums: number[]; }; } export interface Cell { index: { x: number; y: number; }; plannedElement?: PlannedElement; } export interface PlannedElement { basketId: string; articleCodex: string; elementId: number; subGrids?: Grid[]; canDelete?: boolean; canMove?: boolean; area: { fromX: number; toX: number; fromY: number; toY: number; }; size: Size; } export interface Size { width: number; height: number; depth: number; } export interface SelectedElement { elementId: number; articleCodex: string; gridSpace: { rows: number; colums: number; }; area: { fromX: number; toX: number; fromY: number; toY: number; }; size: Size; rules: RuleType[]; } export type RuleType = ModuloRule | SpecificRowsRule | SpecificCloumRule | FixedPositonRule; export interface ModuloRule { type: 'Modulo'; start?: number; modulo: number; } export interface SpecificRowsRule { type: 'SpecificRows'; rows: number[]; } export interface SpecificCloumRule { type: 'SpecificCloums'; onlyOnColums: number[]; } export interface FixedPositonRule { type: 'FixedPositon'; grids: { gridIndex: number; places: { lowestX: number; lowestY: number; }[]; }[]; } export interface ViewHandler { rtvAnalyzeData?: RTVAnalyzeData[]; settingsState: { freePlacesOnGrids?: FreePlacesOnGrids[]; generalPlanningState: { [setId: string]: GeneralPlanningState; }; }; paletteViewHandler: { movePlannerElement: (setId: string, elementId: number, absoluteCopyIndex: { x: number; y: number; }) => Promise; addAccessorieOnShelfPlannerView: any; deleteAccessorieOnShelfPlannerView: any; updateFreePlacesOnGrids: any; selectShelfAccessorie: (articleCodex?: string, basketId?: string) => void; }; viewPlannerHandler: { onElementDeleted: (setId: string, elementId: number) => void; onElementCopy: (setId: string, elementId: number, copyIndex: { x: number; y: number; z: number; }) => Promise; }; divaWebPlanner: { getFreeToMovePlacesOnGrids(gridName: string, basketId: string): FreePlacesOnGrids[] | undefined; moveShelfItemToGrid(accessoireBasketId: string, parentBasketId: string, gridName: string, cellIndex: number): Promise; getPlannerInteractionInformation(): PlannerInteractionInformation | undefined; getEnableUnityRtvKombi: () => boolean; }; tabgroupTypeActive: (type: TabGroupTypes) => boolean; tabGroupState: any; } export interface UIConfig { templateConfig: 'standard' | 'gold' | 'hidden'; posNumIcon: 'TOP_LEFT_BACK'; posTrashIcon: 'TOP_RIGHT_BACK' | 'POSNUM_TOP'; hideUiIcons: boolean; plannerMode: '2DGrid' | '3DImage' | 'BoxPlanner' | 'No' | 'ProductList' | 'RTViewer' | '3DCOMB'; } export interface Props { renderjob: string; apiConfig: ApiConfig; callbacks: { onInitialized?: () => void; viewpointCreated?: (name: string, global: boolean, position: HQS_Transform, rotation: HQS_Transform) => void; setGlb?: (glbUrl: any, globBlob?: Blob) => any; onElementSelected?: (setId: string, elementId: number) => void; onMissingGeo?: () => void; requestNewOverlayImage?: (viewpoint: ViewpointCamInfo, focus: { adjustZoomInUnity: boolean; onlyAdjustZoomBBChanged: boolean; rotationCenter: { x: number; y: number; z: number; }; setId?: string; elementId?: number; }) => void; updateCameraInformation?: (cam: ViewpointCamInfo) => void; }; renderInBackground: boolean; uiConfig?: UIConfig; overlayImage?: { base64: string; isStaticBg: boolean; isStart: boolean; }; disableToggleLoading?: boolean; viewpoint?: ViewpointCamInfo; isMobile?: boolean; elementsInfo?: ElementInfo[]; resolution?: { x: number; y: number; }; inBackground?: boolean; viewHandler?: ViewHandler; stopRender?: boolean; freePlacesOnGrids?: FreePlacesOnGrids[]; plannedPlacesOnGrids?: PlannedPlacesOnGrids[]; jwt?: string; } export interface GUIType { gui: AdvancedDynamicTexture; guiElement: (Button | Ellipse)[]; label?: TextBlock; } export interface ElementInfo { elementId: number; setId: string; active: boolean; selectable: boolean; posNr: string | undefined; callback?: () => void; type: 'PosNr' | 'TrashIcon' | 'BoxCopyRight' | 'BoxCopyLeft' | 'BoxCopyTop' | 'TrashIcon'; } export interface GeoCache { geometry: Mesh; onElements: HQS_Node[]; name: string; } export interface Cache { id: string; material?: MatCache; geo?: GeoCache; } export interface MatCache { mat: Material; isStdMat: boolean; name: string; onNodes?: string[]; parents?: TransformNode[]; onElements: HQS_Node[]; } export interface PlannerInteractionInformation { boxPlannerInteractionInformationPerElement: Map; } export interface PlannerInteractionPerBoxPlannerElement { location: LocationInformation; isDeletable: boolean; availablePlanningLocations: { availableBoxPlannerCellsLeft?: LocationInformation; availableBoxPlannerCellsTop?: LocationInformation; availableBoxPlannerCellsRight?: LocationInformation; }; availableMovingLocations: LocationInformation[]; } /** * Gives information of the location of an element in the grid. */ export interface LocationInformation { cells: Cell[]; widthPerCell: number; heightPerCell: number; depthPerCell: number; width: number; height: number; depth: number; startIndexWorldPos: { x: number; y: number; }; } //# sourceMappingURL=types.d.ts.map