import { default as default_2 } from 'rbush'; /** * This interface was referenced by `AuthJson`'s JSON-Schema * via the `definition` "actionScope". */ declare type ActionScope = | "manageJoinRequests" | "access" | "archive" | "bake" | "changeRole" | "close" | "create" | "createFromOrder" | "delete" | "export" | "import" | "invite" | "query" | "queryPublic" | "queryPrivate" | "read" | "readPrivate" | "readPublic" | "update" | "remove" | "write" | "addUser" | "removeUser" | "settings"; declare type Animate = number | boolean; declare interface ApiUrls { spaceApiUrl?: string; apiStorageUrl?: string; apiProductDataPath?: string; } export declare type ArcCurve = ArcCurve_2 & { style?: ShapeStyle; }; declare interface ArcCurve_2 extends CurveBase { type: ArcCurveType; position?: Vector2_2; radius: number; startAngle: number; endAngle: number; } declare type ArcCurveType = typeof ArcCurveTypeValue; declare const ArcCurveTypeValue = "curve:arc"; /** * Background of the floor plan canvas */ declare type BackgroundOptions = { /** background-color: hex code for color, set to 'transparent' for transparent background */ color?: string; /** show a dynamic grid */ showGrid?: boolean; }; declare interface BaseData { id: string; name: string; type: string; customId: string; customAttributes: SpaceGraphCustomAttributeValue; /** dimensions in meters */ dimensions: { width: number; length: number; height: number; }; /** * axis alignend bounding box in root space * @example * { * min: [0, 0, 0], * max: [1, 2, 1] * } * */ boundingBox: BoundingBox3d; /** contour of the object aligned bounding box in root space */ boundingBoxContour: Polygon_2; labelPoint: Vector2_2; contour: PolygonWithHoles_2; } declare type BaseLayers = 'base' | 'scene' | 'preview' | 'annotation' | 'helper'; declare interface BaseNodeFilter { id?: StringComparator; type?: StringComparator; name?: StringComparator | NullComparator; customId?: StringComparator | NullComparator; customAttributes?: Record; dimensions?: { width?: NumberComparator; length?: NumberComparator; height?: NumberComparator; }; } declare interface BaseSelect { id?: boolean; type?: boolean; name?: boolean; customId?: boolean; customAttributes?: boolean | Record; dimensions?: boolean | { width?: boolean; length?: boolean; height?: boolean; }; boundingBox?: boolean; boundingBoxContour?: boolean; labelPoint?: boolean; contour?: boolean; } export declare type BezierCurve = BezierCurve_2 & { style?: ShapeStyle; }; declare interface BezierCurve_2 extends CurveBase { type: BezierCurveType; points: Vector2_2[]; } declare type BezierCurveType = typeof BezierCurveTypeValue; declare const BezierCurveTypeValue = "curve:quadraticBezier"; declare type BooleanComparator = boolean | { eq: boolean; } | { neq: boolean; }; export declare interface BoundaryData { profile: Vector2_2[]; segments: BoundarySegmentData[]; } declare interface BoundarySegmentData { points: [Vector2_2, Vector2_2]; element: { id: string; type: string; } | null; adjacentSpaceId: string | null; } export declare type BoundingBox2d = { min: Vector2; max: Vector2; }; declare type BoundingBox3d = { min: Vector3; max: Vector3; }; export declare type CircleCurve = CircleCurve_2 & { style?: ShapeStyle; }; declare interface CircleCurve_2 extends CurveBase { type: CircleCurveType; position?: Vector2_2; radius: number; } declare type CircleCurveType = typeof CircleCurveTypeValue; declare const CircleCurveTypeValue = "curve:circle"; declare type ClosedCurve = RectangleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2 | CircleCurve_2 | CompositeCurve_2; declare type ClosedCurveType = RectangleCurveType | PolygonCurveType | PolygonWithHolesCurveType | CircleCurveType | CompositeCurveType; declare interface CommonParameters { materials: LayoutBeamMaterials; } declare interface CommonParameters_2 { counterHeight: number; materials: LayoutCaseworkMaterials; } declare interface CommonParameters_3 { /** thickness of the frame in x direction */ frameThickness: number; /** depth of the frame in z direction */ frameDepth: number; doorType: DoorType; doorAngle: number; hardware: boolean; hingeSide: HingeSide; doorSide: DoorSide; materials: LayoutDoorMaterials; } declare interface CommonParameters_4 { wallCabinet: boolean; leftHighCabinetCount: number; rightHighCabinetCount: number; sinkElementSlot: number; cooktopElementSlot: number; ovenElementSlot: number; materials: LayoutKitchenMaterials; } declare interface CommonParameters_5 { segmentCount: number; segmentLength: number; materials: LayoutRailingMaterials; } declare interface CommonParameters_6 { materials: LayoutRampMaterials; } declare interface CommonParameters_7 { /** thickness of the frame in x direction */ frameThickness: number; /** depth of the frame in z direction */ frameDepth: number; panelLength: number; panelCount: number; materials: LayoutWindowMaterials; } declare type CommonStairsParameters = { railing: 'none' | 'left' | 'right' | 'both'; materials: LayoutStairsMaterials; }; export declare type CompositeCurve = CompositeCurve_2 & { style?: ShapeStyle; }; declare interface CompositeCurve_2 extends CurveBase { type: CompositeCurveType; segments: OpenCurve[]; } declare type CompositeCurveType = typeof CompositeCurveTypeValue; declare const CompositeCurveTypeValue = "curve:composite"; /** * This interface was referenced by `AuthJson`'s JSON-Schema * via the `definition` "createTemporaryAccessToken". */ declare interface CreateTemporaryAccessToken { scopes: ScopeDefinitionArray; durationSeconds?: number; } declare class CuboidGeometry extends ParametricGeometryBase { type: CuboidGeometryType; dimensions: Vector3; constructor(id: string); } declare interface CuboidGeometryJson extends ParametricGeometryBaseJson { type: CuboidGeometryType; dimensions: Vector3; } declare type CuboidGeometryType = typeof CuboidGeometryTypeValue; declare const CuboidGeometryTypeValue = "geometry:cuboid"; declare type Curve = ClosedCurve | OpenCurve; declare interface CurveBase { type: CurveType; } declare type CurveShape = Curve & { style?: ShapeStyle; }; declare type CurveType = ClosedCurveType | OpenCurveType; declare type CustomAttributeInputType = 'Text' | 'Number' | 'Boolean' | 'Integer' | 'Select'; declare type CustomAttributeResourceType = 'building' | 'element' | 'floor' | 'layout' | 'product' | 'space'; declare type CustomAttributeSchema = CustomAttributeSchemaText | CustomAttributeSchemaSelect | CustomAttributeSchemaNumber | CustomAttributeSchemaInteger | CustomAttributeSchemaBoolean; declare type CustomAttributeSchemaBoolean = { type: 'boolean'; }; declare type CustomAttributeSchemaInteger = { type: 'integer'; }; declare type CustomAttributeSchemaNumber = { type: 'number'; }; declare type CustomAttributeSchemaSelect = { type: 'string'; enum: string[]; }; declare type CustomAttributeSchemaText = { type: 'string'; }; /** @deprecated */ declare type CustomAttributeValueType = 'Text' | 'Number' | 'Boolean' | 'Schema'; declare type CustomStairsParameters = { stairsType: CustomStairsType; /** @minimum 0.01 */ height: number; /** @minimum 0.01 */ stepWidth: number; } & CommonStairsParameters; declare type CustomStairsParametersJson = Partial; declare type CustomStairsType = 'custom'; declare type DefaultSelect = { id: true; type: true; }; declare type DimensionParameters = { /** @minimum 0.01 */ length: number; /** @minimum 0.01 */ width: number; /** @minimum 0.01 */ height: number; }; declare interface DimensionParameters_2 { /** @minimum 0.01 */ length: number; /** @minimum 0.01 */ height: number; } declare interface DimensionParameters_3 { /** @minimum 0.01 */ length: number; /** @minimum 0.01 */ height: number; } declare type DoorSide = 'side1' | 'side2'; declare type DoorType = 'singleSwing' | 'doubleSwing' | 'slidingDoor' | 'opening' | 'elevatorDoor' | 'garageDoor'; declare enum DxfUnits { unitLess = 0, inches = 1, feet = 2, miles = 3, millimeters = 4, centimeters = 5, meters = 6, kilometers = 7 } declare type DxfUnitsString = keyof typeof DxfUnits; declare interface EdgeCanSplitOptions { minimumLength?: number; } declare type EdgeElementMap = { 'element:curtainWall': LayoutCurtainWall; 'element:spaceDivider': LayoutSpaceDivider; 'element:wall': LayoutWall; }; declare interface EdgeSplitOptions { vertexId?: string; edgeId?: string; elementId?: string; } declare interface EdgeSplitReturnValue { vertex: SpatialGraphVertex; edge: SpatialGraphEdge; element?: LayoutEdgeElement; } export declare interface ElementData extends BaseData { type: LayoutElementJson['type']; isExternal: boolean; parameters: LayoutElementJson['parameters']; category: string; subCategory: string; product: ProductData; /** local transform for nested elements like openings, windows */ localTransform: SimpleTransform3d; /** transform in root space */ transform: SimpleTransform3d; /** local object aligned bounding box */ localBoundingBox: BoundingBox3d; elements: ElementData[]; parent: ElementData; } export declare interface ElementFilter extends BaseNodeFilter { product?: ProductFilter; category?: StringComparator; subCategory?: StringComparator; /** point query */ at?: Vector2_2; /** 2d bounding box intersection */ within?: { min: Vector2_2; max: Vector2_2; }; isExternal?: BooleanComparator; } declare type ElementQuery = { select?: ElementSelect; where?: ElementFilter; }; export declare interface ElementSelect extends BaseSelect { product?: ProductSelect | boolean; category?: boolean; subCategory?: boolean; isExternal?: boolean; localBoundingBox?: boolean; localTransform?: boolean; transform?: boolean; parent?: ElementSelect | boolean; elements?: ElementQuery | boolean; } declare interface ExportImage { /** output format: png, jpg */ format?: 'png' | 'jpg'; /** fle name relevant if download is true */ fileName?: string; /** only relevant if format is jpg */ quality?: number; /** desired output format */ output?: 'base64' | 'text'; /** target width of the image */ maxWidth?: number; /** If true, methods triggers a file download directly */ download?: boolean; } declare class ExtrusionGeometry extends ParametricGeometryBase { type: ExtrusionGeometryType; profile: ClosedCurve; height: number; constructor(id: string, profile: ClosedCurve); } declare interface ExtrusionGeometryJson extends ParametricGeometryBaseJson { type: ExtrusionGeometryType; profile: ClosedCurve; height: number; } declare type ExtrusionGeometryType = typeof ExtrusionGeometryTypeValue; declare const ExtrusionGeometryTypeValue = "geometry:extrusion"; /** * The main Floor plan engine SDK class */ declare class FloorPlanCore { settings: FpeConfig; static readonly version: string; readonly fpeId: string; computed: FpeComputed; loader: FpeLoader; layout: SpaceGraphLayout; /* Excluded from this release type: spaceGraph */ /* Excluded from this release type: building */ isBrowser: boolean; location: { latitude: number; longitude: number; /** angle measured in degrees from the north line (=0 degrees). Value should be between -180 and 180 degrees (positive clockwise) */ bearing: number; }; protected _emitter: TinyEmitter; constructor({ options }?: { options?: FpeConfig; }); on(event: EventType, handler: FpeCoreEventHandler, ctx?: Context): this; once(event: EventType, handler: FpeCoreEventHandler, ctx?: Context): this; off(event: EventType, handler?: FpeCoreEventHandler): this; emit(event: EventType, ...args: FpeCoreEventMap[EventType]): this; loadLayout(layout: SpaceGraphLayout, { skipGeometryCompute }?: { skipGeometryCompute?: boolean; }): void; loadSpaceGraph(spaceGraph: SpaceGraph, { skipGeometryCompute, layoutId }?: { skipGeometryCompute?: boolean; layoutId?: string; }): void; loadSpaceGraphJson(spaceGraphJson: SpaceGraphJson): void; /** * Load a floor with its unique identifier the floorId * @param {string} floorId id of the floor to load * @param {AccessToken} accessTokenOptions Space API v2 [publishable](../space-api/v2/introduction.md#publishable-access-token) or [temporary](../space-api/v2/introduction.md#temporary-access-token) access token * @returns {Promise.} returns promise which resolves when loading is done */ loadFloorById(floorId: string, accessTokenOptions?: TokenOptions): Promise; /** * Load a layout with its unique identifier the layoutId * @param {string} layoutId id of the floor to load * @param {AccessToken} accessTokenOptions Space API v2 [publishable](../space-api/v2/introduction.md#publishable-access-token) or [temporary](../space-api/v2/introduction.md#temporary-access-token) access token * @returns {Promise.} returns promise which resolves when loading is done */ loadLayoutById(layoutId: string, accessTokenOptions?: TokenOptions): Promise; /** * Change options after the floor plan engine instance has been created */ set(args?: FpeConfig): void; /* Excluded from this release type: updateThemeFilter */ /* Excluded from this release type: updateVisibilityFilter */ getBoundingBox(margin?: number): BoundingBox2d; getElements(args?: { select?: S; where?: ElementFilter; }): QueryPick[]; getElementsById(args: { select?: S; id: string; }): QueryPick; getSpaces(args?: { select?: S; where?: SpaceFilter; }): QueryPick[]; getSpacesById(args: { select?: S; id: string; }): QueryPick; /** * @deprecated getResourcesFromPosition is deprecated and will be removed in the next version. use `floorPlan.getElements({ where: { at: [1, 4 ]}})` */ getResourcesFromPosition(position: Vector2): { spaces: LayoutSpace[]; assets: LayoutAsset[]; }; /** * Destroy the floor plan instance */ destroy(): void; } /** * The main Floor plan engine SDK class */ export declare class FloorPlanEngine extends FloorPlanCore { #private; fpeNode?: HTMLElement; view: WebGlView; interaction: FpeInteraction; /** @deprecated the layout property is deprecated and will be removed in the next version. use `floorPlan.getElements()` or `floorPlan.getSpaces()` */ layout: SpaceGraphLayout; availableHelpers: { [name: string]: typeof Helper; }; helper: { [name: string]: Helper; }; /* Excluded from this release type: preventUpdateOnSpaceGraphEvent */ constructor({ container, options }?: { container?: Element; options?: FpeConfig; }); prevent(e: any): void; /** * Subscribe to an event */ on(event: EventType, handler: FpeEventHandler, ctx?: Context): this; /** * Subscribe to an event once */ once(event: EventType, handler: FpeEventHandler, ctx?: Context): this; /** * Unsubscribe from an event */ off(event: EventType, handler?: FpeEventHandler, ctx?: Context): this; emit(event: EventType, ...args: FpeEventMap[EventType]): this; /* Excluded from this release type: handleDrop */ /** * Change options after the floor plan engine instance has been created * @param args - Startup options */ set(args: FpeConfig): void; drawNodePreview(id: string, layout: SpaceGraphLayout, layer: PlanLayer, style?: ShapeStyle): void; drawNodeUpdate(id: string, style?: 'selected' | ShapeStyle | false): void; /* Excluded from this release type: drawResourceUpdate */ /* Excluded from this release type: mountFloorPlan */ /* Excluded from this release type: initDrawing */ /* Excluded from this release type: initDrawingEvents */ /* Excluded from this release type: freeDrawingEvents */ /* Excluded from this release type: generateUi */ /** * Get a bounding box containing the layout, with some padding * @param layoutBoundingBox - bounding box of the layout, in meters. * @param rectLeft - left edge of a rectangle into which the layout should fit, in pixels. * @param rectTop - top edge of a rectangle into which the layout should fit, in pixels. * @param rectRight - right edge of a rectangle into which the layout should fit, in pixels. * @param rectBottom - bottom edge of a rectangle into which the layout should fit, in pixels. * @param viewportWidth - width in pixels of the canvas. * @param viewportHeight - height in pixels of the canvas. * @returns returns a new bounding box */ getZoomExtentsBoundingBox(layoutBoundingBox: BoundingBox2d, rectLeft: number, rectTop: number, rectRight: number, rectBottom: number, viewportWidth: number, viewportHeight: number): BoundingBox2d; /** * Zoom to the extent of the scene in the viewport ( wait for loadScene promise ) * @param margin - margin around scene in meters. Defaults to 1 meter * @param animate - duration in milliseconds of the animation for the viewport transform. If true, the duration will be 500ms. If false or not provided there will be no animation * @param boundingBox - bounding box to zoom to. Can for example be calculated via getZoomExtentsBoundingBox(…). If provided, the margin parameter will be ignored * @returns returns promise which resolves when animation is done */ zoomExtents(margin?: number, animate?: Animate, boundingBox?: BoundingBox2d): Promise; /** * Zoom to the bounding box of an element ( wait for loadScene promise ) * @param node - id of a node or the node itself * @param margin - margin around scene in meters * @param animate - duration of the animation for the viewport transform, if not provided there will be no animation * @returns returns promise which resolves when animation is done */ zoomToElement(node: string | LayoutElement | SpatialGraphEdge | LayoutSpace, margin?: number, animate?: Animate): Promise; /** * set zoom to a specific bounding box * @param bb - bounding box * @param animate - duration of the animation for the viewport transform, if not provided there will be no animation * @returns returns promise which resolves when animation is done */ setZoom(bb: BoundingBox2d, animate?: Animate): Promise; /** * zoom the current view by a factor * @param factor - zoom factor, larger than 1 zooms in, smaller than 1 zooms out * @param animate - duration of the animation for the viewport transform, if not provided there will be no animation * @returns returns promise which resolves when animation is done */ zoomByFactor(factor: number, animate?: Animate): Promise; /** * Add HTML info window */ addInfoWindow(args?: InfoWindowArgs): InfoWindow; /** * Add custom HTML marker */ addHtmlMarker(args?: HtmlMarkerArgs): HtmlMarker; /** * Add plan marker */ addMarker({ position, color, size }?: MarkerArgs): MarkerPin; /** * Convert screen coordinates to plan coordinates */ getPlanPosition(point: Vector2): Vector2; /** * Convert plan coordinates to screen coordinates */ getScreenPosition(point: Vector2): Vector2; /** * create plan layer or return existing by id */ addLayer({ id, baseLayer }?: { id?: string; baseLayer?: BaseLayers; }): PlanLayer; /** * get plan layer by name */ getLayer(id: any): PlanLayer; /** * Adds a helper and removes previous instances of it */ addHelper(helper: string | typeof Helper, options?: any): Helper; removeHelper(helperId: string): void; /** * Export the current view as an image */ exportImage({ format, fileName, quality, output, maxWidth, download }?: ExportImage): Promise; /** * Destroy the floor plan instance */ destroy(): void; } /** * This is the place to give the floor plan your own style */ export declare type FloorPlanTheme = { /** define the background */ background?: BackgroundOptions; /** wall contours are merged to one continuous outline, needed if you want white walls */ wallContours?: boolean; /** render assets with textures rather than solid colors */ showAssetTextures?: boolean; fontFamily?: string; roomStamps?: { /** show the area information in room stamps */ roomStampDisplay?: ('usage' | 'area' | 'customId' | 'name' | 'id' | ['customAttribute', string])[]; /** text color for room stamps */ text?: Rgb; /** whether the room stamp text should have an outline to assist with contrast issues */ textOutline?: boolean; /** if set room stamps have a fixed size - otherwise they adapt to the zoom level */ fontSize?: number; }; byId?: StyleByKey; byFilter?: ThemeStyles['byFilter']; /* Excluded from this release type: byResolvedFilter */ byType?: ThemeStyles['byType']; }; /** * Granular element/space visibility, honored by every output (webgl, svg, pdf, * dxf, geojson). Resolution precedence, most specific first: * `byId` › resolved `byFilter` › parent `byId`/`byFilter` › `byType` › visible. */ export declare type FloorPlanVisibility = { /** show/hide whole types, e.g. `{ 'element:column': { show: false } }` */ byType?: Partial>; /** * show/hide by query; later matches win. Combine a broad hide with a narrow * show to express "show only X" — e.g. hide all assets, then show one subCategory. */ byFilter?: VisibilityFilter[]; /** show/hide individual elements/spaces by id */ byId?: VisibilityByKey; /* Excluded from this release type: resolvedById */ }; declare type FpeComputed = { wallContours: PolygonWithHoles[]; snapPoints: Vector2[]; snapMargin: number; }; export declare interface FpeConfig extends StartupOptions { api?: { productDataCacheAge?: number; productContourCacheAge?: number; } & TokenOptions; loadTextures?: boolean; showFloorPlan?: boolean; showSpaceDividers?: boolean; showCeilingLamps?: boolean; loadFloorLevel?: string | null; svgViewBoxDim?: number; svgMode?: boolean; destroyOnDomRemove?: boolean; } export declare type FpeCoreEvent = keyof FpeCoreEventMap; declare type FpeCoreEventHandler = FpeCoreEventMap[EventType] extends any[] ? (...args: FpeCoreEventMap[EventType]) => void : never; declare type FpeCoreEventMap = { 'update-settings': [event: FpeConfig]; 'space-api-floor-loaded': [id: string]; 'space-api-floor-error': [id: string, error: string]; }; export declare type FpeDragEvent = { position: Vector2; screenPos: Vector2; sourceEvent: FpeInteractionEvent; }; export declare type FpeDropEvent = { position: Vector2; screenPos: Vector2; verticalPos: number; sourceEvent: DragEvent; }; export declare type FpeEvent = keyof FpeEventMap; declare type FpeEventHandler = FpeEventMap[EventType] extends any[] ? (...args: FpeEventMap[EventType]) => void : never; export declare type FpeEventMap = FpeCoreEventMap & { click: [event: FpePointerEvent]; dblclick: [event: FpePointerEvent]; 'context-menu': [event: FpePointerEvent]; mousemove: [event: FpePointerEvent]; drop: [event: FpeDropEvent]; 'drag-move': [event: FpeDragEvent]; 'drag-start': [event: FpeDragEvent]; 'drag-end': [event: FpeDragEvent]; key: [event: FpeKeyEvent]; keyup: [event: FpeKeyEvent]; focus: [event: boolean]; 'resource-loaded': [event: { resourceId: string; }]; 'spaces-loaded': []; 'loading-status': [event: { totalCount: number; doneCount: number; }]; 'loading-done': [event: { totalCount: number; }]; }; declare interface FpeInteraction { lastSceneClick: Vector2; cursor: Vector2; cursorTarget: LayoutElement | LayoutSpace; isDragging: boolean; isPanning: boolean; lastClick: { time: number; position: ScreenPosition; }; metaKey: boolean; ctrlKey: boolean; altKey: boolean; shiftKey: boolean; dragOffset: Vector2; cursorAction: 'split-wall' | 'duplicate' | 'move' | 'select' | 'none'; _dragStart: ScreenPosition; preventFocusoutOnAltKeyup: boolean; } export declare type FpeInteractionEvent = FpeInteractionEventType[keyof FpeInteractionEventType]; export declare type FpeInteractionEventType = { /* Excluded from this release type: pixi */ dom: MouseEvent; }; export declare type FpeKeyEvent = { key: string; lowerCaseKey: string; sourceEvent: KeyboardEvent; }; declare class FpeLoader extends TinyEmitter { promiseCache: Map>; loadStages: { product: boolean; productContour: boolean; productTexture: boolean; }; queue: Record>>; resources: { nodes: Map>; productJson: Map; productContour: Map; texture: Map; }; floorPlan: FloorPlanCore; productContourCacheAge: number; productDataCacheAge: number; initialLoading: boolean; _requestCounter: number; _loadCounter: number; on: (event: LoadingEvent, callback: Function, ctx?: any) => this; once: (event: LoadingEvent, callback: Function, ctx?: any) => this; off: (event: LoadingEvent, callback?: Function) => this; emit: (event: LoadingEvent, ...args: any[]) => this; constructor(floorPlan: FloorPlanCore); loadStatus(): void; loadResources(resourceId: string, node: LayoutAsset, formats: ResourceFormats[]): Promise; loadResource(resourceId: string, node: LayoutAsset, format: ResourceFormats): any; reset(): void; } export declare type FpePointerEvent = { nodeId?: string; position: Vector2; isDoubleClick?: boolean; sourceEvent: FpeInteractionEvent; }; declare class GeometryBase extends SpaceGraphNodeBase { type: SpaceGraphGeometryType; position: PositionEntry; rotation: RotationEntry; rotationAxis: Vector3; boundingBox: BoundingBox3d; surfaces: Surfaces; materials: SurfaceMaterialsJson; constructor(id: string, type: SpaceGraphGeometryType); } declare interface GeometryBaseJson extends SpaceGraphNodeBaseJson { id: string; type: SpaceGraphGeometryType; position?: PositionEntry; rotation?: RotationEntry; rotationAxis?: Vector3; boundingBox?: BoundingBox3d; surfaces?: Surfaces; materials?: SurfaceMaterialsJson; material?: SpaceGraphMaterialJson; } declare class GeometryClip extends GeometryOperationPlaneBase { type: GeometryClipType; constructor(id: string, plane: Plane, material: SpaceGraphMaterial); } declare interface GeometryClipJson extends GeometryOperationPlaneBaseJson { type: GeometryClipType; } declare type GeometryClipType = typeof GeometryClipTypeValue; declare const GeometryClipTypeValue = "csg:clip"; declare type GeometryFaceIndices = number[] | IndexRange | 'all'; declare class GeometryIntersect extends GeometryOperationGeometryBase { type: GeometryIntersectType; } declare interface GeometryIntersectJson extends GeometryOperationGeometryBaseJson { type: GeometryIntersectType; } declare type GeometryIntersectType = typeof GeometryIntersectTypeValue; declare const GeometryIntersectTypeValue = "csg:intersect"; declare type GeometryOperation = GeometryOperationGeometry | GeometryOperationPlane; declare class GeometryOperationBase extends SpaceGraphTypedValue { type: GeometryOperationType; constructor(type: GeometryOperationType); } declare interface GeometryOperationBaseJson extends SpaceGraphTypedValueJson { type: GeometryOperationType; } declare type GeometryOperationGeometry = GeometryReference | GeometrySubtract | GeometryUnion | GeometryIntersect; declare class GeometryOperationGeometryBase extends GeometryOperationBase { type: GeometryOperationGeometryType; geometry: SpaceGraphGeometry; position: PositionEntry; rotation: RotationEntry; rotationAxis: Vector3; materials: SurfaceMaterials; constructor(type: GeometryOperationGeometryType, geometry: SpaceGraphGeometry, materials: SurfaceMaterials); } declare interface GeometryOperationGeometryBaseJson extends GeometryOperationBaseJson { type: GeometryOperationGeometryType; geometry: string | SpaceGraphGeometryJson; position?: PositionEntry; rotation?: RotationEntry; rotationAxis?: Vector3; materials?: SurfaceMaterialsJson; material?: SpaceGraphMaterialJson; } declare type GeometryOperationGeometryJson = string | GeometryReferenceJson | GeometrySubtractJson | GeometryIntersectJson | GeometryUnionJson; declare type GeometryOperationGeometryType = GeometryReferenceType | GeometrySubtractType | GeometryUnionType | GeometryIntersectType; declare type GeometryOperationJson = GeometryOperationGeometryJson | GeometryOperationPlaneJson; declare type GeometryOperationPlane = GeometryClip; declare class GeometryOperationPlaneBase extends GeometryOperationBase { type: GeometryOperationPlaneType; plane: Plane; material: SpaceGraphMaterial; constructor(type: GeometryOperationPlaneType, plane: Plane, material: SpaceGraphMaterial); } declare interface GeometryOperationPlaneBaseJson extends GeometryOperationBaseJson { type: GeometryOperationPlaneType; plane: Plane; material: SpaceGraphMaterialJson; } declare type GeometryOperationPlaneJson = GeometryClipJson; declare type GeometryOperationPlaneType = GeometryClipType; declare type GeometryOperationType = GeometryOperationGeometryType | GeometryOperationPlaneType; declare class GeometryReference extends GeometryOperationGeometryBase { type: GeometryReferenceType; } declare interface GeometryReferenceJson extends GeometryOperationGeometryBaseJson { type: GeometryReferenceType; } declare type GeometryReferenceType = typeof GeometryReferenceTypeValue; declare const GeometryReferenceTypeValue = "reference:geometry"; declare class GeometrySubtract extends GeometryOperationGeometryBase { type: GeometrySubtractType; } declare interface GeometrySubtractJson extends GeometryOperationGeometryBaseJson { type: GeometrySubtractType; } declare type GeometrySubtractType = typeof GeometrySubtractTypeValue; declare const GeometrySubtractTypeValue = "csg:subtract"; declare class GeometryUnion extends GeometryOperationGeometryBase { type: GeometryUnionType; } declare interface GeometryUnionJson extends GeometryOperationGeometryBaseJson { type: GeometryUnionType; } declare type GeometryUnionType = typeof GeometryUnionTypeValue; declare const GeometryUnionTypeValue = "csg:union"; /** * undirected graph for traversal without edge weights */ declare class Graph { nodeMap: Map>>; addNode(node: T): Map>; addEdge(type: K, source: T, destination: T): void; removeNode(node: T): void; removeEdge(type: K, source: T, destination: T): void; /** * Breadth-First Search * if edges have weights this needs to be replaces with dijkstra algorithm */ findShortestPath(edgeType: K, start: T, end: T, options?: { depthLimit?: number; }): T[] | null; toJSON(): { nodes: { id: string; type: string; }[]; edges: { type: string; nodes: string[]; }[]; }; } declare type GraphEdgeType = 'graph:adjacentTo' | 'graph:connectedTo'; export declare interface GraphicArgs { shapes: Shape[]; position?: Vector2; alpha?: number; clearLayer?: boolean; scale?: number; id?: string; /** * Make the graphic clickable and/or draggable: * - `click: true` — emits click events. * - `drag: true` — draggable handle that follows the pointer (emits drag events * and moves the graphic to the pointer). * - `drag: 'event-only'` — handle that emits drag events but does **not** move. */ interaction?: { click?: boolean; drag?: boolean | 'event-only'; }; /** * Controls fixed screen size (1/zoom) scaling, matching `NodeLabel.fixedScreenSize`: * - `false` or omitted: render at world scale * - `true`: always apply 1/zoom scaling so the graphic keeps a constant screen size * - `[min, max]`: apply 1/zoom scaling within the zoom range; outside it, clamp to the * scale at the boundary (1/min or 1/max) to avoid jumps * * Pair with a centered `position` so scaling happens around the intended anchor. */ fixedScreenSize?: boolean | ZoomRange; /** @deprecated use `interaction: { click, drag }` instead */ interactive?: boolean; /** @deprecated use `interaction: { drag: true }` instead */ isHandler?: boolean; /** @deprecated use `fixedScreenSize` instead */ scaleOnZoom?: boolean; /** @deprecated use `interaction: { drag: true }` (follow) or `interaction: { drag: 'event-only' }` (events only) */ updatePositionOnDrag?: boolean; } declare type GraphicUpdate = { position?: Vector2; rotation?: number; style?: ShapeStyle; shapes?: Shape[]; }; declare type GraphNodeType = { id: string; type: string; }; declare class GroupRelation extends SpaceGraphNodeBase { type: GroupRelationType; elements: Set; constructor(id: string); insertElements(elements: LayoutElement[]): void; removeElements(elements: LayoutElement[]): void; copyForClone(product: GroupRelation): void; toJSON(): GroupRelationJson; } declare interface GroupRelationJson extends SpaceGraphNodeBaseJson { type: GroupRelationType; elements: string[]; } declare type GroupRelationType = typeof GroupRelationTypeValue; declare const GroupRelationTypeValue = "relation:group"; export declare interface GroupShape { type: 'group'; position?: Vector2_2; rotation?: number; children: Shape[]; style?: ShapeStyle; } declare class Helper extends TinyEmitter { floorPlan: FloorPlanEngine; helperId: string; constructor({ floorPlan, helperId }: { floorPlan: FloorPlanEngine; helperId: string; }); destroy(): void; } /** * Elements that can be hidden in the floor plan */ declare type HideableElement = LayoutElement['type'] | LayoutSpace['type'] | SpatialGraphEdge['type'] | LayoutAnnotation['type'] | 'roomStamp'; declare type HingeSide = 'left' | 'right'; declare class HtmlMarker { position: Vector2; size: Vector2; offset: Vector2; isHidden: boolean; id: string; el: HTMLElement; private _floorPlan; private _anchorPos; private _isPanning; constructor({ position, offset, el, floorPlan }: HtmlMarkerState); _updateHtmlMarker: () => void; _updateHtmlMarkerStyle(): void; set({ position, offset }: Pick): void; remove(): void; } declare interface HtmlMarkerArgs { /** coordinates of the window in meters */ position?: Vector2; offset?: Vector2; /** html string as content of the info window */ el?: HTMLElement; } declare interface HtmlMarkerState extends HtmlMarkerArgs { floorPlan: FloorPlanEngine; } declare type IndexedNodeReference = { id: string; type: LayoutBoundingBoxNode['type']; minX: number; minY: number; maxX: number; maxY: number; }; declare type IndexRange = { type: 'index:range'; start: number; end: number; }; declare class InfoWindow { private _floorPlan; position: Vector2; height: number; width: number; closeButton: any; html: any; el: Element; private _anchorPos; private _getPosition; constructor({ width, height, position, html, closeButton, floorPlan }?: InfoWindowState); _createInfoWindow(): void; _setContent(): void; _updateInfoWindow(): void; set({ width, height, position, html, closeButton }: { width: any; height: any; position: any; html: any; closeButton: any; }): void; remove(): void; } declare interface InfoWindowArgs { /** pixel width of the window - default 100 */ width?: number; /** pixel height of the window - default 80 */ height?: number; /** coordinates of the window in meters */ position?: Vector2; /** html string as content of the info window */ html?: string; /** If true , a close button will appear in the top right corner of the info window. */ closeButton?: boolean; } declare interface InfoWindowState extends InfoWindowArgs { floorPlan?: FloorPlanEngine; } declare interface LabelAppearance { text?: string; icon?: LabelIcon; fontSize?: number; color?: string; textOutline?: boolean; /** Only render within this zoom range */ visible?: [number, number]; fixedScreenSize?: boolean | [number, number]; } declare interface LabelIcon { /** Well-known symbol id, e.g. 'iso7010:F001' (fire extinguisher). Preferred over uri */ symbol?: string; /** Custom SVG by URI (SVG-only, so every output stays vector), for icons outside the symbol library */ uri?: string; /** Icon height in meters at world scale; the label's fixedScreenSize applies on top */ size?: number; /** Arrangement relative to the text when both are set. Default 'above' */ placement?: 'above' | 'below' | 'left' | 'right'; /** Tint for monochrome symbols */ color?: string; } declare interface LabelRule extends LabelAppearance { query: NodeQuery; offset?: Vector2_2; frame?: 'local' | 'world'; overrides?: Record; name?: string; } declare class Layout2dView extends LayoutViewBase { type: Layout2dViewType; parameters: Layout2dViewParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface Layout2dViewJson extends LayoutViewBaseJson { type: Layout2dViewType; parameters?: Layout2dViewParametersJson; } declare interface Layout2dViewNodeStyle { tags: string[]; fill: string; fillOpacity: number; stroke: string; strokeWidth: number; } declare type Layout2dViewNodeStyleJson = Partial; declare interface Layout2dViewParameters { style: Layout2dViewStyle; hidden: LayoutElementType[]; } declare interface Layout2dViewParametersJson { style: Layout2dViewStyleJson; hidden: LayoutElementType[]; } declare interface Layout2dViewStyle { background: Pick; units: 'imperial' | 'metric'; byId: Record; byType: Record; byAttribute: { program: Record; usage: Record; }; } declare interface Layout2dViewStyleJson { background?: Pick; units?: 'imperial' | 'metric'; byId?: Record; byType?: Record; byAttribute?: { program?: Record; usage?: Record; }; } declare type Layout2dViewType = typeof Layout2dViewTypeValue; declare const Layout2dViewTypeValue = "view:2d"; declare class Layout3dView extends LayoutViewBase { type: Layout3dViewType; parameters: Layout3dViewParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface Layout3dViewJson extends LayoutViewBaseJson { type: Layout3dViewType; parameters?: Layout3dViewParametersJson; } declare interface Layout3dViewParameters { position: Vector3; normal: Vector3; fov: number | 'default'; scale: number | 'auto'; lensShiftX: number; lensShiftY: number; projection: 'perspective' | 'orthographic'; } declare type Layout3dViewParametersJson = Partial; declare type Layout3dViewType = typeof Layout3dViewTypeValue; declare const Layout3dViewTypeValue = "view:3d"; declare type LayoutAnnotation = LayoutFloorPlanDxfAnnotation | LayoutFloorPlanImageAnnotation | LayoutLabelAnnotation; declare class LayoutAnnotationBase extends LayoutNodeBase { type: LayoutAnnotationType; parameters: LayoutAnnotationParameters; position: Vector3; rotation: number; copyForClone(annotation: LayoutAnnotation): void; setTransform(position: Vector3, rotation: number): void; setParameters(parameters: RecursivePartial): void; toJSON(): LayoutAnnotationJson; } declare interface LayoutAnnotationBaseJson extends LayoutNodeBaseJson { type: LayoutAnnotationType; position: Vector3; rotation: number; parameters?: LayoutAnnotationParametersJson; } declare type LayoutAnnotationJson = LayoutFloorPlanDxfAnnotationJson | LayoutFloorPlanImageAnnotationJson | LayoutLabelAnnotationJson; declare type LayoutAnnotationParameters = LayoutFloorPlanDxfParameters | LayoutFloorPlanImageParameters | LayoutLabelAnnotationParameters; declare type LayoutAnnotationParametersJson = LayoutFloorPlanDxfParametersJson | LayoutFloorPlanImageParametersJson | LayoutLabelAnnotationParametersJson; declare type LayoutAnnotationType = LayoutFloorPlanDxfType | LayoutFloorPlanImageType | LayoutLabelAnnotationType; declare class LayoutAsset extends LayoutTransformElementBase { type: LayoutAssetType; parameters: LayoutAssetParameters; product: SpaceGraphProduct | null; constructor(id: string); get isComponentInstance(): boolean; get isComponentInstanceChild(): boolean; setParameters(parameters: RecursivePartial): void; setProduct(product: SpaceGraphProduct): void; calculateBoundingBox(): { min: Vector3; max: Vector3; }; } declare interface LayoutAssetJson extends LayoutTransformElementBaseJson { type: LayoutAssetType; product?: string; } declare interface LayoutAssetMaterials { } declare interface LayoutAssetParameters { materials: LayoutAssetMaterials; } declare type LayoutAssetType = typeof LayoutAssetTypeValue; declare const LayoutAssetTypeValue = "element:asset"; declare class LayoutBeam extends LayoutTransformElementBase { type: LayoutBeamType; parameters: LayoutBeamParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutBeamJson extends LayoutTransformElementBaseJson { type: LayoutBeamType; parameters?: LayoutBeamParametersJson; } declare interface LayoutBeamMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare type LayoutBeamParameters = DimensionParameters & CommonParameters; declare type LayoutBeamParametersJson = DimensionParameters & Partial; declare type LayoutBeamType = typeof LayoutBeamTypeValue; declare const LayoutBeamTypeValue = "element:beam"; declare class LayoutBoundary { vertices: SpatialGraphVertex[]; edges: SpatialGraphEdge[]; geometryProfile: Vector2_2[]; toJSON(): LayoutBoundaryJson; } declare type LayoutBoundaryElement = LayoutBoundarySlab | LayoutBoundaryWall; declare class LayoutBoundaryElementBase extends LayoutElementBase { type: LayoutBoundaryElementType; parameters: LayoutBoundaryElementParameters; boundaries: LayoutBoundary[]; constructor(id: string, type: LayoutBoundaryElementType, boundaries: LayoutBoundary[]); calculateBoundingBox(): { min: Vector3; max: Vector3; }; } declare interface LayoutBoundaryElementBaseJson extends LayoutElementBaseJson { type: LayoutBoundaryElementType; boundaries: LayoutBoundaryJson[]; parameters?: LayoutBoundaryElementParametersJson; } declare type LayoutBoundaryElementJson = LayoutBoundarySlabJson | LayoutBoundaryWallJson; declare type LayoutBoundaryElementParameters = LayoutBoundarySlabParameters | LayoutBoundaryWallParameters; declare type LayoutBoundaryElementParametersJson = LayoutBoundarySlabParametersJson | LayoutBoundaryWallParametersJson; declare type LayoutBoundaryElementType = LayoutBoundarySlabType | LayoutBoundaryWallType; declare interface LayoutBoundaryJson { edges: string[]; } declare class LayoutBoundarySlab extends LayoutBoundaryElementBase { type: LayoutBoundarySlabType; parameters: LayoutBoundarySlabParameters; space: LayoutSpace | null; constructor(id: string, type: LayoutBoundarySlabType, boundaries: LayoutBoundary[]); setParameters(parameters: RecursivePartial): void; getSpaces(): LayoutSpace[]; } declare interface LayoutBoundarySlabJson extends LayoutBoundaryElementBaseJson { type: LayoutBoundarySlabType; parameters?: LayoutBoundarySlabParametersJson; } declare interface LayoutBoundarySlabMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare interface LayoutBoundarySlabParameters { height: number; elevation: number; materials: LayoutBoundarySlabMaterials; } declare type LayoutBoundarySlabParametersJson = Partial; declare type LayoutBoundarySlabType = LayoutFloorType | LayoutCeilingType; declare class LayoutBoundaryWall extends LayoutBoundaryElementBase { type: LayoutBoundaryWallType; parameters: LayoutBoundaryWallParameters; constructor(id: string, boundaries: LayoutBoundary[]); setParameters(parameters: RecursivePartial): void; } declare interface LayoutBoundaryWallJson extends LayoutBoundaryElementBaseJson { type: LayoutBoundaryWallType; parameters?: LayoutBoundaryWallParametersJson; } declare interface LayoutBoundaryWallMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare interface LayoutBoundaryWallParameters { height: number; elevation: number; surfaces: { top: [0]; bottom: [1]; sides: '...'; }; materials: LayoutBoundaryWallMaterials; } declare type LayoutBoundaryWallParametersJson = Partial; declare type LayoutBoundaryWallType = typeof LayoutBoundaryWallTypeValue; declare const LayoutBoundaryWallTypeValue = "element:boundaryWall"; declare class LayoutBoundingBoxNode extends LayoutNodeBase { protected axisAlignedBoundingBox: BoundingBox3d | null; protected objectAlignedBoundingBox: BoundingBox3d | null; protected boundingBoxContour: Vector2_2[] | null; protected transform: Transform3d | null; protected worldTransform: Transform3d | null; calculateTransform(): Transform3d; getTransform(): Transform3d; calculateWorldTransform(): Transform3d; getWorldTransform(): Transform3d; resetTransform(resetIndex?: boolean): void; resetBoundingBox(resetIndex?: boolean): void; resetSpatialIndexing(): void; calculateBoundingBox(): BoundingBox3d; /** * returns the node's object aligned bounding box with transform */ getBoundingBox(localTransform?: boolean): TransformBoundingBox3d; /** * returns the node's axis aligned bounding box with transform applied */ getAxisAlignedBoundingBox(): BoundingBox3d; calculateBoundingBoxContour(localTransform?: boolean): Vector2_2[]; getBoundingBoxContour(): Vector2_2[]; } declare class LayoutCasework extends LayoutTransformElementBase { type: LayoutCaseworkType; parameters: LayoutCaseworkParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutCaseworkJson extends LayoutTransformElementBaseJson { type: LayoutCaseworkType; parameters?: LayoutCaseworkParametersJson; } declare interface LayoutCaseworkMaterials { cabinet: SpaceGraphMaterialJson; cabinetDoors: SpaceGraphMaterialJson; counter: SpaceGraphMaterialJson; } declare type LayoutCaseworkParameters = DimensionParameters & CommonParameters_2; declare type LayoutCaseworkParametersJson = DimensionParameters & Partial; declare type LayoutCaseworkType = typeof LayoutCaseworkTypeValue; declare const LayoutCaseworkTypeValue = "element:casework"; declare type LayoutCeilingType = typeof LayoutCeilingTypeValue; declare const LayoutCeilingTypeValue = "element:ceiling"; declare class LayoutColumn extends LayoutTransformElementBase { type: LayoutColumnType; parameters: LayoutColumnParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutColumnJson extends LayoutTransformElementBaseJson { type: LayoutColumnType; parameters?: LayoutColumnParametersJson; } declare interface LayoutColumnMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare interface LayoutColumnParameters { profile: LayoutColumnProfile; /** @minimum 0.01 */ height: number; materials: LayoutColumnMaterials; } declare type LayoutColumnParametersJson = Partial; declare type LayoutColumnProfile = RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2; declare type LayoutColumnType = typeof LayoutColumnTypeValue; declare const LayoutColumnTypeValue = "element:column"; declare class LayoutCurtainWall extends LayoutEdgeElementBase { type: LayoutCurtainWallType; parameters: LayoutCurtainWallParameters; constructor(id: string, edges: SpatialGraphEdge[]); setParameters(parameters: RecursivePartial): void; } declare interface LayoutCurtainWallJson extends LayoutEdgeElementBaseJson { type: LayoutCurtainWallType; parameters?: LayoutCurtainWallParametersJson; } declare interface LayoutCurtainWallParameters { } declare type LayoutCurtainWallParametersJson = Partial; declare type LayoutCurtainWallType = typeof LayoutCurtainWallTypeValue; declare const LayoutCurtainWallTypeValue = "element:curtainWall"; declare class LayoutDoor extends LayoutTransformElementBase { type: LayoutDoorType; parameters: LayoutDoorParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; calculateBoundingBox(): { min: Vector3; max: Vector3; }; } declare interface LayoutDoorJson extends LayoutTransformElementBaseJson { type: LayoutDoorType; parameters?: LayoutDoorParametersJson; } declare interface LayoutDoorMaterials { frame: SpaceGraphMaterialJson; leaf: SpaceGraphMaterialJson; } declare type LayoutDoorParameters = DimensionParameters_2 & CommonParameters_3; declare type LayoutDoorParametersJson = DimensionParameters_2 & Partial; declare type LayoutDoorType = typeof LayoutDoorTypeValue; declare const LayoutDoorTypeValue = "element:door"; declare type LayoutEdgeElement = LayoutCurtainWall | LayoutSpaceDivider | LayoutWall; declare class LayoutEdgeElementBase extends LayoutElementBase { #private; type: LayoutEdgeElementType; parameters: LayoutEdgeElementParameters; private edges; private vertices; private boundingBoxTransform; edgesChanged: boolean; constructor(id: string, type: LayoutEdgeElementType, edges: SpatialGraphEdge[]); setEdges(edges: SpatialGraphEdge[]): void; getEdges(): SpatialGraphEdge[]; getVertices(): SpatialGraphVertex[]; getStartVertex(): SpatialGraphVertex | undefined; getEndVertex(): SpatialGraphVertex | undefined; getAxisPoints(): [Vector2_2, Vector2_2] | []; getAxisLength(): number; getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined; getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[]; resetTransform(): void; getBoundingBox(): TransformBoundingBox3d; calculateBoundingBoxTransform(): Transform3d; /** * @deprecated Use getEdges() instead of edge */ get edge(): SpatialGraphEdge; getAdjacentElementsByVertex(): [LayoutEdgeElement[], LayoutEdgeElement[]]; getAdjacentSpacesBySide(): [LayoutSpace[], LayoutSpace[]]; getSpaces(): LayoutSpace[]; getElementsAtLinearPosition(u: number): LayoutElement[]; get isExternal(): boolean; } declare interface LayoutEdgeElementBaseJson extends LayoutElementBaseJson { type: LayoutEdgeElementType; edge: string | string[]; parameters?: LayoutEdgeElementParametersJson; } declare type LayoutEdgeElementJson = LayoutCurtainWallJson | LayoutSpaceDividerJson | LayoutWallJson; declare type LayoutEdgeElementParameters = LayoutCurtainWallParameters | LayoutSpaceDividerParameters | LayoutWallParameters; declare type LayoutEdgeElementParametersJson = LayoutCurtainWallParametersJson | LayoutSpaceDividerParametersJson | LayoutWallParametersJson; declare type LayoutEdgeElementType = LayoutCurtainWallType | LayoutSpaceDividerType | LayoutWallType; declare type LayoutElement = LayoutBoundaryElement | LayoutEdgeElement | LayoutOpeningElement | LayoutTransformElement; declare class LayoutElementBase extends LayoutBoundingBoxNode { type: LayoutElementType; parameters: LayoutElementParameters; parent: LayoutElement | null; elements: LayoutElement[]; geometries: GeometryOperationJson[]; insertElement(element: LayoutElement): void; get isExternal(): boolean; resetTransform(resetIndex?: boolean): void; resetBoundingBox(resetIndex?: boolean): void; removeElement(element: LayoutElement): void; copyForClone(element: LayoutElement): void; setParameters(parameters: RecursivePartial): void; getSpaces(): LayoutSpace[]; toJSON(): LayoutElementJson; } declare interface LayoutElementBaseJson extends LayoutNodeBaseJson { type: LayoutElementType; geometries?: GeometryOperationJson[]; parameters?: LayoutElementParametersJson; elements?: LayoutElementJson[]; } declare type LayoutElementJson = LayoutBoundaryElementJson | LayoutEdgeElementJson | LayoutOpeningElementJson | LayoutTransformElementJson; declare type LayoutElementParameters = LayoutBoundaryElementParameters | LayoutEdgeElementParameters | LayoutOpeningElementParameters | LayoutTransformElementParameters; declare type LayoutElementParametersJson = LayoutBoundaryElementParametersJson | LayoutEdgeElementParametersJson | LayoutOpeningElementParametersJson | LayoutTransformElementParametersJson; declare type LayoutElementType = LayoutBoundaryElementType | LayoutEdgeElementType | LayoutOpeningElementType | LayoutTransformElementType; declare class LayoutFloorPlanDxfAnnotation extends LayoutAnnotationBase { type: LayoutFloorPlanDxfType; parameters: LayoutFloorPlanDxfParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJson { type: LayoutFloorPlanDxfType; parameters?: LayoutFloorPlanDxfParametersJson; } declare interface LayoutFloorPlanDxfParameters { uri: string; drawingOrigin: Vector2_2; drawingUnits: DxfUnitsString; hiddenLayers: string[]; } declare type LayoutFloorPlanDxfParametersJson = Partial; declare type LayoutFloorPlanDxfType = typeof LayoutFloorPlanDxfTypeValue; declare const LayoutFloorPlanDxfTypeValue = "annotation:floorPlanDxf"; declare class LayoutFloorPlanImageAnnotation extends LayoutAnnotationBase { type: LayoutFloorPlanImageType; parameters: LayoutFloorPlanImageParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutFloorPlanImageAnnotationJson extends LayoutAnnotationBaseJson { type: LayoutFloorPlanImageType; parameters?: LayoutFloorPlanImageParametersJson; } declare interface LayoutFloorPlanImageParameters { uri: string; length: number; width: number; } declare type LayoutFloorPlanImageParametersJson = Partial; declare type LayoutFloorPlanImageType = typeof LayoutFloorPlanImageTypeValue; declare const LayoutFloorPlanImageTypeValue = "annotation:floorPlanImage"; declare type LayoutFloorType = typeof LayoutFloorTypeValue; declare const LayoutFloorTypeValue = "element:floor"; declare class LayoutGeneric extends LayoutTransformElementBase { type: LayoutGenericType; parameters: LayoutGenericParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutGenericJson extends LayoutTransformElementBaseJson { type: LayoutGenericType; parameters?: LayoutGenericParametersJson; } declare interface LayoutGenericMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare interface LayoutGenericParameters { profile: LayoutGenericProfile; height: number; materials: LayoutGenericMaterials; } declare type LayoutGenericParametersJson = Partial; declare type LayoutGenericProfile = 'none' | RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2; declare type LayoutGenericType = typeof LayoutGenericTypeValue; declare const LayoutGenericTypeValue = "element:generic"; declare class LayoutKitchen extends LayoutTransformElementBase { type: LayoutKitchenType; parameters: LayoutKitchenParameters; constructor(id: string); setParameters(parameters: RecursivePartial, skipElementCreation?: boolean): void; } declare interface LayoutKitchenJson extends LayoutTransformElementBaseJson { type: LayoutKitchenType; parameters?: LayoutKitchenParametersJson; } declare interface LayoutKitchenMaterials { cabinet: SpaceGraphMaterialJson; cabinetDoors: SpaceGraphMaterialJson; counter: SpaceGraphMaterialJson; } declare type LayoutKitchenParameters = DimensionParameters & CommonParameters_4; declare type LayoutKitchenParametersJson = DimensionParameters & Partial; declare type LayoutKitchenType = typeof LayoutKitchenTypeValue; declare const LayoutKitchenTypeValue = "element:kitchen"; declare class LayoutLabelAnnotation extends LayoutAnnotationBase { type: LayoutLabelAnnotationType; parameters: LayoutLabelAnnotationParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutLabelAnnotationJson extends LayoutAnnotationBaseJson { type: LayoutLabelAnnotationType; parameters?: LayoutLabelAnnotationParametersJson; } declare interface LayoutLabelAnnotationParameters extends LabelAppearance { anchor?: { node: string; offset?: Vector2_2; frame?: 'local' | 'world'; }; } declare type LayoutLabelAnnotationParametersJson = LayoutLabelAnnotationParameters; declare type LayoutLabelAnnotationType = typeof LayoutLabelAnnotationTypeValue; declare const LayoutLabelAnnotationTypeValue = "annotation:label"; declare type LayoutNode = SpatialGraphNode_2 | LayoutSpace | LayoutElement | LayoutAnnotation | LayoutView; declare class LayoutNodeBase extends SpaceGraphNodeWithCustomAttributesBase { type: LayoutNodeType; layout: SpaceGraphLayout; constructor(id: string, type: LayoutNodeType); } declare interface LayoutNodeBaseJson extends SpaceGraphNodeWithCustomAttributesBaseJson { type: LayoutNodeType; } declare type LayoutNodeType = SpatialGraphNodeType | LayoutSpaceType | LayoutElementType | LayoutAnnotationType | LayoutViewType; declare class LayoutOpening extends LayoutOpeningElementBase { type: LayoutOpeningType; parameters: LayoutOpeningParameters; constructor(id: string); getTransform(): Transform3d; get position(): Vector3; get rotation(): number; setParameters(parameters: RecursivePartial): void; getBoundingBox(localTransform?: boolean): { min: Vector3; max: Vector3; transform: Transform3d; }; getSpaces(): LayoutSpace[]; get isExternal(): boolean; } declare type LayoutOpeningElement = LayoutOpening; declare class LayoutOpeningElementBase extends LayoutElementBase { type: LayoutOpeningElementType; parameters: LayoutOpeningElementParameters; constructor(id: string, type: LayoutOpeningElementType); } declare interface LayoutOpeningElementBaseJson extends LayoutElementBaseJson { type: LayoutOpeningElementType; parameters?: LayoutOpeningElementParametersJson; } declare type LayoutOpeningElementJson = LayoutOpeningJson; declare type LayoutOpeningElementParameters = LayoutOpeningParameters; declare type LayoutOpeningElementParametersJson = LayoutOpeningParametersJson; declare type LayoutOpeningElementType = LayoutOpeningType; declare interface LayoutOpeningJson extends LayoutOpeningElementBaseJson { type: LayoutOpeningType; parameters?: LayoutOpeningParametersJson; } declare interface LayoutOpeningMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare interface LayoutOpeningParameters { position: Vector2_2; dimensions: Vector2_2; materials: LayoutOpeningMaterials; } declare type LayoutOpeningParametersJson = Partial; declare type LayoutOpeningType = typeof LayoutOpeningTypeValue; declare const LayoutOpeningTypeValue = "element:opening"; declare class LayoutRailing extends LayoutTransformElementBase { type: LayoutRailingType; parameters: LayoutRailingParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutRailingJson extends LayoutTransformElementBaseJson { type: LayoutRailingType; parameters?: LayoutRailingParametersJson; } declare interface LayoutRailingMaterials { surface: SpaceGraphMaterialJson; } declare type LayoutRailingParameters = DimensionParameters & CommonParameters_5; declare type LayoutRailingParametersJson = DimensionParameters & Partial; declare type LayoutRailingType = typeof LayoutRailingTypeValue; declare const LayoutRailingTypeValue = "element:railing"; declare class LayoutRamp extends LayoutTransformElementBase { type: LayoutRampType; parameters: LayoutRampParameters; constructor(id: string); } declare interface LayoutRampJson extends LayoutTransformElementBaseJson { type: LayoutRampType; parameters?: LayoutRampParametersJson; } declare interface LayoutRampMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare type LayoutRampParameters = DimensionParameters & CommonParameters_6; declare type LayoutRampParametersJson = DimensionParameters & Partial; declare type LayoutRampType = typeof LayoutRampTypeValue; declare const LayoutRampTypeValue = "element:ramp"; declare class LayoutRoof extends LayoutTransformElementBase { type: LayoutRoofType; parameters: LayoutRoofParameters; constructor(id: string); } declare interface LayoutRoofJson extends LayoutTransformElementBaseJson { type: LayoutRoofType; parameters?: LayoutRoofParametersJson; } declare interface LayoutRoofMaterials { } declare interface LayoutRoofParameters { materials: LayoutRoofMaterials; } declare type LayoutRoofParametersJson = Partial; declare type LayoutRoofType = typeof LayoutRoofTypeValue; declare const LayoutRoofTypeValue = "element:roof"; declare class LayoutSlab extends LayoutTransformElementBase { type: LayoutSlabType; parameters: LayoutSlabParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutSlabJson extends LayoutTransformElementBaseJson { type: LayoutSlabType; parameters?: LayoutSlabParametersJson; } declare interface LayoutSlabMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; sides: SpaceGraphMaterialJson; } declare interface LayoutSlabParameters { profile: LayoutSlabProfile; height: number; materials: LayoutSlabMaterials; } declare type LayoutSlabParametersJson = Partial; declare type LayoutSlabProfile = RectangleCurve_2 | CircleCurve_2 | PolygonCurve_2 | PolygonWithHolesCurve_2; declare type LayoutSlabType = typeof LayoutSlabTypeValue; declare const LayoutSlabTypeValue = "element:slab"; declare class LayoutSpace extends LayoutBoundingBoxNode { #private; type: LayoutSpaceType; attributes: LayoutSpaceAttributes; boundaries: LayoutBoundary[]; geometry: LayoutSpaceGeometry; slabs: LayoutBoundarySlab[]; constructor(id: string, boundaries: LayoutBoundary[]); copyForClone(space: LayoutSpace): void; setId(id: string): void; setAttributes(attributes: LayoutSpaceAttributesJson): void; get isExternal(): boolean; calculateArea(): number; getArea(): number; setPolygons(polygons: Vector2_2[][]): void; getAdjacentSpaces(graph: Graph, { connectivity }?: { connectivity?: number; }): LayoutSpace[]; getElements(types?: string | string[]): LayoutElement[]; getBoundaryFromVertex(vertex: SpatialGraphVertex): { boundary: LayoutBoundary | undefined; itemIndex: number; }; getBoundaryFromEdge(edge: SpatialGraphEdge): { boundary: LayoutBoundary | undefined; edgeIndex: number; }; calculateBoundingBox(): BoundingBox3d; getAxisAlignedBoundingBox(): BoundingBox3d; resetBoundingBox(resetIndex?: boolean): void; resetSpatialIndexing(): void; attachSlab(slab: LayoutBoundarySlab): void; detachSlab(slab: LayoutBoundarySlab): void; toJSON(): LayoutSpaceJson; } declare interface LayoutSpaceAttributes { usage: string; program: string; } declare interface LayoutSpaceAttributesJson { usage?: string; program?: string; } declare class LayoutSpaceDivider extends LayoutEdgeElementBase { type: LayoutSpaceDividerType; parameters: LayoutSpaceDividerParameters; constructor(id: string, edges: SpatialGraphEdge[]); setParameters(parameters: RecursivePartial): void; calculateBoundingBox(): BoundingBox3d; } declare interface LayoutSpaceDividerJson extends LayoutEdgeElementBaseJson { type: LayoutSpaceDividerType; parameters?: LayoutSpaceDividerParametersJson; } declare interface LayoutSpaceDividerParameters { } declare type LayoutSpaceDividerParametersJson = Partial; declare type LayoutSpaceDividerType = typeof LayoutSpaceDividerTypeValue; declare const LayoutSpaceDividerTypeValue = "element:spaceDivider"; declare interface LayoutSpaceGeometry { polygons: Vector2_2[][]; } declare interface LayoutSpaceJson extends LayoutNodeBaseJson { type: LayoutSpaceType; boundaries: LayoutBoundaryJson[]; attributes?: LayoutSpaceAttributesJson; } declare type LayoutSpaceType = typeof LayoutSpaceTypeValue; declare const LayoutSpaceTypeValue = "layout:space"; declare class LayoutSpatialGraph { layout: SpaceGraphLayout; vertices: SpatialGraphVertex[]; verticesById: Record; edges: SpatialGraphEdge[]; edgesById: Record; graphChanged: boolean; debugVertexCount: number; debugEdgeCount: number; constructor(layout: SpaceGraphLayout); emit(event: EventType, ...args: SpaceGraphEventMap[EventType]): void; copyForClone(spatialGraph: LayoutSpatialGraph): void; deleteVertexAtIndex(vertexIndex: number, removeNodes: boolean): SpatialGraphVertex | undefined; deleteEdgeAtIndex(edgeIndex: number, removeNodes: boolean): SpatialGraphEdge | undefined; insertVertex(vertex: SpatialGraphVertex): void; removeVertex(vertex: SpatialGraphVertex, removeNodes?: boolean): SpatialGraphVertex | undefined; removeVertexAtIndex(vertexIndex: number, removeNodes?: boolean): SpatialGraphVertex | undefined; removeVertexById(id: string, removeNodes?: boolean): SpatialGraphVertex | undefined; insertEdge(edge: SpatialGraphEdge, splitSpace?: boolean): void; removeEdge(edge: SpatialGraphEdge, removeNodes?: boolean): SpatialGraphEdge | undefined; removeEdgeAtIndex(edgeIndex: number, removeNodes?: boolean): SpatialGraphEdge | undefined; removeEdgeById(id: string, removeNodes?: boolean): SpatialGraphEdge | undefined; getEdgeFromVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): SpatialGraphEdge | undefined; getVertexId(prefix?: string): string; getEdgeId(prefix?: string): string; createVertex(id: string, x: number, y: number): SpatialGraphVertex; createEdge(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex, splitSpace?: boolean): SpatialGraphEdge; createEdgeByVertexIds(id: string, vertexId1: string, vertexId2: string, splitSpace?: boolean): SpatialGraphEdge; toJSON(): LayoutSpatialGraphJson; } declare interface LayoutSpatialGraphJson { vertices: SpatialGraphVertexJson[]; edges: SpatialGraphEdgeJson[]; } declare class LayoutStairFlight extends LayoutTransformElementBase { type: LayoutStairFlightType; parameters: LayoutStairFlightParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutStairFlightJson extends LayoutTransformElementBaseJson { type: LayoutStairFlightType; parameters?: LayoutStairFlightParametersJson; } declare interface LayoutStairFlightMaterials { steps: SpaceGraphMaterialJson; tread: SpaceGraphMaterialJson; } declare type LayoutStairFlightParameters = StraightStairFlightParameters | SpiralStairFlightParameters; declare type LayoutStairFlightParametersJson = StraightStairFlightParametersJson | SpiralStairFlightParametersJson; declare type LayoutStairFlightType = typeof LayoutStairFlightTypeValue; declare const LayoutStairFlightTypeValue = "element:stairFlight"; declare class LayoutStairs extends LayoutTransformElementBase { type: LayoutStairsType; parameters: LayoutStairsParameters; constructor(id: string); setParameters(parameters: RecursivePartial, skipElementCreation?: boolean): void; calculateBoundingBox(): { min: Vector3; max: Vector3; }; } declare interface LayoutStairsJson extends LayoutTransformElementBaseJson { type: LayoutStairsType; parameters?: LayoutStairsParametersJson; } declare interface LayoutStairsMaterials { steps: SpaceGraphMaterialJson; tread: SpaceGraphMaterialJson; railing: SpaceGraphMaterialJson; } declare type LayoutStairsParameters = StraightStairsParameters | OrthogonalStairsParameters | SpiralStairsParameters | CustomStairsParameters; declare type LayoutStairsParametersJson = StraightStairsParametersJson | OrthogonalStairsParametersJson | SpiralStairsParametersJson | CustomStairsParametersJson; declare type LayoutStairsType = typeof LayoutStairsTypeValue; declare const LayoutStairsTypeValue = "element:stairs"; declare type LayoutTransformElement = LayoutAsset | LayoutBeam | LayoutCasework | LayoutColumn | LayoutDoor | LayoutGeneric | LayoutKitchen | LayoutRailing | LayoutRamp | LayoutRoof | LayoutSlab | LayoutStairs | LayoutStairFlight | LayoutWindow; declare class LayoutTransformElementBase extends LayoutElementBase { type: LayoutTransformElementType; parameters: LayoutTransformElementParameters; position: Vector3; rotation: number; rotationAxis: Vector3; constructor(id: string, type: LayoutTransformElementType); copyForClone(transformElement: LayoutTransformElement): void; setPosition(position: Vector3): void; setRotation(rotation: number, rotationAxis?: Vector3): void; setTransform(position: Vector3, rotation: number, rotationAxis?: Vector3): void; getSpaces(): LayoutSpace[]; calculateTransform(): Transform3d; calculateWorldTransform(): Transform3d; calculateBoundingBox(): { min: Vector3; max: Vector3; }; setParameters(parameters: RecursivePartial): void; } declare interface LayoutTransformElementBaseJson extends LayoutElementBaseJson { type: LayoutTransformElementType; position: Vector3; rotation?: number; rotationAxis?: Vector3; parameters?: LayoutTransformElementParametersJson; } declare type LayoutTransformElementJson = LayoutAssetJson | LayoutBeamJson | LayoutCaseworkJson | LayoutColumnJson | LayoutDoorJson | LayoutGenericJson | LayoutKitchenJson | LayoutRailingJson | LayoutRampJson | LayoutRoofJson | LayoutSlabJson | LayoutStairFlightJson | LayoutStairsJson | LayoutWindowJson; declare type LayoutTransformElementParameters = LayoutAssetParameters | LayoutBeamParameters | LayoutCaseworkParameters | LayoutColumnParameters | LayoutDoorParameters | LayoutGenericParameters | LayoutKitchenParameters | LayoutRailingParameters | LayoutRampParameters | LayoutRoofParameters | LayoutSlabParameters | LayoutStairsParameters | LayoutStairFlightParameters | LayoutWindowParameters; declare type LayoutTransformElementParametersJson = LayoutBeamParametersJson | LayoutCaseworkParametersJson | LayoutColumnParametersJson | LayoutDoorParametersJson | LayoutGenericParametersJson | LayoutKitchenParametersJson | LayoutRailingParametersJson | LayoutRampParametersJson | LayoutRoofParametersJson | LayoutSlabParametersJson | LayoutStairFlightParametersJson | LayoutStairsParametersJson | LayoutWindowParametersJson; declare type LayoutTransformElementType = LayoutAssetType | LayoutBeamType | LayoutCaseworkType | LayoutColumnType | LayoutDoorType | LayoutGenericType | LayoutKitchenType | LayoutRailingType | LayoutRampType | LayoutRoofType | LayoutSlabType | LayoutStairsType | LayoutStairFlightType | LayoutWindowType; declare type LayoutType = typeof LayoutTypeValue; declare const LayoutTypeValue = "spatialStructure:layout"; declare type LayoutView = Layout2dView | Layout3dView | LayoutViewStyle; declare class LayoutViewBase extends LayoutNodeBase { type: LayoutViewType; parameters: LayoutViewParameters; copyForClone(view: LayoutView): void; setParameters(parameters: RecursivePartial): void; toJSON(): LayoutViewJson; } declare interface LayoutViewBaseJson extends LayoutNodeBaseJson { type: LayoutViewType; parameters?: LayoutViewParametersJson; } declare type LayoutViewJson = Layout2dViewJson | Layout3dViewJson | LayoutViewStyleJson; declare type LayoutViewParameters = Layout2dViewParameters | Layout3dViewParameters | LayoutViewStyleParameters; declare type LayoutViewParametersJson = Layout2dViewParametersJson | Layout3dViewParametersJson | LayoutViewStyleParametersJson; declare class LayoutViewStyle extends LayoutViewBase { type: LayoutViewStyleType; parameters: LayoutViewStyleParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutViewStyleJson extends LayoutViewBaseJson { type: LayoutViewStyleType; parameters?: LayoutViewStyleParametersJson; } declare interface LayoutViewStyleParameters { labelRules?: LabelRule[]; annotations?: string[]; } declare type LayoutViewStyleParametersJson = LayoutViewStyleParameters; declare type LayoutViewStyleType = typeof LayoutViewStyleTypeValue; declare const LayoutViewStyleTypeValue = "view:style"; declare type LayoutViewType = Layout2dViewType | Layout3dViewType | LayoutViewStyleType; declare class LayoutWall extends LayoutEdgeElementBase { type: LayoutWallType; parameters: LayoutWallParameters; geometryProfile: LayoutWallGeometryProfile; constructor(id: string, edges: SpatialGraphEdge[]); copyForClone(wall: LayoutWall): void; setParameters(parameters: RecursivePartial): void; insertElement(element: LayoutElement): void; removeElement(element: LayoutElement): void; calculateBoundingBox(): BoundingBox3d; } declare interface LayoutWallGeometryProfile { valid: boolean; skipped: boolean; selfIntersecting: boolean; sidePoints1: Vector2_2[]; sidePoints2: Vector2_2[]; joinPoints1: Vector2_2[]; joinPoints2: Vector2_2[]; points: Vector2_2[]; } declare interface LayoutWallJson extends LayoutEdgeElementBaseJson { type: LayoutWallType; parameters?: LayoutWallParametersJson; } declare interface LayoutWallMaterials { top: SpaceGraphMaterialJson; bottom: SpaceGraphMaterialJson; side1: SpaceGraphMaterialJson; side2: SpaceGraphMaterialJson; join1: SpaceGraphMaterialJson; join2: SpaceGraphMaterialJson; } declare interface LayoutWallParameters { /** @minimum 0.01 */ width: number; /** @minimum 0.01 */ height: number; offset: number; elevation: number; materials: LayoutWallMaterials; } declare type LayoutWallParametersJson = Partial; declare type LayoutWallType = typeof LayoutWallTypeValue; declare const LayoutWallTypeValue = "element:wall"; declare class LayoutWindow extends LayoutTransformElementBase { type: LayoutWindowType; parameters: LayoutWindowParameters; constructor(id: string); setParameters(parameters: RecursivePartial): void; } declare interface LayoutWindowJson extends LayoutTransformElementBaseJson { type: LayoutWindowType; parameters?: LayoutWindowParametersJson; } declare interface LayoutWindowMaterials { frame: SpaceGraphMaterialJson; panel: SpaceGraphMaterialJson; } declare type LayoutWindowParameters = DimensionParameters_3 & CommonParameters_7; declare type LayoutWindowParametersJson = DimensionParameters_3 & Partial; declare type LayoutWindowType = typeof LayoutWindowTypeValue; declare const LayoutWindowTypeValue = "element:window"; export declare type LineCurve = LineCurve_2 & { style?: ShapeStyle; }; declare interface LineCurve_2 extends CurveBase { type: LineCurveType; start: Vector2_2; end: Vector2_2; } declare type LineCurveType = typeof LineCurveTypeValue; declare const LineCurveTypeValue = "curve:line"; declare type LoadingEvent = 'loading-done' | 'loading-status' | 'resource-loaded' | 'product-load-texture' | 'spaces-loaded' | 'assets-loaded'; declare interface MarkerArgs { /** coordinates of the marker in meters */ position?: Vector2; /** color of the marker, hex code */ color?: string; /** size in pixels */ size?: number; floorPlan?: FloorPlanEngine; } declare class MarkerPin { position: Vector2; color: string; size: number; id: string; layer: PlanLayer; graphic: PlanGraphic; private floorPlan; constructor({ position, color, size, floorPlan }: MarkerArgs); draw(): void; remove(): void; on(eventType: string, callback: any, context?: any): void; off(eventType?: string, callback?: any): void; set(updateArgs: MarkerUpdateArgs): void; } declare interface MarkerUpdateArgs { events?: { [event: string]: { callback: any; context: any; }; }; } declare class MeshGeometry extends GeometryBase { type: MeshGeometryType; vertices: number[]; indices: number[]; normals: ParametricNormals | number[]; uvs: ParametricUvs | number[]; constructor(id: string); } declare interface MeshGeometryJson extends GeometryBaseJson { type: MeshGeometryType; vertices: number[]; indices: number[]; normals?: ParametricNormals | number[]; uvs?: ParametricUvs | number[]; } declare type MeshGeometryType = typeof MeshGeometryTypeValue; declare const MeshGeometryTypeValue = "geometry:mesh"; declare type NodeLabel = { display: 'customId'[]; fontSize?: number; text?: Rgb; textOutline?: boolean; /** Only render the label when zoom is within [min, max]. */ visible?: ZoomRange; /** * Controls fixed screen size (1/zoom) scaling: * - `false`: render at world scale * - `true` or omitted: always apply 1/zoom scaling * - `[min, max]`: apply 1/zoom scaling within the zoom range; outside it, clamp to the scale at the boundary (1/min or 1/max) to avoid jumps */ fixedScreenSize?: boolean | ZoomRange; }; /** * A persisted node query. The explicit target tells consumers whether to * resolve the filter with queryElements or querySpaces */ declare type NodeQuery = { target: 'elements'; where: ElementFilter; } | { target: 'spaces'; where: SpaceFilter; }; declare type NodesByType = { -readonly [K in keyof NodeMap]: InstanceType[]; }; declare type NodeTypeMap = Record; declare type NullComparator = { null: boolean; }; /** Operators apply conjunctively, so one lower and one upper bound combine into a bounded range */ declare type NumberComparator = number | { eq: number; } | { neq: number; } | { in: number[]; } | { nin: number[]; } | { gt: number; } | { gte: number; } | { lt: number; } | { lte: number; } | { gt: number; lt: number; } | { gt: number; lte: number; } | { gte: number; lt: number; } | { gte: number; lte: number; }; declare interface NumberList extends SpaceGraphTypedValueJson { type: 'number:list'; list: number[]; } declare interface NumberRange extends SpaceGraphTypedValueJson { type: 'number:range'; range: { start: number; step: number; count: number; }; } declare type OpenCurve = LineCurve_2 | PolylineCurve_2 | ArcCurve_2 | BezierCurve_2; declare type OpenCurveType = LineCurveType | PolylineCurveType | ArcCurveType | BezierCurveType; declare type OrthogonalStairsParameters = { stairsType: OrthogonalStairsType; /** @minimum 0.01 */ stepWidth: number; circulation: 'left' | 'right'; } & DimensionParameters & CommonStairsParameters; declare type OrthogonalStairsParametersJson = Partial; declare type OrthogonalStairsType = 'halfLanding' | 'quarterLanding' | 'twoQuarterLanding' | 'winder' | 'doubleWinder'; declare type ParametricGeometry = PlaneGeometry | CuboidGeometry | SphereGeometry | ExtrusionGeometry; declare class ParametricGeometryBase extends GeometryBase { normals: ParametricNormals | 'generator'; uvs: ParametricUvs | 'generator'; geometries: GeometryOperation[]; constructor(id: string, type: ParametricGeometryType); } declare interface ParametricGeometryBaseJson extends GeometryBaseJson { normals?: ParametricNormals | 'generator'; uvs?: ParametricUvs | 'generator'; geometries?: GeometryOperationJson[]; } declare type ParametricGeometryJson = PlaneGeometryJson | CuboidGeometryJson | SphereGeometryJson | ExtrusionGeometryJson; declare type ParametricGeometryType = PlaneGeometryType | CuboidGeometryType | SphereGeometryType | ExtrusionGeometryType; declare type ParametricNormals = 'none' | 'flat' | 'smooth'; declare type ParametricUvs = 'none' | 'automatic' | 'spherical'; declare interface Plane { position: Vector3; normal: Vector3; } declare class PlaneGeometry extends ParametricGeometryBase { type: PlaneGeometryType; normal: Vector3; size: number; doubleSided: boolean; constructor(id: string); } declare interface PlaneGeometryJson extends ParametricGeometryBaseJson { type: PlaneGeometryType; normal: Vector3; size: number; doubleSided: boolean; } declare type PlaneGeometryType = typeof PlaneGeometryTypeValue; declare const PlaneGeometryTypeValue = "geometry:plane"; declare class PlanGraphic { shapes: Shape[]; /* Excluded from this release type: gfx */ /** * Fixed-screen-size scaling for this graphic. * @see GraphicArgs.fixedScreenSize */ fixedScreenSize: boolean | ZoomRange; /* Excluded from this release type: container */ gfxScale: number; private floorPlan; private dragEndCleanups; /** @deprecated read/write {@link PlanGraphic.fixedScreenSize} instead */ get scaleOnZoom(): boolean; /** @deprecated read/write {@link PlanGraphic.fixedScreenSize} instead */ set scaleOnZoom(value: boolean); constructor({ shapes, position, alpha, scale, id, interaction, fixedScreenSize, updatePositionOnDrag, interactive, isHandler, scaleOnZoom, baseLayer, container, floorPlan }: PlanGraphicArgs); /** Apply 1/zoom scaling when `fixedScreenSize` is enabled; otherwise leave the gfx at world scale. */ private applyFixedScreenScale; set({ position, rotation, style, shapes }?: GraphicUpdate): void; private doUpdatePositionOnDrag; on(event: string, callback: any, context?: any): this; off(event: string, callback?: any): this; destroy(): void; private addDragEvent; private removeDragEvent; } declare interface PlanGraphicArgs extends GraphicArgs { floorPlan: FloorPlanEngine; /* Excluded from this release type: baseLayer */ /* Excluded from this release type: container */ [key: string]: any; } declare class PlanLayer { /* Excluded from this release type: container */ graphics: Set; id: string; private baseLayer; private floorPlan; constructor(floorPlan: FloorPlanEngine, baseLayer?: BaseLayers, id?: string); addGraphic(args: GraphicArgs): PlanGraphic; /* Excluded from this release type: findGraphic */ deleteGraphic(graphic: PlanGraphic): void; /** * clear all shapes from the layer */ clear(): void; /** * destroy layer and all shapes */ destroy(): void; } export declare type Polygon = Vector2[]; declare type Polygon_2 = Vector2_2[]; export declare type PolygonCurve = PolygonCurve_2 & { style?: ShapeStyle; }; declare interface PolygonCurve_2 extends CurveBase { type: PolygonCurveType; points: Vector2_2[]; } declare type PolygonCurveType = typeof PolygonCurveTypeValue; declare const PolygonCurveTypeValue = "curve:polygon"; /** outer ring counter clockwise, inner rings ( holes ) clockwise */ export declare type PolygonWithHoles = Polygon[]; declare type PolygonWithHoles_2 = Vector2_2[][]; export declare type PolygonWithHolesCurve = PolygonWithHolesCurve_2 & { style?: ShapeStyle; }; declare interface PolygonWithHolesCurve_2 extends CurveBase { type: PolygonWithHolesCurveType; polygons: Vector2_2[][]; } declare type PolygonWithHolesCurveType = typeof PolygonWithHolesCurveTypeValue; declare const PolygonWithHolesCurveTypeValue = "curve:polygonWithHoles"; export declare type PolylineCurve = PolylineCurve_2 & { style?: ShapeStyle; }; declare interface PolylineCurve_2 extends CurveBase { type: PolylineCurveType; points: Vector2_2[]; } declare type PolylineCurveType = typeof PolylineCurveTypeValue; declare const PolylineCurveTypeValue = "curve:polyline"; declare type PositionEntry = Vector3 | Vector3List | Vector3Range; export declare type PreserveViewbox = 'left-top' | 'left-center' | 'left-bottom' | 'center-top' | 'center-center' | 'center-bottom' | 'right-top' | 'right-center' | 'right-bottom' | 'screen-space'; declare type ProductAttributes = SpaceGraphProduct['attributes']; declare interface ProductData extends BaseData { type: SpaceGraphProduct['type']; category: string; subCategory: string; seatCapacity: number; } declare interface ProductFilter extends BaseNodeFilter { category?: StringComparator; subCategory?: StringComparator; seatCapacity?: NumberComparator; } declare interface ProductSelect extends BaseSelect { category?: boolean; subCategory?: boolean; seatCapacity?: boolean; } export declare type QueryPick = { [K in keyof S as S[K] extends false | undefined ? never : K]: K extends keyof T ? S[K] extends true ? T[K] : S[K] extends ElementQuery ? QueryPick>[] : S[K] extends object ? T[K] extends any[] ? QueryPick[] : QueryPick : never : never; }; export declare type RectangleCurve = RectangleCurve_2 & { style?: ShapeStyle; }; declare interface RectangleCurve_2 extends CurveBase { type: RectangleCurveType; position?: Vector2_2; dimensions: Vector2_2; } declare type RectangleCurveType = typeof RectangleCurveTypeValue; declare const RectangleCurveTypeValue = "curve:rectangle"; declare type RecursivePartial = T extends Array ? { [K in keyof T]: RecursivePartial; } : T extends object ? { [P in keyof T]?: RecursivePartial; } : T; declare type ResourceFormats = 'productJson' | 'productContour' | 'texture'; /** * This interface was referenced by `AuthJson`'s JSON-Schema * via the `definition` "resourceScope". */ declare type ResourceScope = | "customFields" | "customAttributes" | "customAttributeValues" | "organization" | "dxf" | "floor" | "job" | "order" | "product" | "user" | "team" | "superadmin" | "token" | "subscription" | "graphql" | "extension" | "webhook" | "component"; declare type Rgb = [number, number, number]; declare type RgbA = [number, number, number, number]; declare type RotationEntry = number | NumberList | NumberRange; /** * This interface was referenced by `AuthJson`'s JSON-Schema * via the `definition` "scopeDefinition". */ declare interface ScopeDefinition { resource: ResourceScope; action?: ActionScope; resourceId?: string; } /** * This interface was referenced by `AuthJson`'s JSON-Schema * via the `definition` "scopeDefinitionArray". */ declare type ScopeDefinitionArray = ScopeDefinition[]; declare type ScreenPosition = { x: number; y: number; }; export declare const setApiUrls: ({ apiStorageUrl: newApiStorageUrl, spaceApiUrl, apiProductDataPath: newApiProductDataPath }?: ApiUrls) => void; export declare type Shape = CurveShape | TextShape | GroupShape; declare type ShapeLayers = Record; declare interface ShapeStyle { stroke?: string | number | number[]; strokeWidth?: number | 'native'; strokeOpacity?: number; fill?: string | number | number[] | false; fillOpacity?: number; dash?: boolean; alignment?: 0 | 0.5 | 1; } declare type SimpleTransform3d = { position: Vector3; rotation: number; }; export declare interface SpaceData extends BaseData { type: LayoutSpaceJson['type']; isExternal: boolean; category: string; subCategory: string; seatCapacity: number; area: number; elements: ElementData[]; boundaries: BoundaryData[]; } export declare interface SpaceFilter extends BaseNodeFilter { category?: StringComparator; subCategory?: StringComparator; seatCapacity?: NumberComparator; isExternal?: BooleanComparator; area?: NumberComparator; /** point query */ at?: Vector2_2; /** 2d bounding box intersection */ within?: { min: Vector2_2; max: Vector2_2; }; } declare class SpaceGraph { spatialStructure: SpaceGraphSpatialStructure; products: SpaceGraphProduct[]; productsById: Record; productsByType: NodesByType<{ readonly 'product:static': typeof SpaceGraphProductStatic; readonly 'product:component': typeof SpaceGraphProductComponent; }>; customAttributes: SpaceGraphCustomAttribute[]; customAttributesById: Record; customAttributesByType: NodesByType<{ readonly 'customAttribute:definition': typeof SpaceGraphCustomAttribute; }>; geometries: SpaceGraphGeometryJson[]; geometriesById: Record; geometriesByType: NodesByType<{ readonly 'geometry:plane': PlaneGeometry; readonly 'geometry:cuboid': CuboidGeometry; readonly 'geometry:sphere': SphereGeometry; readonly 'geometry:extrusion': ExtrusionGeometry; readonly 'geometry:mesh': MeshGeometry; readonly 'geometry:uri': UriGeometry; }>; materials: SpaceGraphMaterial[]; materialsById: Record; materialsByType: NodesByType<{ readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial; readonly 'material:basic': typeof SpaceGraphBasicMaterial; readonly 'material:color': typeof SpaceGraphColorMaterial; readonly 'material:standard': typeof SpaceGraphStandardMaterial; }>; relations: SpaceGraphRelation[]; relationsById: Record; relationsByType: NodesByType<{ readonly 'relation:group': typeof GroupRelation; }>; nodes: SpaceGraphNode[]; nodesById: Record; nodesByType: NodesByType<{ readonly 'spatialStructure:building': SpaceGraphBuilding; readonly 'spatialStructure:floor': SpaceGraphFloor; readonly 'spatialStructure:layout': SpaceGraphLayout; readonly 'relation:group': typeof GroupRelation; readonly 'product:static': typeof SpaceGraphProductStatic; readonly 'product:component': typeof SpaceGraphProductComponent; readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial; readonly 'material:basic': typeof SpaceGraphBasicMaterial; readonly 'material:color': typeof SpaceGraphColorMaterial; readonly 'material:standard': typeof SpaceGraphStandardMaterial; readonly 'geometry:plane': PlaneGeometry; readonly 'geometry:cuboid': CuboidGeometry; readonly 'geometry:sphere': SphereGeometry; readonly 'geometry:extrusion': ExtrusionGeometry; readonly 'geometry:mesh': MeshGeometry; readonly 'geometry:uri': UriGeometry; readonly 'spatialGraph:edge': SpatialGraphEdge; readonly 'spatialGraph:vertex': SpatialGraphVertex; readonly 'layout:space': LayoutSpace; readonly 'view:2d': Layout2dView; readonly 'view:3d': Layout3dView; readonly 'view:style': LayoutViewStyle; readonly 'annotation:floorPlanDxf': LayoutFloorPlanDxfAnnotation; readonly 'annotation:floorPlanImage': LayoutFloorPlanImageAnnotation; readonly 'annotation:label': LayoutLabelAnnotation; readonly 'element:ceiling': LayoutBoundarySlab; readonly 'element:floor': LayoutBoundarySlab; readonly 'element:boundaryWall': LayoutBoundaryWall; readonly 'element:curtainWall': LayoutCurtainWall; readonly 'element:spaceDivider': LayoutSpaceDivider; readonly 'element:wall': LayoutWall; readonly 'element:opening': LayoutOpening; readonly 'element:asset': LayoutAsset; readonly 'element:beam': LayoutBeam; readonly 'element:casework': LayoutCasework; readonly 'element:column': LayoutColumn; readonly 'element:door': LayoutDoor; readonly 'element:generic': LayoutGeneric; readonly 'element:kitchen': LayoutKitchen; readonly 'element:railing': LayoutRailing; readonly 'element:ramp': LayoutRamp; readonly 'element:roof': LayoutRoof; readonly 'element:slab': LayoutSlab; readonly 'element:stairs': LayoutStairs; readonly 'element:stairFlight': LayoutStairFlight; readonly 'element:window': LayoutWindow; }>; sourceSchemaVersion: string | undefined; private emitter; constructor(sourceSchemaVersion?: string); getEvents(): Record; copyEvents(spaceGraph: SpaceGraph): void; deleteNodeAtIndex(nodeIndex: number, nodes: SpaceGraphNode[], nodesById: Record, nodesByType: NodesByType>): SpaceGraphNode | undefined; insertNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record, nodesByType: NodesByType>): void; removeNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record, nodesByType: NodesByType>): SpaceGraphNode | undefined; registerNode(node: SpaceGraphNode): void; unregisterNode(node: SpaceGraphNode): void; insertSpatialStructure(spatialStructure: SpaceGraphSpatialStructure): void; removeSpatialStructure(): SpaceGraphSpatialStructure | undefined; insertProduct(product: SpaceGraphProduct): void; removeProduct(product: SpaceGraphProduct): void; createProduct(id: string, type: SpaceGraphProductType): SpaceGraphProduct; insertGeometry(geometryJson: SpaceGraphGeometryJson): void; removeGeometry(geometryJson: SpaceGraphGeometryJson): void; insertMaterial(material: SpaceGraphMaterial): void; removeMaterial(material: SpaceGraphMaterial): void; createMaterial(type: SpaceGraphColorMaterialType, id: string, color: Rgb, opacity: number): SpaceGraphColorMaterial; createMaterial(type: SpaceGraphStandardMaterialType, id: string, reference: string): SpaceGraphStandardMaterial; createMaterial(type: SpaceGraphEmbeddedMaterialType, id: string, reference: string, format: SpaceGraphEmbeddedMaterialFormat): SpaceGraphEmbeddedMaterial; createMaterial(type: SpaceGraphBasicMaterialType, id: string): SpaceGraphBasicMaterial; insertRelation(relation: SpaceGraphRelation): void; removeRelation(relation: SpaceGraphRelation): void; createRelation(type: SpaceGraphRelationType, id: string): SpaceGraphRelation; insertCustomAttribute(customAttribute: SpaceGraphCustomAttribute): void; removeCustomAttribute(customAttribute: SpaceGraphCustomAttribute): void; getId(): string; emit(event: EventType, ...args: SpaceGraphEventMap[EventType]): void; on(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void; once(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void; off(event: EventType, handler?: (...args: SpaceGraphEventMap[EventType]) => void): void; toJSON(): SpaceGraphJson; static fromJSON(spaceGraphJson: SpaceGraphJson): SpaceGraph; } declare class SpaceGraphBasicMaterial extends SpaceGraphNodeBase { type: SpaceGraphBasicMaterialType; colorDiffuse: Rgb; colorSpecular: Rgb; specularCoefficient: number; opacity: number; textureDiffuse?: Texture; textureSpecular?: Texture; textureNormal?: Texture; textureAlpha?: Texture; dimensions?: [number, number]; constructor(id: string); copyForClone(material: SpaceGraphBasicMaterial): void; toJSON(): SpaceGraphMaterialResourceJson; } declare interface SpaceGraphBasicMaterialJson extends SpaceGraphMaterialBaseJson { type: SpaceGraphBasicMaterialType; colorDiffuse: Rgb; colorSpecular?: Rgb; specularCoefficient?: number; opacity?: number; textureDiffuse?: Texture; textureSpecular?: Texture; textureNormal?: Texture; textureAlpha?: Texture; dimensions?: [number, number]; } declare type SpaceGraphBasicMaterialType = typeof SpaceGraphBasicMaterialTypeValue; declare const SpaceGraphBasicMaterialTypeValue = "material:basic"; declare class SpaceGraphBuilding extends SpaceGraphSpatialStructureBase { type: SpaceGraphBuildingType; location: SpaceGraphLocation; floors: SpaceGraphFloor[]; /** multiple floors can be on the same level */ floorsByLevel: Record; constructor(id: string); copyForClone(building: SpaceGraphBuilding): void; /** * returns levels sorted by the vertical position of the first floor with that level */ getLevelOrder(): string[]; insertFloor(floor: SpaceGraphFloor): void; removeFloor(floor: SpaceGraphFloor): void; createFloor(id: string): SpaceGraphFloor; toJSON(): SpaceGraphBuildingJson; static fromJSON(buildingJson: SpaceGraphBuildingJson, options: { spaceGraph: SpaceGraph; skipInsert?: boolean; }): SpaceGraphBuilding; } declare interface SpaceGraphBuildingJson extends SpaceGraphSpatialStructureBaseJson { type: SpaceGraphBuildingType; location?: SpaceGraphLocation; floors: SpaceGraphFloorJson[]; } declare type SpaceGraphBuildingType = typeof SpaceGraphBuildingTypeValue; declare const SpaceGraphBuildingTypeValue = "spatialStructure:building"; declare class SpaceGraphColorMaterial extends SpaceGraphNodeBase { type: SpaceGraphColorMaterialType; color: Rgb; opacity: number; constructor(id: string, color?: Rgb, opacity?: number); toJSON(): SpaceGraphMaterialResourceJson; } declare interface SpaceGraphColorMaterialJson extends SpaceGraphMaterialBaseJson { type: SpaceGraphColorMaterialType; value: Rgb | RgbA | string; } declare type SpaceGraphColorMaterialType = typeof SpaceGraphColorMaterialTypeValue; declare const SpaceGraphColorMaterialTypeValue = "material:color"; declare class SpaceGraphCustomAttribute extends SpaceGraphNodeBase { type: SpaceGraphCustomAttributeType; attributes: SpaceGraphCustomAttributeAttributes; constructor(id: string, attributesJson?: SpaceGraphCustomAttributeAttributesJson); getInputType(): CustomAttributeInputType; setAttributes(attributesJson: SpaceGraphCustomAttributeAttributesJson): void; copyForClone(customAttribute: SpaceGraphCustomAttribute): void; toJSON(): SpaceGraphCustomAttributeJson; } declare type SpaceGraphCustomAttributeAttributes = { resourceType: CustomAttributeResourceType; schema: CustomAttributeSchema; updatedAt?: string; description?: string; }; declare type SpaceGraphCustomAttributeAttributesJson = { resourceType: CustomAttributeResourceType; valueType?: CustomAttributeValueType; schema?: CustomAttributeSchema; updatedAt?: string; /** @minLength 3 @maxLength 200 @type string */ description?: string; }; declare interface SpaceGraphCustomAttributeJson extends SpaceGraphNodeBaseJson { /** @type string @minLength 3 @maxLength 70 @pattern ^(?![_-])[A-Za-z0-9_:-]*$ */ id: string; /** @minLength 3 @maxLength 30 @type string */ name: string; type: SpaceGraphCustomAttributeType; attributes: SpaceGraphCustomAttributeAttributesJson; } declare type SpaceGraphCustomAttributeType = typeof SpaceGraphCustomAttributeTypeValue; declare const SpaceGraphCustomAttributeTypeValue = "customAttribute:definition"; declare type SpaceGraphCustomAttributeValue = Record; declare type SpaceGraphCustomAttributeValueJson = Record; declare class SpaceGraphEmbeddedMaterial extends SpaceGraphNodeBase { type: SpaceGraphEmbeddedMaterialType; reference: string; format: SpaceGraphEmbeddedMaterialFormat; constructor(id: string, reference: string, format: SpaceGraphEmbeddedMaterialFormat); toJSON(): SpaceGraphMaterialResourceJson; } declare type SpaceGraphEmbeddedMaterialFormat = 'data3d'; declare type SpaceGraphEmbeddedMaterialType = typeof SpaceGraphEmbeddedMaterialTypeValue; declare const SpaceGraphEmbeddedMaterialTypeValue = "material:embedded"; declare interface SpaceGraphEventMap { 'spatial-structure-create': [SpaceGraphSpatialStructure]; 'spatial-structure-delete': [SpaceGraphSpatialStructure]; 'floor-transform-change': [SpaceGraphFloor]; 'product-create': [SpaceGraphProduct]; 'product-delete': [SpaceGraphProduct]; 'material-create': [SpaceGraphMaterial]; 'material-delete': [SpaceGraphMaterial]; 'relation-create': [SpaceGraphRelation]; 'relation-delete': [SpaceGraphRelation]; 'custom-attribute-create': [SpaceGraphCustomAttribute]; 'custom-attribute-delete': [SpaceGraphCustomAttribute]; 'node-id-change': [SpaceGraphNodeBase, string]; 'node-property-change': [SpaceGraphNodeBase, string]; 'node-custom-attributes-change': [SpaceGraphNodeBase]; 'vertex-create': [SpatialGraphVertex]; 'vertex-delete': [SpatialGraphVertex]; 'vertex-add-edge': [SpatialGraphVertex, SpatialGraphEdge]; 'vertex-remove-edge': [SpatialGraphVertex, SpatialGraphEdge]; 'vertex-set-position': [SpatialGraphVertex]; 'edge-create': [SpatialGraphEdge]; 'edge-delete': [SpatialGraphEdge]; 'edge-set-vertices': [SpatialGraphEdge, { previousVertices: [SpatialGraphVertex, SpatialGraphVertex]; }]; 'space-create': [LayoutSpace]; 'space-delete': [LayoutSpace]; 'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]]; 'space-attributes-change': [LayoutSpace]; 'element-create': [LayoutElement]; 'element-delete': [LayoutElement, LayoutElement | null]; 'element-parameters-change': [LayoutElementBase]; 'element-transform-change': [LayoutTransformElementBase]; 'element-edges-change': [LayoutEdgeElementBase]; 'annotation-create': [LayoutAnnotation]; 'annotation-delete': [LayoutAnnotation]; 'annotation-transform-change': [LayoutAnnotationBase]; 'annotation-parameters-change': [LayoutAnnotationBase]; 'view-create': [LayoutView]; 'view-delete': [LayoutView]; 'view-parameters-change': [LayoutViewBase]; 'geometry-update': [LayoutElement]; 'geometry-profile-update': [LayoutSpace | LayoutElement]; } declare class SpaceGraphFloor extends SpaceGraphSpatialStructureBase { type: SpaceGraphFloorType; parent: SpaceGraphBuilding | null; position: Vector3; rotation: number; level: string | null; layouts: SpaceGraphLayout[]; constructor(id: string); copyForClone(floor: SpaceGraphFloor): void; setPosition(position: Vector3): void; setRotation(rotation: number): void; setTransform(position: Vector3, rotation: number): void; insertLayout(layout: SpaceGraphLayout): void; removeLayout(layout: SpaceGraphLayout): void; createLayout(id: string): SpaceGraphLayout; toJSON(): SpaceGraphFloorJson; static fromJSON(floorJson: SpaceGraphFloorJson, options?: { spaceGraph: SpaceGraph; skipInsert?: boolean; }): SpaceGraphFloor; } declare interface SpaceGraphFloorJson extends SpaceGraphSpatialStructureBaseJson { type: SpaceGraphFloorType; position: Vector3; rotation: number; level?: string; layouts: SpaceGraphLayoutJson[]; } declare type SpaceGraphFloorType = typeof SpaceGraphFloorTypeValue; declare const SpaceGraphFloorTypeValue = "spatialStructure:floor"; declare type SpaceGraphGeometry = ParametricGeometry | MeshGeometry | UriGeometry; declare type SpaceGraphGeometryJson = ParametricGeometryJson | MeshGeometryJson | UriGeometryJson; declare type SpaceGraphGeometryType = ParametricGeometryType | MeshGeometryType | UriGeometryType; declare interface SpaceGraphJson { schemaVersion: string; spatialStructure: SpaceGraphSpatialStructureJson; sharedResources: SpaceGraphSharedResourcesJson; } declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase { type: LayoutType; parent: SpaceGraphFloor | null; spatialGraph: LayoutSpatialGraph; spaces: LayoutSpace[]; spacesById: Record; elements: LayoutElement[]; elementsById: Record; elementsByType: NodesByType<{ readonly 'element:ceiling': typeof LayoutBoundarySlab; readonly 'element:floor': typeof LayoutBoundarySlab; readonly 'element:boundaryWall': typeof LayoutBoundaryWall; readonly 'element:curtainWall': LayoutCurtainWall; readonly 'element:spaceDivider': LayoutSpaceDivider; readonly 'element:wall': LayoutWall; readonly 'element:opening': typeof LayoutOpening; readonly 'element:asset': LayoutAsset; readonly 'element:beam': LayoutBeam; readonly 'element:casework': LayoutCasework; readonly 'element:column': LayoutColumn; readonly 'element:door': LayoutDoor; readonly 'element:generic': LayoutGeneric; readonly 'element:kitchen': LayoutKitchen; readonly 'element:railing': LayoutRailing; readonly 'element:ramp': LayoutRamp; readonly 'element:roof': LayoutRoof; readonly 'element:slab': LayoutSlab; readonly 'element:stairs': LayoutStairs; readonly 'element:stairFlight': LayoutStairFlight; readonly 'element:window': LayoutWindow; }>; annotations: LayoutAnnotation[]; annotationsById: Record; annotationsByType: NodesByType<{ readonly 'annotation:floorPlanDxf': LayoutFloorPlanDxfAnnotation; readonly 'annotation:floorPlanImage': LayoutFloorPlanImageAnnotation; readonly 'annotation:label': LayoutLabelAnnotation; }>; views: LayoutView[]; viewsById: Record; viewsByType: NodesByType<{ readonly 'view:2d': Layout2dView; readonly 'view:3d': Layout3dView; readonly 'view:style': LayoutViewStyle; }>; spatialIndex: SpatialIndex; debugIds: boolean; suggestedIds: Record; constructor(id: string); copyForClone(layout: SpaceGraphLayout): void; insertSpace(space: LayoutSpace): void; removeSpace(space: LayoutSpace): LayoutSpace | undefined; createSpace(id: string, boundaries: LayoutBoundary[]): LayoutSpace; insertElement(element: LayoutElement): void; removeElement(element: LayoutElement): LayoutElement | undefined; createElement(type: LayoutOpeningType, id: string): LayoutOpening; createElement(type: LayoutBoundarySlabType, id: string, boundaries: LayoutBoundary[]): LayoutBoundarySlab; createElement(type: LayoutBoundaryWallType, id: string, boundaries: LayoutBoundary[]): LayoutBoundaryWall; createElement(type: T, id: string, edges: SpatialGraphEdge[]): EdgeElementMap[T]; createElement(type: T, id: string): TransformElementMap[T]; insertNode(node: LayoutAnnotation | LayoutView): void; removeNode(node: LayoutAnnotation | LayoutView): void; insertAnnotation(annotation: LayoutAnnotation): void; removeAnnotation(annotation: LayoutAnnotation): LayoutAnnotation | undefined; createAnnotation(type: LayoutAnnotationType, id: string): LayoutAnnotation; insertView(view: LayoutView): void; removeView(view: LayoutView): LayoutView; createView(type: LayoutViewType, id: string): LayoutView; clearSpaces(): void; getElementList(): LayoutElement[]; getArea(filter?: { program?: { exclude?: string[]; include?: string[]; }; }): number; getLayoutGraph(): Graph; getUniqueId(prefix: string, nodesById: Record): string; getSpaceId(prefix?: string): string; getElementId(element: LayoutElement, prefix?: string): string; getBoundingBox(): TransformBoundingBox3d; toJSON(): SpaceGraphLayoutJson; static fromJSON(layoutJson: SpaceGraphLayoutJson, options?: { spaceGraph?: SpaceGraph; skipInsert?: boolean; }): SpaceGraphLayout; } declare interface SpaceGraphLayoutJson extends SpaceGraphSpatialStructureBaseJson { type: LayoutType; spatialGraph: LayoutSpatialGraphJson; spaces: LayoutSpaceJson[]; elements: LayoutElementJson[]; annotations?: LayoutAnnotationJson[]; views?: LayoutViewJson[]; } declare type SpaceGraphLocation = { latLong: Vector2_2; rotation: number; }; declare type SpaceGraphMaterial = SpaceGraphColorMaterial | SpaceGraphStandardMaterial | SpaceGraphEmbeddedMaterial | SpaceGraphBasicMaterial; declare interface SpaceGraphMaterialBaseJson extends SpaceGraphNodeBaseJson { id: string; } declare type SpaceGraphMaterialJson = Rgb | RgbA | string | SpaceGraphMaterialResourceJson; declare type SpaceGraphMaterialResourceJson = SpaceGraphColorMaterialJson | SpaceGraphStandardMaterialJson | SpaceGraphBasicMaterialJson; declare type SpaceGraphNode = SpaceGraphProduct | SpaceGraphGeometry | SpaceGraphMaterial | SpaceGraphRelation | SpaceGraphCustomAttribute | SpaceGraphBuilding | SpaceGraphFloor | LayoutNode | SpaceGraphLayout | LayoutAnnotation; declare class SpaceGraphNodeBase extends SpaceGraphTypedValue { id: string; name: string; customId: string; constructor(id: string, type: string); copyForClone(node: SpaceGraphNode): void; setName(name: string): void; setCustomId(customId: string): void; emit(event: EventType, ...args: SpaceGraphEventMap[EventType]): void; toJSON(): SpaceGraphNodeBaseJson; } declare interface SpaceGraphNodeBaseJson extends SpaceGraphTypedValueJson { /** @format uuid */ id: string; name?: string; customId?: string; } declare type SpaceGraphNodeWithCustomAttributes = LayoutNode | SpaceGraphSpatialStructure | SpaceGraphProduct; declare class SpaceGraphNodeWithCustomAttributesBase extends SpaceGraphNodeBase { customAttributes: SpaceGraphCustomAttributeValue; constructor(id: string, type: string); setCustomAttributes(customAttributes?: SpaceGraphCustomAttributeValueJson | null, customAttributesById?: Record): void; toJSON(): SpaceGraphNodeWithCustomAttributesBaseJson; copyForClone(node: SpaceGraphNodeWithCustomAttributes): void; } declare interface SpaceGraphNodeWithCustomAttributesBaseJson extends SpaceGraphNodeBaseJson { customAttributes?: SpaceGraphCustomAttributeValueJson | null; } declare type SpaceGraphProduct = SpaceGraphProductStatic | SpaceGraphProductComponent; declare type SpaceGraphProductAttributes = { manufacturer: string; categories: string[]; subCategories: string[]; thumbnail: string; boundingBox: BoundingBox3d; seatCapacity: number; updatedAt: string; }; declare type SpaceGraphProductAttributesJson = { manufacturer?: string; categories?: string[]; subCategories?: string[]; thumbnail?: string; boundingBox?: BoundingBox3d; seatCapacity?: number; updatedAt?: string; }; declare class SpaceGraphProductBase extends SpaceGraphNodeWithCustomAttributesBase { type: SpaceGraphProductType; attributes: SpaceGraphProductAttributes; instances: Set; constructor(id: string, type: SpaceGraphProductType); copyForClone(product: SpaceGraphProductStatic | SpaceGraphProductComponent): void; setAttributes(attributesJson: SpaceGraphProductAttributesJson): void; getBoundingBox(): BoundingBox3d; toJSON(): SpaceGraphProductJson; } declare class SpaceGraphProductComponent extends SpaceGraphProductBase { type: SpaceGraphProductComponentType; attributes: SpaceGraphProductAttributes; products: { position: PositionEntry; rotation: RotationEntry; product: string; }[]; geometries: GeometryOperationJson[]; constructor(id: string); copyForClone(product: SpaceGraphProductComponent): void; toJSON(): SpaceGraphProductComponentJson; setProducts(products: { position: PositionEntry; rotation: RotationEntry; product: string; }[]): void; setInstances(): void; } declare interface SpaceGraphProductComponentJson extends SpaceGraphNodeWithCustomAttributesBaseJson { type: SpaceGraphProductComponentType; attributes?: SpaceGraphProductAttributesJson; products: { position: PositionEntry; rotation: RotationEntry; product: string; }[]; geometries: GeometryOperationJson[]; } declare type SpaceGraphProductComponentType = typeof SpaceGraphProductComponentTypeValue; declare const SpaceGraphProductComponentTypeValue = "product:component"; declare type SpaceGraphProductJson = SpaceGraphProductStaticJson | SpaceGraphProductComponentJson; declare class SpaceGraphProductStatic extends SpaceGraphProductBase { type: SpaceGraphProductStaticType; geometries: GeometryOperationJson[]; constructor(id: string); copyForClone(product: SpaceGraphProductStatic): void; toJSON(): SpaceGraphProductStaticJson; } declare interface SpaceGraphProductStaticJson extends SpaceGraphNodeWithCustomAttributesBaseJson { type: SpaceGraphProductStaticType; attributes?: SpaceGraphProductAttributesJson; geometries: GeometryOperationJson[]; } declare type SpaceGraphProductStaticType = typeof SpaceGraphProductStaticTypeValue; declare const SpaceGraphProductStaticTypeValue = "product:static"; declare type SpaceGraphProductType = SpaceGraphProductStaticType | SpaceGraphProductComponentType; declare type SpaceGraphRelation = GroupRelation; declare type SpaceGraphRelationJson = GroupRelationJson; declare type SpaceGraphRelationType = GroupRelationType; declare interface SpaceGraphSharedResourcesJson { products: SpaceGraphProductJson[]; geometries: SpaceGraphGeometryJson[]; materials: SpaceGraphMaterialResourceJson[]; relations: SpaceGraphRelationJson[]; customAttributes?: SpaceGraphCustomAttributeJson[]; } declare type SpaceGraphSpatialStructure = SpaceGraphBuilding | SpaceGraphFloor | SpaceGraphLayout; declare class SpaceGraphSpatialStructureBase extends SpaceGraphNodeWithCustomAttributesBase { type: SpaceGraphSpatialStructureType; constructor(id: string, type: SpaceGraphSpatialStructureType); } declare interface SpaceGraphSpatialStructureBaseJson extends SpaceGraphNodeWithCustomAttributesBaseJson { type: SpaceGraphSpatialStructureType; } declare type SpaceGraphSpatialStructureJson = SpaceGraphBuildingJson | SpaceGraphFloorJson | SpaceGraphLayoutJson; declare type SpaceGraphSpatialStructureType = SpaceGraphBuildingType | SpaceGraphFloorType | LayoutType; declare class SpaceGraphStandardMaterial extends SpaceGraphNodeBase { type: SpaceGraphStandardMaterialType; reference: string; constructor(id: string, reference: string); toJSON(): SpaceGraphMaterialResourceJson; } declare interface SpaceGraphStandardMaterialJson extends SpaceGraphMaterialBaseJson { type: SpaceGraphStandardMaterialType; reference: string; } declare type SpaceGraphStandardMaterialType = typeof SpaceGraphStandardMaterialTypeValue; declare const SpaceGraphStandardMaterialTypeValue = "material:standard"; declare class SpaceGraphTypedValue { spaceGraph: SpaceGraph; type: string; constructor(type: string); } declare interface SpaceGraphTypedValueJson { type: string; } /** * Map space labels by space usage or space id to a custom name * @example { kitchen: 'cuisine' } */ declare type SpaceLabelMapping = { [label: string]: string; }; export declare interface SpaceSelect extends BaseSelect { category?: boolean; subCategory?: boolean; isExternal?: boolean; area?: boolean; seatCapacity?: boolean; elements?: ElementQuery | boolean; boundaries?: boolean; } declare class SpatialGraphEdge extends SpatialGraphNodeBase { type: SpatialGraphEdgeType; vertices: [SpatialGraphVertex, SpatialGraphVertex]; spaces: [LayoutSpace | null | undefined, LayoutSpace | null | undefined]; boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null]; element: LayoutEdgeElement | null; constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex); getPoints(): [Vector2, Vector2]; getLength(): number; get isExternal(): boolean; setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void; resetSpatialIndexing(): void; calculateBoundingBox(): BoundingBox3d; setVerticesByIds(vertexId1: string, vertexId2: string): void; canSplit(u: number, options?: EdgeCanSplitOptions): boolean; split(u: number, options?: EdgeSplitOptions, updateSpaceBoundaries?: boolean): EdgeSplitReturnValue; canMerge(edge: SpatialGraphEdge): boolean; merge(edge: SpatialGraphEdge, updateSpaceBoundaries?: boolean): void; toJSON(): SpatialGraphEdgeJson; } declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson { id: string; type: SpatialGraphEdgeType; vertices: [string, string]; } declare type SpatialGraphEdgeType = typeof SpatialGraphEdgeTypeValue; declare const SpatialGraphEdgeTypeValue = "spatialGraph:edge"; declare type SpatialGraphNode_2 = SpatialGraphVertex | SpatialGraphEdge; declare class SpatialGraphNodeBase extends LayoutBoundingBoxNode { } declare interface SpatialGraphNodeBaseJson extends LayoutNodeBaseJson { } declare type SpatialGraphNodeType = SpatialGraphVertexType | SpatialGraphEdgeType; declare class SpatialGraphVertex extends SpatialGraphNodeBase { type: SpatialGraphVertexType; position: Vector2_2; edges: SpatialGraphEdge[]; constructor(id: string, x: number, y: number); sortVertexEdges(): void; calculateTransform(): Transform3d; addEdge(edge: SpatialGraphEdge): void; removeEdge(edge: SpatialGraphEdge): void; setPosition(x: number, y: number): void; resetSpatialIndexing(): void; toJSON(): SpatialGraphVertexJson; } declare interface SpatialGraphVertexJson extends SpatialGraphNodeBaseJson { id: string; type: SpatialGraphVertexType; position: Vector2_2; } declare type SpatialGraphVertexType = typeof SpatialGraphVertexTypeValue; declare const SpatialGraphVertexTypeValue = "spatialGraph:vertex"; /** * A spatial index for efficiently querying nodes within a 2D bounding box. * * @example * ```typescript * const spatialIndex = new SpatialIndex(layout); * spatialIndex.addNode(node); * const foundNodes = spatialIndex.find({ * min: [-10, -10], * max: [10, 10], * margin: 0.1, * types: ['element:wall', 'element:door'] * }); * ``` */ declare class SpatialIndex extends default_2 { /** * Maps a node id to the bounding box reference that was actually inserted into * the tree. We need the exact inserted reference (with its original * coordinates) to remove it again: RBush navigates the tree using the item's * bounding box, so removing with a node's *current* (moved) bounding box can * fail to locate the stale entry, leaving duplicates behind. */ indexedNodesById: Map; layout: SpaceGraphLayout; constructor(layout: SpaceGraphLayout); /** * Find nodes by 2d bounding, margin and types selection * * `max` will fallback to `min` if not provided */ find({ min, max, margin, types }: SpatialIndexFind): T[]; addNode(node: LayoutBoundingBoxNode): void; removeNode(node: LayoutBoundingBoxNode): void; remove(node: IndexedNodeReference): this; } declare type SpatialIndexFind = { min: Vector2_2; max?: Vector2_2; margin?: number; types?: LayoutNodeType[]; }; declare class SphereGeometry extends ParametricGeometryBase { type: SphereGeometryType; radius: number; constructor(id: string); } declare interface SphereGeometryJson extends ParametricGeometryBaseJson { type: SphereGeometryType; radius: number; } declare type SphereGeometryType = typeof SphereGeometryTypeValue; declare const SphereGeometryTypeValue = "geometry:sphere"; declare interface SpiralStairFlightParameters { stairFlightType: 'spiral'; angle: number; radius: number; /** @minimum 0.01 */ width: number; /** @minimum 0.01 */ height: number; circulation: 'left' | 'right'; materials: LayoutStairFlightMaterials; } declare type SpiralStairFlightParametersJson = Partial; declare type SpiralStairsParameters = { stairsType: SpiralStairsType; radius: number; angle: number; /** @minimum 0.01 */ height: number; /** @minimum 0.01 */ stepWidth: number; circulation: 'left' | 'right'; } & CommonStairsParameters; declare type SpiralStairsParametersJson = Partial; declare type SpiralStairsType = 'spiral'; declare interface StartupOptions { /** * do not render elements of given types (e.g. 'element:asset', 'element:door', …), or 'roomStamp' * @deprecated use `visibility.byType` instead, e.g. * `{ visibility: { byType: { 'element:asset': { show: false } } } }` */ hideElements?: HideableElement[]; /** * Controls how the viewport adjusts when the canvas container is resized. * * Alignment pairs anchor the viewport to a fixed point within the canvas: * - `'center-center'` (default), `'left-top'`, `'right-top'`, `'left-bottom'`, `'right-bottom'` * * Screen-space mode keeps the floor plan at the same absolute screen position: * - `'screen-space'` – compensates for the canvas element moving on screen * (e.g. when a sidebar opens/closes) so the plan stays visually stationary. */ preserveViewbox?: PreserveViewbox; /** option to disable panning and zooming */ panZoom?: boolean; /** if set, panning and zooming is restricted to the scene boundingbox plus the margin */ panZoomMargin?: number; /** toggle overlaying UI elements */ ui?: UI; /** floor plan theming */ theme?: FloorPlanTheme; /** granular element & space visibility — show/hide by type, query or id */ visibility?: FloorPlanVisibility; /** custom shape layers */ shapeLayers?: ShapeLayers; /** mapping table for custom space labels */ spaceLabelMapping?: SpaceLabelMapping; /** set the unit system */ units?: Units; /** min and max zooming factor. Defaults to [3, 300] */ zoomRange?: [number, number]; } declare type StraightStairFlightParameters = { stairFlightType: 'straight'; materials: LayoutStairFlightMaterials; } & DimensionParameters; declare type StraightStairFlightParametersJson = Partial; declare type StraightStairsParameters = { stairsType: StraightStairsType; } & DimensionParameters & CommonStairsParameters; declare type StraightStairsParametersJson = Partial; declare type StraightStairsType = 'straight' | 'straightLanding'; declare type StringComparator = string | { eq: string; } | { neq: string; } | { in: string[]; } | { nin: string[]; } | { contains: string; }; declare type StyleByKey = Record; declare type StyledFilter = { where: ElementFilter | SpaceFilter; style: ShapeStyle; }; declare type StyleFilter = StyledFilter; declare interface SurfaceMaterials { [surface: string]: SpaceGraphMaterial; } declare interface SurfaceMaterialsJson { [surface: string]: SpaceGraphMaterialJson; } declare interface Surfaces { [surface: string]: GeometryFaceIndices; } /** * This interface was referenced by `AuthJson`'s JSON-Schema * via the `definition` "temporaryAccessToken". */ declare interface TemporaryAccessToken { authorization: string; expiresAt: number; } declare type TemporaryAccessTokenFunction = (args: CreateTemporaryAccessToken) => Promise; export declare interface TextShape { type: 'text'; position: Vector2_2; text: string; rotation?: number; alignV?: 'center' | 'bottom' | 'top'; alignH?: 'center' | 'left' | 'right'; fontSize?: number; style?: ShapeStyle; } declare type Texture = { type: 'texture:uri'; uri: string; preview?: string; source?: string; }; declare type TextureData = { textureUrl: string; applyFilter: TextureFilter; texture?: any; contourTexture?: any; themeOverlayTextures?: Map; imageData?: any; error?: { message: string; }; anchor?: { x: number; y: number; }; offset?: { x: number; y: number; }; position?: { x: number; y: number; }; }; declare enum TextureFilter { None = 0, Default = 1, Grayscale = 2 } declare type ThemeStyles = { byId?: StyleByKey; byType?: { 'element:asset'?: ShapeStyle & { label?: NodeLabel; }; 'element:beam'?: ShapeStyle; 'element:boundaryWall'?: ShapeStyle; 'element:casework'?: ShapeStyle; 'element:ceiling'?: ShapeStyle; 'element:column'?: ShapeStyle; 'element:curtainWall'?: ShapeStyle; 'element:door'?: ShapeStyle; 'element:floor'?: ShapeStyle; 'element:generic'?: ShapeStyle; 'element:kitchen'?: ShapeStyle; 'element:opening'?: ShapeStyle; 'element:railing'?: ShapeStyle; 'element:ramp'?: ShapeStyle; 'element:roof'?: ShapeStyle; 'element:slab'?: ShapeStyle; 'element:spaceDivider'?: ShapeStyle; 'element:stairFlight'?: ShapeStyle; 'element:stairs'?: ShapeStyle; 'element:wall'?: ShapeStyle; 'element:window'?: ShapeStyle; 'layout:space'?: ShapeStyle; 'spatialGraph:edge'?: ShapeStyle; 'annotation:floorPlanImage'?: ShapeStyle & { grayscale?: boolean; }; }; byFilter?: StyleFilter[]; }; declare class Ticker { methods: { [name: string]: { fn: Function; ctx: WebGlView; }; }; add: (name: string, fn: Function, ctx: WebGlView) => void; remove: (name: string) => void; } declare class TinyEmitter { on(event: string, callback: Function, ctx?: any): this; once(event: string, callback: Function, ctx?: any): this; emit(event: string, ...args: any[]): this; off(event: string, callback?: Function): this; } declare interface TokenOptions { publishableAccessToken?: string; secretAccessToken?: string; temporaryAccessToken?: TemporaryAccessToken; temporaryAccessTokenFunction?: TemporaryAccessTokenFunction; temporaryAccessTokenScopes?: ScopeDefinitionArray; sdkVersion?: string; } declare type Transform3d = { position: Vector3; rotation: number; rotationAxis: Vector3; }; declare type TransformBoundingBox3d = { min: Vector3; max: Vector3; transform: Transform3d; }; declare type TransformElementMap = { 'element:asset': LayoutAsset; 'element:beam': LayoutBeam; 'element:casework': LayoutCasework; 'element:column': LayoutColumn; 'element:door': LayoutDoor; 'element:kitchen': LayoutKitchen; 'element:railing': LayoutRailing; 'element:ramp': LayoutRamp; 'element:roof': LayoutRoof; 'element:slab': LayoutSlab; 'element:stairs': LayoutStairs; 'element:stairFlight': LayoutStairFlight; 'element:window': LayoutWindow; 'element:generic': LayoutGeneric; }; declare type UI = { /** Show a dynamic scale indicator */ scale?: boolean; /** Show the current cursor position in plan coordinates */ coordinates?: boolean; }; /** * Which unit system and how to display the units */ declare type Units = { /** meters or feet? */ system?: 'metric' | 'imperial'; /** how many decimals should be shown for lengths? */ lengthDecimals?: number; /** how many decimals should be shown for areas? */ areaDecimals?: number; /** if 'area', it displays e.g. 12 m². If 'boundingBox'it displays e.g. 4 m x 3 m */ roomDimensions?: 'area' | 'boundingBox'; }; declare class UriGeometry extends GeometryBase { type: UriGeometryType; format: UriGeometryFormat; uri: string; normals: ParametricNormals; constructor(id: string); } declare type UriGeometryFormat = 'data3d'; declare interface UriGeometryJson extends GeometryBaseJson { type: UriGeometryType; format: UriGeometryFormat; uri: string; normals?: ParametricNormals; } declare type UriGeometryType = typeof UriGeometryTypeValue; declare const UriGeometryTypeValue = "geometry:uri"; export declare type Vector2 = [number, number]; declare type Vector2_2 = [number, number]; export declare type Vector3 = [number, number, number]; declare interface Vector3List extends SpaceGraphTypedValueJson { type: 'vector3:list'; list: Vector3[]; } declare interface Vector3Range extends SpaceGraphTypedValueJson { type: 'vector3:range'; range: { start: Vector3; step: Vector3; count: number; }; } declare type ViewEvent = 'pan' | 'zoom' | 'viewbox' | 'resize-canvas' | 'scene-rendered' | 'focus'; declare type VisibilityByKey = Record; export declare type VisibilityFilter = { where: ElementFilter | SpaceFilter; show: boolean; }; /** * Visibility payload for a rule: `{ show: false }` omits the node from every * output, `{ show: true }` re-shows it. Modeled as an object (like theme's * `ShapeStyle`) so a rule can later grow predicate fields (e.g. a zoom range) * without a breaking API change. */ export declare type VisibilityRule = { show: boolean; }; declare class WebGlView extends TinyEmitter { windowPos: Vector2; zoom: number; client: Vector2; layers: Map; viewbox: BoundingBox2d; styleCache: Record; viewportNeedsUpdate: boolean; viewportPaused: boolean; viewportInFocus: boolean; wallNodesToUpdate: any[]; wallNodeUpdateInProgress: boolean; /* Excluded from this release type: floorContainers */ roomStampLayers: Map; nodeLabelLayers: Map; /* Excluded from this release type: shapeLayerIds */ parentEl: HTMLElement; /* Excluded from this release type: _settings */ /* Excluded from this release type: gfxLayers */ /* Excluded from this release type: textureCache */ redrawScene: () => void; /* Excluded from this release type: gfxNodes */ /* Excluded from this release type: _viewport */ /* Excluded from this release type: _canvasMargin */ /* Excluded from this release type: _renderer */ /* Excluded from this release type: _stage */ _dummyTexture: any; /* Excluded from this release type: _zoomTarget */ _oldTime: number; ticker?: Ticker; _lastCanvasRect?: DOMRect; _resizeObserver?: ResizeObserver; _resizeRafId: number | null; on: (event: ViewEvent, callback: Function, ctx?: any) => this; once: (event: ViewEvent, callback: Function, ctx?: any) => this; off: (event: ViewEvent, callback?: Function) => this; emit: (event: ViewEvent, ...args: any[]) => this; constructor(loader: FpeLoader, settings: FpeConfig, parentEl: HTMLElement); /** * main animation loop */ draw(): void; startAnimationLoop(): void; stopAnimationLoop(): void; updateView(): void; watchResize(): Promise; get gfxNodeCount(): number; reset(): void; pause(interaction?: string): void; resume(interaction?: string): void; destroy(): void; } /** A `[min, max]` zoom range (inclusive bounds) used for zoom-dependent rendering. */ export declare type ZoomRange = [min: number, max: number]; export { }