forked from Jibo-Revival-Group/JiboOs
81 lines
2.3 KiB
JavaScript
81 lines
2.3 KiB
JavaScript
|
|
/**
|
||
|
|
* @interface jibo.face.views.PauseOverlay~PauseOptions
|
||
|
|
* @description Interface for pause options.
|
||
|
|
* @prop {number} [alpha] - Alpha value for overlay when opened. Supports values between `0` and `1`.
|
||
|
|
* @prop {number} [duration] - Duration in milliseconds of tween, if `0` no tween is used.
|
||
|
|
* @prop {String} [type] - Type of tween applied to alpha transition when opening and closing.
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Level of opacity for overlay.
|
||
|
|
* Supports values between `0` and `1`.
|
||
|
|
* @name jibo.face.views.PauseOverlay#alpha
|
||
|
|
* @default .7
|
||
|
|
* @type {number}
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Duration in milliseconds of tween.
|
||
|
|
* If `0` no tween is used.
|
||
|
|
* @name jibo.face.views.PauseOverlay#duration
|
||
|
|
* @default 550
|
||
|
|
* @type {number}
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Type of tween applied to alpha transition when opening and closing.
|
||
|
|
* @name jibo.face.views.PauseOverlay#type
|
||
|
|
* @default 'sineOut'
|
||
|
|
* @type {string}
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Graphic for display overlay.
|
||
|
|
* @name jibo.face.views.PauseOverlay#_overlay
|
||
|
|
* @type {PIXI.Graphics}
|
||
|
|
* @private
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Flag set to `true` after open is called, reset to `false` on close.
|
||
|
|
* @name jibo.face.views.PauseOverlay#_isOpen
|
||
|
|
* @type {boolean}
|
||
|
|
* @private
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Apply values from options.
|
||
|
|
* @method jibo.face.views.PauseOverlay#applyOptions
|
||
|
|
* @example
|
||
|
|
* {
|
||
|
|
* "alpha": ".7",
|
||
|
|
* "duration": 550,
|
||
|
|
* "type": "sineOut",
|
||
|
|
* }
|
||
|
|
* @param {jibo.face.views.PauseOverlay~PauseOptions} options - Options for pause.
|
||
|
|
* @param {number} [options.alpha] - Level of opacity for overlay.
|
||
|
|
* @param {number} [options.duration] - Duration in milliseconds of tween.
|
||
|
|
* @param {String} [options.type] - Type of tween applied to alpha transition.
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Apply default values.
|
||
|
|
* @method jibo.face.views.PauseOverlay#applyDefaults
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Open the overlay.
|
||
|
|
* Creates PIXI.Graphic and adds to stage.
|
||
|
|
* @method jibo.face.views.PauseOverlay#open
|
||
|
|
* @param {PIXI.Container} container - Container for the overlay, should be View's stage.
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Close the overlay, once closed remove overlay from display.
|
||
|
|
* @method jibo.face.views.PauseOverlay#close
|
||
|
|
*/
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Destroy
|
||
|
|
* @method jibo.face.views.PauseOverlay#destroy
|
||
|
|
*/
|