xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
714 stars 286 forks source link

[SUPPORT] XKT loading fails for given model #945

Closed intrida-dev closed 4 months ago

intrida-dev commented 1 year ago

When I try to load some XKT files using XKTLoaderPlugin, it gives an error on console. I debugged a little and found, it is failing at line highlighted in following SS. edgeIndicesBuf is null, so it can't call edgeIndicesBuf.bind(). image

I am getting following error: image

To reproduce the same error, I am sending you the XKT file. 9623c9ad-2b8d-43f1-ad8c-e8aafbc8d40d.zip

Please check and let me know, if something is being wrong here.

xeolabs commented 4 months ago

Looks like it's loading OK now in the latest release.

Screenshot from 2024-04-20 20-18-07

My test code:


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

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

    const xktLoader = new XKTLoaderPlugin(viewer);

    const sceneModel = xktLoader.load({
        id: "myModel",
        src: "../../assets/models/xkt/v10/model.xkt"

    });

    sceneModel.on("loaded", () => {
        viewer.cameraFlight.jumpTo(sceneModel);
    });
intrida-dev commented 4 months ago

Looks like it's loading OK now in the latest release.

Screenshot from 2024-04-20 20-18-07

My test code:

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

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

    const xktLoader = new XKTLoaderPlugin(viewer);

    const sceneModel = xktLoader.load({
        id: "myModel",
        src: "../../assets/models/xkt/v10/model.xkt"

    });

    sceneModel.on("loaded", () => {
        viewer.cameraFlight.jumpTo(sceneModel);
    });

We will check this in latest version of Xeokit. Thanks :-)