This package has been deprecated

Author message:

moved to @viewar/room-planner

viewar-room-planner

0.3.0 • Public • Published

ViewAR Room Planner

The room planner included in ViewAR's base6 template and sample app. To use this package you need to have the ViewAR API installed (https://www.npmjs.com/package/viewar-api).

For more information visit our developer portal at http://developer.viewar.com or our website at http://www.viewar.com.

Usage

Initialise with:

import viewarApi from 'viewar-api';
import createRoomPlanner from 'viewar-room-planner';
 
await viewarApi.init({appId: 'com.viewar.sdk'});
export const roomPlanner = createRoomPlanner(window);

Attach to a canvas:

// editor: The editor's div element.
// canvas: The canvas element to draw on.
// 'touchable': The html class that is touchable (for inserting windows or doors).
roomPlanner.attach(window.document, editor, canvas, 'touchable');

Export state to use with ViewAR SDK:

// Get state.
const exportState = roomPlanner.exportStateToCore();
 
// Create 3d representation.
await viewarApi.roomManager.addRoomToScene(exportState);

Dependents (0)

Package Sidebar

Install

npm i viewar-room-planner

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

317 kB

Total Files

3

Last publish

Collaborators

  • mbrviewar
  • nedosekin_viewar
  • karl_hofer_1234
  • da_viewar
  • meixnermarkus