14 lines
406 B
JavaScript
14 lines
406 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.SquareDrawer = void 0;
|
|
const fixFactor = Math.sqrt(2);
|
|
class SquareDrawer {
|
|
draw(context, particle, radius) {
|
|
context.rect(-radius / fixFactor, -radius / fixFactor, (radius * 2) / fixFactor, (radius * 2) / fixFactor);
|
|
}
|
|
getSidesCount() {
|
|
return 4;
|
|
}
|
|
}
|
|
exports.SquareDrawer = SquareDrawer;
|