Skip to content

Conversation

@Ely-S
Copy link
Contributor

@Ely-S Ely-S commented Jul 15, 2019

Description:
Fixes loading of binary glTF files by determining the file type using the glTF header. #4219

Changes proposed:

  • When loading resources using a-asset-item, aframe determines the response type (text or arraybuffer) by checking to see if the requested resource has a .glb/.gltf file extension. This solution failed when loading resources with query parameters at the end (e.g /file.glb?version=1). This fix checks for the presence of the glTF magic number in the response body to determine if it should be treated as binary glTF data or text.

@ngokevin ngokevin merged commit c2dc693 into aframevr:master Jul 27, 2019
@dmarcos
Copy link
Member

dmarcos commented Jul 30, 2019

This breaks loading of the glTF file loading in examples: /showcase/shopping/ and /examples/showcase/anime-UI/

On console:

components:gltf-model:warn JSON.parse: unexpected character at line 1 column 1 of the JSON data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants