106 lines
3.3 KiB
JavaScript
106 lines
3.3 KiB
JavaScript
/**
|
|
* @interface jibo.animdb.PlaybackResult
|
|
* @description Interface for the result of Play on an Animation.
|
|
* @property playback {jibo.animdb.Playback} Playback object created to play the animation.
|
|
* @property result {Promise<AnimationState>} Resulting state the animation completed playback in.
|
|
*/
|
|
|
|
/**
|
|
* @interface jibo.animdb#PlaybackOptions
|
|
* @description Interface of playback options.
|
|
* @property [forceReturnToIdle] {boolean} `true` to return Jibo to neutral pose after the animation finishes.
|
|
* @property [screenCenterOverride] {boolean} `true` to center screen content before the animation plays.
|
|
* @property [ownerInformation] {string} Name by which the DOFArbiter should track the requester.
|
|
* @property [disableSetFaceAnim] {boolean} Disables setting animation as the jibo.face.animation
|
|
*/
|
|
|
|
/**
|
|
* @class Playback
|
|
* @memberof jibo.animdb
|
|
*/
|
|
|
|
/**
|
|
* Creates a playback object
|
|
*/
|
|
|
|
/**
|
|
* Initializes the KeysPlayback object for the animation.
|
|
*
|
|
* @method jibo.animdb.Playback#init
|
|
* @param {jibo.animdb#AnimConfig} config - Config that allow configuring creation of animation.
|
|
* @returns {Promise<jibo.animdb.Playback>}
|
|
*/
|
|
|
|
/**
|
|
* Initializes the KeysPlayback object for the animation and immediately plays it.
|
|
*
|
|
* @method jibo.animdb.Playback#initAndPlay
|
|
* @param {jibo.animdb#AnimConfig} config - Config that allow configuring creation of animation.
|
|
* @param {jibo.animdb#PlaybackOptions} [options] - Options that allow configuring playback of animation.
|
|
* @returns {Promise<AnimationState>}
|
|
*/
|
|
|
|
/**
|
|
* Plays the animation
|
|
*
|
|
* @method jibo.animdb.Playback#play
|
|
* @param {jibo.animdb#PlaybackOptions} [options] - Options that allow configuring playback of animation
|
|
* @returns {Promise<AnimationState>}
|
|
*/
|
|
|
|
/**
|
|
* Stops playing animation
|
|
*
|
|
* @method jibo.animdb.Playback#stop
|
|
* @returns {Promise<void>}
|
|
*/
|
|
|
|
/**
|
|
* !Mutates!
|
|
* Actually initializes the KeysPlayback object for the animation.
|
|
*
|
|
* @method jibo.animdb.Playback#_init
|
|
* @param {jibo.animdb#AnimConfig} config - Config that allow configuring creation of animation
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* !Mutates!
|
|
* Merges default Playback options with those provided,
|
|
*
|
|
* @method jibo.animdb.Playback#resolvePLaybackOptions
|
|
* @param {jibo.animdb#PlaybackOptions} options
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* !Mutates!
|
|
* Registers all handlers to all relevant events on the keysAnimation
|
|
*
|
|
* @method jibo.animdb.Playback#registerEventsAndHandlers
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* When an animation completes, handle returning body to neutral, etc.
|
|
*
|
|
* @method jibo.animdb.Playback#handlePlaybackCompletion
|
|
* @param {AnimationState} state
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Clean-up after a played animation
|
|
*
|
|
* @method jibo.animdb.Playback#_cleanup
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Loads the animation data from disk and optionally immediately plays
|
|
*
|
|
* @method jibo.animdb.Animation#loadAnimation
|
|
* @param {boolean} [andPlay=false] Immediately play the animation upon loading (if possible)
|
|
* @returns {Promise<KeysAnimation>} The jibo runtime KeysAnimation object
|
|
* @private
|
|
*/ |