three
JavaScript 3D library
Last updated 14 days ago by mrdoob .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install three 
SYNC missed versions from official npm registry.

three.js

NPM Package Build Size NPM Downloads Dev Dependencies Language Grade

JavaScript 3D library

The aim of the project is to create an easy to use, lightweight, 3D library with a default WebGL renderer. The library also provides Canvas 2D, SVG and CSS3D renderers in the examples.

ExamplesDocumentationWikiMigratingQuestionsForumSlackDiscord

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 'js/three.module.js';

var camera, scene, renderer;
var geometry, material, mesh;

init();
animate();

function init() {

	camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.01, 10 );
	camera.position.z = 1;

	scene = new THREE.Scene();

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

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

	renderer = new THREE.WebGLRenderer( { antialias: true } );
	renderer.setSize( window.innerWidth, window.innerHeight );
	document.body.appendChild( renderer.domElement );

}

function animate() {

	requestAnimationFrame( animate );

	mesh.rotation.x += 0.01;
	mesh.rotation.y += 0.02;

	renderer.render( scene, camera );

}

If everything went well, you should see this.

Cloning this repository

Cloning the repo with all its history results in a ~2GB 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

Current Tags

  • 0.118.3                                ...           latest (14 days ago)

203 Versions

  • 0.118.3                                ...           14 days ago
  • 0.118.2                                ...           14 days ago
  • 0.118.1                                ...           17 days ago
  • 0.118.0                                ...           17 days ago
  • 0.117.1                                ...           a month ago
  • 0.117.0                                ...           a month ago
  • 0.116.1                                ...           2 months ago
  • 0.116.0                                ...           2 months ago
  • 0.115.0                                ...           4 months ago
  • 0.114.0                                ...           4 months ago
  • 0.113.2                                ...           5 months ago
  • 0.113.1                                ...           5 months ago
  • 0.113.0                                ...           5 months ago
  • 0.112.1                                ...           6 months ago
  • 0.112.0                                ...           7 months ago
  • 0.111.0                                ...           7 months ago
  • 0.110.0                                ...           8 months ago
  • 0.109.0                                ...           9 months ago
  • 0.108.0                                ...           10 months ago
  • 0.107.0                                ...           a year ago
  • 0.106.2                                ...           a year ago
  • 0.106.1                                ...           a year ago
  • 0.106.0                                ...           a year ago
  • 0.105.2                                ...           a year ago
  • 0.105.1                                ...           a year ago
  • 0.105.0                                ...           a year ago
  • 0.104.0                                ...           a year ago
  • 0.103.0                                ...           a year ago
  • 0.102.1                                ...           a year ago
  • 0.102.0                                ...           a year ago
  • 0.101.1                                ...           a year ago
  • 0.101.0                                ...           a year ago
  • 0.100.0                                ...           2 years ago
  • 0.99.0                                ...           2 years ago
  • 0.98.0                                ...           2 years ago
  • 0.97.0                                ...           2 years ago
  • 0.96.0                                ...           2 years ago
  • 0.95.0                                ...           2 years ago
  • 0.94.0                                ...           2 years ago
  • 0.93.0                                ...           2 years ago
  • 0.92.0                                ...           2 years ago
  • 0.91.0                                ...           2 years ago
  • 0.90.0                                ...           2 years ago
  • 0.89.0                                ...           3 years ago
  • 0.88.0                                ...           3 years ago
  • 0.87.1                                ...           3 years ago
  • 0.87.0                                ...           3 years ago
  • 0.86.0                                ...           3 years ago
  • 0.85.2                                ...           3 years ago
  • 0.85.1                                ...           3 years ago
  • 0.85.0                                ...           3 years ago
  • 0.84.0                                ...           3 years ago
  • 0.83.0                                ...           4 years ago
  • 0.82.1                                ...           4 years ago
  • 0.82.0                                ...           4 years ago
  • 0.81.2                                ...           4 years ago
  • 0.81.1                                ...           4 years ago
  • 0.81.0                                ...           4 years ago
  • 0.80.1                                ...           4 years ago
  • 0.80.0                                ...           4 years ago
  • 0.79.0                                ...           4 years ago
  • 0.78.0                                ...           4 years ago
  • 0.77.1                                ...           4 years ago
  • 0.77.0                                ...           4 years ago
  • 0.76.1                                ...           4 years ago
  • 0.75.0                                ...           4 years ago
  • 0.74.0                                ...           4 years ago
  • 0.73.2                                ...           4 years ago
  • 0.73.1                                ...           4 years ago
  • 0.66.97                                ...           5 years ago
  • 0.66.96                                ...           5 years ago
  • 0.66.95                                ...           5 years ago
  • 0.66.94                                ...           5 years ago
  • 0.66.93                                ...           5 years ago
  • 0.66.92                                ...           5 years ago
  • 0.66.91                                ...           5 years ago
  • 0.66.90                                ...           5 years ago
  • 0.66.89                                ...           5 years ago
  • 0.66.88                                ...           5 years ago
  • 0.73.0                                ...           5 years ago
  • 0.66.82                                ...           5 years ago
  • 0.66.87                                ...           5 years ago
  • 0.68.87                                ...           5 years ago
  • 0.72.0                                ...           5 years ago
  • 0.71.1                                ...           5 years ago
  • 0.66.86                                ...           5 years ago
  • 0.68.86                                ...           5 years ago
  • 0.66.85                                ...           5 years ago
  • 0.66.84                                ...           5 years ago
  • 0.66.83                                ...           5 years ago
  • 0.66.81                                ...           5 years ago
  • 0.66.80                                ...           5 years ago
  • 0.66.79                                ...           5 years ago
  • 0.66.78                                ...           5 years ago
  • 0.66.77                                ...           5 years ago
  • 0.66.76                                ...           5 years ago
  • 0.66.75                                ...           5 years ago
  • 0.66.74                                ...           5 years ago
  • 0.66.73                                ...           5 years ago
  • 0.66.72                                ...           5 years ago
  • 0.66.71                                ...           5 years ago
  • 0.66.70                                ...           5 years ago
  • 0.66.69                                ...           5 years ago
  • 0.66.68                                ...           5 years ago
  • 0.66.67                                ...           5 years ago
  • 0.66.66                                ...           5 years ago
  • 0.66.65                                ...           5 years ago
  • 0.66.64                                ...           5 years ago
  • 0.66.54                                ...           5 years ago
  • 0.70.1                                ...           5 years ago
  • 0.66.63                                ...           5 years ago
  • 0.71.0                                ...           5 years ago
  • 0.66.62                                ...           5 years ago
  • 0.66.61                                ...           5 years ago
  • 0.66.60                                ...           5 years ago
  • 0.66.59                                ...           5 years ago
  • 0.66.58                                ...           5 years ago
  • 0.66.57                                ...           5 years ago
  • 0.66.56                                ...           5 years ago
  • 0.66.55                                ...           5 years ago
  • 0.66.53                                ...           5 years ago
  • 0.66.52                                ...           5 years ago
  • 0.66.51                                ...           5 years ago
  • 0.66.50                                ...           5 years ago
  • 0.66.49                                ...           5 years ago
  • 0.66.48                                ...           5 years ago
  • 0.66.47                                ...           5 years ago
  • 0.66.46                                ...           5 years ago
  • 0.66.45                                ...           5 years ago
  • 0.66.43                                ...           5 years ago
  • 0.66.42                                ...           5 years ago
  • 0.66.41                                ...           5 years ago
  • 0.70.0                                ...           5 years ago
  • 0.66.40                                ...           5 years ago
  • 0.66.39                                ...           5 years ago
  • 0.66.38                                ...           5 years ago
  • 0.66.37                                ...           6 years ago
  • 0.66.36                                ...           6 years ago
  • 0.66.35                                ...           6 years ago
  • 0.66.32-dev                                ...           6 years ago
  • 0.66.31                                ...           6 years ago
  • 0.66.30                                ...           6 years ago
  • 0.66.29                                ...           6 years ago
  • 0.66.28                                ...           6 years ago
  • 0.66.27                                ...           6 years ago
  • 0.66.26                                ...           6 years ago
  • 0.66.25                                ...           6 years ago
  • 0.66.24                                ...           6 years ago
  • 0.66.23                                ...           6 years ago
  • 0.66.22                                ...           6 years ago
  • 0.66.21                                ...           6 years ago
  • 0.66.20                                ...           6 years ago
  • 0.69.0                                ...           6 years ago
  • 0.66.19                                ...           6 years ago
  • 0.66.18                                ...           6 years ago
  • 0.66.17                                ...           6 years ago
  • 0.66.16                                ...           6 years ago
  • 0.66.15                                ...           6 years ago
  • 0.66.14                                ...           6 years ago
  • 0.66.13                                ...           6 years ago
  • 0.66.12                                ...           6 years ago
  • 0.66.11                                ...           6 years ago
  • 0.66.10                                ...           6 years ago
  • 0.66.9                                ...           6 years ago
  • 0.66.8                                ...           6 years ago
  • 0.66.7                                ...           6 years ago
  • 0.66.6                                ...           6 years ago
  • 0.68.0                                ...           6 years ago
  • 0.67.0                                ...           6 years ago
  • 0.66.2                                ...           6 years ago
  • 0.66.1                                ...           6 years ago
  • 0.66.0                                ...           6 years ago
  • 0.58.10                                ...           7 years ago
  • 0.58.9                                ...           7 years ago
  • 0.58.8                                ...           7 years ago
  • 0.58.7                                ...           7 years ago
  • 0.56.7                                ...           7 years ago
  • 0.58.6                                ...           7 years ago
  • 0.58.5                                ...           7 years ago
  • 0.58.4                                ...           7 years ago
  • 0.58.3                                ...           7 years ago
  • 0.58.2                                ...           7 years ago
  • 0.58.1                                ...           7 years ago
  • 0.56.4                                ...           7 years ago
  • 0.56.3                                ...           7 years ago
  • 0.56.2                                ...           7 years ago
  • 0.56.1                                ...           7 years ago
  • 0.56.0                                ...           7 years ago
  • 0.55.0                                ...           7 years ago
  • 0.54.0                                ...           7 years ago
  • 0.54.12-dev                                ...           8 years ago
  • 0.54.11-dev                                ...           8 years ago
  • 0.54.10-dev                                ...           8 years ago
  • 0.54.9-dev                                ...           8 years ago
  • 0.54.8-dev                                ...           8 years ago
  • 0.54.7-dev                                ...           8 years ago
  • 0.54.6-dev                                ...           8 years ago
  • 0.54.5-dev                                ...           8 years ago
  • 0.54.4-dev                                ...           8 years ago
  • 0.54.3-dev                                ...           8 years ago
  • 0.54.2-dev                                ...           8 years ago
  • 0.54.1-dev                                ...           8 years ago
  • 0.54.0-dev                                ...           8 years ago
Downloads
Today 279
This Week 5,367
This Month 8,537
Last Day 864
Last Week 5,247
Last Month 23,159
Dependencies (0)
None
Dev Dependencies (11)
Dependents (1376)

Copyright 2014 - 2016 © taobao.org |