diff options
author | Saivan <savian@me.com> | 2018-05-01 21:47:47 +1000 |
---|---|---|
committer | Saivan <savian@me.com> | 2018-05-01 21:47:47 +1000 |
commit | 6d46e412ae2aeb9c8c75896f74496137f0016cc3 (patch) | |
tree | 1089b411b528130c6b8d3f43b6878e861687d394 /dist/svg.js | |
parent | bfd79957d3944d746c5a0edbdb261114fbe8b12f (diff) | |
download | svg.js-6d46e412ae2aeb9c8c75896f74496137f0016cc3.tar.gz svg.js-6d46e412ae2aeb9c8c75896f74496137f0016cc3.zip |
The animations work with the .queue method
Diffstat (limited to 'dist/svg.js')
-rw-r--r-- | dist/svg.js | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/dist/svg.js b/dist/svg.js index 7e80e03..a8eea01 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -6,7 +6,7 @@ * @copyright Wout Fierens <wout@mick-wout.com> * @license MIT * -* BUILT: Mon Apr 30 2018 18:47:43 GMT+1000 (AEST) +* BUILT: Tue May 01 2018 21:08:17 GMT+1000 (AEST) */; (function(root, factory) { @@ -373,6 +373,35 @@ SVG.Queue = SVG.invent({ /* globals fullHex, compToHex */ +/* + +Color { + constructor (a, b, c, space) { + space: 'hsl' + a: 30 + b: 20 + c: 10 + }, + + toRgb () { return new Color in rgb space } + toHsl () { return new Color in hsl space } + toLab () { return new Color in lab space } + + toArray () { [space, a, b, c] } + fromArray () { convert it back } +} + +// Conversions aren't always exact because of monitor profiles etc... +new Color(h, s, l, 'hsl') !== new Color(r, g, b).hsl() +new Color(100, 100, 100, [space]) +new Color('hsl(30, 20, 10)') + +// Sugar +SVG.rgb(30, 20, 50).lab() +SVG.hsl() +SVG.lab('rgb(100, 100, 100)') +*/ + // Module for color convertions SVG.Color = function (color) { var match @@ -1487,7 +1516,7 @@ SVG.Matrix = SVG.invent({ } // We can apply translations after everything else - transformer = transformer.translate(tx, ty) + transformer = transformer.translate(t.tx, t.ty) return transformer }, |