I post here because it looks like the best place to do it.
As some of you might know I'm taking care of the unofficial Ejecta exporter. I've been able to create a 100% working webGL canvas (including effects) but I have a giant issue that I don't have any idea how to fix.
I really hope someone or Ashley (even if I know your stance about DOMLess) can point me to the right direction.
Basically in webGL the canvas is not rendered with retina (please read here: github.com/phoboslab/Ejecta/issues/243) for this reason there is the need to do it manually like so:
canvas.width = window.innerWidth * window.devicePixelRatio;
canvas.height = window.innerHeight * window.devicePixelRatio;
canvas.style.width = window.innerWidth;
canvas.style.height = window.innerHeight;
The issue is with touches, window.innerWidth * window.devicePixelRatio effectively doubles the canvas, if you don't set canvas.style.width construct renders a giant canvas, so on screen you see just a quarter, this is expected, the issue is with touches, even setting the style c2 still reads touches from the giant canvas, resulting in an unusable app.
How can I hack this behaviour? Has anyone has any ideas?