Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

XKT Format V8 #14

Closed
xeolabs opened this issue May 14, 2021 · 0 comments
Closed

XKT Format V8 #14

xeolabs opened this issue May 14, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@xeolabs
Copy link
Member

xeolabs commented May 14, 2021

XKT V8

XKT V8 combines IFC metadata into the XKT file, making the use of a separate metadata JSON file redundant.

Advantages are:

  • One HTTP request for each model, instead of two.
  • Smaller payload, since XKT is compressed binary.
  • One file per model, instead of two, which simplifies data management.

For backward compatibility, XKTLoaderPlugin will continue to accept a separate metadata JSON file, if one is provided. In such a case, the JSON metadata would override the metadata embedded in the XKT.

Along with this update, we'll also update all docs, examples and tests to work with XKT V8. This means changing all code examples so that they load the single XKT file, without the JSON metadata file, since this is now the standard for xeokit.

IFC -> XKT Conversion

The open source conversion pipeline changes slightly, where we re-route the metadata JSON from the xeokit-metadata tool into the gltf2xkt tool, to combine the metadata into its XKT output.

./IfcConvert --use-element-guids HolterTower.ifc HolterTower.dae

./COLLADA2GLTF/build/COLLADA2GLTF-bin -i HolterTower.dae -o HolterTower.gltf 

xeokit-metadata HolterTower.ifc HolterTower.json

gltf2xkt.js -s HolterTower.gltf -m HolterTower.json -o HolterTower.xkt

oss_xkt_conversion

Loading XKT

Now, loading the XKT no longer requires loading an accompanying metadata JSON file:

import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";

const viewer = new Viewer({
     canvasId: "myCanvas"
});

const xktLoader = new XKTLoaderPlugin(viewer);

const modelNode = xktLoader.load({
     id: "myModel",
     src: "./HolterTower.xkt"
});
@xeolabs xeolabs self-assigned this May 14, 2021
@xeolabs xeolabs added the enhancement New feature or request label May 14, 2021
@xeolabs xeolabs pinned this issue May 14, 2021
@xeolabs xeolabs closed this as completed May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant