UNPKG

jsge

Version:

Javascript Game Engine

621 lines (164 loc) 9.38 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="expires" content="Wen, 05 Jun 2024 07:01:00 GMT"> <title>JSDoc: Class: System</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="stage-title">Class: System</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>System<span class="signature">(iSystemSettings, canvasContainer<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2> <div class="class-description">A main app class, <br> Holder class for GameStage,<br> can register new GameStages,<br> init and preload data for them,<br></div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="System"><span class="type-signature"></span>new System<span class="signature">(iSystemSettings, canvasContainer<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>iSystemSettings</code></td> <td class="type"> <span class="param-type"><a href="SystemSettings.html">SystemSettings</a></span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last">holds iSystem settings</td> </tr> <tr> <td class="name"><code>canvasContainer</code></td> <td class="type"> <span class="param-type">HTMLElement</span> | <span class="param-type">null</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> null </td> <td class="description last">If it is not passed, iSystem will create div element and attach it to body</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="base_System.js.html">base/System.js</a>, <a href="base_System.js.html#line16">line 16</a> </li></ul></dd> </dl> </div> <!-- <h3 class="subsection-title">Classes</h3> <dl> <dt><a href="System.html">System</a></dt> <dd></dd> </dl> --> <h3 class="subsection-title">Members</h3> <h4 class="name" id="iSystem"><span class="type-signature"></span>iSystem<span class="type-signature"></span></h4> <!----> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="base_System.js.html">base/System.js</a>, <a href="base_System.js.html#line48">line 48</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="preloadAllData"><span class="type-signature"></span>preloadAllData<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4> <div class="description"> Preloads assets for all registered pages </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="base_System.js.html">base/System.js</a>, <a href="base_System.js.html#line72">line 72</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;void></span> </dd> </dl> <h4 class="name" id="registerStage"><span class="type-signature"></span>registerStage<span class="signature">(screenPageName, extendedGameStage)</span><span class="type-signature"></span></h4> <div class="description"> A main factory method for create GameStage instances, <br> register them in a System and call GameStage.register() stage </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenPageName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>extendedGameStage</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">extended GameStage class(not an instance!)</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="base_System.js.html">base/System.js</a>, <a href="base_System.js.html#line58">line 58</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <div class="switcher"><ul><li class="active"><a href="/">1.5.9</a></li></div> <h2><a href="/">Home</a></h2><h3>Classes</h3><ul><li><a href="DrawCircleObject.html">DrawCircleObject</a></li><li><a href="DrawConusObject.html">DrawConusObject</a></li><li><a href="DrawImageObject.html">DrawImageObject</a></li><li><a href="DrawLineObject.html">DrawLineObject</a></li><li><a href="DrawObjectFactory.html">DrawObjectFactory</a></li><li><a href="DrawPolygonObject.html">DrawPolygonObject</a></li><li><a href="DrawRectObject.html">DrawRectObject</a></li><li><a href="DrawShapeObject.html">DrawShapeObject</a></li><li><a href="DrawTextObject.html">DrawTextObject</a></li><li><a href="DrawTiledLayer.html">DrawTiledLayer</a></li><li><a href="GameStage.html">GameStage</a></li><li><a href="GameStageData.html">GameStageData</a></li><li><a href="IExtension.html">IExtension</a></li><li><a href="INetwork.html">INetwork</a></li><li><a href="IRender.html">IRender</a></li><li><a href="ISystem.html">ISystem</a></li><li><a href="ISystemAudio.html">ISystemAudio</a></li><li><a href="RenderLoop.html">RenderLoop</a></li><li><a href="RenderLoopDebug.html">RenderLoopDebug</a></li><li><a href="System.html">System</a></li><li><a href="SystemSettings.html">SystemSettings</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-application_scheme.html">Application Scheme</a></li><li><a href="tutorial-assets_manager.html">Assets Manager</a></li><li><a href="tutorial-common_issues.html">Common Issues</a></li><li><a href="tutorial-how_to_add_and_use_audio.html">How to add and use audio</a></li><li><a href="tutorial-how_to_do_animations.html">How to Create Animations</a></li><li><a href="tutorial-how_to_load_and_use_tilemaps.html">How to Load and Use Tilemaps</a></li><li><a href="tutorial-quick_start.html">Quick Start</a></li><li><a href="tutorial-spine_animations.html">How to Add Spine Animations</a></li><li><a href="tutorial-stages_lifecycle.html">Stages Lifecycle</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Wed Jun 18 2025 06:53:54 GMT+0000 (Coordinated Universal Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>