50

Pros and cons anyone? Couldn’t find a complete feature set for three.js library. Though I do know it’s popular and in active development. Maybe someone have done some R&D on WebGL engines and can suggest which benefits each library gives?

oddy
  • 1,879
  • 2
  • 16
  • 25
  • When you say WebGL engines, do you mean scene graph libraries that run on top of WebGL? I.e. what is the set that you want a comparison of? – LarsH Jul 22 '11 at 16:44
  • @larsh First question: exactly, sorry for the confusion. Second question: easyness of use, animation, IK, support, inner architecture of the framework/library itself (to contribute). – oddy Jul 22 '11 at 18:28
  • I wonder about canvas fallback. I think I read somewhere that tree.js can fallback to use canvas for rendering if webgl is not available.. think about ie. I wonder how this works in practice if you have to display rather simple objects. What about the other options do they have such a fallback mechanism too? – Nils Mar 20 '12 at 15:41

4 Answers4

92

As SceneJS author I thought I'd throw this in if it helps: SceneJS is specialised towards fast rendering of large numbers of individually articulated objects, without game engine effects like shadows, reflections etc.

In other words it's aimed at requirements of CAD, medical anatomy, engineering visualisations, things with 1000's of nuts and bolts, organs etc.

It therefore has less flexibility than three.js, GLGE and PhiloGL.

It does however have a pure JSON API, which people have found integrates well with AJAX, parsers and databases (eg CouchDB).

So if you're writing a game I would point you at one of the other frameworks, but if you're writing a CAD viewer then SceneJS might do the trick.

xeolabs
  • 1,369
  • 1
  • 9
  • 15
  • That’s really helpful, thank you. – oddy Aug 06 '11 at 09:40
  • 5
    Update: SceneJS v4 now supports post-effect pipelines, enabling effects like depth-of-field etc. So now we have reflections, and shadows will be supported soon :) http://scenejs.org/examples/index.html#postprocessing_depthOfField_autofocus – xeolabs Nov 13 '14 at 14:32
  • @xeolabs I just noticed this thread and thought I would ask you. I am building something similar to this: https://matterport.com/3d-space/project-sky-12-dome-house/, but without the 3D data, just panorama photos. I have gotten started with Three.js, but have some issues with groupings, memory leaks and so on which led me to look at alternatives. If you were building the site I linked, which would you choose, Three.js, or SceneJS? – Alan Mar 28 '16 at 15:28
37

I often use the popularity of a project on GitHub as an indicator of its success. While there are problems with this method, I do find it's often the best way to make a choice. Listing popular WebGL projects, in decreasing popularity by number of "stars":

This also mirrors what I've found when looking into these projects. three.js seems to be the most feature complete, has an extensive set of examples, a well-structured code base, and a thriving community.

Allan Raquin
  • 512
  • 7
  • 25
jterrace
  • 57,555
  • 21
  • 140
  • 184
  • This is very helpful. Does this method have anything to say about projects that are not hosted on GitHub, or is that one of the problems you alluded to? For example, CopperLicht has often been given high marks, but is not hosted on GitHub. – LarsH Jul 22 '11 at 19:40
  • @LarsH It's one of the problems, although I consider having open source development a huge plus. – jterrace Jul 22 '11 at 19:53
  • @jterrace Well, last time I checked (1 month ago) the doc in three.js was far from complete. Some projects even in your list have better (more complete) documentation. As for GitHub — it’s not the only online source code hoster. Bitbucket, Codeplex, Google code etc. What I’m looking is a R&D in that field. Personal experience in a couple of WebGL frameworks. – oddy Jul 22 '11 at 20:11
  • @oddy I have personal experience. ThreeJS has an extensive set of examples and a great community. Highly recommend. – jterrace Jul 22 '11 at 20:27
  • @jterrace One simple question before I go with your advice. Which frameworks have you used except for three.js and why you didn’t liked them (overall)? – oddy Jul 22 '11 at 20:39
  • @oddy Have used GLGE (decent feature set, but lack of forward movement and poorly designed source) and SceneJS (nice library and community, but lack of contributors limits its currently implemented features) – jterrace Jul 22 '11 at 21:20
  • Hmm, best documentation = extensive examples? Hmm... – LarsH Jul 22 '11 at 21:28
6

This is basically a duplicate of WebGL Framework, but the answers have probably changed since then. See also Which WebGL framework should i learn?

Since the world of WebGL is developing so fast right now, it would be difficult to find a complete, up-to-date comparison of WebGL frameworks. As soon as somebody spent the time researching such a thing, it would be obsolete. But here is an annotated list of WebGL frameworks:

http://www.khronos.org/webgl/wiki/User_Contributions

If you start a project using one of these frameworks, and then if you update this list based on your experience, it will be more up to date than before.

By the way in looking just now at PhiloGL, I was impressed with the full set of API docs, and that they've ported all the WebGL lessons to use PhiloGL (source code only, no explanatory text). I don't see a tutorial per se; but they have several examples, so overall they're better off than three.js in regard to documentation.

A few more notes, for those who may come after (including myself):

  • CopperLicht seems to major on loading models from files, as opposed to generating geometry in code. It is not open source.
  • PhiloGL uses O3D for generating geometry, e.g. spheres.
  • Three.js comes with commonly-used textures.
Community
  • 1
  • 1
LarsH
  • 25,732
  • 8
  • 77
  • 136
  • +1 for the link to khronos. As for the list update. I don’t want to go for the milk and return with a toy horse, psp and a ball. I’m here for your advice (I’ve answered on your question about what features I need from framework), not for sharing my own experience. If I had it, I wouldn’t ask for advice, because I’d already done my own expertise. – oddy Jul 22 '11 at 20:35
  • @oddy: I was mainly referring to updating the list after you've spent some time digging into whatever project you're thinking about starting. You came here for free advice and received it. Many of us get fulfillment out of sharing with others the knowledge we've spent time gathering. If you don't want to update the khronos list with what you learn, that's your choice. Thanks for the +1. – LarsH Jul 22 '11 at 21:37
  • 1
    Please try to understand why I’m somewhat annoyed. I asked for pros and cons for the libraries stackoverflowers had experience with. But instead got a link to the list of available libraries and suggestion to go for three.js without any explanation. – oddy Jul 24 '11 at 08:24
  • 2
    @oddy: not "instead". Rather, "in addition". The fact that you didn't get everything you asked for, for free, is no reason to criticize those who gave you part of what you wanted. You also got several specific pieces of info about three.js, before you posted the above comment. – LarsH Mar 23 '12 at 19:12
1

I'm the author of Jax ( http://blog.jaxgl.com/what-is-jax ), a framework with emphasis on test-driven, behavior-driven development and sheer productivity. Jax offers powerful code generators, an integrated application server and testing environment, and a cleanly-organized MVC (Model, View, Controller) architecture for your WebGL application.

Jax is designed first and foremost around Getting Stuff Done. It's a convention-over-configuration framework, which means that -- while you can certainly make it do things however you like -- if you accept its conventions, you'll find there's very little up-front cost to getting your application off the ground.

In addition, Jax was designed around extensibility. It's easy to build meshes with whatever data set or algorithms you prefer to use, from loading them via JSON to generating them on the vertex shader; and the framework sports an honest-to-goodness plugin system so you can pick and choose additional functionality (such as collision detection) based on the needs of your application, without bloating the framework with things you don't care about.

It has loads of documentation and I'm adding more every chance I get; the quick-start page is now online at http://jaxgl.com, and a set of comprehensive guides are slowly making their way to http://guides.jaxgl.com. Links to the API documentation are available there, as well.

A growing selection of live demos of Jax in action are also alive and well on Github: http://sinisterchipmunk.github.com.

sinisterchipmunk
  • 1,924
  • 17
  • 20
  • I tried “meadow” demo in Chrome couple of months ago. It didn’t work. I tried it second time, second ago. It still doesn’t work. Chrome 15.0.849.0 dev-m. Black screen. Dungeon demo throws an exception about maximum number of textures been reached and camera doesn’t move at all. Jax just doesn’t looks like a tool to “Get Stuff Done” yet. At least not today. – oddy Aug 13 '11 at 11:16
  • I'm sorry the demos aren't working well for you. (Are the other demos working?) Unfortunately, I was blissfully unaware of this problem! I try to address Jax-related issues very rapidly, but can't do so if they're never reported. If you open an issue at http://github.com/sinisterchipmunk/jax/issues and list your video card (including manufacturer, model and driver version) and OS information, along with any extra information available that might be shown in the error console, I can start looking at what could be causing the problem. – sinisterchipmunk Sep 10 '11 at 02:41
  • Please, disregard. I believe it was browser’s issue. Build 15.0.874.5 dev-m runs both demoes without any issues. – oddy Sep 12 '11 at 07:30
  • Excellent! Thanks for letting me know. – sinisterchipmunk Sep 12 '11 at 13:27
  • 1
    I assume development has stopped by now but all demos are broken again in Chrome. – Valentin Klinghammer Sep 22 '14 at 16:47