25.11.2 • Published 8 months ago

@inweb/viewer-visualize v25.11.2

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
8 months ago

Viewer.visualize

Viewer.visualize is JavaScript library for rendering CAD and BIM files in a browser using VisualizeJS.

Core capabilities:

  • Visualize files stored on the Open Cloud Server, on the web, or on your local computer.
  • Add user interaction with scenes.
  • Create markups.
  • Save and load viewpoints.

This library is a part of CDE SDK by Open Design Alliance.

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.

<script>
  const viewer = new ODA.Visualize.Viewer();
</script>

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";
const viewer = new Viewer();

Example

Download and render file from the Open Cloud Server:

<html>
  <body>
    <div>
      <canvas id="canvas" />
    </div>

    <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>
  </body>
</html>

To learn more, see First application guide.

Copyright and license

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

25.10.1

8 months ago

25.11.1

8 months ago

25.11.2

8 months ago

25.11.0

8 months ago

25.10.0

9 months ago

25.9.8

10 months ago

25.7.13

9 months ago

25.8.23

9 months ago

25.8.20

11 months ago

25.8.15

11 months ago

25.8.14

11 months ago

25.8.16

11 months ago

25.8.11

11 months ago

25.8.10

11 months ago

25.8.13

11 months ago

25.8.12

11 months ago

25.8.19

11 months ago

25.5.0

1 year ago

25.7.1

12 months ago

25.5.3

1 year ago

25.7.0

12 months ago

25.9.5

10 months ago

25.7.7

11 months ago

25.9.4

10 months ago

25.7.6

11 months ago

25.9.7

10 months ago

25.7.9

11 months ago

25.9.6

10 months ago

25.7.8

11 months ago

25.9.1

10 months ago

25.7.3

11 months ago

25.9.0

10 months ago

25.7.2

12 months ago

25.9.3

10 months ago

25.7.5

11 months ago

25.9.2

10 months ago

25.7.4

11 months ago

25.6.0

1 year ago

25.8.0

11 months ago

25.6.2

1 year ago

25.6.1

1 year ago

25.8.22

10 months ago

25.7.10

11 months ago

25.8.21

10 months ago

25.8.9

11 months ago

25.7.12

10 months ago

25.7.11

11 months ago

25.8.6

11 months ago

25.6.8

11 months ago

25.8.5

11 months ago

25.6.7

1 year ago

25.8.8

11 months ago

25.8.7

11 months ago

25.8.2

11 months ago

25.6.4

1 year ago

25.8.1

11 months ago

25.6.3

1 year ago

25.8.4

11 months ago

25.6.6

1 year ago

25.8.3

11 months ago

25.6.5

1 year ago

25.4.11

1 year ago

25.4.10

1 year ago

25.5.4

1 year ago

25.4.7

1 year ago

25.4.6

1 year ago

25.4.4

1 year ago

25.4.2

1 year ago

25.4.3

1 year ago

25.4.1

1 year ago

25.4.0

1 year ago

25.3.26

1 year ago

25.3.25

1 year ago

25.3.23

1 year ago

25.3.24

1 year ago

25.3.22

1 year ago

25.3.21

1 year ago

25.3.20

1 year ago

25.3.19

1 year ago

25.3.18

1 year ago

25.3.17

1 year ago

25.3.15

1 year ago

25.3.13

1 year ago