- js image preload for firefox
This commit is contained in:
parent
0e7b83733d
commit
fb3698b4bf
@ -18,11 +18,16 @@ let pageVisible = true;
|
|||||||
let debugMode = false;
|
let debugMode = false;
|
||||||
let timeoutHandle;
|
let timeoutHandle;
|
||||||
|
|
||||||
//preload images
|
//preload images to avoid firefox NS_BINDING_ABORTED error
|
||||||
new Image().src = 'characterSprites/Red/Down.png';
|
const characters = ["Green","Red","Orange","Blue"];
|
||||||
new Image().src = 'characterSprites/Red/Up.png';
|
characters.forEach((char) => {
|
||||||
new Image().src = 'characterSprites/Red/Left.png';
|
new Image().src = 'characterSprites/'+ char +'/Down.png';
|
||||||
new Image().src = 'characterSprites/Red/Right.png';
|
new Image().src = 'characterSprites/'+ char +'/Up.png';
|
||||||
|
new Image().src = 'characterSprites/'+ char +'/Left.png';
|
||||||
|
new Image().src = 'characterSprites/'+ char +'/Right.png';
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//emoji picker code
|
//emoji picker code
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user