AnalyticalGraphicsInc / gltf-vscode

This is an extension for Visual Studio Code to add support for editing glTF files.
Apache License 2.0
441 stars 61 forks source link

TypeError when converting .gltf to .glb #245

Closed chrisdjali-wrld3d closed 2 years ago

chrisdjali-wrld3d commented 2 years ago

I have a basic glTF containing just a texture:

{
    "asset": {
        "generator": "I wrote this by hand",
        "version": "2.0"
    },
    "textures": [
        {
            "name": "An unreferenced texture",
            "sampler": 0,
            "source": 0
        }
    ],
    "images": [
        {
            "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAATSURBVBhXY/jPwADEjEDi/38GAB72BP3Pc1wfAAAAAElFTkSuQmCC"
        }
    ],
    "samplers": [
        {
            "magFilter": 9729,
            "minFilter":9987,
            "wrapS": 10497,
            "wrapT": 10497
        }
    ]
}

This is a valid glTF file, e.g. Kronos' validator says it's okay, and the spec says all top-level properties except asset are optional.

If I attempt to run the glTF: Export to GLB (Binary file) command with this open, I get a TypeError:

TypeError: Cannot read properties of undefined (reading 'length')

Unfortunately, I've not been able to get VS Code to give me a stack trace for this, so I don't know the specific mechanism of the failure.

najadojo commented 2 years ago

@emackey I've updated gltf-import-export to address this issue.

chrisdjali-wrld3d commented 1 year ago

It's a few days away from being a whole year since this was fixed, and there's still no release that actually contains the fix. Is this extension abandoned, or is another release going to happen at some point?

emackey commented 1 year ago

Thanks for the nudge @chrisdjali-wrld3d. A new version has been a long time coming.

🚀 2.4.0 is now published!