Add js sdk changes

With type declarations and various missing parts added by Willy-JL
This commit is contained in:
MX
2024-11-05 09:49:46 +03:00
parent 8a2cf4dc3d
commit 79caf7bf72
19 changed files with 378 additions and 26 deletions

View File

@@ -0,0 +1,32 @@
/**
* Module for interactive with Flipper Video Game Module (VGM)
* @version Available with JS feature `vgm`
* @module
*/
/**
* @brief Get current VGM pitch, or undefined if VGM not present
*/
export declare function getPitch(): number | undefined;
/**
* @brief Get current VGM roll, or undefined if VGM not present
*/
export declare function getRoll(): number | undefined;
/**
* @brief Get current VGM yaw, or undefined if VGM not present
*/
export declare function getYaw(): number | undefined;
/**
* @brief Wait until yaw changed by specified amount
*
* Returns how much the yaw changed from initial value if it exceeded the
* specified yaw angle, or returns 0 if it was not exceeded within the timeout
* Or returns undefined if VGM is not present
*
* @param angle How much the yaw needs to change
* @param timeout Maximum time in milliseconds to wait for specified yaw change, default 3000ms
*/
export declare function deltaYaw(angle: number, timeout?: number): number | undefined;