mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 03:23:42 +00:00
21 lines
459 B
JavaScript
21 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;
|