Skip to content

Instantly share code, notes, and snippets.

@jefBinomed
Created June 17, 2015 14:52
Show Gist options
  • Save jefBinomed/2df5ea08063138042cea to your computer and use it in GitHub Desktop.
Save jefBinomed/2df5ea08063138042cea to your computer and use it in GitHub Desktop.
Programmez-07/08_2015-PortalWebrtc-08
vardims = {};
this.canvas = undefined;
this.init = function(dim)
{
context = this.canvas.getContext('2d');
width = Math.round(this.canvas.width / scale);
height = Math.round(this.canvas.height / scale);
if (dim){
dims = dim;
}else{
dims = {width: width, height : height};
}
colorMap = Array(width * height);
for(var i = 0; i < colorMap.length; i++)
colorMap[i] = 0;
initPalette();
initBuffer();
update();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment