|
|
|
@ -248,7 +248,9 @@ function getVerticalOffset(boxHeight: number, shape: ShapeType): number { |
|
|
|
|
|
|
|
|
|
function getHorizontalOffset(boxWidth: number, shape: ShapeType): number { |
|
|
|
|
const padding = shapesSizes[shape]["width"]; |
|
|
|
|
return Math.floor(Math.random() * (boxWidth - padding)); |
|
|
|
|
return shapesSizes[shape]["size"] == "big" |
|
|
|
|
? Math.floor(Math.random() * (boxWidth - padding / 2) - padding / 2) |
|
|
|
|
: Math.floor(Math.random() * (boxWidth - padding)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getRandomAngle(shape: ShapeType): number { |
|
|
|
|