()
| 4110 | loadTextures(); |
| 4111 | |
| 4112 | function init() { |
| 4113 | canvas = document.querySelector('#container'); |
| 4114 | |
| 4115 | var dpi = window.devicePixelRatio; |
| 4116 | canvas.width = window.innerWidth; |
| 4117 | canvas.height = window.innerHeight; |
| 4118 | canvas.style.width = window.innerWidth + "px"; |
| 4119 | canvas.style.height = window.innerHeight + "px"; |
| 4120 | |
| 4121 | raindrops = new _raindrops2["default"](canvas.width, canvas.height, dpi, dropAlpha, dropColor); |
| 4122 | raindrops.minR = 30; |
| 4123 | raindrops.maxR = 60; |
| 4124 | raindrops.collisionRadiusIncrease = 0.005; |
| 4125 | raindrops.drizzle = 35; |
| 4126 | raindrops.drizzleSize = [3, 7.5]; |
| 4127 | raindrops.drizzleCleaningRadiusMultiplier = 0.30; |
| 4128 | |
| 4129 | textureFg = (0, _createCanvas2["default"])(textureFgSize.width, textureFgSize.height); |
| 4130 | textureFgCtx = textureFg.getContext('2d'); |
| 4131 | textureBg = (0, _createCanvas2["default"])(textureBgSize.width, textureBgSize.height); |
| 4132 | textureBgCtx = textureBg.getContext('2d'); |
| 4133 | |
| 4134 | generateTextures(); |
| 4135 | |
| 4136 | renderer = new _rainRenderer2["default"](canvas, raindrops.canvas, textureFg, textureBg, null, { |
| 4137 | brightness: 1.1, |
| 4138 | alphaMultiply: 6, |
| 4139 | alphaSubtract: 3 |
| 4140 | }); |
| 4141 | |
| 4142 | setupEvents(); |
| 4143 | } |
| 4144 | |
| 4145 | function setupEvents() { |
| 4146 | updateTextures(); |
no test coverage detected