xeokit-sdk
xeokit-sdk copied to clipboard
Detail Culling
Detail Culling
A new DetailCullPlugin
will accelerate camera interaction by culling less visually-interesting objects while the camera is moving.
For each Entity
that represents an object in your Viewer
, DetailCullPlugin
will automatically mark it culled whenever
- the
Entity
is a certain IFC type, or - the
Entity
is above a certain complexity and below a certain size.
When culled, an Entity
is not processed by xeokit's renderer, leading to a significant speedup.
Use DetailCullPlugin
by simply adding it to your Viewer
.
const viewer = new Viewer({
canvasId: "myCanvas",
transparent: true
});
const detailCullPlugin = new DetailCullPlugin(viewer, {
// TODO
});
const xktLoader = new XKTLoaderPlugin(viewer);
const model = xktLoader.load({
id: "myModel",
src: "./models/xkt/OTCConferenceCenter/OTCConferenceCenter.xkt",
metaModelSrc: "./metaModels/OTCConferenceCenter/metaModel.json"
});