Added unit test

This commit is contained in:
Matt D 2016-05-12 10:56:33 +10:00
parent 299d4fb895
commit 5345c1ff0a

View File

@ -230,4 +230,27 @@ describe("TransformUtils suite", function() {
]);
});
});
/*******************************/
/*********** CENTER ************/
/*******************************/
it("centers a frame", function () {
// create frame
var frame = pskl.model.Frame.fromPixelGrid(toFrameGrid([
[A, B, O, O],
[B, A, O, 0],
[O, O, O, O],
[O, O, O, O]
]));
// should be centered
pskl.tools.transform.TransformUtils.center(frame);
frameEqualsGrid(frame, [
[O, O, O, O],
[O, A, B, O],
[O, B, A, O],
[O, O, O, O]
]);
});
});