three
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/three package

0.176.0 • Public • Published

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 WebGL and WebGPU renderers but SVG and CSS3D renderers are also available as addons.

ExamplesDocsManualWikiMigratingQuestionsForumDiscord

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.176.00latest

Version History

VersionDownloads (Last 7 Days)Published
0.176.00
0.175.0206,142
0.174.076,875
0.173.051,561
0.172.054,122
0.171.035,151
0.170.0186,841
0.169.039,431
0.168.040,803
0.167.122,901
0.167.08,475
0.166.127,401
0.166.01,432
0.165.025,391
0.164.130,322
0.164.06,616
0.163.028,274
0.162.033,406
0.161.030,012
0.160.131,372
0.160.014,686
0.159.042,233
0.158.023,486
0.157.016,004
0.156.112,329
0.156.01,711
0.155.023,289
0.154.033,151
0.153.013,110
0.152.213,978
0.152.1763
0.152.04,004
0.151.314,547
0.151.2663
0.151.1290
0.151.02,226
0.150.119,914
0.150.03,924
0.149.018,151
0.148.018,315
0.147.010,191
0.146.027,682
0.145.05,000
0.144.06,093
0.143.0103,289
0.142.07,240
0.141.06,420
0.140.28,241
0.140.1149
0.140.02,111
0.139.251,285
0.139.123
0.139.02,405
0.138.35,422
0.138.2189
0.138.169
0.138.01,313
0.137.517,482
0.137.4416
0.137.36
0.137.217
0.137.172
0.137.01,457
0.136.014,369
0.135.042,115
0.134.08,445
0.133.18,584
0.133.01,024
0.132.24,992
0.132.114
0.132.0415
0.131.314,180
0.131.2660
0.131.196
0.131.032
0.130.15,478
0.130.01,182
0.129.03,080
0.128.08,728
0.127.06,994
0.126.17,013
0.126.03,269
0.125.28,845
0.125.1653
0.125.01,859
0.124.04,854
0.123.012,571
0.122.03,128
0.121.19,050
0.121.0132
0.120.15,918
0.120.02,601
0.119.1819
0.119.0669
0.118.31,764
0.118.26
0.118.1761
0.118.0243
0.117.11,488
0.117.0613
0.116.12,456
0.116.068
0.115.01,594
0.114.0699
0.113.21,429
0.113.178
0.113.035
0.112.11,758
0.112.0666
0.111.011,147
0.110.01,052
0.109.0876
0.108.01,294
0.107.0605
0.106.21,998
0.106.118
0.106.0193
0.105.25,466
0.105.19
0.105.097
0.104.01,270
0.103.0306
0.102.1215
0.102.0240
0.101.1196
0.101.086
0.100.0362
0.99.02,141
0.98.0719
0.97.0617
0.96.0555
0.95.0844
0.94.0216
0.93.0484
0.92.0842
0.91.01,209
0.90.0301
0.89.02,551
0.88.0720
0.87.15,816
0.87.051
0.86.0469
0.85.218,036
0.85.14
0.85.0557
0.84.02,720
0.83.03,228
0.82.1107
0.82.08
0.81.291
0.81.112
0.81.0232
0.80.127
0.80.01,102
0.79.0222
0.78.0311
0.77.173
0.77.02,007
0.76.133
0.75.015
0.74.094
0.73.2113
0.73.1121
0.66.9711
0.66.967
0.66.957
0.66.944
0.66.935
0.66.9216
0.66.917
0.66.907
0.66.896
0.66.884
0.73.010
0.66.824
0.66.878
0.68.874
0.72.0692
0.71.1317
0.66.865
0.68.864
0.66.856
0.66.847
0.66.833
0.66.814
0.66.805
0.66.7910
0.66.784
0.66.775
0.66.767
0.66.757
0.66.7410
0.66.738
0.66.725
0.66.716
0.66.706
0.66.696
0.66.687
0.66.678
0.66.664
0.66.654
0.66.647
0.70.111
0.71.0364
0.66.636
0.66.625
0.66.614
0.66.604
0.66.595
0.66.5812
0.66.579
0.66.564
0.66.554
0.66.546
0.66.537
0.66.524
0.66.514
0.66.507
0.66.496
0.66.486
0.66.477
0.66.465
0.66.454
0.66.438
0.66.426
0.66.4110
0.70.09
0.66.405
0.66.394
0.66.385
0.66.378
0.66.365
0.66.354
0.66.32-dev6
0.66.318
0.66.30298
0.66.299
0.66.285
0.66.276
0.66.2615
0.66.254
0.66.246
0.66.237
0.66.225
0.66.214
0.66.207
0.69.025
0.66.195
0.66.187
0.66.177
0.66.164
0.66.155
0.66.146
0.66.135
0.66.124
0.66.114
0.66.104
0.66.97
0.66.85
0.66.74
0.66.68
0.68.08
0.67.013
0.66.27
0.66.16
0.66.010
0.58.1037
0.58.96
0.58.89
0.58.75
0.56.78
0.58.622
0.58.54
0.58.410
0.58.34
0.58.25
0.58.126
0.56.47
0.56.35
0.56.28
0.56.16
0.56.036
0.55.0445
0.54.017
0.54.12-dev5
0.54.11-dev5
0.54.10-dev5
0.54.9-dev5
0.54.8-dev5
0.54.7-dev4
0.54.6-dev4
0.54.5-dev5
0.54.4-dev4
0.54.3-dev6
0.54.2-dev5
0.54.1-dev8
0.54.0-dev6

Package Sidebar

Install

npm i three

Homepage

threejs.org/

Weekly Downloads

1,384,508

Version

0.176.0

License

MIT

Unpacked Size

30.2 MB

Total Files

1099

Last publish

Collaborators

  • mrdoob
  • mugen87