phaser/v3/src/actions/PlaceOnRectangle.js

18 lines
354 B
JavaScript

var PerimeterPoint = require('../geom/rectangle/PerimeterPoint');
var PlaceOnRectangle = function (items, rect)
{
var angle = 0;
var step = 360 / items.length;
for (var i = 0; i < items.length; i++)
{
PerimeterPoint(rect, angle, items[i]);
angle += step;
}
return items;
};
module.exports = PlaceOnRectangle;