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

Function generateTextures

demo/js/main.js:4092–4104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4090 var textureBlurCtx = textureBlur.getContext('2d');
4091
4092 function generateTextures() {
4093 var sun = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0];
4094
4095 textureCtx.globalAlpha = 1;
4096 textureCtx.drawImage(images.textureRain.img, 0, 0, 192 / 2, 128 / 2);
4097 textureCtx.globalAlpha = sun;
4098 textureCtx.drawImage(images.textureSun.img, 0, 0, 192 / 2, 128 / 2);
4099
4100 textureBlurCtx.globalAlpha = 1;
4101 textureBlurCtx.drawImage(images.textureRainBlur.img, 0, 0);
4102 textureBlurCtx.globalAlpha = sun;
4103 textureBlurCtx.drawImage(images.textureSunBlur.img, 0, 0);
4104 }
4105 generateTextures();
4106
4107 var liquid = new _webglLiquid2["default"](canvas, r.canvas, images.shine.img, texture, textureBlur);

Callers 1

main.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected