JSPM

  • Created
  • Published
  • Downloads 662
  • Score
    100M100P100Q103655F
  • License SEE LICENSE IN LICENSE

Visualize.js based 3D CAD and BIM data Viewer for the inWEB Open Cloud platform.

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 a JavaScript library for visualization of 3D CAD and BIM data from VSFX files stored on the Open Cloud Server, on the web, or in local files.

This library enables you to integrate advanced Visualize capabilities into your applications, including user interaction with scenes and objects, 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.2 with a version you need):

<script src="https://unpkg.com/@inweb/viewer-visualize@25.2/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:

// create instance of the Client class for working with server
const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });

// login to the server
await client.signInWithEmail("email", "password");

// get file list from the server
const files = await client.getFiles();

// create instance of Viewer class for rendering drawing files
const viewer = new ODA.Visualize.Viewer(client);

// initialize Viewer it with the specified <canvas> element
await viewer.initialize(canvas);

// open the first file in the list
await viewer.open(files.result[0]);

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.