Skip to content

Commit

Permalink
support binary gltf with first buffer external
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Oct 6, 2022
1 parent 929caef commit ccd6768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decoder.go
Expand Up @@ -78,7 +78,7 @@ func (d *Decoder) Decode(doc *Document) error {
}

var externalBufferIndex = 0
if isBinary && len(doc.Buffers) > 0 && !doc.Buffers[0].IsEmbeddedResource() {
if isBinary && len(doc.Buffers) > 0 && doc.Buffers[0].URI == "" {
externalBufferIndex = 1
if err := d.decodeBinaryBuffer(doc.Buffers[0]); err != nil {
return err
Expand Down

0 comments on commit ccd6768

Please sign in to comment.