Framework for developing 3D web apps
You can find lots of examples at showcases.
animate()
function before making the actual app.THREE.Scene
for example) in every frame.Unknown yet
.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.Worker
(Multithreading)$ npm install --save whs
See WhitestormJS/test-whitestorm-webpack for more details.
Full documentation of guides and APIs are located at here.
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.