Skip to content

FBXLoader fails to load .fbx file, cannot read property 'a' of undefined #31247

@trusktr

Description

@trusktr

Description

Here's a file that Autodesk FBX Review can load successfully:

https://rawcdn.githack.com/trusktr/assets/dfc15ee3b65b57b7d5d696f6d2d3ab60a2fce536/models/chloe.fbx

Reproduction steps

Open the codepen and see this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'a')
    at GeometryParser.parseVertexColors (FBXLoader.js:2382:35)
    at GeometryParser.parseGeoNode (FBXLoader.js:1788:25)
    at GeometryParser.genGeometry (FBXLoader.js:1685:24)
    at GeometryParser.parseMeshGeometry (FBXLoader.js:1675:15)
    at GeometryParser.parseGeometry (FBXLoader.js:1616:17)
    at GeometryParser.parse (FBXLoader.js:1590:22)
    at FBXTreeParser.parse (FBXLoader.js:199:44)
    at FBXLoader.parse (FBXLoader.js:175:59)
    at Object.onLoad (FBXLoader.js:116:19)
    at three.core.js:43848:38

Code

import {FBXLoader} from 'three/examples/jsm/loaders/FBXLoader.js'

const fbxUrl = 'https://rawcdn.githack.com/trusktr/assets/dfc15ee3b65b57b7d5d696f6d2d3ab60a2fce536/models/chloe.fbx'
const model = await new FBXLoader().loadAsync(fbxUrl)
console.log(model)

Live example

https://codepen.io/trusktr/pen/bNdoRjV?editors=0010

Screenshots

No response

Version

r176

Device

No response

Browser

No response

OS

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions