You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

open-cloud-client

Package Overview
Dependencies
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-cloud-client

Client.js is a library for implementing BIM Project management applications.

25.2.4
latest
npmnpm
Version published
Weekly downloads
23
-8%
Maintainers
1
Weekly downloads
 
Created
Source

Client.js

Client.js is a JavaScript library for implementing cross-browser BIM Project management applications. Client.js provides the following benefits:

  • easy access to the server resources like Projects, Files, Issues etc
  • integration of the VisualizeJS library with the Open Cloud Server
  • convenient API to open BIM files from the server for rendering and data management
  • optimizations and improvements of the quality of rendering BIM files

Table of contents

Installation

Install via npm

Open a terminal in your project folder and run:

npm install open-cloud-cllient

The Client.js package will be downloaded and installed. Then you're ready to import it in your code, see example below.

CDN or static hosting

Declare your script, and then use ODA object as shown below.

<script src="https://opencloud.azureedge.net/libs/clientjs/24.12/client.min.js"></script>

<script>
  const client = new ODA.Client();

  // place your code here (see example below)
</script>

Example

Download and render a drawing file from the Open Cloud Server:

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

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

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

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

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

// 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-2023 the Open Design Alliance. Code is distributed under a proprietary license, see LICENSE for more information.

FAQs

Package last updated on 09 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts