API Reference › Globals › RoomlePlanner
# Class: RoomlePlanner
# Hierarchy
- RoomlePlanner
# Implements
- KernelAccessCallbackI
- RoomlePlannerCallback
- GlobalAPI
- Context
- KernelUtilityForUi
- ExternalEmbeddable‹RoomlePlannerUiCallback›
# Index
# Constructors
# Properties
# Accessors
# Methods
- back
- backTo
- backToPlanner
- cancelSelection
- deleteSelection
- disableRotation
- disableSnapping
- dragInObject
- drawWalls
- enableHD
- enableRotation
- enableSnapping
- exportGLB
- formatValueToUnitString
- getCameraOffset
- getConfigurator
- getConfiguratorApi
- getCurrentSkin
- getObjects
- getPartlistOf
- getPlanInteractionHandler
- getPlanModelViewHelper
- getPlanOverview
- getRuntimeComponentIdOfRootComponent
- getScene
- importGLB
- init
- insertItemList
- insertItems
- insertObject
- isReady
- loadError
- loadPlan
- loadPlanXml
- onCloseHSC
- preparePerspectiveImage
- prepareTopImage
- removeElements
- rotateSelection
- setCameraOffset
- setOverrides
- showBenchmarks
- showStats
- startConfiguring
- startViewing
- switch2D
- switch3D
- switchToConfigurator
- switchToFirstPerson
- switchToPlanner
- switchToViewer
- syncCatalog
- update
- updateScene
- updateSize
# Constructors
# constructor
+ new RoomlePlanner(creator
: string): RoomlePlanner
Defined in packages/planner-core/src/roomle-planner.ts:129
Parameters:
Name | Type |
---|---|
creator | string |
Returns: RoomlePlanner
# Properties
# creator
• creator: string
_Implementation of Context.creator_
Defined in packages/planner-core/src/roomle-planner.ts:80
# Accessors
# callbacks
• get callbacks(): RoomlePlannerUiCallback
Defined in packages/planner-core/src/roomle-planner.ts:389
Returns: RoomlePlannerUiCallback
• set callbacks(callback
: RoomlePlannerUiCallback): void
Defined in packages/planner-core/src/roomle-planner.ts:393
Parameters:
Name | Type |
---|---|
callback | RoomlePlannerUiCallback |
Returns: void
# Methods
# back
▸ back(): void
Defined in packages/planner-core/src/roomle-planner.ts:408
Returns: void
# backTo
▸ backTo(_cssClass
: string): void
Defined in packages/planner-core/src/roomle-planner.ts:426
Parameters:
Name | Type |
---|---|
_cssClass | string |
Returns: void
# backToPlanner
▸ backToPlanner(): void
Defined in packages/planner-core/src/roomle-planner.ts:309
Returns: void
# cancelSelection
▸ cancelSelection(): void
Defined in packages/planner-core/src/roomle-planner.ts:148
Returns: void
# deleteSelection
▸ deleteSelection(): void
Defined in packages/planner-core/src/roomle-planner.ts:136
Returns: void
# disableRotation
▸ disableRotation(): void
Defined in packages/planner-core/src/roomle-planner.ts:638
Disable rotation of selected elements
Returns: void
# disableSnapping
▸ disableSnapping(): void
Defined in packages/planner-core/src/roomle-planner.ts:658
disable all types of snapping
Returns: void
# dragInObject
▸ dragInObject(id
: RapiId, dragEvent
: DragEvent): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:642
Parameters:
Name | Type |
---|---|
id | RapiId |
dragEvent | DragEvent |
Returns: Promise‹void›
# drawWalls
▸ drawWalls(wallDefinitions
: WallDefinition[], interactionOptions
: InteractionOptions): KernelWall[]
Defined in packages/planner-core/src/roomle-planner.ts:694
Draws walls according to the wall definitions this can be used to create a room on the fly
Parameters:
Name | Type | Default |
---|---|---|
wallDefinitions | WallDefinition[] | - |
interactionOptions | InteractionOptions | {} |
Returns: KernelWall[]
# enableHD
▸ enableHD(source?
: DynamicLightSettingSource): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:261
Parameters:
Name | Type |
---|---|
source? | DynamicLightSettingSource |
Returns: Promise‹void›
# enableRotation
▸ enableRotation(): void
Defined in packages/planner-core/src/roomle-planner.ts:631
Enables rotation of selected elements
Returns: void
# enableSnapping
▸ enableSnapping(): void
Defined in packages/planner-core/src/roomle-planner.ts:651
enable snapping of object to object and object to wall
Returns: void
# exportGLB
▸ exportGLB(): void
Defined in packages/planner-core/src/roomle-planner.ts:224
Returns: void
# formatValueToUnitString
▸ formatValueToUnitString(value
: number, parameter
: KernelParameter): string | number
Defined in packages/planner-core/src/roomle-planner.ts:686
Returns the formatted value based on the parameter.unitType
Parameters:
Name | Type | Description |
---|---|---|
value | number | - |
parameter | KernelParameter |
Returns: string | number
# getCameraOffset
▸ getCameraOffset(): CanvasOffset
Implementation of GlobalAPI
Defined in packages/planner-core/src/roomle-planner.ts:537
Returns: CanvasOffset
# getConfigurator
▸ getConfigurator(): Configurator
Defined in packages/planner-core/src/roomle-planner.ts:430
Returns: Configurator
# getConfiguratorApi
▸ getConfiguratorApi(): RoomleConfigurator
Defined in packages/planner-core/src/roomle-planner.ts:287
Returns: RoomleConfigurator
# getCurrentSkin
▸ getCurrentSkin(): Promise‹RapiSkin›
Defined in packages/planner-core/src/roomle-planner.ts:434
Returns: Promise‹RapiSkin›
# getObjects
▸ getObjects(): Promise‹UiPlanObject[]›
Defined in packages/planner-core/src/roomle-planner.ts:549
returns all objects found in the current plan this includes info about size, rotation, id and parts
Returns: Promise‹UiPlanObject[]›
# getPartlistOf
▸ getPartlistOf(id
: number): Promise‹KernelPartList | null›
Defined in packages/planner-core/src/roomle-planner.ts:668
get the Partlist of certain runtimeID can be used if partlist of a selected Item is needed
Parameters:
Name | Type | Description |
---|---|---|
id | number | runtimeID of a configurable item |
Returns: Promise‹KernelPartList | null›
kernelPartlist with processed price, currency and RAL colors
# getPlanInteractionHandler
▸ getPlanInteractionHandler(): Promise‹PlanInteractionHandler›
Defined in packages/planner-core/src/roomle-planner.ts:483
Returns: Promise‹PlanInteractionHandler›
# getPlanModelViewHelper
▸ getPlanModelViewHelper(): Promise‹PlanModelViewHelper›
Defined in packages/planner-core/src/roomle-planner.ts:487
Returns: Promise‹PlanModelViewHelper›
# getPlanOverview
▸ getPlanOverview(): Promise‹PlanOverview›
Defined in packages/planner-core/src/roomle-planner.ts:607
get all info available for the current plan, including objects, rooms and walls
Returns: Promise‹PlanOverview›
# getRuntimeComponentIdOfRootComponent
▸ getRuntimeComponentIdOfRootComponent(planObjectId
: number): number
Implementation of KernelUtilityForUi
Defined in packages/planner-core/src/roomle-planner.ts:443
Returns the runtime component id of the plan object with the given id
Parameters:
Name | Type | Description |
---|---|---|
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
# getScene
▸ getScene(): Scene
Implementation of GlobalAPI
Defined in packages/planner-core/src/roomle-planner.ts:529
Returns: Scene
# importGLB
▸ importGLB(url
: string): void
Defined in packages/planner-core/src/roomle-planner.ts:228
Parameters:
Name | Type |
---|---|
url | string |
Returns: void
# init
▸ init(element
: HTMLElement, preloadPlanId?
: string, options?
: InitData): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:152
Parameters:
Name | Type |
---|---|
element | HTMLElement |
preloadPlanId? | string |
options? | InitData |
Returns: Promise‹void›
# insertItemList
▸ insertItemList(ids
: RapiId[]): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:511
Parameters:
Name | Type |
---|---|
ids | RapiId[] |
Returns: Promise‹void›
# insertItems
▸ insertItems(itemList
: RapiItem[]): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:525
Inserts all of the items in the array into current plan
Parameters:
Name | Type | Description |
---|---|---|
itemList | RapiItem[] | Array of items received from the Roomle API |
Returns: Promise‹void›
# insertObject
▸ insertObject(id
: RapiId, position?
: Position3, rotation?
: number): Promise‹void | KernelObject›
Defined in packages/planner-core/src/roomle-planner.ts:497
Inserts the object into the scene (at a given position and rotation)
Parameters:
Name | Type | Description |
---|---|---|
id | RapiId | - |
position? | Position3 | x (left/right),y (up, down) and z(front, back) in meters |
rotation? | number | in radians |
Returns: Promise‹void | KernelObject›
# isReady
▸ isReady(): void
Implementation of KernelAccessCallbackI
Defined in packages/planner-core/src/roomle-planner.ts:276
Returns: void
# loadError
▸ loadError(error?
: any): void
Implementation of KernelAccessCallbackI
Defined in packages/planner-core/src/roomle-planner.ts:479
Parameters:
Name | Type |
---|---|
error? | any |
Returns: void
# loadPlan
▸ loadPlan(id
: string, options?
: InitData): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:183
Parameters:
Name | Type |
---|---|
id | string |
options? | InitData |
Returns: Promise‹void›
# loadPlanXml
▸ loadPlanXml(xml
: string, options?
: InitData): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:165
Parameters:
Name | Type |
---|---|
xml | string |
options? | InitData |
Returns: Promise‹void›
# onCloseHSC
▸ onCloseHSC(): void
Defined in packages/planner-core/src/roomle-planner.ts:401
Returns: void
# preparePerspectiveImage
▸ preparePerspectiveImage(options
: PrepareImageOptions): Promise‹Base64Image›
Defined in packages/planner-core/src/roomle-planner.ts:624
Generates a perspective image (slightly from the side) and returns it as base64
Parameters:
Name | Type | Default | Description |
---|---|---|---|
options | PrepareImageOptions | {} |
Returns: Promise‹Base64Image›
# prepareTopImage
▸ prepareTopImage(options
: PrepareImageOptions): Promise‹Base64Image›
Defined in packages/planner-core/src/roomle-planner.ts:616
Generates a top image (birds eye view) and returns it as base64
Parameters:
Name | Type | Default | Description |
---|---|---|---|
options | PrepareImageOptions | {} |
Returns: Promise‹Base64Image›
# removeElements
▸ removeElements(kernelPlanElements
: KernelObject[], interactionOptions
: InteractionOptions): void
Defined in packages/planner-core/src/roomle-planner.ts:716
Parameters:
Name | Type | Default |
---|---|---|
kernelPlanElements | KernelObject[] | - |
interactionOptions | InteractionOptions | {} |
Returns: void
# rotateSelection
▸ rotateSelection(rotateBy
: number): void
Defined in packages/planner-core/src/roomle-planner.ts:144
rotates the selected item(s)
Parameters:
Name | Type | Description |
---|---|---|
rotateBy | number | angle in rad |
Returns: void
# setCameraOffset
▸ setCameraOffset(offset
: CanvasOffset): void
Implementation of GlobalAPI
Defined in packages/planner-core/src/roomle-planner.ts:541
Parameters:
Name | Type |
---|---|
offset | CanvasOffset |
Returns: void
# setOverrides
▸ setOverrides(initData
: InitDataDefinition & GlobalInitDataDefinition): void
Defined in packages/planner-core/src/roomle-planner.ts:203
Set general configuration parameter
Parameters:
Name | Type | Description |
---|---|---|
initData | InitDataDefinition & GlobalInitDataDefinition |
Returns: void
# showBenchmarks
▸ showBenchmarks(): void
Defined in packages/planner-core/src/roomle-planner.ts:283
Returns: void
# showStats
▸ showStats(): void
Defined in packages/planner-core/src/roomle-planner.ts:397
Returns: void
# startConfiguring
▸ startConfiguring(): void
Defined in packages/planner-core/src/roomle-planner.ts:300
Returns: void
# startViewing
▸ startViewing(): void
Defined in packages/planner-core/src/roomle-planner.ts:296
Returns: void
# switch2D
▸ switch2D(): void
Defined in packages/planner-core/src/roomle-planner.ts:212
Returns: void
# switch3D
▸ switch3D(): void
Defined in packages/planner-core/src/roomle-planner.ts:216
Returns: void
# switchToConfigurator
▸ switchToConfigurator(): Promise‹Configurator›
Defined in packages/planner-core/src/roomle-planner.ts:313
Returns: Promise‹Configurator›
# switchToFirstPerson
▸ switchToFirstPerson(): void
Defined in packages/planner-core/src/roomle-planner.ts:220
Returns: void
# switchToPlanner
▸ switchToPlanner(id?
: string): void
Defined in packages/planner-core/src/roomle-planner.ts:358
Parameters:
Name | Type |
---|---|
id? | string |
Returns: void
# switchToViewer
▸ switchToViewer(): Promise‹GlbViewer›
Defined in packages/planner-core/src/roomle-planner.ts:338
Returns: Promise‹GlbViewer›
# syncCatalog
▸ syncCatalog(catalogId
: string): Promise‹void›
Defined in packages/planner-core/src/roomle-planner.ts:475
Parameters:
Name | Type |
---|---|
catalogId | string |
Returns: Promise‹void›
# update
▸ update(): void
Defined in packages/planner-core/src/roomle-planner.ts:379
Returns: void
# updateScene
▸ updateScene(): void
Implementation of GlobalAPI
Defined in packages/planner-core/src/roomle-planner.ts:533
Returns: void
# updateSize
▸ updateSize(): void
Implementation of GlobalAPI
Defined in packages/planner-core/src/roomle-planner.ts:365
Returns: void