📜 ⬆️ ⬇️

Three.js - 3d Javascript engine


There is a javascript-gurra, mr.doob , even on Habré his works have already surfaced .
In general, it has a very powerful Javascript 3d framework called

Three.js


The examples are, frankly, impressive. The latest versions of modern browsers work smoothly and beautifully.

I especially delayed the flight between the balls and pleased with the panoramic engine .
And who works for WebGL - so do not rejoice at all - there you and Minecraft and everything you want)


')
var camera, scene, renderer, geometry, material, mesh; init(); animate(); function init() { camera = new THREE.Camera( 75, window.innerWidth / window.innerHeight, 1, 10000 ); camera.position.z = 1000; scene = new THREE.Scene(); geometry = new THREE.Cube( 200, 200, 200 ); material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } ); mesh = new THREE.Mesh( geometry, material ); scene.addObject( mesh ); renderer = new THREE.CanvasRenderer(); renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild( renderer.domElement ); } function animate() { // Include examples/js/RequestAnimationFrame.js for cross-browser compatibility. requestAnimationFrame( animate ); render(); } function render() { mesh.rotation.x += 0.01; mesh.rotation.y += 0.02; renderer.render( scene, camera ); } 

Once again link:

Three.js

Source: https://habr.com/ru/post/117772/


All Articles