WebGL Meetup, 18 November, 2020
Web Programming Toolkit
a
for
Graphics
&
BIM
Engineering
1. What is BIM?
2. WebGL BIM Challenges
3. What is xeokit?
const viewer = new Viewer({
canvasId: "myCanvas"
});
viewer.camera.eye = [0,0,10];
viewer.camera.look = [0,0,0];
viewer.camera.up = [-0, 1, 0];
const xktLoader =
new XKTLoaderPlugin(viewer);
const model = xktLoader.load({
src: "myModel.xkt",
metaModelSrc: "myModel.json"
});
5. Loading Big Models Quickly
6. Converting IFC Models for xeokit
Metadata
Geometry
7. Loading IFC Models into xeokit
import {Viewer} from "../src/viewer/Viewer.js";
import {XKTLoaderPlugin} from
"../src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js";
const viewer = new Viewer({
canvasId: "myCanvas"
});
viewer.camera.eye = [1842022, 10, -5173301];
viewer.camera.look = [1842022, 10, -5173401];
viewer.camera.up = [-0.0, 1.0, 0.0];
const xktLoader = new XKTLoaderPlugin(viewer);
const model = xktLoader.load({
metaModelSrc: "metadata.json",
src: "geometry.xkt"
});
Minimal example
8. Minimizing Memory Footprint
A large plumbing model at BIMData.io
9. Drawing Many Objects Interactively
1. ANGLE_instanced_arrays
xeokit uses two rendering techniques:
2. Batched Geometry Arrays
10. Accurate Rendering - Rounding Jitter on WebGL
Need to emulate double-precision rendering to eliminate rounding jitter
Model centered at (1842022, 10, -5173301), provided by BIMData.io
11. Accurate Rendering - Eliminating Rounding Jitter
Read about RTC coordinates in virtualglobebook.com
12. Navigating Precisely
Ray-cast every n frames to find distance to nearest object, scale dolly and zoom rates accordingly
13. xeokit in the Wild : OpenProject GmbH
Thanks!