RoomlePlanner.default
planner-core/src/roomle-planner.default
Shared API between configurator and planner
Type parameters
P
extends readonly PluginName[] = readonly []
Implements
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new default<P>(creator, activePlugins?)
Type parameters
P
extends readonly "external-objects"[] = readonly []
Parameters
creator
string
activePlugins?
P
Properties
_creator_
• _creator_: string
Implementation of
Accessors
PlannerCoreTypes
• get PlannerCoreTypes(): PlannerKernelContainer
Returns
an object which has all type constants from Roomle Core (C/C++)
callbacks
• get callbacks(): default
Returns
Implementation of
• set callbacks(callback): void
Parameters
callback
Returns
void
Implementation of
hasSingleRoom
• get hasSingleRoom(): boolean
Check if the 3D scene contains only one room
Returns
boolean
True if there is only one room, false otherwise
Methods
_selectExternalObjectGroup
▸ _selectExternalObjectGroup(groupId, switchToPlanner): Promise<void>
Parameters
groupId
string
switchToPlanner
boolean
Returns
Promise<void>
_selectExternalObjectModule
▸ _selectExternalObjectModule(rootModuleId, subModuleId, selectPlanObject, switchToConfigurator, selectComponent, highlightSelection): Promise<void>
Parameters
rootModuleId
string
subModuleId
string
selectPlanObject
boolean
switchToConfigurator
boolean
selectComponent
boolean
highlightSelection
boolean
Returns
Promise<void>
addAtticToWall
▸ addAtticToWall(wall, kneeHeight, width, preferredSide?): KernelAttic
Creates a sloping roof attic on a given wall.
Parameters
kneeHeight
number
Height of the attic knee wall.
width
number
Width of the sloping roof.
Returns
The newly created attic.
back
▸ back(): void
Returns
void
backTo
▸ backTo(_cssClass): void
Parameters
_cssClass
string
Returns
void
backToPlanner
▸ backToPlanner(): void
Returns
void
calcPartsPriceSum
▸ calcPartsPriceSum(partList): Promise<KernelPartListPrice>
Parameters
partList
Returns
Promise<KernelPartListPrice>
cancelSelection
▸ cancelSelection(reason?): void
Parameters
Returns
void
Implementation of
RoomlePlannerCallback.cancelSelection
changeExteriorWallsMaterial
▸ changeExteriorWallsMaterial(material): void
Parameters
material
Returns
void
changeFloorsMaterial
▸ changeFloorsMaterial(material): void
Parameters
material
Returns
void
changeInteriorWallsMaterial
▸ changeInteriorWallsMaterial(material): void
Parameters
material
Returns
void
configureExternalObjectApi
▸ configureExternalObjectApi(configurationJson): Promise<void>
With "configureExternalObjectApi" the default representation of the objects and UI and the default behavior when interacting with external objects can be completely or partially overwritten. This configuration should be set prior to loading plans or objects.
Parameters
Returns
Promise<void>
Implementation of
createNewSerializedConfiguration
▸ createNewSerializedConfiguration(configurationRuntimeId): Promise<string>
Parameters
configurationRuntimeId
number
Returns
Promise<string>
createPlanFromObject
▸ createPlanFromObject(id, position?, rotation?): Promise<number>
creates and loads a plan from a given object
Parameters
Returns
Promise<number>
deleteSelection
▸ deleteSelection(): void
Returns
void
Implementation of
RoomlePlannerCallback.deleteSelection
disableAdvancedDocking
▸ disableAdvancedDocking(): void
disable docking of objects that fit together when objects are snapped in the plan
Returns
void
disableEvents
▸ disableEvents(): void
Returns
void
disableMeasurementLineDrawing
▸ disableMeasurementLineDrawing(): void
Returns
void
disableMultiselect
▸ disableMultiselect(): void
Disable the selection of multiple elements.
Returns
void
disableRotation
▸ disableRotation(): void
Disable rotation of selected elements
Returns
void
disableShowChildrenOfPlanObject
▸ disableShowChildrenOfPlanObject(planElementViewModel): void
disable interaction with child components of configurable objects in the plan
Parameters
planElementViewModel
Returns
void
disableSnapping
▸ disableSnapping(): void
disable all types of snapping
Returns
void
disableWallDrawing
▸ disableWallDrawing(): void
Returns
void
downloadHomagIxExportPoC
▸ downloadHomagIxExportPoC(): Promise<any>
Returns
Promise<any>
dragInObject
▸ dragInObject(idOrSerializedConfigString, dragEvent, type?): Promise<number>
Parameters
Returns
Promise<number>
drawWalls
▸ drawWalls(wallDefinitions, interactionOptions?): KernelWall[]
Draws walls according to the wall definitions this can be used to create a room on the fly
Parameters
wallDefinitions
interactionOptions
Returns
duplicateItems
▸ duplicateItems(itemList): PlanObject[]
Duplicates all planObjects in the array and inserts them into the current plan
Parameters
Returns
enableAdvancedDocking
▸ enableAdvancedDocking(): void
enable docking of objects that fit together when objects are snapped in the plan
Returns
void
enableEvents
▸ enableEvents(): void
Returns
void
enableMeasurementLineDrawing
▸ enableMeasurementLineDrawing(): void
Returns
void
enableMultiselect
▸ enableMultiselect(): void
Enable the selection of multiple elements. Common parameters shared between those elements can then be changed at once
Returns
void
Implementation of
enableRotation
▸ enableRotation(): void
Enables rotation of selected elements
Returns
void
enableShowChildrenOfPlanObject
▸ enableShowChildrenOfPlanObject(planElementViewModel): void
enable interaction with child components of configurable objects in the plan
Parameters
planElementViewModel
Returns
void
enableSnapping
▸ enableSnapping(): void
enable snapping of object to object and object to wall
Returns
void
enableWallDrawing
▸ enableWallDrawing(): void
Returns
void
escapeDrawing
▸ escapeDrawing(cancelDrawing): void
Parameters
cancelDrawing
boolean
Returns
void
exportCanvasScreenshot
▸ exportCanvasScreenshot(quality?): Promise<string>
Parameters
quality?
number
Returns
Promise<string>
Implementation of
exportGLB
▸ exportGLB(): void
Returns
void
exportImageFromCamera
▸ exportImageFromCamera(filename?, shouldWaitForAssets?): Promise<void>
Parameters
filename
string
'image'
shouldWaitForAssets
boolean
false
Returns
Promise<void>
Implementation of
formatValueToUnitString
▸ formatValueToUnitString(value, parameter): string | number
Returns the formatted value based on the parameter.unitType
Parameters
value
number
parameter
Returns
string | number
generateTCExport
▸ generateTCExport(planObjectIds?): Promise<any>
Parameters
planObjectIds
string[]
[]
Returns
Promise<any>
getAttachedAttic
▸ getAttachedAttic(wall): KernelAttic
Gets the attached attic from a wall.
Parameters
Returns
The first attached attic or null.
getCameraOffset
▸ getCameraOffset(): CanvasOffset
Gets the available screen space for our item default: 'left: 0, top: 1, right: 1, bottom: 0'
Returns
Implementation of
getConfigurator
▸ getConfigurator(): Configurator
Returns
getConfiguratorApi
▸ getConfiguratorApi(): default<P>
Returns
default<P>
getConfiguratorContext
▸ getConfiguratorContext(): default
returns class containing configurator specific data properties
Returns
getCurrentSkin
▸ getCurrentSkin(): Promise<RapiSkin>
Returns
Promise<RapiSkin>
getExternalObjectGroups
▸ getExternalObjectGroups(): Promise<object[]>
"getExternalObjectGroups" returns all groups of external objects modules (PosData) that are currently loaded in the plan.
Returns
Promise<object[]>
Implementation of
getObjects
▸ getObjects(): Promise<UiPlanObject[]>
returns all objects found in the current plan this includes info about size, rotation, id and parts
Returns
Promise<UiPlanObject[]>
getPartlistOf
▸ getPartlistOf(id): Promise<KernelPartList>
get the Partlist of certain runtimeID can be used if partlist of a selected Item is needed
Parameters
id
number
runtimeID of a configurable item
Returns
Promise<KernelPartList>
kernelPartlist with processed price, currency and RAL colors
getPlanInteractionHandler
▸ getPlanInteractionHandler(): Promise<PlanInteractionHandler>
Returns
Promise<PlanInteractionHandler>
getPlanModelViewHelper
▸ getPlanModelViewHelper(): Promise<PlanModelViewHelper>
Returns
Promise<PlanModelViewHelper>
getPlanOverview
▸ getPlanOverview(): Promise<PlanOverview>
get all info available for the current plan, including objects, rooms and walls
Returns
Promise<PlanOverview>
getPlanXmlFrom
▸ getPlanXmlFrom(plan): any
Parameters
Returns
any
getRuntimeComponentIdOfRootComponent
▸ getRuntimeComponentIdOfRootComponent(planObjectId): number
Returns the runtime component id of the plan object with the given id
Parameters
planObjectId
number
id of the plan object you want to get the runtime component id of the root component from
Returns
number
number the number of the runtime id of the root component
Implementation of
getScene
▸ getScene(): Scene
Returns the three.js scene (https://threejs.org/docs/#api/en/scenes/Scene) WARNING: This is the actual scene (reference) and not a copy!
Returns
Scene
Implementation of
getStorage
▸ getStorage(): default
returns manager class to interface with indexedDB storage
Returns
Implementation of
getUnitFormatter
▸ getUnitFormatter(): default
returns unit formatter for formatting input und output values in scene
Returns
Implementation of
getWallAngleDegrees
▸ getWallAngleDegrees(wall): number
Returns the wall angle in degrees relative to the camera
Parameters
Returns
number
hasWalls
▸ hasWalls(): boolean
Returns
boolean
highlightPlanElements
▸ highlightPlanElements(runtimeIds): void
Highlights one or more objects in the scene based on their runtime IDs.
If runtimeIds is null, all highlighted objects will be unhighlighted.
Parameters
runtimeIds
number | number[]
A single runtime ID, an array of runtime IDs, or null.
Returns
void
importGLB
▸ importGLB(url): void
Parameters
url
string
Returns
void
init
▸ init(element, preloadPlanId?, options?): Promise<void>
Parameters
Returns
Promise<void>
insertItemList
▸ insertItemList(ids): Promise<number[]>
Parameters
ids
string[]
Returns
Promise<number[]>
insertItems
▸ insertItems(itemList): Promise<number[]>
Inserts all of the items in the array into current plan
Parameters
itemList
(RapiItem | RapiConfiguration | `__ext__obj__#${string}` | ExternalObject)[]
Array of items received from the Roomle API
Returns
Promise<number[]>
insertObject
▸ insertObject(id, position?, rotation?): Promise<number>
Inserts the object into the scene (at a given position and rotation)
Parameters
id
string
rotation?
number
in radians
Returns
Promise<number>
isCurrentlyDrawing
▸ isCurrentlyDrawing(): boolean
Returns
boolean
isReady
▸ isReady(): void
Returns
void
Implementation of
loadError
▸ loadError(error?): void
Parameters
error?
any
Returns
void
Implementation of
loadExternalObjectGroup
▸ loadExternalObjectGroup(groupData, findFreeSpaceInPlan, verifyArrangement?, mergedGroups?): Promise<void>
"loadExternalObjectGroup" loads a group of modules and places them in the plan. If the group has already been loaded, it is completely replaced by the new group. This function therefore has 2 use cases:
Load a new group of modules
Update or modify an existing group of modules The initial location of the group and the IDs of the modules are defined in the group JSON.
Parameters
findFreeSpaceInPlan
boolean
undefined
A free space is automatically searched for in the plane.
verifyArrangement
boolean
false
Verify whether the root modules of the group need to be rearranged as they have changed in size.
mergedGroups
string[]
[]
Groups that were merged into another group and have to be delete (this is required to generate correct undo/redo steps).
Returns
Promise<void>
Implementation of
loadExternalObjectLibrary
▸ loadExternalObjectLibrary(libraryJson): void
"loadExternalObjectLibrary" loads the master data of a library. If master data has already been loaded for the library, it is completely replaced by the new master data.
Parameters
libraryJson
string | object
The library JSON as string or object.
Returns
void
Implementation of
loadPlan
▸ loadPlan(id, options?): Promise<RapiPlan | RapiPlanSnapshotGetData>
Parameters
id
string
options?
Returns
Promise<RapiPlan | RapiPlanSnapshotGetData>