dromara / newcar

🪢A modern animation engine for JavaScript ecosystem based on Skia (canvaskit-wasm)
https://newcarjs.org
Apache License 2.0
685 stars 34 forks source link

`AnimationBuilder` for animation group creation #53

Open wgxh-cli opened 4 months ago

wgxh-cli commented 4 months ago

Features

// The call of `tree` creates a builder instance for animation chaining
tree(create, { duration: 1 })
  // `and` means play in `async` mode
  .and(move, { start: 1, duration: 1, to: [400, 400] })
  // `then` means play in 'sync' mode
  .then(scale, { duration: 2, to: [2, 2] })
  .and(fadeOut, { duration: 2 })
  .build(widget)

Can this be added?