Alexander Buzin cba32d60f2 Move src/extras/controls to src/modules/controls
Former-commit-id: b8acbc4a80fb2480d7c9496899d4a289c5386c4c
2017-01-25 14:12:18 +02:00
2016-09-05 23:17:06 +03:00
2017-01-24 23:54:35 +02:00
2017-01-24 23:07:54 +02:00
2017-01-25 00:46:09 +02:00
2016-08-29 18:41:12 +03:00
2016-11-08 17:05:28 +09:00
2017-01-18 16:48:11 +02:00
2017-01-18 00:09:40 +02:00
CI
2016-11-08 12:10:21 +02:00
2016-10-28 19:38:25 +03:00
2016-11-08 18:35:17 +02:00
2016-11-08 11:09:55 +02:00
2017-01-15 20:14:16 +02:00
2016-11-07 15:35:48 +02:00
2017-01-24 23:22:18 +02:00
2016-12-01 16:22:03 +02:00
2017-01-15 20:12:13 +02:00

XO code style NPM Version Build Status Known Vulnerabilities Discord

Framework for developing 3D web apps

Showcases

You can find lots of examples at showcases.

basic/helloworld basic/model softbody/cloth3 postprocessing/basic-glitch softbody/ropes design/saturn

Why?

  • 🤔 Because making of even a basic Three.js application requires at least ~20 lines of code (see this tutorial)

    • Native three.js: you will need to setup: scene, renderer, camera, make an animate() function before making the actual app.
    • Whitestorm.js: all those values are filled with defaults, you just need to define your own values only if they differs from defaults.
  • 💣 Adding physics is hard.

    • Other frameworks: To make your app run with physics you need to make a second world with same 3d objects and apply their transform (position & rotation) to your rendered scene objects (THREE.Scene for example) in every frame.
    • Whitestorm.js: All this can be done automatically.
  • 🔌 Components & plugins

    • Other: Unknown yet.
    • Whitestorm.js: It provides ability to create your own components using framework's tools. (You can add a component like WHS.Box or WHS.PointLight but for creating a terrain (WHS.Terrain) / aquarium (WHS.Aquarium) / car (WHS.Car) / any other with specific merhods and scripts.
    • See Component system in interactive 3D of web article for more info.

Features

  • 💎 Simple in usage
  • Minimize 3D scene prototyping
  • 🔌 Component based scene graph
  • 💣 Integrated high performance physics with Worker (Multithreading)
  • Automatization of rendering
  • Enhanced softbodies
  • 🆕 ES2015+ based
  • Extension system (plugins)
  • Dynamic geometry update
  • asm.js acceleration
  • Webpack friendly
  • ✔️ Integrated Three.js rendering engine
  • Work with Whitestorm.js and Three.js at the same time

Installation

NODE

$ npm install --save whs

WEBPACK

See WhitestormJS/test-whitestorm-webpack for more details.

Documentation

Full documentation of guides and APIs are located at here.

Usage

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

    gravity: [0, -100, 0], // Physic gravity.

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

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

  mass: 10, // Mass of physics object.

  material: {
    color: 0xffffff, // White color.
    kind: 'basic' // THREE.MeshBasicMaterial
  },

  position: [0, 10, 0]
});

sphere.addTo(world);
console.log(sphere.native); // Returns THREE.Mesh of this object.

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

Playground!

playground

Contributors

Author Contributor Contributor Contributor Contributor Contributor Contributor Contributor Contributor

forthebadge

Description
🚀 🌪 Super-fast 3D framework for Web Applications 🥇 & Games 🎮. Based on Three.js
Readme 347 MiB
Languages
JavaScript 100%