UNPKG

whs

Version:

Super-fast 3D framework for Web Applications & Games. Based on Three.js

1,464 lines (466 loc) 32.2 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>ModuleSystem - 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>&nbsp;<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>&nbsp;</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>&nbsp;</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>ModuleSystem</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="#applyBridge">.applyBridge()</a></li> <li><a href="#applyCommand">.applyCommand()</a></li> <li><a href="#applyModule">.applyModule()</a></li> <li><a href="#disposeModule">.disposeModule()</a></li> <li><a href="#disposeModules">.disposeModules()</a></li> <li><a href="#integrateModules">.integrateModules()</a></li> <li><a href="#module">.module()</a></li> </ul> </ul> </div> <section class="main-doc"> <header> <h2> <span class="ancestors"><a href="module-core.html">core</a>/</span> ModuleSystem </h2> </header> <article> <div class="container-overview"> <div class="section-method" id="ModuleSystem"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>new ModuleSystem<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Provides API for classes that will use Modules.<br/> This class includes basic event system with those supported methods:</p> <pre>.on()</pre><pre>.off()</pre><pre>.emit()</pre> </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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.js#L16">line 16</a> </li></ul></dd> </dl> <h4 class="no-dec" style="padding-left: 20px;">Extends Events </h4> </div> </div> <!-- <div class="subsection-right"> --> <h3 class="subsection-title" id="tag-methods">Methods <span class="gline"></span></h3> <div class="section-method" id="applyBridge"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>applyBridge<span class="signature">(bridgeMap)</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> <p>Makes component-specific API to work with modules.</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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.js#L61">line 61</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>bridgeMap</code></td> <td class="type"> <span class="param-type"><code>Object</code></span> </td> <td class="description last"> </td> </tr> </tbody> </table> <div class="section-returns"> <!--<h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>Object</code></span> </dd> </dl> <div class="param-desc"> <p>Returns object with modified values.</p> </div> --> </div> </div> <div class="section-method" id="applyCommand"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>applyCommand<span class="signature">(name, cb<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> <p>.applyCommand runs a method called <code>name</code> on all modules.</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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.js#L91">line 91</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>name</code></td> <td class="type"> <span class="param-type"><code>String</code></span> </td> <td class="attributes"> </td> <td class="default"> <code></code> </td> <td class="description last"> <p>the method name.</p> </td> </tr> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type"><code>function</code></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code> (func, moduleScope) => func.apply(this, [moduleScope]) </code> </td> <td class="description last"> <p>How the function is wrapped/</p> </td> </tr> </tbody> </table> </div> <div class="section-method" id="applyModule"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>applyModule<span class="signature">(module, push<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> <p>.applyModule is also used in .integrateModules() function. It does exactly what its name says (applies module to component or app).</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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.js#L118">line 118</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>module</code></td> <td class="type"> <span class="param-type"><code>Object</code></span> </td> <td class="attributes"> </td> <td class="default"> <code></code> </td> <td class="description last"> <p>the module to apply</p> </td> </tr> <tr> <td class="name"><code>push</code></td> <td class="type"> <span class="param-type"><code>Boolean</code></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code> true </code> </td> <td class="description last"> </td> </tr> </tbody> </table> <div class="section-throws"> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type"><code>ManagerError</code></span> </div> </div> <div class="section-returns"> <!--<h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>Object</code></span> </dd> </dl> <div class="param-desc"> <p>Returns module that was applied.</p> </div> --> </div> </div> <div class="section-method" id="disposeModule"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>disposeModule<span class="signature">(module)</span><span class="type-signature"> &rarr; {Module}</span></h4> <div class="description"> <p>Disposes of the given 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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.js#L164">line 164</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 dispose</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>Module</code></span> </dd> </dl> <div class="param-desc"> <p>Returns module that was removed.</p> </div> --> </div> </div> <div class="section-method" id="disposeModules"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>disposeModules<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Disposes of all modules</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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.js#L149">line 149</a> </li></ul></dd> </dl> </div> <div class="section-method" id="integrateModules"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>integrateModules<span class="signature">(source<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> <p>This method applies all modules from .modules collection.</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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.js#L39">line 39</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>source</code></td> <td class="type"> <span class="param-type"><code>Object</code></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"> <p>If source (should be a component) is provided, will replace .modules with source's one before executing modules.</p> </td> </tr> </tbody> </table> </div> <div class="section-method" id="module"> <h4 class="name"><span class="type-signature"></span><span class="dot">.</span>module<span class="signature">(module)</span><span class="type-signature"> &rarr; {this}</span></h4> <div class="description"> <p>piped version of .applyModule().</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/ModuleSystem.js">core/ModuleSystem.js</a>, <a href="https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/core/ModuleSystem.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>module</code></td> <td class="type"> <span class="param-type"><code>Object</code></span> </td> <td class="description last"> <p>the module to apply</p> </td> </tr> </tbody> </table> <div class="section-throws"> <h5>Throws:</h5> <div class="param-desc"> <span class="param-type"><code>ManagerError</code></span> </div> </div> <div class="section-returns"> <!--<h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>this</code></span> </dd> </dl> <div class="param-desc"> <p>returns this - app/component</p> </div> --> </div> <div class="section-examples"> <h5>Example</h5> <p class="code-caption">Piped modules</p> <pre class="prettyprint"><code>component .module(new Module1()) .module(new Module2()) .module(new Module3())</code></pre> </div> </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>