Aframe: Add "request error" to materialtextureloaded, or error callback for texture loading

Created on 31 Dec 2018  路  1Comment  路  Source: aframevr/aframe

Description:
Right now if texture was not loaded with, for example, 404, callback is still fired, and there is no way to determine if texture was loaded or not

here texture loading error is handled
https://github.com/aframevr/aframe/blob/4a44a804bbf7347e41fdc88daa6fa1d68756029d/src/systems/material.js#L312

and herematerialtextureloaded event is fired
https://github.com/aframevr/aframe/blob/4a44a804bbf7347e41fdc88daa6fa1d68756029d/src/utils/material.js#L119

  • A-Frame Version: 0.8.2

Most helpful comment

I think there might be several ways to make it appropriate:

1) (in my opinion) most efficient way: add error callback
2) don't fire loaded callback, if texture, in fact, was not loaded

>All comments

I think there might be several ways to make it appropriate:

1) (in my opinion) most efficient way: add error callback
2) don't fire loaded callback, if texture, in fact, was not loaded

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FireDragonGameStudio picture FireDragonGameStudio  路  5Comments

MrBokeh picture MrBokeh  路  5Comments

rich311 picture rich311  路  3Comments

AdrienPoupa picture AdrienPoupa  路  6Comments

huhsame picture huhsame  路  3Comments