Gathering detailed insights and metrics for @vertexvis/viewer
Gathering detailed insights and metrics for @vertexvis/viewer
Gathering detailed insights and metrics for @vertexvis/viewer
Gathering detailed insights and metrics for @vertexvis/viewer
npm install @vertexvis/viewer
Typescript
Module System
Node Version
NPM Version
TypeScript (96.17%)
CSS (2.98%)
Shell (0.46%)
JavaScript (0.29%)
HTML (0.1%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
12 Stars
652 Commits
3 Forks
4 Watchers
20 Branches
26 Contributors
Updated on Jul 09, 2025
Latest Version
0.23.5
Package Id
@vertexvis/viewer@0.23.5
Unpacked Size
80.33 MB
Size
8.07 MB
File Count
1,626
NPM Version
lerna/4.0.0/node@v16.15.1+x64 (linux)
Node Version
16.15.1
Published on
Jun 03, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
26
23
This project contains Vertex's 3D Viewer SDK. Vertex is a cloud platform for rendering large 3D models. See Vertex's website for more information.
Our 3D viewer is distributed as a set of standards-based web components that can run in any browser supporting the Custom Elements v1 specification. For browsers that do not support the Custom Elements v1 spec, a polyfill will automatically be used.
The easiest way to get started is by including a <script>
tag in your HTML
file that references our published JS bundles from a CDN.
1<html> 2 <head> 3 <link 4 rel="stylesheet" 5 href="https://cdn.jsdelivr.net/npm/@vertexvis/viewer@0.23.5/dist/viewer/viewer.css" 6 /> 7 <script 8 type="module" 9 src="https://cdn.jsdelivr.net/npm/@vertexvis/viewer@0.23.5/dist/viewer/viewer.esm.js" 10 ></script> 11 </head> 12 13 <body> 14 <vertex-viewer id="viewer" src="urn:vertex:stream-key:123" client-id="123"></vertex-viewer> 15 </body> 16</html>
This package also provides a set of utilities for use with its API. These utilities can be imported from a CDN as shown below:
1<!-- CDN --> 2<html> 3 <head> 4 </head> 5 <body> 6 <script type="module"> 7 import { ColorMaterial } from 'https://cdn.jsdelivr.net/npm/@vertexvis/viewer@0.23.5/dist/esm/index.mjs'; 8 9 function main() { 10 const color = ColorMaterial.fromHex('#ff0000'); 11 } 12 </script> 13 </body> 14</html>
If you want to interact with a web component via JavaScript, you should ensure
the browser has registered the custom elements prior to calling the elements
methods. You can use
window.customElements.whenDefined
to check if the component has been loaded.
1async function main() { 2 const viewer = document.querySelector('#viewer'); 3 4 // Wait for the component to be registered. 5 await customElements.whenDefined('vertex-viewer'); 6 viewer.load("urn:vertex:stream-key:123") 7}
Our components support being installed as an NPM dependency and packaged through
a bundler such as Webpack or Rollup. First, add @vertexvis/viewer
as an NPM
dependency to your package.json
:
1{ 2 "dependencies": { 3 "@vertexvis/viewer": "^0.23.5" 4 } 5}
Next, import defineCustomElements
from the loader included as part of the
package. Using the loader will self lazy-load the components used in your
application.
Note: Certain bundler settings may have issues with using the self lazy-loading strategy. See Manually Registering Components for an alternative to register components.
1import { defineCustomElements } from '@vertexvis/viewer/loader'; 2 3async function main() { 4 await defineCustomElements(); 5 6 const viewer = document.querySelector("viewer"); 7 await viewer.load("urn:vertex:stream-key:123"); 8 console.log("Loaded!"); 9} 10 11main();
We recommended using self lazy-loading to load components, which helps keep bundle sizes to a minimum and only loads components as they're needed. However, some bundler configurations may have problems with this option.
You can manually register components by importing them and registering them with the browser.
1import { VertexViewer, VertexViewerDefaultToolbar } from '@vertexvis/viewer'; 2 3customElements.define('vertex-viewer', VertexViewer); 4customElements.define('vertex-viewer-default-toolbar', VertexViewerDefaultToolbar);
If a component depends on other components, you'll need to register each one
individually. As this can be tedious, we export a defineCustomElements()
method to register all components. Note: this will add all components to
your bundle.
1import { defineCustomElements } from '@vertexvis/viewer'; 2 3defineCustomElements();
Some of our components provide default values for properties that can be used
once the component is ready. Before interacting with these properties, the
componentOnReady
method must be awaited to ensure the property is defined.
1function main() { 2 await defineCustomElements(); 3 4 const sceneTree = document.querySelector("scene-tree"); 5 await sceneTree.componentOnReady(); 6 7 sceneTree.controller.stateChanged(state => { 8 console.log(`Scene Tree Row Count: ${state.totalRows}`); 9 }); 10}
If you plan on targeting IE11 or Edge <= 18, you'll also need to supply polyfills for the Web Component APIs (Custom Elements, Shadow DOM, CSS Variables, etc).
To include the polyfills, import applyPolyfills
from the loader.
1import { applyPolyfills, defineCustomElements } from '@vertexvis/viewer/loader'; 2 3function main() { 4 await applyPolyfills(); 5 await defineCustomElements(); 6 7 console.log("Loaded!"); 8}
Check out our examples directory and Examples page on our Dev Portal to get an idea of what you can do with Vertex's Viewer component.
Each component provided by the @vertexvis/viewer
package also exposes
its own component-level README with additional examples and property definitions.
See below for the list of components and links to their READMEs:
No vulnerabilities found.
Reason
19 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
all changesets reviewed
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More