* setTransformAsync * Newer Promise-returning version of `transform()` * @param t2 Transform Object with `x`,`y`,`k`,`r` properties. * @param duration? Duration of the transition in milliseconds, defaults to 0ms (asap) * @return Promise that resolves when the transform has
(t2, duration = 0)
| 548 | * @return Promise that resolves when the transform has finished changing |
| 549 | */ |
| 550 | setTransformAsync(t2, duration = 0) { |
| 551 | // Avoid tiny or out of bounds rotations |
| 552 | t2.r = numWrap((+(t2.r || 0).toFixed(3)), 0, TAU); // radians |
| 553 | |
| 554 | const gfx = this.context.systems.gfx; |
| 555 | return gfx.setTransformAsync(t2, duration); |
| 556 | } |
| 557 | |
| 558 | |
| 559 | /** |
no outgoing calls
no test coverage detected