No description
Find a file
2026-06-25 10:36:42 +02:00
.github/workflows no ci for package building 2026-06-25 10:28:45 +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 fix the asset path resolving 2026-06-25 10:28:16 +02:00
.gitattributes rm dist, cause we have no current library to download 2026-06-25 10:05:33 +02:00
.gitignore add library.zip again 2026-06-25 10:36:42 +02:00
dfg-3dviewer-library.zip add library.zip again 2026-06-25 10:36:42 +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 no ci for package building 2026-06-25 10:28:45 +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 and package

npm install
npm run build:library
npm run pack:library

Output:

  • dist/library/dfg_3dviewer.min.js and assets/ (CSS, draco, IFC WASM, fonts)
  • dfg-3dviewer-library.zip — extract to web/libraries/dfg-3dviewer/ on Drupal (gitignored)

Local development

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

Install on Drupal

  1. Build and pack locally (see above), then extract dfg-3dviewer-library.zip 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
  • dist/ — build output (gitignored; run npm run build:library)
  • rollup.config.js — production builds
  • tests/ — Playwright E2E