No description
Find a file
2026-06-25 10:01:49 +02:00
.github/workflows Initial commit 2026-06-25 09:11:23 +02:00
dist/library with dist 2026-06-25 09:19:26 +02:00
scripts Initial commit 2026-06-25 09:11:23 +02:00
src-tauri Initial commit 2026-06-25 09:11:23 +02:00
tests Initial commit 2026-06-25 09:11:23 +02:00
viewer Initial commit 2026-06-25 09:11:23 +02:00
.gitattributes Initial commit 2026-06-25 09:11:23 +02:00
.gitignore add zip build to ci 2026-06-25 10:01:49 +02:00
.gitlab-ci.yml add zip build to ci 2026-06-25 10:01:49 +02:00
embed.html Initial commit 2026-06-25 09:11:23 +02:00
index.html Initial commit 2026-06-25 09:11:23 +02:00
jsconfig.json Initial commit 2026-06-25 09:11:23 +02:00
package-lock.json Initial commit 2026-06-25 09:11:23 +02:00
package.json Initial commit 2026-06-25 09:11:23 +02:00
playwright.config.js Initial commit 2026-06-25 09:11:23 +02:00
README.md add zip build to ci 2026-06-25 10:01:49 +02:00
rollup.config.js Initial commit 2026-06-25 09:11:23 +02:00
viewer-settings-example.json Initial commit 2026-06-25 09:11:23 +02:00

DFG 3D Viewer — JavaScript Library

Three.js-based 3D viewer. Ships as a minified bundle for web/libraries/dfg-3dviewer/ or standalone HTML embeds.

Drupal integration is provided by the separate dfg_3dviewer module.

Build

npm install
npm run build:library

Output in dist/library/:

  • dfg_3dviewer.min.js
  • assets/ — CSS, draco, IFC WASM, fonts

For local packaging (optional):

npm run pack:library   # creates dfg-3dviewer-library.zip (gitignored)

Releases

Tagged pushes build dfg-3dviewer-library.zip in CI and attach it to a GitLab Release.

git tag v1.0.3
git push origin v1.0.3

Download the zip from Releases and extract to web/libraries/dfg-3dviewer/ on Drupal.

Local development

cp viewer/viewer-settings-example.json viewer-settings.json
npm run dev:test
# http://localhost:1234

Install on Drupal

  1. Download dfg-3dviewer-library.zip from Releases and extract to web/libraries/dfg-3dviewer/
  2. Enable the dfg_3dviewer Drupal module and configure at /admin/config/dfg_3dviewer

Standalone embed

<div id="DFG_3DViewer" 3d="./examples/box.stl"></div>
<script type="module" src="./dfg_3dviewer.min.js"></script>

Or pass config in code: await Viewer.MainInit({ ... }).

Repository layout

  • viewer/ — source
  • rollup.config.js — production builds
  • tests/ — Playwright E2E