whs
Version:
Super-fast 3D framework for Web Applications & Games. Based on Three.js
1,752 lines (517 loc) • 34.7 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>ModuleManager - Documentation</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="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<a class="no-u" href="index.html"><span class="logo">whs<span class="gl">.js</span> <span class="gline"></span></span></a>
<li>
<a href="https://github.com/WhitestormJS/whitestorm.js/releases"><img src="https://img.shields.io/github/release/WhitestormJS/whitestorm.js.svg?style=flat-square" alt="GitHub release"></a>
</li>
<li><a href="https://discord.gg/5yNCvC4">chat</a> <span style="color: #777; font-size: 12px; margin-left: 5px;">(discord)</span></li>
<li><a href="https://github.com/WhitestormJS/whitestorm.js">github</a> <span style="color: #777; font-size: 12px; margin-left: 5px;">(source code)</span></li>
<li><a href="https://whs-dev.surge.sh/examples/">examples</a></li>
<li><span> </span></li>
<li><a href="https://threejs.org/">three.js</a></li>
<li><a href="https://twitter.com/_alex_buzin">twitter</a> <span style="color: #777; font-size: 12px; margin-left: 5px;">(me)</span></li>
<li><span> </span></li>
<li class="nav-heading">Pages</li><li class="nav-link nav-Welcome-link"><a href="index.html">Welcome</a></li><li class="nav-link nav-Showcase-link"><a href="Showcase.html">Showcase</a></li><li class="nav-link nav-Hello World!-link"><a href="Hello World!.html">Hello World!</a></li><li class="nav-link nav-Loops & 3D Animation-link"><a href="Loops & 3D Animation.html">Loops & 3D Animation</a></li><li class="nav-link nav-Groups-link"><a href="Groups.html">Groups</a></li><li class="nav-link nav-3D Transforms-link"><a href="3D Transforms.html">3D Transforms</a></li><li class="nav-link nav-Usage with webpack-link"><a href="Usage with webpack.html">Usage with webpack</a></li><li class="nav-link nav-Modules-link"><a href="Modules.html">Modules</a></li><li class="nav-link nav-Animation Clips-link"><a href="Animation Clips.html">Animation Clips</a></li><li class="nav-heading margin">Classes</li><li class="nav-heading pad "><a href="module-core.html">core</a></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.App.html">App</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.CameraComponent.html">CameraComponent</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.Component.html">Component</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.LightComponent.html">LightComponent</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.Loop.html">Loop</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.MeshComponent.html">MeshComponent</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.ModuleManager.html">ModuleManager</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-core.ModuleSystem.html">ModuleSystem</a></span></li><li class="nav-heading pad "><a href="module-components_meshes.html">components/meshes</a></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Box.html">Box</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Circle.html">Circle</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Cone.html">Cone</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Cylinder.html">Cylinder</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Dodecahedron.html">Dodecahedron</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Extrude.html">Extrude</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Group.html">Group</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Icosahedron.html">Icosahedron</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Importer.html">Importer</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Lathe.html">Lathe</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Line.html">Line</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Octahedron.html">Octahedron</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Parametric.html">Parametric</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Plane.html">Plane</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Polyhedron.html">Polyhedron</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Ring.html">Ring</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Shape.html">Shape</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Sphere.html">Sphere</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Tetrahedron.html">Tetrahedron</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Text.html">Text</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Torus.html">Torus</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Torusknot.html">Torusknot</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_meshes.Tube.html">Tube</a></span></li><li class="nav-heading pad "><a href="module-components_lights.html">components/lights</a></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_lights.AmbientLight.html">AmbientLight</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_lights.DirectionalLight.html">DirectionalLight</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_lights.HemisphereLight.html">HemisphereLight</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_lights.PointLight.html">PointLight</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_lights.SpotLight.html">SpotLight</a></span></li><li class="nav-heading pad "><a href="module-components_cameras.html">components/cameras</a></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_cameras.CubeCamera.html">CubeCamera</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_cameras.OrthographicCamera.html">OrthographicCamera</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-components_cameras.PerspectiveCamera.html">PerspectiveCamera</a></span></li><li class="nav-heading pad "><a href="module-modules.html">modules</a></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules.DefineModule.html">DefineModule</a></span></li><li class="nav-heading pad "><a href="module-modules_app.html">modules/app</a></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.ControlsModule.html">ControlsModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.ElementModule.html">ElementModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.FogModule.html">FogModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.OrbitControlsModule.html">OrbitControlsModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.PostProcessorModule.html">PostProcessorModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.RenderingModule.html">RenderingModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.ResizeModule.html">ResizeModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.SceneModule.html">SceneModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.StateModule.html">StateModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_app.VirtualMouseModule.html">VirtualMouseModule</a></span></li><li class="nav-heading pad "><a href="module-modules_mesh.html">modules/mesh</a></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_mesh.AnimationModule.html">AnimationModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_mesh.DynamicGeometryModule.html">DynamicGeometryModule</a></span></li><li class="nav-heading "><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="module-modules_mesh.TextureModule.html">TextureModule</a></span></li><li class="nav-heading margin">Namespaces</li><li class="nav-heading "><span class="nav-item-type type-namespace">N</span><span class="nav-item-name"><a href="WHS.html">WHS</a></span></li><li class="nav-heading "><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#VREffect">VREffect</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#WEBVR">WEBVR</a></span></li>
<!-- <div class="nav-footer">
<a href="https://discord.gg/5yNCvC4" class="icon"><img src="./discord.png" width="32" /></a>
<a href="https://github.com/WhitestormJS/whitestorm.js" class="icon"><img src="./github.png" style="transform: scale(1.3);" width="32" /></a>
<a href="https://twitter.com/_alex_buzin" class="icon"><img src="./twitter.jpg" style="transform: scale(0.8);" width="32" /></a>
</div> -->
</nav>
<div id="main">
<h1 class="page-title"><span class="sub"></span>ModuleManager</h1>
<div class="sidebar">
<h5>Table of content</h5>
<ul>
<li><span class="folder ">— </span><a href="#tag-methods">Methods</a></li>
<ul class="sub ">
<li><a href="#.add">.add()</a></li>
<li><a href="#active">.active()</a></li>
<li><a href="#define">.define()</a></li>
<li><a href="#get">.get()</a></li>
<li><a href="#has">.has()</a></li>
<li><a href="#require">.require()</a></li>
<li><a href="#reset">.reset()</a></li>
<li><a href="#set">.set()</a></li>
<li><a href="#update">.update()</a></li>
<li><a href="#use">.use()</a></li>
</ul>
</ul>
</div>
<section class="main-doc">
<header>
<h2>
<span class="ancestors"><a href="module-core.html">core</a>/</span>
ModuleManager
</h2>
</header>
<article>
<div class="container-overview">
<div class="section-method" id="ModuleManager">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>new ModuleManager<span class="signature">(object)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Solves modules dependencies</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L4">line 4</a>
</li></ul></dd>
</dl>
<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>object</code></td>
<td class="type">
<span class="param-type"><code>Object</code></span>
</td>
<td class="description last">
<p>handler</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- <div class="subsection-right"> -->
<h3 class="subsection-title" id="tag-methods">Methods <span class="gline"></span></h3>
<div class="section-method" id=".add">
<h4 class="name"><span class="type-signature">(static) </span><span class="dot">.</span>add<span class="signature">()</span><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="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L174">line 174</a>
</li></ul></dd>
</dl>
</div>
<div class="section-method" id="active">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>active<span class="signature">(module)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets .currentModule to provided module.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L31">line 31</a>
</li></ul></dd>
</dl>
<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>module</code></td>
<td class="type">
<span class="param-type"><code>Object</code></span>
</td>
<td class="description last">
<p>the module to make current</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section-method" id="define">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>define<span class="signature">(name)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Define the module in manager</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L59">line 59</a>
</li></ul></dd>
</dl>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">
<p>The module name</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section-method" id="get">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>get<span class="signature">(key)</span><span class="type-signature"> → {Object|Module}</span></h4>
<div class="description">
<p>Returns dependency in store object, by key.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L108">line 108</a>
</li></ul></dd>
</dl>
<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>key</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
<p>the key of the dependency</p>
</td>
</tr>
</tbody>
</table>
<div class="section-throws">
<h5>Throws:</h5>
<dl>
<dt>
<div class="param-desc">
<p>if dependency is not in the store</p>
</div>
</dt>
<dd></dd>
<dt>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><code>DependencyError</code></span>
</dd>
</dl>
</dt>
<dd></dd>
</dl>
</div>
<div class="section-returns">
<!--<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>Object</code></span>
|
<span class="param-type"><code>Module</code></span>
</dd>
</dl>
-->
</div>
<div class="section-examples">
<h5>Example</h5>
<p class="code-caption">Get the 'hello' dependency</p>
<pre class="prettyprint"><code>manager.get('hello'); // -> {world: true}</code></pre>
</div>
</div>
<div class="section-method" id="has">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>has<span class="signature">(key)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Returns whether manager has a dependency with the given key</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L130">line 130</a>
</li></ul></dd>
</dl>
<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>key</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
<p>the key of the dependency</p>
</td>
</tr>
</tbody>
</table>
<div class="section-returns">
<!--<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type:
</dt>
<dd>
<span class="param-type"><code>Boolean</code></span>
</dd>
</dl>
<div class="param-desc">
<p>Promise that is resolved when all promises completed.</p>
</div>
-->
</div>
<div class="section-examples">
<h5>Example</h5>
<p class="code-caption">Check whether the store has the 'hello' dependency</p>
<pre class="prettyprint"><code>manager.has('hello'); // -> true</code></pre>
</div>
</div>
<div class="section-method" id="require">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>require<span class="signature">(name, moduleExecutor)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Require module</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L187">line 187</a>
</li></ul></dd>
</dl>
<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>name</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
<p>Defined name</p>
</td>
</tr>
<tr>
<td class="name"><code>moduleExecutor</code></td>
<td class="type">
<span class="param-type"><code>function</code></span>
</td>
<td class="description last">
<p>Function that returns applied module</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section-method" id="reset">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>reset<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
<p>Set's .currentModule to null.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L46">line 46</a>
</li></ul></dd>
</dl>
</div>
<div class="section-method" id="set">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>set<span class="signature">(key, data)</span><span class="type-signature"></span></h4>
<div class="description">
<p>An alias for .add() <br/><br/>
Use this method if you know that you will overwrite existing dependency.<br/>
Use it in your app, but not in module that you provide to other people.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L87">line 87</a>
</li></ul></dd>
</dl>
<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>key</code></td>
<td class="type">
<span class="param-type"><code>String</code></span>
</td>
<td class="description last">
<p>the key of the dependency</p>
</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type"><code>Object</code></span>
</td>
<td class="description last">
<p>the value of the dependency</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section-method" id="update">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>update<span class="signature">(depsMap<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Updates deps</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L147">line 147</a>
</li></ul></dd>
</dl>
<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>depsMap</code></td>
<td class="type">
<span class="param-type"><code>Object</code></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>
{}
</code>
</td>
<td class="description last">
</td>
</tr>
</tbody>
</table>
</div>
<div class="section-method" id="use">
<h4 class="name"><span class="type-signature"></span><span class="dot">.</span>use<span class="signature">(name)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Get the defined module from manager</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js">core/ModuleManager.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleManager.js#L73">line 73</a>
</li></ul></dd>
</dl>
<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>name</code></td>
<td class="type">
</td>
<td class="description last">
<p>The module name</p>
</td>
</tr>
</tbody>
</table>
</div>
<!-- </div> -->
</article>
</section>
<script>
var folders = document.querySelectorAll('.folder');
console.log(folders);
[].slice.call(folders).forEach(function (folder) {
folder.addEventListener('click', function() {
folder.classList.toggle('folded');
folder.parentNode.nextElementSibling.classList.toggle('folded');
folder.innerText = folder.className.indexOf('folded') > -1 ? '+ ' : '— ';
});
})
</script>
</div>
<br class="clear">
<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a><strong> on Tue Jul 18 2017 14:29:47 GMT+0300 (EEST)</strong>. Inspired by <a href="http://stack.gl/packages/">stack.gl</a>
<br /> <span style="color: #A9B0C2;"><b>MIT</b>, see <code>LICENSE.md</code> for details.</span>
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/scroll.js"></script>
<script>
const links = document.querySelectorAll('.sidebar a[href]');
[].slice.call(links).forEach(link => {
link.classList.add('scroll');
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-83696871-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>