MCPcopy Create free account
hub / github.com/codrops/RainEffect / loadTextures

Function loadTextures

src/index.js:41–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39let blend={v:0};
40
41function loadTextures(){
42 loadImages([
43 {name:"dropAlpha",src:"img/drop-alpha.png"},
44 {name:"dropColor",src:"img/drop-color.png"},
45
46 {name:"textureRainFg",src:"img/weather/texture-rain-fg.png"},
47 {name:"textureRainBg",src:"img/weather/texture-rain-bg.png"},
48
49 {name:"textureStormLightningFg",src:"img/weather/texture-storm-lightning-fg.png"},
50 {name:"textureStormLightningBg",src:"img/weather/texture-storm-lightning-bg.png"},
51
52 {name:"textureFalloutFg",src:"img/weather/texture-fallout-fg.png"},
53 {name:"textureFalloutBg",src:"img/weather/texture-fallout-bg.png"},
54
55 {name:"textureSunFg",src:"img/weather/texture-sun-fg.png"},
56 {name:"textureSunBg",src:"img/weather/texture-sun-bg.png"},
57
58 {name:"textureDrizzleFg",src:"img/weather/texture-drizzle-fg.png"},
59 {name:"textureDrizzleBg",src:"img/weather/texture-drizzle-bg.png"},
60 ]).then((images)=>{
61 textureRainFg = images.textureRainFg.img;
62 textureRainBg = images.textureRainBg.img;
63
64 textureFalloutFg = images.textureFalloutFg.img;
65 textureFalloutBg = images.textureFalloutBg.img;
66
67 textureStormLightningFg = images.textureStormLightningFg.img;
68 textureStormLightningBg = images.textureStormLightningBg.img;
69
70 textureSunFg = images.textureSunFg.img;
71 textureSunBg = images.textureSunBg.img;
72
73 textureDrizzleFg = images.textureDrizzleFg.img;
74 textureDrizzleBg = images.textureDrizzleBg.img;
75
76 dropColor = images.dropColor.img;
77 dropAlpha = images.dropAlpha.img;
78
79 init();
80 });
81}
82loadTextures();
83
84function init(){

Callers 1

index.jsFile · 0.70

Calls 2

loadImagesFunction · 0.70
initFunction · 0.70

Tested by

no test coverage detected