Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support XKT V8 #655

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

Support XKT V8 #655

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

Comments

@xeolabs
Copy link
Member

xeolabs commented May 14, 2021

XKT V8

See: xeokit/xeokit-xkt-utils#14

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 added the enhancement New feature or request label May 14, 2021
@xeolabs xeolabs self-assigned this May 14, 2021
@xeolabs xeolabs added this to the 1.9.0 milestone May 14, 2021
@xeolabs xeolabs closed this as completed May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant