drawcall / Proton

Javascript particle animation library
https://drawcall.github.io/Proton/
MIT License
2.41k stars 275 forks source link

getImageData error after context.drawImage #37

Closed tabsun closed 8 years ago

tabsun commented 8 years ago

In proton we have following code: getImageData:function(a,b,c){ a.drawImage(b,c.x,c.y); var d=a.getImageData(c.x,c.y,c.width,c.height); a.clearRect(c.x,c.y,c.width,c.height); return d }

And I get error @ getImageData, if remove the line of drawImage everything is OK. As I'm not familiar with html and js, could any one give me some advice? MUCH THANKS !

drawcall commented 8 years ago

Please describe your usage scenario, and error message.

tabsun commented 8 years ago

Thanks for response. I have found the reason and anyone who encounter this question may look here: http://www.cnblogs.com/jdksummer/articles/2565998.html