Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell which version of Three.js is loaded in browser?

How can you tell which version of the Three.js library the browser is currently using?

I have tried all of these in the console:

THREE.version 
THREE.version() 
THREE.v
THREE.v()

But they are all undefined.

like image 305
Martin Joiner Avatar asked Sep 13 '17 08:09

Martin Joiner


People also ask

Is Three Js a library or framework?

Three. js is an open source JavaScript library that is used to display the graphics, 3D and 2D objects on the web browser.

Is Three Js a JavaScript?

three. js is a JavaScript-based WebGL engine that can run GPU-powered games and other graphics-powered apps straight from the browser.


1 Answers

Type THREE.REVISION in the console.

Three.js uses the word revision rather than version. You will often see discussion on SO referring to r84 as short hand for "revision 84".

BTW, Three.js automatically logs this number to the console whenever an instance of THREE.WebGLRenderer is initialised. Look near the top of the console for something like:

  THREE.WebGLRenderer 84        three.min.js:154
>
like image 150
Martin Joiner Avatar answered Oct 16 '22 22:10

Martin Joiner