Reproducing A Clever Animation Product, Part 29

It took a bit of experimentation but the ultimate fix turned out to be quite simple. If the browser’s JavaScript interpreter strips off the second parameter then we can just duplicate the first one. It might not give exactly the intended result if the second parameter was not originally equal to the first but it’ll work. All parts of the demo will now work in recent versions of the Microsoft browsers as well as Firefox, Chrome, and Safari. It works in Opera as well but upon installing it and testing this blog site it turns out that the discrete-event simulation stuff does not work in Opera. I guess that will be Monday’s activity.

Here’s the updated code as described.

The reason the process didn’t create the expected animation was because with the second parameter missing from pStart, the script had no way to interpolate between the second value of pStart and the second parameter of pEnd. The initial transform was applied correctly but subsequent ones all read something like this. IE might not do the expected thing with the second parameter but it isn’t going to be happy trying to process a value of NaN.

This entry was posted in Tools and methods and tagged , . Bookmark the permalink.

Leave a Reply