0.169.1 • Published 8 months ago

super-three v0.169.1

Weekly downloads
5,009
License
MIT
Repository
github
Last release
8 months 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( animate );
document.body.appendChild( renderer.domElement );

// animation

function animate( 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.169.1

8 months ago

0.169.0

9 months ago

0.168.0

9 months ago

0.167.0

11 months ago

0.165.0

1 year ago

0.164.0

1 year ago

0.163.0

1 year ago

0.162.0

1 year ago

0.161.0

1 year ago

0.160.1

1 year ago

0.160.0

1 year ago

0.158.0

2 years ago

0.157.1

2 years ago

0.157.0

2 years ago

0.156.0

2 years ago

0.154.0

2 years ago

0.154.1

2 years ago

0.155.0

2 years ago

0.152.0

2 years ago

0.147.1

2 years ago

0.147.0

3 years ago

0.144.0

3 years ago

0.141.0

3 years ago

0.137.0

3 years ago

0.135.0

3 years ago

0.136.1

3 years ago

0.136.0

3 years ago

0.133.5

4 years ago

0.133.4

4 years ago

0.133.3

4 years ago

0.133.2

4 years ago

0.133.1

4 years ago

0.133.0

4 years ago

0.128.0

4 years ago

0.128.3

4 years ago

0.128.2

4 years ago

0.128.1

4 years ago

0.124.2

4 years ago

0.124.1

4 years ago

0.124.0

4 years ago

0.125.1

4 years ago

0.125.0

4 years ago

0.123.1

5 years ago

0.123.0

5 years ago

0.122.0

5 years ago

0.120.6

5 years ago

0.120.5

5 years ago

0.120.4

5 years ago

0.120.3

5 years ago

0.120.2

5 years ago

0.120.1

5 years ago

0.120.0

5 years ago

0.119.0

5 years ago

0.118.0

5 years ago

0.116.0

5 years ago

0.115.1

5 years ago

0.115.0

5 years ago

0.113.0

5 years ago

0.111.6

5 years ago

0.112.0

5 years ago

0.111.5

5 years ago

0.111.4

6 years ago

0.111.3

6 years ago

0.111.0

6 years ago

0.111.1

6 years ago

0.111.2

6 years ago

0.109.0

6 years ago

0.108.0

6 years ago

0.105.2

6 years ago

0.105.1

6 years ago

0.102.2

6 years ago

0.102.1

6 years ago

0.101.0

6 years ago

0.100.0

6 years ago