1.0.7 • Published 1 year ago

@plogg/three v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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 in the examples.

Examples Documentation Wiki Migrating Questions Forum Slack

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';

// init

const camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 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( window.innerWidth, window.innerHeight );
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 went 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

acceptsacorn-jsxabbrevacornajvagentkeepaliveaggregate-erroragent-baseansi-alignansi-colorsansi-stylesansi-regexargparsearray-flattenaprobaare-we-there-yetarray.prototype.flatasn1array-includesassert-plusast-metadata-infererasynckitastral-regexaws4babel-plugin-polyfill-corejs2babel-plugin-dynamic-import-nodebabel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbalanced-matchbasic-authboxenbatchaws-sign2body-parserbcrypt-pbkdfbrotli-sizebrace-expansionbuffer-frombrowserslistcacachebuiltinsbuiltin-modulescallsitescamelcasecall-bindbytescaniuse-litecaselesschownrclean-stackcode-point-atcli-boxescliuicolor-namecolor-convertcolor-supportcombined-streamcolorscommanderconcat-mapconsole-control-stringscontent-typecontent-dispositionconvert-source-mapcookiecore-util-iscookie-signaturecore-js-compatcorscore-jscross-spawndate-fnsdashdashdeep-isdebugdefine-lazy-propdefine-propertiesdelegatesdelayed-streamdeepmergedepddestroydoctrinedomhandlerdomelementtypedom-serializerdomutilsduplexerecc-jsbnee-firstelectron-to-chromiumencodingemoji-regexencodeurlentitiesenquirererr-codeenv-pathses-abstractescape-htmlescaladees-to-primitiveescape-string-regexpeslint-scopeeslint-import-resolver-nodeeslint-module-utilsespreeeslint-utilsesqueryeslint-visitor-keysesrecurseestree-walkerestraverseesprimaesutilsetagexpressextendfast-json-stable-stringifyextsprintffast-levenshteinfast-deep-equalfinalhandlerfile-entry-cachefilesizeforever-agentform-datafind-upflat-cacheflattedfreshforwardedfs-minipassfseventsfunctional-red-black-treefs.realpathfunction-bindget-intrinsicgaugegensyncget-caller-fileglob-parentglobget-symbol-descriptiongetpassgzip-sizegraceful-fsglobalshar-validatorhas-flaghas-symbolshas-bigintshas-tostringtaghosted-git-infohas-unicodehtmlparser2http-cache-semanticshttp-proxy-agenthttp-signaturehttps-proxy-agenthumanize-msignore-walkhashttp-errorsignoreiconv-liteimport-freshimurmurhashindent-stringinfer-ownerinflightinternal-slotinheritsis-boolean-objectis-bigintipipaddr.jsis-callableis-extglobis-core-moduleis-date-objectis-fullwidth-code-pointis-moduleis-dockeris-negative-zerois-number-objectis-lambdais-globis-regexis-shared-array-bufferis-weakrefis-stringisstreamis-wslisarrayis-typedarrayjs-tokensjest-workerisexejsbnjsescis-symbolhar-schemajs-yamljson-schema-traversejson-stable-stringify-without-jsonifyjson-stringify-safejson-schemajsonparsejson5jsprimlocate-pathlevnlodash.debouncelodashlodash.mergelodash.memoizelodash.truncatelru-cachemerge-descriptorsmedia-typermethodsmerge-streammimemake-fetch-happenmime-typesmime-dbminimatchminimistminipassminipass-collectminipass-fetchminipass-json-streamminipass-flushminipass-pipelineminipass-sizedmkdirpminizlibmsnanoidnode-forgenatural-comparenegotiatornode-gypnode-releasesnoptnpm-bundlednpm-install-checksnpm-normalize-package-binnpm-package-argnpm-pick-manifestnpm-packlistnpmlogoauth-signjson-parse-even-better-errorsnumber-is-nanobject-assignobject-inspectobject-keysobject.assignon-finishedobject.valuesonceopenoptionatorp-limitp-locatep-tryp-mappacoteparent-moduleparseurlpath-existspath-is-absoluteperformance-nowpath-parsepath-to-regexppath-keyprocess-nextick-argspicocolorspicomatchprelude-lspromise-inflightproxy-addrprogresspunycodepromise-retryrange-parserrandombytespslqsraw-bodyread-package-json-fastregeneratereadable-streamregenerator-transformregenerator-runtimeregenerate-unicode-propertiesregexppregjsparserrequestregjsgenregexpu-corerequire-from-stringresolverequire-directoryresolve-fromretryrimrafrxjssafer-buffersafe-buffersecure-compareselfsignedsendserialize-javascriptsemvernpm-registry-fetchserve-staticserver-destroyset-blockingservez-libsetprototypeofshebang-regexside-channelshebang-commandsignal-exitslice-ansisockssmart-buffersocks-proxy-agentsource-mapsource-map-supportsprintf-jsspawn-commandsshpkssristring-widthstatusesstring.prototype.trimstartstrip-bomstring.prototype.trimendstring_decoderstrip-ansisupports-colorstrip-json-commentssupports-preserve-symlinks-flagtabletartext-tableto-fast-propertiestoidentifiertough-cookietsconfig-pathstunnel-agenttree-killtweetnacltslibtype-istype-checktype-festunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunbox-primitiveunique-filenameserve-indexunicode-property-aliases-ecmascriptunique-slugutil-deprecateterseruri-jsutils-mergeunpipeuuidwhich-boxed-primitivewhichverrorword-wrapvarywrap-ansiwide-alignv8-compile-cachewrappyvalidate-npm-package-namewidest-lineyallisty18nyargsyargs-parseryocto-queue
1.0.7

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago