Getting Started¶
Info
On 2024/12/18 we updated our service API and changed the domains where DVM gets its resources. Please make sure your services have whitelisted these domains. You can check them on the DVM requirements section.
DVM (Digital Venue Manager) is a JavaScript library that manages and loads a series of modules that bring different functionalities to a venue, such as loading or interacting with Maps or 3D Views.
DVM is designed to load only the modules you need, using a unique library. In this way, the client will not need to load different libraries for each functionality, but a unique and unified library that contains only what is necessary.
Permissions¶
In order to have access to the resources of a Venue, it is necessary to authorize the domains from where the access will be requested.
To obtain an authorization, please send an email to support@3ddigitalvenue.com with the domains to be authorized.
Warning
Make sure you meet the referrer requirements.
Requirements¶
Referrer policies¶
In order to allow our API to check the domain, your site must not use noreferrer
or same-origin
referrer policies.
Content Security Policies and Firewalls¶
If your site uses Content Security Policies, or you have a firewall that needs to whitelist external services you must allow the following domains:
Also, there are data:
, blob:
requirements, along with unsafe-inline
styles. You have an example below with the details.
CSP Meta tag example¶
Installation¶
You need to install the npm package @3ddv/dvm
:
For more information, you have the package README available here.
Manual script alternative¶
Alternatively you can include the script manually, although you won't have available the Typescript definitions.
This library is available in two main distributions:
- Stable: It contains the most stable changes. It is updated less often than the Latest distribution, but its updates are tested to be solid. This is the recommended distribution for production environments. To use this distribution, please include this script in your code:
- Latest: It contains the last production changes. It is updated more often with new features. This distribution should not be used in production environments. To use this distribution, please include this script in your code:
Warning
These distributions are maintained by 3D Digital Venue.
3D Digital Venue cannot guarantee the correct behavior of the library if it is loaded from a different source than the ones specified in this section.
Instantiating a Module¶
With DVM
we can load modules asynchronously using the method loadModule
. This method will return a
Promise that will resolve returning the initialized instance of the module.
The list of available modules can be found here.
Info
It is recommended to be familiar with the use of Promise
for the correct
use of this library and its modules.
Using @3ddv/dvm¶
you can import the function loadModule
from @3ddv/dvm
:
Using direct script¶
Once the library is loaded, yoy can access the function loadModule
through DVM
global scope namespace:
Compilation version¶
DVM has multiple compilations:
- ES5 with polyfills: the default build, more compatible but bigger and slower.
- ES2015+ without polyfills: weight less, better performance, less compatibility.
DVM will check automatically if the browser is compatible with ES2015+ build and download it if it is.
Plugins¶
Some modules have plugins that enhance its features. Some of these plugins will be automatically loaded by the module, while others have to be loaded manually. The details will be specified in the own module section.