initial commit

This commit is contained in:
2026-03-16 13:53:01 +02:00
parent 631dc7df36
commit 81e6e0a7a2
23381 changed files with 8224173 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
/**
* Sort the list of Loop members.
* @callback jibo.face.views.ContactsView~LoopListSort
* @param loopList {jibo.kb.loop.UserNode[]} List of Loop members to sort.
*/
/**
* Check to see if a Loop member is in the list.
* @callback jibo.face.views.ContactsView~LooperCheck
* @param looper {jibo.kb.loop.UserNode} Loop member to check the list for.
* @return {Boolean} `true` if the Looper exists in the list.
*/
/**
* Menu display for a list of Contacts.
*
* @class ContactsView
* @extends jibo.face.views.MenuView
* @memberof jibo.face.views
*/
/**
* Optional function used to edit the looper list.
* Should determine what ContactButtons are created and in what order.
* Need to take and return an array of Loop members.
* If not explicitly defined will be set to a default when createListComponents is called.
* @name jibo.face.views.ContactsView#sortLoopList
* @type {jibo.face.views.ContactsView~LoopListSort}
*/
/**
* Optional function used to determine if a ContactButton's checkmark should be displayed.
* Requires a Looper and return a boolean.
* If true is returned, a checkmark on the Loop member's ContactButton will be displayed.
* @name jibo.face.views.ContactsView#determineCheck
* @type {jibo.face.views.ContactsView~LooperCheck}
*/
/**
* Optional parameters indicating whether show the "Not a Loop Member" button.
* @name jibo.face.views.ContactsView#showNotALoopMemberButton
* @type {Boolean}
*/
/**
* @name jibo.face.views.ContactsView#_loopMembers
* @type {jibo.kb.loop.UserNode[]}
* @private
*/
/**
* Destroy.
* @method jibo.face.views.ContactsView#destroy
*/
/**
* Default LoopListSort used to edit list of Loop members.
* @method jibo.face.views.ContactsView#removeInvalidLoopers
* @param {jibo.kb.loop.UserNode[]} loopList List of Loop members objects
* @returns {jibo.kb.loop.UserNode[]} The edited list of Loop members objects
* @private
*/

View File

@@ -0,0 +1,29 @@
/**
* View class that serves as a container for the Eye.
*
* @class EyeView
* @extends jibo.face.views.View
* @memberof jibo.face.views
*/
/**
* Construct View
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* Adjust provided transition before calling inherited method.
* @method jibo.face.views.EyeView#open
* @param {Function} [callback] - Callback fired when close is complete, can also listen for View.OPENED event.
* @param {String} [transitionType] - This will be ignored as EyeView defines its own transition types.
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* We want to override the close transition type for EyeView
* @method jibo.face.views.EyeView#close
* @param {Function} [callback] - Callback fired when close is complete, can also listen for View.CLOSED event.
* @param {String} [transitionType] - This will be ignored as EyeView defines its own transition types.
*/

View File

@@ -0,0 +1,70 @@
/**
* @description Interface - Configuration values for creating a ImageView.
* @interface jibo.face.views.ImageView~ImageViewOptions
* @extends jibo.face.views.View~ViewOptions
* @prop {AssetDescriptor} [image] - Relative source path to the resource.
*/
/**
* View designed to display standard Clips.
*
* Takes a simplified JSON configuration. Example:
* ```json
* {
* "viewConfig": {
* "type": "ImageView",
* "id": "my_image_view",
* "image": {
* "id": "clipTest",
* "src": "resources/images/my-image.png",
* "type": "texture"
* },
* "scaleToFit": true
* }
* }
* ```
* @class ImageView
* @extends jibo.face.views.View
* @memberof jibo.face.views
*/
/**
* The default class identifier.
* Generally used to register the class.
* @name jibo.face.views.ImageView.DEFAULT_TYPE
* @type {String}
* @readOnly
*/
/**
* If clip is smaller than screen determine if it should be stretched to fit
* @name jibo.face.views.ImageView#scaleToFit
* @type {boolean}
* @public
*/
/**
* AssetDescriptor for the ImageView's Clip
* @name jibo.face.views.ImageView.imageDescriptor
* @type {jibo.face.views~AssetDescriptor}
* @public
*/
/**
* Clip for the ImageView.
* @name jibo.face.views.MenuView#clip
* @public
* @readOnly
* @type {jibo.face.views.Clip}
*/
/**
* Construct ImageView
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL EXTERNALLY.
*
* Determine x and y positions for the clip element, and its scaling relative to the screen.
* @method jibo.face.views.ImageView#positionComponents
*/

View File

@@ -0,0 +1,208 @@
/**
* @description Interface for describing default values of the list elements that will be shown in the MenuView.
* @interface jibo.face.views.MenuView~ListDefaultData
* @extends jibo.face.views.MenuButton~MenuButtonOptions
* @property {String} [menuButtonType] The name of the MenuButton type that will be generated in the list.
*/
/**
* @description Interface - Configuration values for creating a MenuView.
* @interface jibo.face.views.MenuView~MenuViewOptions
* @extends jibo.face.views.View~ViewOptions
* @prop {String} [title] - Position of the element on the screen.
* @prop {jibo.face.views.MenuView~ListDefaultData} [listDefault] - Default values that will be applied to list elements upon creation.
* @prop {jibo.face.views.MenuButton~MenuButtonOptions[]} [list] - Structure specifying the contents of the list. Its values override those given in {~listDefault}.
* @prop {Boolean} [useEyeTransitions] - Flag indicating whether eyeTransitions should be used.
*/
/**
* View designed to display standard list menus.
*
* Takes a simplified JSON configuration. Example:
* ```json
* {
* "viewConfig": {
* "type": "MenuView",
* "id": "my_menu",
* "title": "Menu Title",
* "progress": { //setting to true will use default values, setting to false prevent creation
* "width" : 500,
* "height": 20,
* "backgroundColor": "0xff892f",
* "progressColor": "0x1E90FF",
* "position": {
* "x": "390",
* "y": "170",
* "margin" : {
* "x": 100|LEFT|CENTER|RIGHT,
* "y": 100|TOP|CENTER|BOTTOM
* }
* }
* },
* "listDefault": {
* "menuButtonType": "SkillButton"
* },
* "list": [
* {
* "id": "mySkill",
* "label": "My SKill",
* "colors": ["0xff892f", "0xaf4123"],
* "iconSrc": "resources/icons/mySkill.png",
* "action": {
* "type": "event",
* "data": {
* "event": "openSkill"
* "skill": "mySkill"
* }
* }
* }
* ]
* }
* }
* ```
* @class MenuView
* @extends jibo.face.views.View
* @memberof jibo.face.views
*/
/**
* Default value for X padding of the listProgress.
* @name jibo.face.views.MenuView.LISTPROGRESS_LEFT_MARGIN
* @type {number}
* @readOnly
* @private
*/
/**
* Default value for Y padding of the listProgress.
* @name jibo.face.views.MenuView.LISTPROGRESS_BOTTOM_MARGIN
* @type {number}
* @readOnly
* @private
*/
/**
* Margin value for X padding on either side of title to edge of screen.
* @name jibo.face.views.MenuView.TITLE_MARGIN
* @type {number}
* @readOnly
* @private
*/
/**
* Buffer value for Y padding beween bottom of title and top of list buttons.
* @name jibo.face.views.MenuView.TITLE_BUFFER
* @type {number}
* @readOnly
* @private
*/
/**
* Maximum height of title text.
* @name jibo.face.views.MenuView.TITLE_HEIGHT
* @type {number}
* @readOnly
* @private
*/
/**
* Maximum height of button label text.
* @name jibo.face.views.MenuView.LABEL_HEIGHT
* @type {number}
* @readOnly
* @private
*/
/**
* A constant specified by design
* @name jibo.face.views.MenuView#MENU_LABEL_BUFFER
* @private
* @type {number}
* @readOnly
*/
/**
* The default class identifier.
* Generally used to register the class.
* @name jibo.face.views.MenuView.DEFAULT_TYPE
* @type {String}
* @readOnly
*/
/**
* List for the MenuView.
* @name jibo.face.views.MenuView#list
* @public
* @readOnly
* @type {jibo.face.views.List}
*/
/**
* Title for the MenuView, only created if specified.
* @name jibo.face.views.MenuView#titleLabel
* @public
* @readOnly
* @type {jibo.face.views.Label}
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* Create and add components for List.
* @method jibo.face.views.MenuView#createListComponents
* @param {jibo.face.views.List} list The List components components will be added to.
* @protected
*/
/**
* Add eye specific transitions for use when this instance of MenuView opens from or closes to an EyeView.
* Call on instance of MenuView prior to starting a change view process.
* @method jibo.face.views.MenuView#addEyeTransitions
*/
/**
* Apply List config update values (pageIndex, indexOfAction) directly to view config.
* This occurs because MenuView does not use a standard component configuration,
* instead storing List related data directly to its viewConfig.
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL EXTERNALLY.
*
* Determine y positions for the menu elements, as they are relative to each other.
* @method jibo.face.views.MenuView#positionComponents
* @param {number} [overrideTitleHeight] Override the calculated title height (or if there is no title but you want more spacing).
*/
/**
* Positions button labels according to list start position to match buttons location on the screen
* @method jibo.face.views.MenuView#positionButtonLabels
* @protected
*/
/**
* Update the button labels to match the list elements.
* Enacts the Label close and open transitions by default.
* @method jibo.face.views.MenuView#updateButtonLabels
* @param {Boolean} [labelRemovalNeeded = false] Flag indicating that we need to remove label component
* and reposition labels
* @param {Boolean} [playTransition = true] Flag determining if close and open transitions will be used,
* if false updates the text without any transitions.
* @param {number} [duration = 200] Duration of the transition.
* @protected
*/
/**
* Calls the close transition on all of the button labels.
* @method jibo.face.views.MenuView#fadeOutButtonLabels
* @param {number} [duration = 100] Duration of the transition.
* @private
*/
/**
* Manages eye tween aspect of the close to eye transition.
* @method jibo.face.views.MenuView#eyeOpenTransition
* @param {Function} callback - Callback fired when eye completes tween.
* @param {number} duration - Duration of the transition.
* @private
*/

View File

@@ -0,0 +1,81 @@
/**
* @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
*/

View File

@@ -0,0 +1,99 @@
/**
* @description Interface - Configuration values for creating a TextView.
* @interface jibo.face.views.TextView~TextViewOptions
* @extends jibo.face.views.View~ViewOptions
* @prop {string} [text] - Text to show.
* @prop {PIXI.TextStyle} [style] - Style of the text.
* @prop {jibo.face.views.Element~DimensionData} [margins] - Margins between edge of screen and text bounds.
*/
/**
* View designed to display standard text.
*
* Takes a simplified JSON configuration.
* @example
* {
* "viewConfig": {
* "type": "TextView","
* "id": "text_view_id",
* "text":"This is a text"
* }
* }
* @class TextView
* @extends jibo.face.views.View
* @memberof jibo.face.views
*/
/**
* Default value for the text style if one's missing.
* @name jibo.face.views.Label.DEFAULT_STYLE
* @type {PIXI.TextStyle}
* @readOnly
* @private
*/
/**
* Margin value for X padding on either side of text to edge of screen.
* @name jibo.face.views.TextView.TEXT_MARGIN_X
* @type {number}
* @readOnly
* @private
*/
/**
* Margin value for Y padding on either side of text to edge of screen.
* @name jibo.face.views.TextView.TEXT_MARGIN_Y
* @type {number}
* @readOnly
* @private
*/
/**
* Object describing the font specification used by `PIXI.Text`.
* Will be applied to the text on
* ```
* fontSize: 100,
* fontFamily: 'Proxima Nova Soft',
* fill: '#FFFFFF',
* fontStyle: 'bold'
* wordWrap: true,
* wordWrapWidth: 100,
* align: 'center'
* ```
* @name jibo.face.views.Label#style
* @type {PIXI.TextStyle}
*/
/**
* Margins between text and edge of screen.
* If not specified will use the defaults.
* @name jibo.face.views.Label#margins
* @type {DimensionData}
*/
/**
* Text of TextView label.
* @name jibo.face.views.TextView#text
* @public
* @readOnly
* @type {String}
*/
/**
* Text of TextView label.
* @name jibo.face.views.TextView#text
* @public
* @type {String}
*/
/**
* Label of the TextView.
* @name jibo.face.views.TextView#label
* @public
* @readOnly
* @type {jibo.face.views.Label}
*/
/**
* Construct View
*/

View File

@@ -0,0 +1,428 @@
/**
* @interface jibo.face.views.View~ViewOptions
* @extends jibo.face.views.Component~ComponentOptions
* @description Interface - Configuration values for creating a View.
* @prop {String} [category] - Category of view.
* @prop {String} [soundSet] - Set of sounds for view sfx.
* @prop {Boolean} [ignoreSwipeDown] - Flag to block or enable swipe down gesture.
* @prop {Boolean} [transitionStageOnly] - If 'true' view transition apply to View's stage only,
* if 'false' possible for transition to be acted out by individual Components where applicable.
* @prop {Boolean | jibo.face.views.PauseOverlay#PauseOptions} [pause] - Determine if view will pause the view it is opening over.
* If 'true' will use default pause options, pass PauseOptions for custom values.
* @prop {Boolean} [pauseParent] - Deprecated.
* @prop {jibo.face.views.PauseOverlay#PauseOptions} [pauseOptions] - Deprecated.
* @prop {Boolean} [border] - Flag to turn screen border visibility true or false.
*/
/**
* Handler for custom View transitions.
* @callback jibo.face.views.View~TransitionHandler
* @param {Function} done - Must call when transition is complete.
* @param {jibo.face.views.View} [view] View to apply the transition to.
*/
/**
* @typedef jibo.face.views~STATE
* @description Static class with static members that describe possible states of the views.
* @prop INITIALIZED Intialize the data.
* @prop DATA_LOADED State set and emitted once initial data has been loaded and configurations set.
* @prop ASSETS_LOADED State set and emitted once initial assets have been loaded.
* @prop LOADED State set and emitted once loading is complete, at point of dispatch View should be ready for use.
* @prop OPENED State set and emitted once View has completed its opening transition.
* @prop CLOSED State set and emitted once View has completed its closing transition.
* @prop DESTROYED State set and emitted once View has been destroyed.
* @prop LOAD_ERROR Event emitted if there is a load error.
*/
/**
* @typedef jibo.face.views~CATEGORY
* @description Static class with static members that describe possible categories of the views.
* @prop GUI Category for views that contain an interactive user interface.
* @prop DISPLAY Category for views that are primarily used for display and not for interfacing.
* @prop EYE Category for EyeView type views.
*/
/**
* Base class for groupings of GUI elements on screen at once.
* Views are the unit which {@link jibo.face.views} acts upon.
*
* @class View
* @extends jibo.face.views.ComponentGroup
* @memberof jibo.face.views
*/
/**
* The default class identifier.
* Generally used to register the class.
* @name jibo.face.views.View.DEFAULT_TYPE
* @type {String}
* @readOnly
*/
/**
* Event dispatched when the View is going to close because of a 'back' command.
* Currently closing a View and going back to the previous view is triggered by a swipe down.
* @type {string}
* @name jibo.face.views.View#BACK
* @readOnly
*/
/**
* Option for setting custom transitions.
* Use with `View.defineTransitions` for transitions to be used when opening from or closing to an empty screen.
* @type {string}
* @name jibo.face.views.View.EMPTY
* @readOnly
*/
/**
* Option for setting custom transitions.
* Use with `View.defineTransitions` for transitions to be used when opening over a paused view or closing while being paused.
* @type {string}
* @name jibo.face.views.View.PAUSED
* @readOnly
*/
/**
* Reference to the paused View below this View.
* @name jibo.face.views.View#pausedParent
* @type {jibo.face.views.View}
*/
/**
* Overlay used when view is paused.
* @name jibo.face.views.View#pauseOverlay
* @type {jibo.face.views.PauseOverlay}
*/
/**
* Flag, if `true` the closure of the View on swipe down behavior will be setup.
* @name jibo.face.views.View#closeOnSwipeDown
* @type {boolean}
* @default true
*/
/**
* Flag that when `true` will pause, instead of closing and destroying, the current View when this View opens above it.
* Once this View finishes opening the previous View, which is now paused, is referenced here {@link jibo.face.views.View#pausedParent}
* @name jibo.face.views.View#willPauseParent
* @type {boolean}
* @default false
*/
/**
* Options applied to parent view when pausing.
* @name jibo.face.views.View#pauseOptions
* @type {jibo.face.views.PauseOverlay#PauseOptions}
*/
/**
* Set of sounds to use when triggering sfx connected to menu button clicks, view open transition, and view close transition.
*
* The global sound sets include:
* - `main` - Used for the eye view and the main menu.
* - `skill` - Default sound set for standard views.
* - `action` - Use for confirmation view overlays.
*
* The soundSet value is combined with the sound type to determine which sound to play.
* For example clicking a menu button will trigger a 'button' sfx, this is combined with the soundSet value to determine the sound id.
* So a clicking a button in a view with a soundSet of `skill` will play the sound with id `skill_button`.
*
* Example for Setting a view's soundSet value via the config:
* ```
* "viewConfig": {
* "type": "MenuView",
* "id": "confirmation_view",
* "soundSet": "action",
* ```
* @name jibo.face.views.View#soundSet
* @type {string}
* @default `skill`
*/
/**
* Flag to transition using only stage.
* If `true` prevents components from handling open and close individually.
* @name jibo.face.views.View#transitionStageOnly
* @type {boolean}
* @default false
*/
/**
* Flag, if `true` the screen border is made visible just before opening view.
* Must set before view opens to take effect.
* @name jibo.face.views.View#borderNeeded
* @type {boolean}
* @default true
*/
/**
* Specify a custom transition for either close or open, whichever is happening next.
* Can be set to a Function, in which case that Function will be used instead of the `open` or `close` methods,
* or set to a string, in which case that string will become the transition type checked by the `open` or `close` methods.
* @name jibo.face.views.View#transitionHandler
* @type {jibo.face.views.View~TransitionHandler | string}
*/
/**
* View category, helps determine behavior and function expected from view.
* Category is not directly bound to `View.type`.
* @name jibo.face.views.View#_category
* @type {string}
*/
/**
* Reference to ViewState the View was created from.
* A View will may not always have a ViewState defined,
* reference to ViewState is made within applyState.
* @name jibo.face.views.View#_viewState
* @type {jibo.face.views.ViewState}
* @private
*/
/**
* Reference to loadAsset created by loader, kept for cleanup.
* @name jibo.face.views.View#_assetLoad
* @type {jibo.loader.AssetLoad}
* @private
*/
/**
* Tokens of assets loaded and cached by this loader.
* @name jibo.face.views.View#_loadedAssets
* @type {jibo.loader.AssetToken[]}
* @private
*/
/**
* Queue for assets that require loading.
* When _assetLoad completes a single load task queued asset are added to _assetLoad's load list.
* @name jibo.face.views.View#_assetLoadQueue
* @type {jibo.face.views~AssetDescriptor[]}
* @private
*/
/**
* List of pending asset load requests.
* When _assetLoad completes asset load requests are checked,
* if requested assets have been loaded executes callback.
* @name jibo.face.views.View#_assetLoadRequests
* @type {any[]}
* @private
*/
/**
* Object used to store custom transitions, uses a specific structure to manage nested choices.
* @type {any}
* @private
*/
/**
* Get top most PIXI.Container of this View.
* @name jibo.face.views.View#stage
* @type {PIXI.Container}
* @readOnly
*/
/**
* The assets loaded by the View, these are returned from the loader as an Object using the asset id as keys.
* Assets available after the view has completed its load methods.
* @name jibo.face.views.View#assets
* @type {Object}
* @readOnly
*/
/**
* Type is equal to Class name.
* @name jibo.face.views.View#type
* @type {string}
* @readOnly
*/
/**
* The current state of view.
* Refer to documentation for valid states e.g. LOADED, OPENED, CLOSED
* @name jibo.face.views.View#state
* @return {String} Refer to the View static constants or ViewManager for valid values.
*/
/**
* View category, helps determine behavior and function expected from view.
* Category is not directly bound to `View.type`.
* @name jibo.face.views.View#category
* @type {string}
* @readOnly
*/
/**
* Construct View
*/
/**
* Method to acquire the source of data needed to setup the View.
* Once the data source is available calls internal methods to assign the data to the class appropriately.
* By default this method handles the loading of a configuration file, but could also be extended to get data from the KB, servers, or web services.
* @method jibo.face.views.View#loadData
* @param {Boolean} [loadAssetsOnComplete = true] - If `true` will call loadAssets() once data finishes loading.
* @protected
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* Loads view configuration if a configPath has been defined, but the viewConfig is undefined.
* @method jibo.face.views.View#loadConfig
* @returns {Promise<jibo.face.views.View>} Promise with View it was called from.
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* Apply data once all required data has finished loading.
* Custom View classes can overrdie this class to manually create custom Components.
* @method jibo.face.views.View#applyData
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* All data and assets have finished loading, create the display and update the status.
* For classes that override View this is where a lot of the setup logic will go.
* @method jibo.face.views.View#loaded
* @protected
*/
/**
* Called when loaded process is completed and View is ready to become current.
* Calls ready on all child Components, which allows opportunity to do additional setup
* that may depend on other components or parent Components.
* @method jibo.face.views.View#ready
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* Pause the View and its Components.
* Pausing locks/unlocks the input and applies/removes a black overly to the stage.
* @method jibo.face.views.View#pause
* @param {Boolean} [flag = true] - Flag for pausing or un-pausing this View.
* @param {jibo.face.views.PauseOverlay#PauseOptions} [pauseOptions] - Options defining how the pause executes.
*/
/**
* FOR OVERRIDE ONLY. DO NOT CALL.
*
* Destroy the view, calls destroy on all child components first.
* @method jibo.face.views.View#destroy
*/
/**
* Load given asset descriptions.
* Callback executes once requested assets are available within the `View.assets`.
* @method jibo.face.views.View#addAssets
* @param {jibo.face.views~AssetDescriptor|jibo.face.views~AssetDescriptor[]|Object} assets
* The assets to load.
* @param {Function} [callback] - Called when requested asset are available in `View.assets`.
* If there is an error while loading callback is called with err
*/
/**
* Adds custom `open` and `close` transitions.
* Custom transitions to use when opening or closing from specific view types
* or certain states, such as an empty screen (`View.EMPTY`) or a paused view (`View.PAUSED`).
* @method jibo.face.views.View#addTransition
* @param {string} viewType - Type of view or state. Accepted states include `View.EMPTY` and `View.PAUSED`.
* @param {boolean} openFrom - If `true`, transitions will be used when opening from the given viewType. If `false`, when closing from that type.
* @param {jibo.face.views.View~TransitionHandler | string} [myTransition] - Handler for executing transition or transition type on owning view.
* A Function will be used instead of the `open` or `close` methods, and a string will be the transition type used by the View's `open` or `close` methods.
* @param {jibo.face.views.View~TransitionHandler | string} [theirTransition] - Handler or transition type used by matching view for their transition.
* If the owning view is closing then this will be set as the opening view's transition.
* @param {jibo.face.views~STACK_DIRECTION} [stackDirection] - Specifies the stack direction associated with the transition,
* if undefined does not take stack direction into account
* STACK_DIRECTION.ADD indicates view is being added to stack.
* STACK_DIRECTION.REMOVE indicates view is being removed.
* STACK_DIRECTION.SWAP indicates the views are being swapped and there is no change to the stack size.
*/
/**
* Method to bubble actions up from Components.
* Actions pass through this method up to the ViewManager.
* By passing actions through the View the View can augment the action, supply additional parameters, etc.
* @method jibo.face.views.View#actionHandler
* @param {jibo.face.views.ActionData} action The action called. Contains string for type of action and data Object
* with any pertinent data dependent on action type.
* @param {jibo.face.views.Component} fromComponent The component that triggered the action (if applicable).
*/
/**
* Method to pass actions downward to Components.
* Passing actions through parent chain allows parents to interrupt and augment actions.
* @method jibo.face.views.View#actionEnactor
* @param {jibo.face.ActionData} action Contains string for type of action and data Object
* with any pertinent data dependent on action type.
* @return {boolean} Returns true if action is acted on by this View or any of its children.
*/
/**
* Set up swipe down to close current view, if no other swipe actions were defined.
* This is a standard UX specification for Menus, but may want to be excluded in certain use cases.
* @method jibo.face.views.View#setupSwipeDownToClose
* @protected
*/
/**
* Apply default values for use by loader.
* @method jibo.face.views.View#setAssetDescriptorDefaults
* @param {jibo.face.views~AssetDescriptor} asset Description of asset.
* @return {jibo.face.views~AssetDescriptor} Description of asset.
* @private
*/
/**
* Adds asset to load queue if not already loaded or loading.
* @method jibo.face.views.View#addAssetToQueue
* @param {jibo.face.views~AssetDescriptor} asset - Asset to add to queue.
* @returns {boolean} `true` if asset was added to queue.
* @private
*/
/**
* Remove asset from manifest and `View.assets` and unload from cache.
* NOTE: Use carefully; removing shared assets can have adverse effects.
* @method jibo.face.views.View#removeAsset
* @param {jibo.face.views~AssetDescriptor} asset - Asset to remove.
* @private
*/
/**
* Remove asset from manifest and `View.assets` and unload from cache.
* NOTE: Use carefully; removing shared assets can have adverse effects.
* @method jibo.face.views.View#removeFromManifest
* @param {jibo.face.views~AssetDescriptor} asset - Asset descriptordescribing asset to remove
* @private
*/
/**
* Check if given assets exist in `View.assets`.
* @method jibo.face.views.View#checkForAssets
* @param {jibo.face.views~AssetDescriptor|jibo.face.views~AssetDescriptor[]|Object} assets
* The assets to check.
* @returns {boolean} `true` if all assets were found in `View.assets`.
* @private
*/
/**
* Remove assets from manifest and unload tokens if they do not exist in `View.assets`.
* @method jibo.face.views.View#removeMissingAssets
* @param {jibo.face.views~AssetDescriptor|jibo.face.views~AssetDescriptor[]|Object} assets
* The assets to check.
* @private
*/
/**
* Play sound, considering the View's sound set.
* @method jibo.face.views.View#playSound
* @param {string} soundType - Kind of sound to use ('button', 'enter', 'exit').
* Combined with with View's soundSet to create sound id, for example the skill button sound id is 'skill_button'.
* @private
*/