@pattern-x/gemini-viewer-threejs

bim viewer

Usage no npm install needed!

<script type="module">
  import patternXGeminiViewerThreejs from 'https://cdn.skypack.dev/@pattern-x/gemini-viewer-threejs';
</script>

README

bim viewer

Project setup

npm install

Compiles and hot-reloads for development

npm start

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

three.js

  • three.js version: v0.131.0

Upgrade draco

  • Once threejs is upgraded, we'll also need to update draco source files.
    • draco is configed in Viewer3D.ts, const decoderPath = 'three/js/libs/draco/gltf/', which is a path that must be available from network. We'll need to:
    • Copy node_modules/three/examples/js/libs/draco folder to public/three/js/libs/draco
    • This is important because there can be error if the code doesn't match.

Upgrade web-ifc.wasm

wasm is required in order to load ifc file, we'll need to copy: node_modules/three/examples/jsm/loaders/ifc/web-ifc.wasm to /public/three/js/libs/ifc/


End