0.167.1 • Published 2 months ago

three v0.167.1

Weekly downloads
401,906
License
MIT
Repository
github
Last release
2 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

ymapboxvue-gcode-viewer@hereticsibyl/svelte-hope-component@zf_node/three-vue3d-earth-globe@michaelldev/ngx-profile-avatar@superviz/threejs-adapteraeonlabs-vue-model-vieweratwintestdouyabo-threejs-demo@datagrok/viewers@bbc/storyplayer@qunyu/ldr-group-loaderthree-fastr3f-sdk-testreact-native-sdaf@bimenergy/floorplantm-streetside-viewer@kykungz/vizz-legacy-rendererprocedural-threewebviewer-uploaderhpc-pack0three-fx-composerts-workflowthreejsareact360view@ar-ty/webviewer360videoreactreact360threejs@modly/modly-visualizermodly-visualizer@aicsnpm/agentviz-viewercra-template-buerliyang3deurogridvizsimulation-lib-hz@dorabot/visualizationthree-dimensional@techanvil/terminal-ninjadorabot-visualizationthreejs-raycast-selectionthreejs-aabb-collision-enginebravobimreact-use-threesworldthreevue-three-zhongxuyang@__escad-test/clientinr-webar-coremoldrawrfv-with-loadingreact-file-viewer-by-loadingreact-file-viewer-w-loadingreact-file-viewer-with-loading@lauri-codes/matterabu.jsreact-3d-globe@geenee/sdk-example-slam@geenee/sdk-example-trackingrapier-testbed3dscene-json-renderercomponent-bbyjola_player@mlperego/use-r3f-assets@formationai/voltron-bundlertriglyphthree-nebula-websitecomic-package3m-plugin-postprocessing-effect-composermacys-starsp-gis3sp-gis4sp-gis5sp-gis6propile-spontexarchei-skinview3d@meat_packages/hb-map-display-componentanimation-felixcloset-viewerforge-viewer-vue-component-julianmatemats-viewervue-3d-scenexr3-clientxr3-spokexrchat-spokesimularge-reusable-scenevsat-three-demo@selmanbaskaya/colorscaleg.frame.common.level_managersb-vue-quasarthree-vue-base@verybigthings/g.frame.common.level_managerjupyterlab-xyz-extensionts-basic-gltf-viewer3dstreamlinesglobinwebmarine-coretransform-controls@thingts/thingtsthree-slim-controlsgade-map
0.165.0

4 months ago

0.167.0

2 months ago

0.167.1

2 months ago

0.166.1

3 months ago

0.166.0

3 months ago

0.164.0

5 months ago

0.164.1

5 months ago

0.163.0

6 months ago

0.162.0

7 months ago

0.161.0

8 months ago

0.160.1

9 months ago

0.160.0

10 months ago

0.159.0

10 months ago

0.158.0

11 months ago

0.154.0

1 year ago

0.153.0

1 year ago

0.156.0

1 year ago

0.156.1

1 year ago

0.155.0

1 year ago

0.157.0

1 year ago

0.152.0

1 year ago

0.152.1

1 year ago

0.152.2

1 year ago

0.151.1

2 years ago

0.151.2

2 years ago

0.151.0

2 years ago

0.151.3

2 years ago

0.149.0

2 years ago

0.150.0

2 years ago

0.150.1

2 years ago

0.148.0

2 years ago

0.147.0

2 years ago

0.146.0

2 years ago

0.144.0

2 years ago

0.145.0

2 years ago

0.142.0

2 years ago

0.141.0

2 years ago

0.143.0

2 years ago

0.140.2

2 years ago

0.140.1

2 years ago

0.140.0

2 years ago

0.139.0

3 years ago

0.139.2

3 years ago

0.139.1

3 years ago

0.138.1

3 years ago

0.138.3

3 years ago

0.138.2

3 years ago

0.137.2

3 years ago

0.137.1

3 years ago

0.137.0

3 years ago

0.137.5

3 years ago

0.137.4

3 years ago

0.137.3

3 years ago

0.136.0

3 years ago

0.138.0

3 years ago

0.135.0

3 years ago

0.134.0

3 years ago

0.133.1

3 years ago

0.133.0

3 years ago

0.132.2

3 years ago

0.132.1

3 years ago

0.132.0

3 years ago

0.131.3

3 years ago

0.131.2

3 years ago

0.131.1

3 years ago

0.131.0

3 years ago

0.130.1

3 years ago

0.130.0

3 years ago

0.129.0

3 years ago

0.128.0

3 years ago

0.127.0

4 years ago

0.126.1

4 years ago

0.126.0

4 years ago

0.125.2

4 years ago

0.125.1

4 years ago

0.125.0

4 years ago

0.124.0

4 years ago

0.123.0

4 years ago

0.122.0

4 years ago

0.121.1

4 years ago

0.121.0

4 years ago

0.120.1

4 years ago

0.120.0

4 years ago

0.119.1

4 years ago

0.119.0

4 years ago

0.118.2

4 years ago

0.118.3

4 years ago

0.118.0

4 years ago

0.118.1

4 years ago

0.117.1

4 years ago

0.117.0

4 years ago

0.116.1

4 years ago

0.116.0

4 years ago

0.115.0

5 years ago

0.114.0

5 years ago

0.113.2

5 years ago

0.113.1

5 years ago

0.113.0

5 years ago

0.112.1

5 years ago

0.112.0

5 years ago

0.111.0

5 years ago

0.110.0

5 years ago

0.109.0

5 years ago

0.108.0

5 years ago

0.107.0

5 years ago

0.106.2

5 years ago

0.106.1

5 years ago

0.106.0

5 years ago

0.105.2

5 years ago

0.105.1

5 years ago

0.105.0

5 years ago

0.104.0

5 years ago

0.103.0

6 years ago

0.102.1

6 years ago

0.102.0

6 years ago

0.101.1

6 years ago

0.101.0

6 years ago

0.100.0

6 years ago

0.99.0

6 years ago

0.98.0

6 years ago

0.97.0

6 years ago

0.96.0

6 years ago

0.95.0

6 years ago

0.94.0

6 years ago

0.93.0

6 years ago

0.92.0

6 years ago

0.91.0

7 years ago

0.90.0

7 years ago

0.89.0

7 years ago

0.88.0

7 years ago

0.87.1

7 years ago

0.87.0

7 years ago

0.86.0

7 years ago

0.85.2

7 years ago

0.85.1

7 years ago

0.85.0

7 years ago

0.84.0

8 years ago

0.83.0

8 years ago

0.82.1

8 years ago

0.82.0

8 years ago

0.81.2

8 years ago

0.81.1

8 years ago

0.81.0

8 years ago

0.80.1

8 years ago

0.80.0

8 years ago

0.79.0

8 years ago

0.78.0

8 years ago

0.77.1

8 years ago

0.77.0

8 years ago

0.76.1

8 years ago

0.75.0

9 years ago

0.74.0

9 years ago

0.73.2

9 years ago

0.73.3

9 years ago

0.73.1

9 years ago

0.66.97

9 years ago

0.66.96

9 years ago

0.66.95

9 years ago

0.66.94

9 years ago

0.66.93

9 years ago

0.66.92

9 years ago

0.66.91

9 years ago

0.66.90

9 years ago

0.66.89

9 years ago

0.66.88

9 years ago

0.73.0

9 years ago

0.66.82

9 years ago

0.66.87

9 years ago

0.68.87

9 years ago

0.72.0

9 years ago

0.71.1

9 years ago

0.66.86

9 years ago

0.68.86

9 years ago

0.66.85

9 years ago

0.66.84

9 years ago

0.66.83

9 years ago

0.66.81

9 years ago

0.66.80

9 years ago

0.66.79

9 years ago

0.66.78

9 years ago

0.66.77

9 years ago

0.66.76

9 years ago

0.66.75

9 years ago

0.66.74

9 years ago

0.66.73

9 years ago

0.66.72

9 years ago

0.66.71

9 years ago

0.66.70

9 years ago

0.66.69

9 years ago

0.66.68

9 years ago

0.66.67

9 years ago

0.66.66

9 years ago

0.66.65

9 years ago

0.66.64

9 years ago

0.70.1

9 years ago

0.71.0

9 years ago

0.66.63

9 years ago

0.66.62

9 years ago

0.66.61

9 years ago

0.66.60

9 years ago

0.66.59

9 years ago

0.66.58

9 years ago

0.66.57

9 years ago

0.66.56

9 years ago

0.66.55

9 years ago

0.66.54

9 years ago

0.66.53

9 years ago

0.66.52

9 years ago

0.66.51

9 years ago

0.66.50

9 years ago

0.66.49

10 years ago

0.66.48

10 years ago

0.66.47

10 years ago

0.66.46

10 years ago

0.66.45

10 years ago

0.66.43

10 years ago

0.66.42

10 years ago

0.66.41

10 years ago

0.70.0

10 years ago

0.66.40

10 years ago

0.66.39

10 years ago

0.66.38

10 years ago

0.66.37

10 years ago

0.66.36

10 years ago

0.66.35

10 years ago

0.66.32-dev

10 years ago

0.66.31

10 years ago

0.66.30

10 years ago

0.66.29

10 years ago

0.66.28

10 years ago

0.66.27

10 years ago

0.66.26

10 years ago

0.66.25

10 years ago

0.66.24

10 years ago

0.66.23

10 years ago

0.66.22

10 years ago

0.66.21

10 years ago

0.66.20

10 years ago

0.69.0

10 years ago

0.66.19

10 years ago

0.66.18

10 years ago

0.66.17

10 years ago

0.66.16

10 years ago

0.66.15

10 years ago

0.66.14

10 years ago

0.66.13

10 years ago

0.66.12

10 years ago

0.66.11

10 years ago

0.66.10

10 years ago

0.66.9

10 years ago

0.66.8

10 years ago

0.66.7

10 years ago

0.66.6

10 years ago

0.66.5

10 years ago

0.66.4

10 years ago

0.66.3

10 years ago

0.68.0

10 years ago

0.67.0

10 years ago

0.66.2

11 years ago

0.66.1

11 years ago

0.66.0

11 years ago

0.58.10

11 years ago

0.58.9

11 years ago

0.58.8

11 years ago

0.58.7

11 years ago

0.56.7

11 years ago

0.58.6

11 years ago

0.58.5

11 years ago

0.58.4

11 years ago

0.58.3

11 years ago

0.58.2

11 years ago

0.58.1

11 years ago

1.58.1

11 years ago

0.56.4

12 years ago

0.56.3

12 years ago

0.56.2

12 years ago

0.56.1

12 years ago

0.56.0

12 years ago

0.55.0

12 years ago

0.54.0

12 years ago

0.54.12-dev

12 years ago

0.54.11-dev

12 years ago

0.54.10-dev

12 years ago

0.54.9-dev

12 years ago

0.54.8-dev

12 years ago

0.54.7-dev

12 years ago

0.54.6-dev

12 years ago

0.54.5-dev

12 years ago

0.54.4-dev

12 years ago

0.54.3-dev

12 years ago

0.54.2-dev

12 years ago

0.54.1-dev

12 years ago

0.54.0-dev

12 years ago