Skip to Content
Welcome to Vyno! 🍷

then

等待前一组操作完成后立即执行下一组操作,是 next(0) 的语法糖。

基本用法

// 等待 motion 完成后立即执行 speak figure.motion("wave").then.speak`你好!`; // 等价于 figure.motion("wave").next(0).speak`你好!`;

适用场景

确保前一个动作完成后再进行下一个动作,但不需要额外延迟。

对比

  • then 与 next(ms):then 不引入延迟,next 引入毫秒级延迟
  • then 与 beat:then 等待前一组操作完成;beat 是链上短暂停顿符号
Last updated on