EkoLabs / aframe-spritesheet-component

Animated spritesheet support for A-Frame
Other
34 stars 5 forks source link

When using a-asset-item on a-assets threejs fileLoader interprets resposeType as arrayBuffer #3

Closed balataca closed 4 years ago

balataca commented 5 years ago

If you want to preload a model on the a-assets tag, threejs fileLoader will interpret other assets as arrayBuffer, and when using this library it will output the error:

SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data

This happens because when the fileLoader loads the json, the responseType is configured as arrayBuffer and not as json.