@scojin: Here's a monkey patch you can use until I fix the bug:
require('prim').blit =
function blit(surface, x, y, image, mask)
{
mask = mask || Color.White;
var x1 = x;
var y1 = y;
var x2 = x1 + image.width;
var y2 = y1 + image.height;
var v1 = surface === screen ? 1 : 0;
var u2 = surface === screen ? 1 : image.width;
var v2 = surface === screen ? 0 : image.height;
var shape = new Shape([
{ x: x1, y: y1, u: 0, v: v1, color: mask },
{ x: x2, y: y1, u: u2, v: v1, color: mask },
{ x: x1, y: y2, u: 0, v: v2, color: mask },
{ x: x2, y: y2, u: u2, v: v2, color: mask },
], image, ShapeType.TriStrip);
shape.draw(surface);
}
The above patch won't work after the bug is fixed, so be sure to put it in a place you won't forget it exists. Otherwise down the road you might wonder why your game suddenly broke after an update