@@ -37,7 +37,9 @@ Elm.Native.Transform2D.make = function(elm) {
37 var s = Math.sin(t);
37 var s = Math.sin(t);
38 return new A([c, -s, 0, s, c, 0]);
38 return new A([c, -s, 0, s, c, 0]);
40−
40+ function translation(x,y) {
41+ return new A([1,0,x,0,1,y]);
41 function rotate(t,m) {
43 function rotate(t,m) {
42 var c = Math.cos(t);
44 var c = Math.cos(t);
43 var s = Math.sin(t);
45 var s = Math.sin(t);
@@ -84,6 +86,7 @@ Elm.Native.Transform2D.make = function(elm) {
84 identity:identity,
86 identity:identity,
85 matrix:F6(matrix),
87 matrix:F6(matrix),
86 rotation:rotation,
88 rotation:rotation,
89+ translation:F2(translation),
87 multiply:F2(multiply)
90 multiply:F2(multiply)
89 transform:F7(transform),
92 transform:F7(transform),