workadventure icon indicating copy to clipboard operation
workadventure copied to clipboard

Set camera API could return a Promise

Open ValdoTR opened this issue 10 months ago • 0 comments

Now that we can pass a duration to the function: set(x: number, y: number, width?: number, height?: number, lock?: boolean, smooth?: boolean, duration?: number): void;

It could be great to be able to know when the camera is fully set (in order to execute some code just after that).

So we could do:

// duration of 10 seconds
await WA.camera.set(area.x, area.y, 1000, 1000, false, true, 10000);
// Do something after the camera is set

ValdoTR avatar Apr 15 '24 12:04 ValdoTR