mirror of
https://github.com/photonstorm/phaser
synced 2025-01-12 13:18:49 +00:00
20 lines
459 B
JavaScript
20 lines
459 B
JavaScript
var MathRotateAroundDistance = require('../math/RotateAroundDistance');
|
|
|
|
// point = any object with public x/y properties
|
|
// angle = radians
|
|
// distance = px
|
|
|
|
var RotateAroundDistance = function (items, point, angle, distance)
|
|
{
|
|
var x = point.x;
|
|
var y = point.y;
|
|
|
|
for (var i = 0; i < items.length; i++)
|
|
{
|
|
MathRotateAroundDistance(items[i], x, y, angle, distance);
|
|
}
|
|
|
|
return items;
|
|
};
|
|
|
|
module.exports = RotateAroundDistance;
|