engine icon indicating copy to clipboard operation
engine copied to clipboard

Issue with parsinng glb file when it has empty curveData.paths

Open aliakseikalosha opened this issue 2 years ago • 2 comments

Description

In our project we use glb models, and we have issue with parsing the files error is in glb-parser.js

if (curveData.paths[0].propertyPath[0] === 'localRotation' && curveData.interpolation !== INTERPOLATION_CUBIC) {
            quatArrays.push(curves[curves.length - 1].output);
        }

If curveData has empty array of paths if will gerenrate a TypeError: curveData.paths[0] is undefined and stop parsing.

aliakseikalosha avatar Sep 02 '22 09:09 aliakseikalosha

Hi ... interesting, this should be easy to fix. Would you be able to share one of the glb files triggering this error? Thanks @aliakseikalosha .

mvaligursky avatar Sep 02 '22 09:09 mvaligursky

hi guys - any chance of a repro here? @aliakseikalosha

mvaligursky avatar Sep 18 '22 20:09 mvaligursky

The error was in work project so I can't share it. The new version of the model haven't been triggering same error. I was trying to reproduce this error with other my own models but have no luck with it.

Anyway as I mentioned before it does not seems as a good idea to expect that all arrays have at least one element.

Sorry for late reply @mvaligursky

aliakseikalosha avatar Sep 22 '22 00:09 aliakseikalosha