Constimport { Shape2D, Gradient } from '@datamoc/mw_games/two-d/render';
const sky = new Gradient({
type: 'linear',
start: { x: 0, y: 0 },
end: { x: 0, y: 1 },
colorStops: [
{ offset: 0, color: 0x1a1a3a },
{ offset: 1, color: 0x3a2a4a },
],
});
const backdrop = new Shape2D().rect(0, 0, 320, 180).fill(sky);
A gradient fill/stroke, passed to
Shape2D.fill/.strokethe same way a plain colour is.