The xeokit SDK allows us to import 3D models from DTX, which is xeokit's
native runtime asset delivery format for model representations and semantics.
The DTX format compresses large double-precision model representations and semantic data to a compact payload that
loads quickly over the Web into a xeokit viewer running in the browser.
To import a DTX model into xeokit, use the loadDTX function, which will load the file into
a SceneModel and a DataModel.
xeokit DTX Importer and Exporter
Import and export models as xeokit's native binary DTX format
The xeokit SDK allows us to import 3D models from DTX, which is xeokit's native runtime asset delivery format for model representations and semantics.
The DTX format compresses large double-precision model representations and semantic data to a compact payload that loads quickly over the Web into a xeokit viewer running in the browser.
To import a DTX model into xeokit, use the loadDTX function, which will load the file into a SceneModel and a DataModel.
To export a DTX model from xeokit, use the saveDTX function, which will save a SceneModel and a DataModel to DTX file data.
Installation
Usage
In the example below, we'll use loadDTX to import a DTX file into a DataModel and a SceneModel. The @xeokit/core!SDKError class is used to handle errors that may occur during the process:
Using @xeokit/dtx!saveDTX to export the DataModel and SceneModel to DTX file data in an ArrayBuffer: