bradley / Blotter

A JavaScript API for drawing unconventional text effects on the web.
https://blotter.js.org
Other
3.04k stars 209 forks source link

Liquid distortion material no longer functioning #67

Open veeta-orinko opened 9 months ago

veeta-orinko commented 9 months ago

Hi - I've just noticed that all liquid distortion effects (including codepen, etc) have stopped working with the error code:

blotter.min.js:30 Uncaught DOMException: Failed to construct 'ImageData': The input data length is not a multiple of 4. at a.Renderer.setSize (https://cdnjs.cloudflare.com/ajax/libs/Blotter/0.1.0/blotter.min.js:30:402731)

was just prepping to launch a site using this amazing effect! 
webdingens commented 2 months ago

The setSize function is not prepped to handle widths/heights with subpixel accuracy. My scaled display is breaking the entire demo section of the page, Chrome and FF current, Win11. I added a Math.round(a) around the assignment to width and height, and it started working again.