Appearance
Changelog
Looking for newer versions?
v3.2.1
March 15th 2023
- Changes
- use updated storage endpoints
v3.2.0
December 4th 2023
New ✨
- the Floor Plan SDK npm package now ships with type definitions, offering first-class TypeScript support.
- support was added for the
customId
property on space and asset objects found underfloorPlan.resources
. Custom IDs can be set through the Editor UI. See the Help Center article for more information.
v3.1.7
November 17th 2023
- Fixes
- prevent namespace collision for 2d outline cache when multiple SDK versions are loaded
v3.1.6
November 13th 2023
New ✨
the Floor Plan SDK package is now published to npm, and npm will be the main distribution channel for Floor Plan SDK releases going forward.
code.archilogic.com
CDN URLs will continue to be supported forv3.x
releases, but we recommend migrating to the npm package when possible.Installation via npm CLI:
bashnpm install @archilogic/floor-plan-sdk
Usage:
ts// importing the npm package as ES module (recommended) import FloorPlanEngine from '@archilogic/floor-plan-sdk' // importing the npm package as UMD bundle (when the global FloorPlanEngine variable is required) import '@archilogic/floor-plan-sdk' // importing the stylesheet (when used with a bundler which supports importing CSS files) import '@archilogic/floor-plan-sdk/fpe.css' // importing as ES module via public CDN (useful for environments where npm is not supported) import FloorPlanEngine from 'https://unpkg.com/@archilogic/floor-plan-sdk?module'
Changes
- use static 2d outline cache for improved performance
v3.1.5
March 21st 2023
- Fixes
- fixed
floorPlan.resources
not being updated after loading another scene
- fixed
v3.1.4
July 12th 2022
- Fixes
- fixed UI menu issues with multiple instances of floor plan engine
v3.1.3
December 6th 2021
- Fixes
- fixed issue where offscreen HTML markers could be incorrectly updated
v3.1.2
November 25th 2021
- Fixes
- fixed canvas resize issues related to static CSS positioning*
*As part of this fix and from v3.1.2 onwards, an external stylesheet is now deployed to our CDN at https://code.archilogic.com/fpe-sdk/<version>/fpe.css
.
It can be linked to as an external stylesheet, ie:
html
<link rel="stylesheet" href="https://code.archilogic.com/fpe-sdk/v3.1.2/fpe.css" />
This can be used for debugging purposes or for environments where CSS injection via JS is not supported.
v3.1.1
October 28th 2021
- Fixes
- fixed
setHighlight
method when the specific resource was colored by a theme
- fixed
v3.1.0
September 30th 2021
New ✨
- add ability to set
fillOpacity
,outline
andoutlineWidth
withsetHighlight
method - preserveViewbox can now be used to specify how a floor plan should be anchored if its containing DOM element is resized
- the text outline for a
roomStamp
can now be disabled with theelements.roomStamp.textOutline
theme option - the content of a
roomStamp
can now be further customized with theroomStampDisplay
option - the current
zoom
level is now exposed by the 'viewbox' event
- add ability to set
Changes
- improved loading engine
- void spaces are rendered transparent without room stamp
- performance improvements for info windows
- improve 2d layering of assets, wallContours and railings
Fixes
- fixed issues with misplaced info windows
- add correct spacings for longer room stamps
- fixes WebGl issues with Chrome 94+
v3.0.2
April 29th 2021
- Fixes
- fix incorrect position for offscreen HTML markers
v3.0.1
April 14th 2021
- Fixes
- prevent issues from unsupported products geometry
v3.0.0
April 9th 2021
- Changes
- updated to use Space API V2 internally
- Space API V1 access tokens must be replaced by Space API V2 tokens
StartupOptions
no longer supportsaccessToken
andpublishableApiKey
properties- access tokens must be provided via the
.loadScene
method
v2.2.0
February 3rd 2021
- New ✨
- add custom HTML markers
- set up custom space name mapping
- zoomByFactor method
- setZoom method
- viewbox event exposed
v2.1.0
December 7th 2020
New ✨
- private scenes can be accessed with a corresponding token
- support for asset subCategories
- support display of custom space usage names
Fixes
- fix option for infoWindows to not show the closing button
v2.0.3
September 24th 2020
Changes
- added support for access token syntax
- area measurement has a semi transparent background
Fixes
- enable transparent background
- measuring text adapts to zoom level
- fix snapping to walls when changing a measurement
- improved texture loading
- better material support
v2.0.2
August 27th 2020
- Fixes
- mobile click events exposed incorrect position
- prevent duplicate instance on the same root node
v2.0.1
August 21th 2020
- Changes
- enable scale bar with imperial units
- allow to switch off menus on runtime
- allow to toggle panZoom on runtime
- set default strokeWidth for wallContours
- add support for size param when creating markers
- set default planRotation to 0
- Fixes
- correct position in drop event for canvas with offset
- reset texture loader when needed and make sure to capture unloaded textures
- fix shape fill for wallContours
v2.0.0
August 19th 2020
New ✨
- WegGl based drawing engine
- Texture support for the assets
- Subscribe to floor plan events: click, mousemove, drop which expose the current plan position FloorPlanEvents
- Added method getResourcesFromPosition to get resources ( spaces or assets ) from a given plan position
- Added Method to destroy and clean up floor plan instance
Changes
- resource naming adapted to Space API floorPlan.resources
v1.5.5
March 25th 2020
- Changes
- Send SDK version in request header
- Allow to set the publishableApiKey in the startup options
v1.5.4
March 10th 2020
- Fixes
- Disable resize handler when printing
- Changes
- Replace document resize with resize handler
v1.5.2
February 3rd 2020
- New ✨
- Option to toggle usage and area independently for room stamps
v1.5.1
October 17th 2019
New ✨
- Add markers to a plan via
let marker = floorPlan.addMarker()
- Add click events to markers
marker.addEventListener('click', method)
- Convert screen coordinates into plan coordinates
floorPlan.getPlanPosition()
- Convert plan coordinates into screen coordinates
floorPlan.getScreenPosition()
- Measuring tool snaps to wall corners
- Measuring tool and coordinate display support imperial units
- Add markers to a plan via
Changes
- Improved export image reliability, now also works for multi instance usage
- Draw closed measurement polygons
Fixes
- Fixed incorrect info window positioning
v1.5.0
October 2nd 2019
New ✨
floorPlan.state.computed.spaces
references to the furniture that is in the spacefloorPlan.state.computed.furniture
holds all furniture data including metadata- Spaces and furniture lists can reference to external ids that are needed to connect to external systems. ( Contact us if you need support in adding external ids to a scene )
- Highlight spaces or furniture items
node.setHighlight
- Export the current view as an image:
flooPlan.exportImage
- Add an info window:
floorPlan.addInfoWindow
- Change options on runtime:
floorPlan.changeOptions
Changes
- Floor plan engine requires a publishable api key that is white-listed for the domain that is used
- [Breaking]
floorPlan.zoomExtents
renamed fromfloorPlan.view.zoomToExtent
- [Breaking]
floorPlan.zoomToElement
renamed fromfpe.view.zoomToElement
v1.3.2
June 25th 2019
New ✨
- Added support for multiple instances
Changes
fpe.loadScene
returns promise directlyfpe.sceneLoaded.promise
is deprecated- Furniture svg nodes contain product id:
html<g class="interior" product-id="<product-id>"> <path></path> </g>
- Floor plan engine mounts as a child node to the provided dom element
- Computed spaces contain bounding box
jsfloorPlan.loadScene(sceneId).then(() => { // computed spaces gives access to the metadata and shape in world space of the spaces ( rooms ) of a scene const spaces = floorPlan.state.computed.spaces console.log(spaces[0]) /* { localPlacement: Object // location and polygon in object space boundingBox: {x, y, x2, y2, width, height } // bounding box of the polygon id: "3c45a15b-4016-44e4-bb61-ce0f828b6848" // unique id usage: "Work" // label polygon: Array[8] // outline in world space polygonHoles: Array[0] // holes in the polygon area: 19.461620941722256 // area in m2 center: Array[2] // pole of inaccessibility of the polygon in world space } */ })
v1.3.1
June 20th 2019
- New ✨
zoomToExtent
supports animation
js// margin Number bounding box margin in meters // duration Number duration in milliseconds fpe.view.zoomToExtent(margin, duration)
- Added new method
zoomToElement
js// element Element dom element to mount to // margin Number bounding box margin in meters // duration Number duration in milliseconds fpe.view.zoomToElement(element, margin, duration).then(() => { /* do something when animation is done */ })
- Both methods return a promise, resolving when the animation is done
v1.3.0
June 6th 2019
- New ✨
- mount floor plan engine to dom node with initialization options
jsconst options = { panZoom: true, units: { system: 'imperial' }, theme: {}, ui: { menu: false, scale: true, coordinates: false } } const floorPlan = new FloorPlanEngine(elementId, options)
- load scene from sceneId
jsfloorPlan.loadScene(sceneId)
- floor plan theming