npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@3ddv/dvm

v2.8.3

Published

This package is a helper to use [DVM](https://docs.3ddvapis.com/js/dvm/). Instead of just adding the script to your website, you can use this package to:

Readme

README

This package is a helper to use DVM. Instead of just adding the script to your website, you can use this package to:

  • Use ES6 import/export syntax.
  • Get Typescript definitions.

Using this package will still continue to download the core DVM from our CDN, adding it to your website.

If you use this package, you must not add manually the dvm.js script in your html.

Installation

npm install --save @3ddv/dvm

How to use it

This package exports the following functions:

  • loadModule: equivalent to DVM.loadModule.
  • allowFeatureDetection: true by default. false if you want to disable feature detection entirely. You have to call it before loading any module. Check more information here.
  • useModernBuild: false by default. true if you want to load directly ES2020+ modules without checking any feature detection. You have to call it before loading any module. Check more information here.
  • setDVMVersion: You can specify from which namespace you want to download DVM. By default, it will be downloaded from stable. It has to be called before the first loadModule call. You should leave it by default unless we specify something else. This would be the equivalent to include the specific script.
  • setDefaultModuleVersion: You can specify the default version branch for a specific module. By default, all modules uses stable branch.
  • setDefaultEnvironment: Switch the CDN environment from which DVM is downloaded. Defaults to "pro".
  • getBuiltinDVMVersion: Returns the builtin version of DVM.
  • getBuiltinModuleVersion: Returns the builtin version of a module.
  • getDefaultModuleVersion: Returns the currently configured default branch for a module.

loadModule also accepts the following per-call options that override the global defaults:

  • version — branch (e.g. "stable", "latest") or numeric version (e.g. "2.5.6") for this call.
  • feature_detection: false — disable feature detection just for this call.
  • modern: true — request the ES2020+ build of the module for this call.
  • polyfills — load the polyfills chunk. Defaults to true for ES5 builds and false for ES2020+ builds; set explicitly to override.
  • plugins — array of plugin names to preload with the module. Each module has its own plugins; see the module's documentation.
  • client_id — set only if 3D Digital Venue has provided one for you.
import { loadModule, setDVMVersion, setDefaultModuleVersion } from "@3ddv/dvm";

setDVMVersion("stable"); // stable is already set by default
setDefaultModuleVersion("map_viewer", "stable");

loadModule("map_viewer", { container: "container-id" })
    .then((viewer) => {
        return viewer.loadMap({ venue_id: "venue" });
    })
    .then(() => {
        console.log("map loaded");
    });

Feature detection and modern build

Starting with v2.8, @3ddv/dvm no longer performs any feature detection itself, so it will never try to eval or run inline code on your page. The DVM library it downloads from our CDN does perform feature detection by default, but that work is isolated in a separate file — if it's blocked by a browser extension or CSP, the rest of the loader still runs.

Feature detection can be turned off entirely. Call allowFeatureDetection(false) before any module instancing:

import { loadModule, allowFeatureDetection } from "@3ddv/dvm";

allowFeatureDetection(false);

loadModule("3d_viewer", { container: "container-id" });

It can also be disabled per call:

loadModule("3d_viewer", { container: "container-id", feature_detection: false });

When feature detection is disabled, the ES5 build is downloaded by default. You can force the ES2020+ build with useModernBuild(true) or the per-call modern: true flag:

import { loadModule, useModernBuild } from "@3ddv/dvm";

useModernBuild(true);

// or, per call:
loadModule("3d_viewer", { container: "container-id", modern: true });

Builtin versions

You can specify the specific version with which this package was published:

import { loadModule, setDVMVersion, setDefaultModuleVersion } from '@3ddv/dvm';

setDVMVersion('builtin');
setDefaultModuleVersion('map_viewer', 'builtin');
setDefaultModuleVersion('3d_viewer', 'builtin');

loadModule('map_viewer', { container: 'container-id' })
    .then((viewer) => {
      ...
    });

Specific versions

You can specify a specific numeric version of a module.

import { loadModule, setDVMVersion, setDefaultModuleVersion } from '@3ddv/dvm';

setDefaultModuleVersion('map_viewer', '2.5.6');

loadModule('map_viewer', { container: 'container-id' })
    .then((viewer) => {
      ...
    });