Files
Zos/Skills/@be/node_modules/jibo-anim-db/lib/docs/AnimUtils.js

136 lines
4.3 KiB
JavaScript

/**
* Meta term that denotes a Keys contains only audio
* @const AUDIO_ONLY_META
* @memberof jibo.animdb
* @private
*/
/**
* @interface LayerHandler<T>
* @description Function type that handles a layer argument.
* @memberof jibo.animdb
* @private
*/
/**
* @class AnimUtils
* @memberof jibo.animdb
* @private
*/
/**
* Add layer of requested type to animation
* @method jibo.animdb.AnimUtils#_addMockLayer
* @static
* @private
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @param {string} type Layer type
*/
/**
* Scales the time values of all animation keyframes with a number,
* also affects animation duration
* @method jibo.animdb.AnimUtils#scaleTimeInPlace
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @param {number} scale Scale multiplier
*/
/**
* Scales the body DoF value with a number
* @method jibo.animdb.AnimUtils#scaleBodyInPlace
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @param {number} scale Scale multiplier
*/
/**
* Flips eye and textures left/right
* @method jibo.animdb.AnimUtils#flipScreenLeftRight
* @static
* @param {jibo.animdb#Anim} animDataAnimation data (for example loaded from keys file)
*/
/**
* Checks to see if the body starts in a neutral position
* @method jibo.animdb.AnimUtils#startsNeutral
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @returns {boolean}
* @private
*/
/**
* Checks to see if the body ends in a neutral position
* @method jibo.animdb.AnimUtils#endsNeutral
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @returns {boolean}
* @private
*/
/**
* Checks each layer of the provided animation for content and returns the status of each layer
* @method jibo.animdb.AnimUtils#checkLayers
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @param {boolean} [strict=true] Toggle for whether empty layers should be counted or not (default to not)
* @returns {LayerPresence}
* @private
*/
/**
* Checks to see if animation has audio
* @method jibo.animdb.AnimUtils#hasAudio
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @returns {boolean}
* @private
*/
/**
* Checks to see if an animation has content in the requested layer
* @method jibo.animdb.AnimUtils#hasLayer
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @param {jibo.animdb.LayerName} layerName Requested layer name
* @param {boolean} [strict=true] Toggle for whether empty layers should be counted or not (default to not)
* @returns {boolean}
* @private
*/
/**
* Checks to see if animation has a hold safe keyframe
* @method jibo.animdb.AnimUtils#hasHoldSafe
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @param {string} name - Name of animation
* @returns {number} -1 if none
* @private
*/
/**
* Attempts to auto extract orientation from animation
* @method jibo.animdb.AnimUtils#calculateOrientation
* @static
* @param {jibo.animdb#Anim} animData Animation data (for example loaded from keys file)
* @returns {Orientation}
* @private
*/
/**
* Iterates through all layers whose type are equal to layer type name
* @method jibo.animdb.AnimUtils#forEachLayerType
* @static
* @param {jibo.animdb#Anim} animData - Animation data (for example loaded from keys file)
* @param {jibo.animdb.LayerName} layerTypeName Layer type name matched againt all layer types
* @param {Function} handler - Handler function for the layer
*/
/**
* Takes a possibly incomplete query object and inserts default values
* @method jibo.animdb.AnimUtils#insertDefaultAnimQueryParams
* @static
* @param {jibo.animdb#Anim} query Animation query
* @mutates query
*/