JSPM

  • Created
  • Published
  • Downloads 744
  • Score
    100M100P100Q103437F
  • License SEE LICENSE IN LICENSE

3D CAD and BIM data Viewer powered by Visualize

Package Exports

  • @inweb/viewer-visualize
  • @inweb/viewer-visualize/dist/viewer-visualize.js
  • @inweb/viewer-visualize/dist/viewer-visualize.module.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@inweb/viewer-visualize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Viewer.visualize

Viewer.visualize is JavaScript library powered by Visualize for in-browser visualization of 3D CAD and BIM data in browser from VSFX files stored on the Open Cloud Server, on the web, or on your local computer.

This library enables you to integrate advanced visualization capabilities into your web applications, including user interaction with scenes and objects, markups, and collaboration using the inWEB Open Cloud platform.

VSFX is an internal Visualize SDK file format with support for streaming and partial viewing.

Installation

CDN or static hosting

For CDN, you can use unpkg or jsDelivr (replace 25.3 with a version you need):

<script src="https://unpkg.com/@inweb/viewer-visualize@25.3/dist/viewer-visualize.js"></script>

The global namespace for Viewer.visualize is ODA.Visualize.

Install via npm

Open a terminal in your project folder and run:

npm install @inweb/viewer-visualize

The Viewer.visualize package will be downloaded and installed. Then you're ready to import it in your code:

import { Viewer } from "@inweb/viewer-visualize";

Example

Download and render file from the Open Cloud Server:

<script src="https://unpkg.com/@inweb/client@25.3/dist/client.js"></script>
<script src="https://unpkg.com/@inweb/viewer-visualize@25.3/dist/viewer-visualize.js"></script>

<script>
  const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });
  const viewer = new ODA.Visualize.Viewer(client);

  init();

  async function init() {
    await client.signInWithEmail("email", "password");
    const files = await client.getFiles();
    await viewer.initialize(canvas);
    await viewer.open(files.result[0]);
    viewer.setActiveDragger("Orbit");
  }
</script>

To learn more, see First application guide.

Code and documentation copyright 2002-2024 the Open Design Alliance. Code is distributed under a proprietary license, see LICENSE for more information.