mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 20:13:35 +00:00
18 lines
354 B
JavaScript
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;
|