【 在 baddif (Fire of my loins) 的大作中提到: 】
: flash不支持透明吧?
: 是不是要做成像以前很火的那种flash小游戏的方式?
: canvas这个,我看到的动画方法都是把原来的用白矩形覆盖再重画一张图上去的形式。这种方法效率如何呢?图片数量多的话,能达到1秒24帧的程度吗?
no need to fill white first.
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/putImageData
always draw in an ImageData object, and put to canvas only when finished.
this is like "double buffer", and is possible to be v-synced by the browser.
: ...................
--
FROM 180.173.161.*