crossbrowdy
Version:
A Multimedia JavaScript framework to create real cross-platform and hybrid game engines, games, emulators, multimedia libraries and apps.
1,786 lines (609 loc) • 167 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>CrossBrowdy API documentation [printable] Class: CB_GraphicSpritesScene</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.yeti.css">
</head>
<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<div class="navbar navbar-default navbar-fixed-top ">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">CrossBrowdy API documentation [printable]</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="topNavigation">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
<ul class="dropdown-menu inline">
<li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
<ul class="dropdown-menu inline">
<li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
<ul class="dropdown-menu inline">
<li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
</ul>
</li>
</ul>
<div class="col-sm-3 col-md-3">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
<div class="input-group-btn">
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="container" id="toc-content" style="width:100%;">
<div class="row" style="width:100%;">
<div class="col-md-8" style="width:85%;">
<div id="main">
<h1 class="page-title">Class: CB_GraphicSpritesScene</h1>
<section>
<header>
<h2>
CB_GraphicSpritesScene
</h2>
<div class="class-description"><p>Class to manage different groups of graphic sprites (2D or 3D). Internally, it manages <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects.</p></div>
</header>
<article>
<div class="container-overview">
<hr>
<dt>
<h4 class="name" id="CB_GraphicSpritesScene"><span class="type-signature"></span>new CB_GraphicSpritesScene<span class="signature">( [spritesGroups] [, byReference])</span><span class="type-signature"> → {<a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Class to manage different groups of graphic sprites (2D or 3D). Internally, it manages <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th style="width:12%; min-width:110px;">Name</th>
<th style="width:12%; min-width:110px;">Type</th>
<th style="width:12%; min-width:110px;">Argument</th>
<th style="width:12%; min-width:110px;">Default</th>
<th class="last" style="min-width:310px;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>spritesGroups</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type"><a href="CB_GraphicSpritesScene.html#.SPRITES_GROUPS_OBJECT">CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT</a></span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Object with the desired groups of sprites. The information will be used for the <a href="CB_GraphicSpritesScene.html#spritesGroups"><code>CB_GraphicSpritesScene#spritesGroups</code></a> property. Used as the "spritesGroups" parameter when calling the <a href="CB_GraphicSpritesScene.html#insertSpritesGroups"><code>CB_GraphicSpritesScene#insertSpritesGroups</code></a> method internally.</p></td>
</tr>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>byReference</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type">boolean</span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
false
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>This value will be used as the "byReference" parameter of the constructor when creating the new internal <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects. If a boolean value is not provided, it will use the value of the <code>CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT.byReference_DEFAULT</code> property of the given <a href="CB_GraphicSpritesScene.html#.SPRITES_GROUPS_OBJECT"><code>CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT</code></a> object (parsed to boolean).</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-127">line 127</a>
</li>
</ul>
</dd>
<dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>Think about a "createCopy" parameter on different the insert methods (to insert sprites groups/graphic sprites objects, etc.) so it will make a copy of the object to avoid using/modifying the original one. If the "createCopy" is set to false, it should always use the object as reference (using/modifying it).</li>
<li>Think about a method to remove a sprite group object when the same sprite group is received by parameter. The same to remove a <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object, receiving a <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object by parameter. The same to remove the sprites groups object, receiving a sprites groups object by parameter. Only remove them if they match exactly.</li>
<li>Think about a method to insert <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object directly. The same with a method that inserts many <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects (receiving an array with them).</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Returns a new <a href="CB_GraphicSpritesScene.html"><code>CB_GraphicSpritesScene</code></a> object.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></span>
</dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<hr>
<dt class="name" id="id">
<h4 id="id"><span class="type-signature"><readonly> </span>id<span class="type-signature"> :string|*</span></h4>
</dt>
<dd>
<div class="description">
<p>Identifier of the sprites groups object (the "id" property of the <a href="CB_GraphicSpritesScene.html#.SPRITES_GROUPS_OBJECT"><code>CB_GraphicSpritesScene.SPRITES_GROUPS_OBJECT</code></a> stored in the <a href="CB_GraphicSpritesScene.html#spritesGroups"><code>CB_GraphicSpritesScene#spritesGroups</code></a> property) and the <a href="CB_GraphicSpritesScene.html"><code>CB_GraphicSpritesScene</code></a> object itself (same one). It should be unique. It must be a value which evaluates to true. By default, it is generated automatically (with an internal counter).</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
|
<span class="param-type">*</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li>'CB_GraphicSpritesScene_' + CB_GraphicSpritesScene._idUnique++</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-140">line 140</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="isSpritesScene">
<h4 id="isSpritesScene"><span class="type-signature"><constant> </span>isSpritesScene<span class="type-signature"> :boolean</span></h4>
</dt>
<dd>
<div class="description">
<p>Property which is always set to true to help identify this type of object.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li>true</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-173">line 173</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="parent">
<h4 id="parent"><span class="type-signature"><readonly> </span>parent<span class="type-signature"> :*</span></h4>
</dt>
<dd>
<div class="description">
<p>Property pointing to or containing its parent. It is the same as the "parent" property of the <code>CB_GraphicSprites.SPRITES_GROUPS_OBJECT</code> stored in the <code>CB_GraphicSprites#spritesGroups</code> property.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">*</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-149">line 149</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="spritesGroups">
<h4 id="spritesGroups"><span class="type-signature"><readonly> </span>spritesGroups<span class="type-signature"> :SPRITES_GROUPS_OBJECT</span></h4>
</dt>
<dd>
<div class="description">
<p>Object containing all the internally-created <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects and their information.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">SPRITES_GROUPS_OBJECT</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li>{}</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-159">line 159</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="type">
<h4 id="type"><span class="type-signature"><constant> </span>type<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>Indicates the type of object (always "spritesScene").</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li>spritesScene</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-182">line 182</a>
</li>
</ul>
</dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<hr>
<dt>
<h4 class="name" id="destructor"><span class="type-signature"></span>destructor<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Destroys the graphic sprites scene object (removing all the sprites groups and the internal <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects, etc.) and frees memory.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-201">line 201</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="executeAll"><span class="type-signature"></span>executeAll<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Alias for <a href="CB_GraphicSpritesScene.html#executeFunctionAll"><code>CB_GraphicSpritesScene#executeFunctionAll</code></a>.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-600">line 600</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="CB_GraphicSpritesScene.html#executeFunctionAll"><code>CB_GraphicSpritesScene#executeFunctionAll</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="executeFunctionAll"><span class="type-signature"></span>executeFunctionAll<span class="signature">(functionEach [, orderedByZIndex] [, delayBetweenEach] [, graphicSpritesObjects] [, returnSetTimeoutsArray] [, delayBetweenEachAffectsFirst] [, functionFinish])</span><span class="type-signature"> → {integer|array}</span></h4>
</dt>
<dd>
<div class="description">
<p>Performs a desired action, using the provided function, on all the existing <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects or on the desired ones (if provided). Calls the <a href="CB_Arrays.html#.executeFunctionAll"><code>CB_Arrays.executeFunctionAll</code></a> function internally and returns its returning value.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th style="width:12%; min-width:110px;">Name</th>
<th style="width:12%; min-width:110px;">Type</th>
<th style="width:12%; min-width:110px;">Argument</th>
<th style="width:12%; min-width:110px;">Default</th>
<th class="last" style="min-width:310px;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>functionEach</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type"><a href="CB_Arrays.html#.executeFunctionAll_ON_LOOP_CALLBACK">CB_Arrays.executeFunctionAll_ON_LOOP_CALLBACK</a></span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be called for each <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object. As the first parameter it receives the <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object of the "graphicSpritesObjects" being looped, as the second parameter the position of this <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object in the "graphicSpritesObjects" array provided (or, if not provided, in the array returned by the <a href="CB_GraphicSpritesScene.html#getGraphicSpritesAll"><code>CB_GraphicSpritesScene#getGraphicSpritesAll</code></a> method), the third parameter is the array being looped and the fourth parameter will be the "delayBetweenEach" being used, being "this" the <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object itself.</p></td>
</tr>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>orderedByZIndex</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type">boolean</span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
false
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to true, it will loop the <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> sorted by their z-index (ascending order).</p></td>
</tr>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>delayBetweenEach</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type">number</span>
|
<span class="param-type"><a href="CB_Arrays.html#.executeFunctionAll_ON_LOOP_CALLBACK">CB_Arrays.executeFunctionAll_ON_LOOP_CALLBACK</a></span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
0
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If a value greater than zero is used, it will be used as the delay desired between each call to the "functionEach" function (calling them using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> function internally). If not provided or the value is 0 (zero) or lower, each call to the "functionEach" function will be performed immediately one after the other. If a function is provided, it will be called with the same parameters as the "functionEach" function and its returning value will be used as the delay (executed every loop for each <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> object).</p></td>
</tr>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>graphicSpritesObjects</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type">array</span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<a href="CB_GraphicSpritesScene.html#getGraphicSpritesAll"><code>CB_GraphicSpritesScene#getGraphicSpritesAll</code></a>()
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>A numeric array containing the <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects that we want to loop. It should contain only <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects which are already in the current <a href="CB_GraphicSpritesScene.html"><code>CB_GraphicSpritesScene</code></a> object. If not provided, it will use all the <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects contained in the <a href="CB_GraphicSpritesScene.html"><code>CB_GraphicSpritesScene</code></a> object.</p></td>
</tr>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>returnSetTimeoutsArray</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type">boolean</span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
false
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether we want the method to return an integer or a numeric array with information of each <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> call. Returning an array with information of each <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> call is only useful when the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> function is called internally, which happens when the "delayBetweenEach" parameter is greater than 0 (zero).</p></td>
</tr>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>delayBetweenEachAffectsFirst</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type">boolean</span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
false
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to true, the desired delay (if any) will also affect the first call to the "functionEach" function.</p></td>
</tr>
<tr>
<td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>functionFinish</code></td>
<td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<span class="param-type"><a href="CB_Arrays.html#.executeFunctionAll_ON_FINISH_CALLBACK">CB_Arrays.executeFunctionAll_ON_FINISH_CALLBACK</a></span>
</td>
<td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
<optional><br>
</td>
<td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
</td>
<td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function that will be called for when it has finished looping all the items. The first parameter will be the array which was looped, the second parameter will be the number of times that the "functionEach" callback was called (the most likely, matches the number of elements unless they are undefined or null), and the third parameter will be the maximum "delay" used, being "this" the array itself.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-628">line 628</a>
</li>
</ul>
</dd>
<dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>Think about only allowing <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects (in the "graphicSpritesObjects" parameter) which are already in the <a href="CB_GraphicSpritesScene.html"><code>CB_GraphicSpritesScene</code></a> (identify them by their ID), to avoid problems.</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>If the "returnSetTimeoutsArray" parameter is set to false, it will return the number of calls to the "functionEach" function that were performed (which should be the same number as the <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> objects given in the "graphicSpritesObjects" parameter). Otherwise, if the "returnSetTimeoutsArray" is set to true, it will return a numeric array with a <a href="CB_Arrays.html#.executeFunctionAll_OBJECT"><code>CB_Arrays.executeFunctionAll_OBJECT</code></a> object for each <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> given. The length of this array will also be the number of calls to the "functionEach" function that were performed. Note that if a value greater than 0 (zero) for the "delayBetweenEach" parameter has been provided, perhaps not all calls of the "functionEach" function will have been performed yet when exiting this method because of the asynchronous nature of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout">setTimeout</a> function.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">integer</span>
|
<span class="param-type">array</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="forEach"><span class="type-signature"></span>forEach<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Alias for <a href="CB_GraphicSpritesScene.html#executeFunctionAll"><code>CB_GraphicSpritesScene#executeFunctionAll</code></a>.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-605">line 605</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="CB_GraphicSpritesScene.html#executeFunctionAll"><code>CB_GraphicSpritesScene#executeFunctionAll</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="forEachGraphicSprites"><span class="type-signature"></span>forEachGraphicSprites<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Alias for <a href="CB_GraphicSpritesScene.html#executeFunctionAll"><code>CB_GraphicSpritesScene#executeFunctionAll</code></a>.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-610">line 610</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="CB_GraphicSpritesScene.html#executeFunctionAll"><code>CB_GraphicSpritesScene#executeFunctionAll</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Alias for <a href="CB_GraphicSpritesScene.html#getGraphicSprites"><code>CB_GraphicSpritesScene#getGraphicSprites</code></a>.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-534">line 534</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="CB_GraphicSpritesScene.html#getGraphicSprites"><code>CB_GraphicSpritesScene#getGraphicSprites</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getAll"><span class="type-signature"></span>getAll<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Alias for <a href="CB_GraphicSpritesScene.html#getGraphicSpritesAll"><code>CB_GraphicSpritesScene#getGraphicSpritesAll</code></a>.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html">CrossBase/audiovisual/image/CB_GraphicSpritesScene.js</a>,
<a href="CrossBase_audiovisual_image_CB_GraphicSpritesScene.js.html#sunlight-1-line-505">line 505</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="CB_GraphicSpritesScene.html#getGraphicSpritesAll"><code>CB_GraphicSpritesScene#getGraphicSpritesAll</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getById">