Refactor transform animations (#4296)

* feat: add matrix module

* fix(animations): parse transform property correctly

* fix(css-animations): compute transformation value with matrix

* refactor: add typings for keyframes array in style scope

* fix(animations): transform regex and method invocation

* fix(matrix): rewrite decomposition function

* refactor: transform animations parse

* test: add tests for css animation transform

* refactor: move transformConverter to style-properties

* lint: remove unnecessary comma

* lint: remove unnecessary word in d.ts

* fix(style-properties): correctly use transformConverter

* fix(matrix): flat multiply affine 2d matrices

cc @PanayotCankov
This commit is contained in:
Stanimira Vlaeva
2017-06-09 18:20:07 +03:00
committed by GitHub
parent c228b97263
commit 9bba250424
15 changed files with 639 additions and 432 deletions

View File

@@ -1,4 +1,4 @@
var epsilon = 1E-05;
const epsilon = 1E-05;
export function areClose(value1: number, value2: number): boolean {
return (Math.abs(value1 - value2) < epsilon);
@@ -26,4 +26,8 @@ export function greaterThanZero(value: Object): boolean {
export function notNegative(value: Object): boolean {
return (<number>value) >= 0;
}
}
export const radiansToDegrees = (a: number) => a * (180 / Math.PI);
export const degreesToRadians = (a: number) => a * (Math.PI / 180);