canvas = {
const darRotacion = (coor) => {
return [-coor[0], -coor[1]];
};
let canvas = DOM.context2d(width, width).canvas;
let ctx = canvas.getContext("2d");
let rc = rough.canvas(canvas);
const projection = d3.geoOrthographic().scale(200).rotate(darRotacion(0, 0));
let mapPath = d3.geoPath().projection(projection);
let rot = 0;
let timer = d3.timer(() => {
rot += 1;
ctx.rect(0, 0, width, width);
ctx.fillStyle = "#fff";
ctx.fill();
mapPath = d3.geoPath().projection(projection.rotate(darRotacion([rot, 0])));
ctx.beginPath(), mapPath(mundo), (ctx.fillStyle = "#000"), ctx.fill();
});
invalidation.then(() => timer.stop());
return canvas;
}