What does HackerNews think of three.js?

JavaScript 3D Library.

Language: JavaScript

#1 in 3D
#1 in HTML
#2 in JavaScript
It's using Three.js[^1] with Photons[^2], and a number of other interesting libraries for calculation like satellite-js[^3].

[1]: https://github.com/mrdoob/three.js/

[2]: https://github.com/mkkellogg/Photons

[3]: https://github.com/shashwatak/satellite-js

Neat! I see it's done using three.js for 3d graphics and tween.js for animation.

https://github.com/mrdoob/three.js/

https://github.com/tweenjs/tween.js/

constexpr - Cool project!

For those of us with slow internet connections please change your Makefile to use a shallow clone:

``` github/three: mkdir -p github git clone --depth 1 https://github.com/mrdoob/three.js.git github/three -b r108 cd github/three && git checkout r108 ```

This would save a couple of gigs and hours in download.

Just skimming your code I see variable mangling but no AST optimizations, is that correct? Which is odd because you show similar output sizes to the JS bundlers.

Read something that matters to you, some library or snippet that you use a lot or you depend on it. Context matters a lot in getting motivated to comprehend things. Otherwise you will just browse some random code with little to no connection and lack of understanding how the authors got there.

One source code I look into from time to time is Three.js: https://github.com/mrdoob/three.js/ to discover more details over the documentation.

The github project page has a bit more info than the threejs.org website.

It is a relatively small JavaScript library for creating and rendering 3D scene graphs in a browser. It enables you to code while thinking of scenes and the objects within them, rather than GPU buffers and what to put in them.

https://github.com/mrdoob/three.js/

SVG is many times slower than an optimized graphics library rendered on the canvas tag in 2d or webgl contexts. There are many libraries based on the canvas tag for graphics but not all of them are focused on doing visualizations but people still use them for these use cases all the time.

The most well known WebGL library is https://github.com/mrdoob/three.js/ Which has been used for many examples like this http://armsglobe.chromeexperiments.com/

But you could look at the libraries focused on 2d like these http://paperjs.org/ http://fabricjs.com/ But the larger 2d canvas libraries also have much of the same abilities. http://createjs.com/ - http://codepen.io/ianwhitfield/pen/BKOJmj https://github.com/pixijs/pixi.js - http://anvaka.github.io/ngraph/examples/pixi.js/06%20-%20Pac...

If you are just rendering vectors like an icon image, there is no harm in using SVG. If you want access to nodes on a page with a JavaScript library like jQuery, SVG is still the best option. For everything else SVG is not the most performant and is not able to deliver on many graphics abilities that the Canvas tag is capable of. I respect that in most visualizations it doesn't matter and it might be easier but it doesn't mean SVG is the best thing to use for all graphics.

For anyone unfamiliar with Three.js (like I was a minute ago), it's evidently a JavaScript library for 3D graphics: https://github.com/mrdoob/three.js/
It's a good question. I have an entire bookmark folder of "cool WebGL demos" collected over the years, but have seen very few full-fledged applications.

One way you could hedge the WebGL vs. Canvas bet is to use something like THREE.js, where you use THREE's cameras, lighting, etc and then specify whether it should use WebGL or Canvas for rendering. But then again, you'd be betting on THREE.js :)

https://github.com/mrdoob/three.js/

Three.js is a wonderful way to experiment with 3D programming.

Github repo: https://github.com/mrdoob/three.js/

Examples: http://mrdoob.github.com/three.js/

Lets take a look at two repos on sourceforge and github:

http://sourceforge.net/projects/vlc/

https://github.com/mrdoob/three.js

They serve entirely different purposes. Sourceforge looks like a sales page, listing features and downloads. Gitub has the contents of the source right there at the top, before the readme or description, even!

Github seems to be focused on developers, while sourceforge is like a download portal for open source software.

https://github.com/mrdoob/three.js/ - That should get you going. Download that and take a look at all the examples and how they are made. Here is a good book on webgl too - http://www.amazon.com/WebGL-Up-Running-Tony-Parisi/dp/144932...
If you dont know OpenGL already you might be better starting with a library like Three.js: https://github.com/mrdoob/three.js
I've been playing with WebGL via the THREE.js[1] library and I'm really gobsmacked. It's relatively easy, and a lot of fun to play with.

I've noticed that a lot of the demos people have created so far are rendering a simple scene, or trying to build a game engine. I'm looking forward to more people building user interfaces that make use of 3D for data visualization and user interaction. 3D has literally never been so accessible.

[1] https://github.com/mrdoob/three.js/

The point is both Adobe and the W3C are guessing. Think how much faster we could advance if it was put in the hands of the community. A community that constantly implements, gets feedback, re-implements, collaborates. You only have to look at three.js (https://github.com/mrdoob/three.js/) and similar to get an idea of what can be built on a low-level API.

[Edit: guessing, not second-guessing]

Wow: WebGL, CSS/Dom and Canvas renderers.

EaselJS has been considering it[1], and even Three.js has it[2], but as Canvas gets more widespread and Hardware acceleration by default, these multiple renderers may not be that helpful. On the other hand, how long until then?

[1] https://groups.google.com/forum/#!searchin/easeljs/renderer/...

[2] https://github.com/mrdoob/three.js/

Seems nice. But would love ot know it compares to Three.js[1]

[1] https://github.com/mrdoob/three.js/

Thanks! I used Three.JS for the 3d rendering, Rails for the rest. Good idea on the click/drag UI, I'll think about that for v2!

Three.JS: https://github.com/mrdoob/three.js/

WebGL makes it really easy for anyone to start now: http://learningwebgl.com/blog/?page_id=1217?

You can also see the framework Three.Js[1], which Mr. Doob used/created on his Google Colabs[2]

[1] https://github.com/mrdoob/three.js

[2] http://www.ro.me/tech/

Some of the other examples are pretty impressive too: https://github.com/mrdoob/three.js
don't know about 3d/canvas in paper.js, but you should check out three.js, which does do 3d on canvas: https://github.com/mrdoob/three.js/
When I say "in most situations" my implication is that for most 3D applications in the browser such low level interaction with the 3D API is not necessary. Most people building things with WebGL in the future will not be working with WebGL directly, but through an abstraction layer like three.js[1]. This could easily be extended to use Flash as an alternate renderer (say, for people running IE).

[1] https://github.com/mrdoob/three.js/

three.js (https://github.com/mrdoob/three.js/) An easy to use wrapper for doing 3D graphics via JS using canvas, WebGL, and SVG renderers. Check out the cool demos. I'm betting 2011 will see a lot done with this and similar libraries.
https://github.com/mrdoob/three.js has 900+ followers on github, by far the biggest project from my initial analysis.