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
728 stars 287 forks source link

PerformanceModel broken for uncompressed geometry positions #370

Closed JWerbrouck closed 4 years ago

JWerbrouck commented 4 years ago

Hi! I am working on an academic project for management of distributed building data. The semantics are structured using semantic web ontologies, the geometry using glTF; the xeokit-sdk viewer would be a really nice addition for visualisation of these models. However, I noted that in my own snippets as well as in the example docs, the glTF models get rendered incorrectly (see attachment). I tested this with several models in different browsers (Firefox, Chrome, Edge) on both Windows and Linux (without Edge), and got the same result everywhere. So I wondered if this could be a recent bug? Thank you!

Screenshot from 2020-06-29 16-07-42

xeolabs commented 4 years ago

Hi, yes that is a recent bug, will be fixed in the next release!

Perhaps the performance:true parameter is a workaround for now:

const model = gltfLoader.load({
    id: "myModel",
    src: "./models/gltf/duplex/scene.gltf",
    metaModelSrc: "./metaModels/duplex/metaModel.json", // Creates a MetaObject instances in scene.metaScene.metaObjects
    edges: true,
    performance: true
});
JWerbrouck commented 4 years ago

Hi, thank you for the swift response! Unfortunately, adding the performance parameter did not solve the rendering issue. I will use the XKT files for now. Looking forward to the next release!

xeolabs commented 4 years ago

Now fixed in xeokit-sdk 1.3.53 on npm