You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

todo.md 4.2KB

5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # tests to write
  2. - sugar.js
  3. - insertBefore
  4. - insertAfter
  5. - after
  6. - before
  7. - ax, ay, amove
  8. - Path.js
  9. - targets
  10. - Element.js
  11. - svg
  12. - attr.js
  13. - Style.js
  14. # Where We Left Off
  15. Saivan
  16. ======
  17. Ulima
  18. =====
  19. - Use runners[runnerid] = {startTime, runner, persist}
  20. timeline.persist('monkey-in', Infinity)
  21. - folding transformations
  22. - testing direct non affine morph
  23. - why cant i use current?
  24. - handle null values
  25. Both
  26. ====
  27. - We discussed that matrices should always be applied from the left for animation, so we have:
  28. - If we have C R x where C is the current Matrix and R is the relative matrix that we want to apply
  29. - It could be animated by instead left multiplying (C R inv(C)) so that we have (C R inv(C)) C R
  30. - This allows us to always left multiply (which greatly simplifies things)
  31. => Conclusion: We dont do this. We apply transformations left or right whatever is necessary
  32. Latest
  33. ======
  34. - Runners would call an element.mergeMatrix() function that requests a native animation frame. Each runner would cancel the call made by the last runner, so that the function only runs once per frame.
  35. -https://en.wikipedia.org/wiki/Change_of_basis#Change_of_coordinates_of_a_vector
  36. # Timeline Description
  37. - [T] Timeline constructors
  38. - [T] timeline () - Returns the timeline context to the user
  39. - [T] Time Management
  40. - [T] play () - Lets the timeline keep playing from here
  41. - [T] pause () - Pauses the timeline where it currently is
  42. - [T] stop () - Pauses the timeline and sets time = 0
  43. - [T] finish () - Moves the time to the final time for the final animation, forces declaratives to snap to their final positions
  44. - [T] speed (newSpeed) - Sets the playback speed
  45. - [T] seek (dt) - Scrubs the timeline time forward or backward by dt
  46. - [T] time (t) - Sets the absolute time to t
  47. - [T] backwards (back) - Sets the speed to (back ? speed : -speed)
  48. - [T] position (p) - sets the position in range [0, 1]
  49. - [T] loop (times, swing, waits)
  50. - [T] Runner Management
  51. - [T] remove(tagOrRunner, end) - Removes all runners with tag from the timeline
  52. - [T] reset () - Deletes all of the runners and resets the timeline
  53. - [T] persist (tag, lifetime) - how long to keep a reference to an animation after it is completed
  54. - [T] schedule (tag, time, when) - move the start time of the runner to time otherwise, returns all of the scheduled runners start and end times.
  55. - [T] Hidden Methods
  56. - [x] `_step (dt)`
  57. - [x] `_continue ()`
  58. # Runner
  59. - [x] Constructors
  60. - [x] animate (duration, delay, when) - Makes a new runner and returns the timeline context to the user with the new runner active.
  61. - [x] loop (duration, times, swing) - Makes a new runner with the looping set as described by the parameters, returns timeline
  62. - [x] delay (by, when) - Makes a new runner to start <by> ms after the last active runner is complete
  63. - [x] Runner Methods
  64. - [x] element (svgElement) - Given an element, you can bind it directly
  65. - [x] animate (args) - Calls animate if we have an element set
  66. - [x] loop (args) - Calls loop with arguments if we have an element
  67. - [x] delay (args) - calls delay if we have an element
  68. - [x] Runner Events
  69. - [x] on (eventName, fn) - Binds a function to an event
  70. - [x] off (eventName) - Unbinds all function from that event
  71. - [x] fire () - Fires an event
  72. - [x] Basic Functionality
  73. - [x] queue (initFn, runFn, alwaysInitialise) - Given two functions, the runner will run initFn once, and run runFn on every step. If alwaysInitialise is true, it will always run the initialisation as well.
  74. - [x] during (runFn) - The function to run on each frame
  75. - [x] Runner Animation Methods
  76. - [x] time (time) - Sets the time to the given time and runs the runner
  77. - [x] step (dt) - Runs the runner method if
  78. - [x] finish () - runs step with dT = Infinity
  79. - [x] reverse () - Makes non-declarative runners play backwards
  80. - [x] ease (fn) - Sets the easing function, can not be used to convert a non-declarative to a declarative animation.
  81. - [x] active (activated) - Activates or deactivates a runner
  82. - [x] loop (o) - Activates a loop sequence
  83. - [x] Runner Management
  84. - [x] tag (name) - Name a runner or act as a getter
  85. - [x] untag ()