innerGlow = {
const canvas = DOM.canvas(width, height);
const ctx = canvas.getContext('2d');
geoPath.context(ctx);
ctx.fillStyle = waterColor;
ctx.fillRect(0, 0, width, height);
ctx.save();
ctx.fillStyle = 'white';
ctx.shadowColor = waterGlowColor;
ctx.shadowBlur = 30;
ctx.beginPath();
states.forEach((state) => { geoPath(state); });
ctx.fill();
ctx.restore();
states.forEach((state) => {
ctx.fillStyle = state.properties.fillColor;
ctx.beginPath();
geoPath(state);
ctx.fill();
});
states.forEach((state) => {
const stateCanvas = DOM.canvas(width, height);
const stateCtx = stateCanvas.getContext('2d');
stateCtx.save();
geoPath.context(stateCtx);
stateCtx.lineWidth = 10;
stateCtx.shadowColor = state.properties.strokeColor;
stateCtx.shadowBlur = 15;
stateCtx.setTransform(1, 0, 0, 1, -3000, -3000);
stateCtx.shadowOffsetX = 3000;
stateCtx.shadowOffsetY = 3000;
stateCtx.beginPath();
geoPath(state);
stateCtx.stroke();
stateCtx.restore();
stateCtx.globalCompositeOperation = 'destination-in';
stateCtx.beginPath();
geoPath(state);
stateCtx.fill();
ctx.drawImage(stateCanvas, 0, 0);
});
geoPath.context(ctx);
ctx.strokeStyle = '#ccc';
ctx.lineWidth = 1;
ctx.beginPath();
states.forEach((state) => { geoPath(state); });
ctx.stroke();
return canvas;
}