WhitestormJS

Whitestorm.js
Original author(s) Alexander Buzin (sasha240100) [1]
Developer(s) WhitestormJS community [2]
Stable release
v0.11.1
Development status Active
Written in JavaScript
Type JavaScript library
License MIT License[3]
Website whsjs.io

Whitestorm.js is a 3D JavaScript library/API based on Three.js that simplify code, adds physics and post-effects. The source code is hosted in a repository on GitHub.

Overview

WhitestormJS is a framework for 3D web apps built with Three.js technology. It implements a core with component system and plugin support for fast development of 3D scene with physics. Automizing your web app with whitestorm is fast and comfortable. This engine has physics support implemented by custom Physi.js library, which is much faster than others. Framework provides extended component control and high frame rate, because it uses WebWorkers technology for multithreading.

Features

Whitestorm.js includes the following features:[4]

Whitestorm.js is made available under the MIT license.[3]

Usage

NODE

npm install whitestormjs

BROWSER

Include a script tag linking the WhitestormJS library in your head or after your body:

The Whitestorm.js library is a single JavaScript file. Include Three.js, Wagner, and Cannon.js libraries before Whitestorm.js. Include a script tag linking the WhitestormJS library in your head or after your body:

<script src="{path_to_lib}/whitestorm.js"></script>

After adding these libraries, you can configure your game:

const world = new WHS.World({
    stats: "fps", // fps, ms, mb or false if not need.
    autoresize: true,

    gravity: { // Physic gravity.
        x: 0,
        y: -100,
        z: 0
    },

    camera: {
      z: 50 // Move camera.
    }
});

const sphere = new WHS.Sphere({ // Create sphere object.
  geometry: {
    radius: 3
  },

  mass: 10, // Mass of physics object.

  material: {
    color: 0xffffff,
    kind: 'basic'
  },

  pos: {
    x: 0,
    y: 100,
    z: 0
  }
});

sphere.addTo(GAME);
sphere.getNative(); // Returns THREE.Mesh of this object.

world.start(); // Start animations and physics simulation.

References

Category:2010 software Category:3D scenegraph APIs Category:Cross-platform software Category:Free 3D graphics software Category:Graphics libraries Category:JavaScript libraries Category:Software using the MIT license Category:WebGL

This article is issued from Wikipedia - version of the 10/28/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.