MyGit
🚩收到GitHub仓库的更新通知

mrdoob/three.js

Fork: 35010 Star: 98338 (更新于 2024-03-29 01:28:42)

license: MIT

Language: JavaScript .

JavaScript 3D Library.

最后发布版本: r162 ( 2024-02-29 16:57:10)

官方网址 GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

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.

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( 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

最近版本更新:(数据更新于 2024-03-28 09:40:26)

2024-02-29 16:57:10 r162

2024-01-31 14:54:46 r161

2023-12-22 20:35:12 r160

2023-11-30 22:02:40 r159

2023-10-27 17:29:59 r158

2023-09-28 23:13:39 r157

2023-09-05 15:13:32 r156

2023-07-28 00:13:58 r155

2023-06-29 11:04:14 r154

2023-05-31 23:25:41 r153

主题(topics):

3d, augmented-reality, canvas, html5, javascript, svg, virtual-reality, webaudio, webgl, webgl2, webgpu, webxr

mrdoob/three.js同语言 JavaScript最近更新仓库

2024-03-29 00:21:01 jgraph/drawio

2024-03-27 02:01:56 nodejs/node

2024-03-26 03:21:15 usebruno/bruno

2024-03-25 23:16:34 EddieHubCommunity/BioDrop

2024-03-25 22:59:35 expressjs/express

2024-03-25 21:16:38 awslabs/llrt