You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example below, we'll disable xeokit's double-precision support, which gives a performance and memory boost
on low-power devices, but means that we can no longer render double-precision models without jittering. This is OK if we know that we're not going to view models that are geographically vast, or offset far from the World coordinate origin.
We'll also switch from window.requestAnimationFrame to window.setInterval for xeokit's animations, which can also give a
performance boost in some cases.
import{Configs,Viewer,XKTLoaderPlugin}from"../dist/xeokit-sdk.min.es.js";// Access xeoit-sdk global configs.// We typically set configs only before we create any Viewers.constconfigs=newConfigs();// Disable 64-bit precision for extra speed.// Only set this config once, before you create any Viewers.configs.doublePrecisionEnabled=false;// Disable window.requestAnimationFrame (RAF) and use// window.setInterval for Viewer render loops.// This config can be switched dynamically, if needed.configs.rafEnabled=false;// This Viewer will now have 64-precision disabled and // will use window.setInterval for its render loop.constviewer=newViewer({canvasId: "myCanvas"});viewer.camera.eye=[-3.933,2.855,27.018];viewer.camera.look=[4.400,3.724,8.899];viewer.camera.up=[-0.018,0.999,0.039];constxktLoader=newXKTLoaderPlugin(viewer);constmodel=xktLoader.load({src: "../assets/models/xkt/v8/ifc/Duplex.ifc.xkt"});
The text was updated successfully, but these errors were encountered:
Add a new Configs class to manage global configurations for all Viewers.
Usage
In the example below, we'll disable xeokit's double-precision support, which gives a performance and memory boost
on low-power devices, but means that we can no longer render double-precision models without jittering. This is OK if we know that we're not going to view models that are geographically vast, or offset far from the World coordinate origin.
We'll also switch from window.requestAnimationFrame to window.setInterval for xeokit's animations, which can also give a
performance boost in some cases.
The text was updated successfully, but these errors were encountered: