Skip to content

Instantly share code, notes, and snippets.

View arcanis's full-sized avatar
:octocat:

Maël Nison arcanis

:octocat:
View GitHub Profile
var startEmulator = function (rom) {
var engine = Virtjs.create(Virtjs.engine.GameBoy, {
devices : {
screen : new Virtjs.screen.WebGL(),
input : new Virtjs.input.Keyboard({ map : map }),
timer : new Virtjs.timer.RAFrame(),
data : new Virtjs.data.LocalStorage()
},
barDemo.selectAll("rect").
data(data).
enter().
append("svg:rect").
attr("x", function(datum, index) { return x(index); }).
attr("y", function(datum) { return height - y(datum.books); }).
attr("height", function(datum) { return y(datum.books); }).
attr("width", barWidth).
attr("fill", "#2d578b");