New modules system🐫 , i will provide some if you see WhitestormJS for the first time: Before we start useful links repo: Github https://github.com/WhitestormJS/whitestorm.js : npm https://www.npmjs.com/package/whs Modules Modules are awesome. Modules can do anything you can do with plain , but much more an way. THREE.Mesh cleaner flexible Step 1. Manager Manager is used to add and get dependencies. Let’s say my module knows that there is module that will use its API. Then module leaves a dependency in object for module . A B A manager B Module can also provide a behavior “what to do if component will overwrite component’s dependency” with method. B C A manager.update() manager() in RenderingModule Step 2. Integrate Modules can have method. It is automatically executed when module is applied to a component or App. Commonly used to add some functionality to defined component. integrate() Example of integrate function in SceneModule Step 3. Bridges Bridges allow developers to make component-specific API. Each component can extend it’s flexibility by providing parts of code that will be processed with “bridges”. Let’s say i have a object. I can pass this material to modules — they can change it’s color, make it semi-transparent or create and overwrite with a new one; material A part of WHS.Box code Function define that current object should go through the following bridge. .applyBridge() A part of TextureModule code Bridge function accepts two parameters: the and . input object module’s scope Bridge function’s scope is component as in integrate() Conclusion You can start exploring other modules in we will continue adding modules (probably to the README). Currently you can use two modules that will help you in development, physics module + built-in modules. WhitestormJS on Github ,
Share Your Thoughts