Code Monkey home page Code Monkey logo

web-animations-js-legacy's People

Contributors

alancutter avatar arv avatar birtles avatar douglasduteil avatar dstoc avatar ebidel avatar ericwilligers avatar ewilligers avatar jakemac53 avatar krinkle avatar maxh avatar mikelawther avatar mithro avatar nevir avatar nornagon avatar randfur avatar rbtcollins avatar rictic avatar robdodson avatar sandyphan avatar shans avatar sheimlich avatar sorvell avatar stephmc avatar steveblock avatar umaar avatar wesleycho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web-animations-js-legacy's Issues

"transform styles SVG elements" feature needs to be detected

In WebKit, the 'transform' property applies to SVG elements. In Firefox it does not. Instead, Firefox SVG elements accept a 'transform' attribute value.

We'll need to detect this feature so that we can decide whether SVG 'transform' animations should be applied through style or through the 'transform' attribute.

Complete transform support

Still to do:

  • promote 2d animations to 3d animations when interpolating from 2d to 3d or vice versa
  • implement special rules for 3d rotation
  • clarify whether rotateZ should collapse to rotate in 2D case
  • clarify whether rotateX-Z should collapse to rotate3d
  • implement special rules for matrix interpolation
  • implement special rules for perspective interpolation

left: 0 doesn't work but left: 0px does

The following doesn't animate smoothly:

new Animation(target, {left: ['0','500px']}, 1);

But this does:

new Animation(target, {left: ['0px','500px']}, 1);

Do something with TimedItem.changePlaybackRate()

The polyfill currently provides TimedItem.changePlaybackRate(), which updates TimedItem.timing.playbackRate and seeks so as to preserve the current playback position. The method is not in the spec.

We should decide how we want to expose this functionality and then make sure the spec and polyfill match up.

We probably can't do this until we've resolved how to expose supplied and calculates timing parameters. See web-animations/web-animations-js#134

Decide on behaviour when pausing and unpausing a Player with a forced currentTime and whose Timeline is not started

The spec [1] states that Player.currentTime is zero for a Player whose Timeline is not started. Given this, when assigning to Player.currentTime while in this state, we update the time drift but continue to return zero for currentTime. The time drift manifests itself once the Timeline starts.

However, the algorithm for pausing means that if the TimedItem is paused and unpaused before the Timeline starts, any time drift calculated above will be lost and reset to zero. This is odd, as pausing and unpausing at any other time will leave the currentTime unaltered.

We should decide if this behaviour is desired. If so, it probably should be mentioned explicitly in the spec. Either way, we should update the polyfill if required and add a testcase.

[1] https://dvcs.w3.org/hg/FXTF/raw-file/default/web-anim/index.html#the-current-time-of-a-player

Animations containing % transforms fail on Chrome 25

new Animation(target,
{'-webkit-transform': ['translate3d(0,0,0)', 'translate3d(100%,0,0)'],
1
);

The above animation fails on Chrome 25 but works on Canary. I notice that -webkit-calc is used to generate intermediate values for this animation. This appears not to be supported.

This problem is also evident in test-transform-units.html which fails silently. Notice, for example, the top row left and right squares. These do not animate properly but do have the correct end state.

Transform animations with one frame don't work

new Animation(target, {transform:'translate3d(0,100%,0)'}, 0.3)
new Animation(target, {opacity: '0'}, 0.3)

I want to animate the target from the current values. The first animation throws an exception but but the second animation works as expected.

Animation starting time pausing problems at time 0

In the code below #a is lightsteelblue instead of red when paused at time 0.

<style> .anim { width: 100px; height: 100px; background-color: lightsteelblue; } </style>

var foo = new Animation(document.querySelector("#a"), {"background-color": ["red", "green"]}, 2);
foo.pause();

document.animationTimeline.currentTime is always zero

This is because currentTime is obtained from the parent, but the DEFAULT_GROUP does not have a parent. The DEFAULT_GROUP picks up its time from a call to updateTimeMarkers() with an explicit parentTime, but this is not propagated to currentTime.

This is probably very low priority to fix, as it will be obsoleted by the upcoming switch to TimeSources.

operation:"add" doesn't work if the previous player.source is set to null

In this example I play an animation with operation:"replace" and then one with operation:"add":

var replace = new Animation(target, {left: ["0px","50px"]}, 0.2);
var player = document.timeline.play(replace);

setTimeout(function() {
// works if the next line is commented
player.source = null;
var add = new Animation(target, {left: ["0px", "100px"], operation: "add"}, 0.2);
document.timeline.play(add);

If I set the first animation's player.source to null, the second animation with operation:"add" doesn't work. If I don't, it works.

Avoid 404s for *-checks.js

These are generated by the new test framework. They clutter the log and get in the way of debugging.

Assigning to Doug as I'm not sure what his plan is here.

Numerous tests fail on Firefox

A few examples tested on version 19.0.2:

test-calc.html
test-color-names.html
test-color.html
test-composite-transforms.html
test-iteration-start.html

Many of these tests appear to exclusively use -webkit-transform.

New test framework sometimes underestimates the total duration

New test framework sometimes underestimates the total duration of the animations being tested.

For example, test-iterations-fill.html should have a total duration of 1 + 3 * 8 / 2 = 13. The new framework shows a maximum time of 12, though the animation appears to continue beyond this point.

Consider making animating 'transform' property work cross-browser

It would be extremely helpful to have animations using the 'transform' property work cross-browser.

Rather than requiring users to duplicate animation values for -moz-transform, -webkit-transform, -ms-transform, transform, etc., the polyfill could feature detect the client's actual transform property and normalize an animation using the standard 'transform' property to the supported property name.

Need to call into timedItem parameter when timeline.play() is called

Currently we don't update timedItems when we call play and pass them as a parameter. This means that:

  • currentTime is incorrect until a raf cycle
  • media doesn't update pause state, etc. until a raf cycle

We should include an update step on timedItems when play is called to ensure the timeline is immediately placed into a consistent state.

ParGroup call causing a maxium call stack error

new Animation(topObjects[i], {left: ["100px", "600px"]}, 2);
new Animation(topObjects[i], {left: ["100px", "600px"]}, 2);
var parentAnimation = new ParGroup(document.animationTimeline.children);

The above code causes an error "Uncaught RangeError: Maximum call stack size exceeded"

Section 8.2 of spec defines local time incorrectly

The spec states that the local time of a timed item is the sum of the timed item's inherited time and its start time. It should be the inherited time less the start time. Note that the example is correct.

Bug with children of a SeqGroup of differing types

Bug report from Sarah ...

... the problem seems to be when you have children of a parent SeqGroup of differing types. For example, ParGroups and SeqGroups, or ParGroups and Animations, etc. In the code attached, I have a SeqGroup parent with three different versions of the children. The currently uncommented one (SeqGroup followed by a ParGroup) produces the closest bug to the one in the original Car.html file.

The really interesting bit is the first commented out sgroup (a ParGroup followed by a SeqGroup) produces a slightly different bug. In this case, the animation doesn't play correctly at all, including the first time. The final sgroup is similar to this one.

<style> .anim { position: absolute; height: 100px; width: 100px; left: 100px; } #a { background-color: red; top: 100px; } #b { background-color: blue; top: 200px; } </style>

"Go!"

<script src="web-animation.js"></script> <script> var go = function() { var lightOff = "rgb(50,50,50)"; var aLeft = new Animation(document.querySelector("#a"), {left: ["100px", "200px"]}, {duration: 1}); var aRight = new Animation(document.querySelector("#a"), {left: ["200px", "100px"]}, {duration: 1}); var bLeft = new Animation(document.querySelector("#b"), {left: ["100px", "200px"]}, {duration: 1}); var bRight = new Animation(document.querySelector("#b"), {left: ["200px", "100px"]}, {duration: 1}); var left = new SeqGroup([aLeft, bLeft]); var right = new ParGroup([aRight, bRight]); var sgroup = new SeqGroup([left, right]); //var sgroup = new SeqGroup([right, left]); //var sgroup = new SeqGroup([left, bRight]); sgroup.play(); } var button = document.querySelector("#buttonA"); button.addEventListener('mousedown', go, false); </script>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.