asdf-games/lib/Lightsource.js

12 lines
327 B
JavaScript
Raw Normal View History

2020-03-24 20:29:33 +01:00
class Lightsource {
2020-03-26 20:10:53 +01:00
constructor(x, y, mapX, mapY, mapW, mapH, style = { start: "rgba(0, 0, 0, 0)", stop: "rgba(0, 0, 0, 0.5)", radius: 100 }) {
this.pos = { mapX, mapY };
this.radPos = { x, y };
this.mapW = mapW;
this.mapH = mapH;
this.radius = style.radius;
2020-03-24 20:29:33 +01:00
this.style = style;
}
}
2020-03-26 20:10:53 +01:00
2020-03-24 20:29:33 +01:00
module.exports = Lightsource;