Nanoseconds Produce Minutes

    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);

    Keywords

    none

    Install

    npm i viewar-room-planner

    DownloadsWeekly Downloads

    18

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    317 kB

    Total Files

    3

    Last publish

    Collaborators

    • ak_viewar
    • doubleu23
    • ewajankowska
    • jauntz
    • karl_hofer_1234
    • meixnermarkus
    • nikgraf
    • richardp7