I'm slapping together a quick tech demo and am trying to follow along with the basic programmatic implementation of this util found in the xeokit-gltf-to-xkt Readme as part of the process to convert IFC to XKT. I'm running in to the following error when trying to use the parseGLTFIntoXKTModel parser.
TypeError: Cannot read property '0' of undefined at parseDefaultScene (C:\Users\hastings\Documents\Development\glowing-xenon\node_modules\@xeokit\xeokit-xkt-utils\dist\xeokit-xkt-utils.cjs.js:1:98098) at parseGLTFIntoXKTModel (C:\Users\hastings\Documents\Development\glowing-xenon\node_modules\@xeokit\xeokit-xkt-utils\dist\xeokit-xkt-utils.cjs.js:1:96060) at async convertIFCtoXKT (C:\Users\hastings\Documents\Development\glowing-xenon\src\main.js:51:5)
Below is a copy of the JS function that I am trying to use. I have confirmed that the model is getting converted properly up until the parsing function, and the gltf is being properly turned in to a Buffer Object. I omitted the callback for the parser in this snippet (my demo model has no external relations), but I have also tried including a callback and experienced no change.
(I've tried formatting it better, but GFM's parser is fighting it)
`/*Takes IFC filepath as a string, and converts that file to an XKTModel /
async function convertIFCtoXKT(filePath) {
const {
XKTModel,
parseGLTFIntoXKTModel,
writeXKTModelToArrayBuffer
} = require("@xeokit/xeokit-xkt-utils/dist/xeokit-xkt-utils.cjs.js");
I'm slapping together a quick tech demo and am trying to follow along with the basic programmatic implementation of this util found in the xeokit-gltf-to-xkt Readme as part of the process to convert IFC to XKT. I'm running in to the following error when trying to use the
parseGLTFIntoXKTModel
parser.TypeError: Cannot read property '0' of undefined at parseDefaultScene (C:\Users\hastings\Documents\Development\glowing-xenon\node_modules\@xeokit\xeokit-xkt-utils\dist\xeokit-xkt-utils.cjs.js:1:98098) at parseGLTFIntoXKTModel (C:\Users\hastings\Documents\Development\glowing-xenon\node_modules\@xeokit\xeokit-xkt-utils\dist\xeokit-xkt-utils.cjs.js:1:96060) at async convertIFCtoXKT (C:\Users\hastings\Documents\Development\glowing-xenon\src\main.js:51:5)
Below is a copy of the JS function that I am trying to use. I have confirmed that the model is getting converted properly up until the parsing function, and the gltf is being properly turned in to a Buffer Object. I omitted the callback for the parser in this snippet (my demo model has no external relations), but I have also tried including a callback and experienced no change.
(I've tried formatting it better, but GFM's parser is fighting it)
`/*Takes IFC filepath as a string, and converts that file to an XKTModel / async function convertIFCtoXKT(filePath) { const { XKTModel, parseGLTFIntoXKTModel, writeXKTModelToArrayBuffer } = require("@xeokit/xeokit-xkt-utils/dist/xeokit-xkt-utils.cjs.js");
};`