mirror of
https://github.com/photonstorm/phaser
synced 2024-12-26 13:03:36 +00:00
14 lines
308 B
JavaScript
14 lines
308 B
JavaScript
|
var Decompose = function (rect, out)
|
||
|
{
|
||
|
if (out === undefined) { out = []; }
|
||
|
|
||
|
out.push({ x: rect.x, y: rect.y });
|
||
|
out.push({ x: rect.right, y: rect.y });
|
||
|
out.push({ x: rect.right, y: rect.bottom });
|
||
|
out.push({ x: rect.x, y: rect.bottom });
|
||
|
|
||
|
return out;
|
||
|
};
|
||
|
|
||
|
module.exports = Decompose;
|