File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ module.exports = registerElement('a-assets', {
4242 loaded . push ( new Promise ( function ( resolve , reject ) {
4343 // Set in cache because we won't be needing to call three.js loader if we have.
4444 // a loaded media element.
45- THREE . Cache . files [ imgEls [ i ] . getAttribute ( 'src' ) ] = imgEl ;
45+ THREE . Cache . add ( imgEls [ i ] . getAttribute ( 'src' ) , imgEl ) ;
4646 imgEl . onload = resolve ;
4747 imgEl . onerror = reject ;
4848 } ) ) ;
@@ -165,7 +165,7 @@ function mediaElementLoaded (el) {
165165 // Store video elements only. three.js loader is used for audio elements.
166166 // See assetParse too.
167167 if ( el . tagName === 'VIDEO' ) {
168- THREE . Cache . files [ el . getAttribute ( 'src' ) ] = el ;
168+ THREE . Cache . add ( el . getAttribute ( 'src' ) , el ) ;
169169 }
170170 resolve ( ) ;
171171 }
You can’t perform that action at this time.
0 commit comments