npm install @cognite/reveal @cognite/sdk three@<version>
yarn add @cognite/reveal @cognite/sdk three@<version>
pnpm add @cognite/reveal @cognite/sdk three@<version>
Please find the correct version of ThreeJS in the release documentation on Github. We only guarantee support for the exact ThreeJS version specified there.
Installation for projects with Content-Security-Policy
To be able to use Reveal while having a CSP you have to allow the following:
These settings are nessesary to allow for execution of internal WebAssembly modules bundled with Reveal.
connect-src policy is for allowing the WebAssembly module to be added as data url.
unsafe-eval policy is needed to evaluate and execute the WebAssembly module at runtime.
This may be removed in the future once the wasm-unsafe-eval policy gets implemented into all major browsers.
Evaluate security risks before adding any of these options to your CSP.