Import models as xeokit's native binary XKT format
The xeokit SDK allows us to import 3D models from XKT, which is xeokit's
native runtime asset delivery format for model representations and semantics.
The XKT format compresses large double-precision model geometry to
a compact payload that loads quickly over the Web into a xeokit viewer running in the browser.
To import a XKT model into xeokit, use the loadXKT function, which will load the file into
a SceneModel.
In the example below, we will create a Viewer with
a WebGLRenderer and a Scene, which holds model geometry and materials.
On our Viewer, we will create a single View to render it to a canvas element on the page. We will
also attach a CameraControl to our View, allowing us to control its camera with mouse and touch input.
Within the Scene, we will create a SceneModel to hold a model. We will then use
loadXKT to load
any XKT file into our SceneModel.
The SDKError class will be used to handle any errors that may occur during this process.
xeokit XKT Importer and Exporter
Import models as xeokit's native binary XKT format
The xeokit SDK allows us to import 3D models from XKT, which is xeokit's native runtime asset delivery format for model representations and semantics.
The XKT format compresses large double-precision model geometry to a compact payload that loads quickly over the Web into a xeokit viewer running in the browser.
To import a XKT model into xeokit, use the loadXKT function, which will load the file into a SceneModel.
Use the loadMetaModel function to load legacy JSON metadata into a DataModel.
Installation
Usage
In the example below, we will create a Viewer with a WebGLRenderer and a Scene, which holds model geometry and materials.
On our Viewer, we will create a single View to render it to a canvas element on the page. We will also attach a CameraControl to our View, allowing us to control its camera with mouse and touch input.
Within the Scene, we will create a SceneModel to hold a model. We will then use loadXKT to load any XKT file into our SceneModel.
The SDKError class will be used to handle any errors that may occur during this process.