WhitestormJS is a 3D Javascript engine based on Three.js. It uses physics and effects libraries to define WhitestormJS API™ that contains useful scripts for terrain generation, skybox, animation, physics simulation and post-effects. WhitestormJS simplifies Three.js object crafting algorithm to javascript methods with parameters.
WhitestormJS is hosted by jsDelivr. You can link to the latest minified version, full version, or download both.
* It is advised to download your own copies of the following libraries, as large changes can break backwards compatibility.
Include Three.js, Wagner, and Physi.js libraries.
Include a script tag linking the WhitestormJS library in your head
or after your body
:
<script src="three.js"></script>
<script src="physi.js"></script>
<script src="wagner.js"></script>
<!-- WhitestormJS library -->
<script src="{path_to_lib}/whitestorm.js"></script>
After adding these libraries, you can configure your game:
var GAME = new WHS.init({
anaglyph: false, // Anaglyph effect.
stats: "fps", // fps, ms, mb or false if not need.
wagner: WAGNER, // wagner library variable
gravity: { // Physic gravity.
x: 0,
y: -100,
z: 0
}
path_worker: 'physijs_worker.js' // Path to Physijs worker here.
path_ammo: 'ammo.js' // Path to Ammo.js.
});
// Define your scene objects here.
GAME.start(); // Start animations and physics simulation.
- FPS (First person example with Wagner effects and terrain.)
- Basic (Basic "Hello world!" example.)
- Material (Basic example with material.)
- Object/Model (Teapot model with Three.js JSONLoader.)
- Object/Wall (Stone wall (basic).)
- Plugin/Color (Basic plugin example.)
- Skybox (Skybox example)
Changelog: Look here
Произведение «WhitestormJS 3D-Library» созданное автором по имени Alexander Buzin, публикуется на условиях лицензии Creative Commons «Attribution-NonCommercial-NoDerivatives» («Атрибуция — Некоммерческое использование — Без производных произведений») 4.0 Всемирная.
Основано на произведении с https://github.com/WhitestormJS/whitestorm.js.
Разрешения, выходящие за рамки данной лицензии, могут быть доступны на странице https://github.com/WhitestormJS/whitestorm.js.