MCPcopy Create free account
hub / github.com/facebook/Rapid / setTransformAsync

Method setTransformAsync

modules/core/MapSystem.js:550–556  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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 /**

Callers 2

setMapParamsAsyncMethod · 0.95
transformMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected