0.164.0 • Published 1 month ago

super-three v0.164.0

Weekly downloads
5,009
License
MIT
Repository
github
Last release
1 month ago

three.js

NPM Package Build Size NPM Downloads DeepScan Discord

JavaScript 3D library

The aim of the project is to create an easy-to-use, lightweight, cross-browser, general-purpose 3D library. The current builds only include a WebGL renderer but WebGPU (experimental), SVG and CSS3D renderers are also available as addons.

Examples Docs Manual Wiki Migrating Questions Forum Discord

Usage

This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a WebGL renderer for the scene and camera, and it adds that viewport to the document.body element. Finally, it animates the cube within the scene for the camera.

import * as THREE from 'three';

const width = window.innerWidth, height = window.innerHeight;

// init

const camera = new THREE.PerspectiveCamera( 70, width / height, 0.01, 10 );
camera.position.z = 1;

const scene = new THREE.Scene();

const geometry = new THREE.BoxGeometry( 0.2, 0.2, 0.2 );
const material = new THREE.MeshNormalMaterial();

const mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );

const renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setSize( width, height );
renderer.setAnimationLoop( animation );
document.body.appendChild( renderer.domElement );

// animation

function animation( time ) {

	mesh.rotation.x = time / 2000;
	mesh.rotation.y = time / 1000;

	renderer.render( scene, camera );

}

If everything goes well, you should see this.

Cloning this repository

Cloning the repo with all its history results in a ~2 GB download. If you don't need the whole history you can use the depth parameter to significantly reduce download size.

git clone --depth=1 https://github.com/mrdoob/three.js.git

Change log

Releases

0.164.0

1 month ago

0.163.0

2 months ago

0.162.0

3 months ago

0.161.0

4 months ago

0.160.1

4 months ago

0.160.0

6 months ago

0.158.0

7 months ago

0.157.1

8 months ago

0.157.0

8 months ago

0.156.0

9 months ago

0.154.0

11 months ago

0.154.1

11 months ago

0.155.0

10 months ago

0.152.0

1 year ago

0.147.1

1 year ago

0.147.0

2 years ago

0.144.0

2 years ago

0.141.0

2 years ago

0.137.0

2 years ago

0.135.0

2 years ago

0.136.1

2 years ago

0.136.0

2 years ago

0.133.5

3 years ago

0.133.4

3 years ago

0.133.3

3 years ago

0.133.2

3 years ago

0.133.1

3 years ago

0.133.0

3 years ago

0.128.0

3 years ago

0.128.3

3 years ago

0.128.2

3 years ago

0.128.1

3 years ago

0.124.2

3 years ago

0.124.1

3 years ago

0.124.0

3 years ago

0.125.1

3 years ago

0.125.0

3 years ago

0.123.1

4 years ago

0.123.0

4 years ago

0.122.0

4 years ago

0.120.6

4 years ago

0.120.5

4 years ago

0.120.4

4 years ago

0.120.3

4 years ago

0.120.2

4 years ago

0.120.1

4 years ago

0.120.0

4 years ago

0.119.0

4 years ago

0.118.0

4 years ago

0.116.0

4 years ago

0.115.1

4 years ago

0.115.0

4 years ago

0.113.0

4 years ago

0.111.6

4 years ago

0.112.0

4 years ago

0.111.5

4 years ago

0.111.4

4 years ago

0.111.3

5 years ago

0.111.0

5 years ago

0.111.1

5 years ago

0.111.2

5 years ago

0.109.0

5 years ago

0.108.0

5 years ago

0.105.2

5 years ago

0.105.1

5 years ago

0.102.2

5 years ago

0.102.1

5 years ago

0.101.0

5 years ago

0.100.0

5 years ago