News for hackers. Stuff that matters.
Re:Illuminated.js – 2D lights and shadows rendering engine f... by JackC on Friday May 11, 2012 @10:20AM (#3959284)
Huh. I've never worked with canvas, but is it possible that moving the middle canvas itself would be faster than clearing and redrawing it every frame? Like you have two canvases side by side in a div with overflow hidden, move both canvases each frame, and when one of them is totally off screen, move it to the other side and draw new terrain. Or are you hoping to avoid animating the canvases themselves?
Re:Illuminated.js – 2D lights and shadows rendering engine f... by ajuc on Friday May 11, 2012 @03:56PM (#3961035)
I'll need not 2, but 4 canvas elements, each at least [width/2+1, height/2+1]. I'll try this, and let you know. Thanks for ideas, even if it seems a little strange.
Re:Illuminated.js – 2D lights and shadows rendering engine f... by ajuc on Friday May 11, 2012 @06:09PM (#3961698)
Eh, wrong again. 9 canvases of size [width/2+1, height/2+1], or 4 of size [width, height].