75 comments

[ 3.5 ms ] story [ 136 ms ] thread
What was changed since the last submission (http://news.ycombinator.com/item?id=4790688)?
I actually submitted it trying to find a discussion, since I was having trouble searching for it. When it created a new story instead of linking to the past discussion I assumed it was new. Sorry about that!
The best bet is to use the search engine below.
(comment deleted)
fyi, I get a white page in Opera.
Same with Chromium.

  Error creating WebGL context. three.min.js:390
  Uncaught TypeError: Cannot call method 'getExtension' of null three.min.js:390
Works great in my chromium ("Version 24.0.1312.56 Built on Ubuntu 12.04, running on elementary OS 0.2 (24.0.1312.56-0ubuntu0.12.04.1)")
Worked great in Chrome (Version 25.0.1364.172 m) on XP/32.
Same with IE. But works with FF.
For those curious, this works great on mobile (Firefox on a Nexus 4)
I only get blank on Mobile Safari
I'm surprised that Firefox Mobile supports WebGL (and pretty quickly too). Neither Chrome nor Safari do.
At least Chrome Beta does, but iirc you need to enable it in about:flags.
It's weird more browsers don't, considering WebGL is based on OpenGL ES, and most mobile devices implement ES.
It's likely just a matter of perf. on mobile devices. If the browser's rendering/compositing is itself using too much of the GPU's resources to simultaneously run anything worthwhile in WebGL, it's probably not worth exposing it.
Well, mobile games use the GPU all the time, I don't see why web apps can't. Browsers could prompt before using it, that's what the BlackBerry PlayBook does.
cool,with just a few libs no bloated mvc framework.
I fear that three.js will be more or less obsolete with the rise of emscripten/asm.js which allows basically any 3D Engine there is to Run inside the browser. There is still some work todo in regards to quicker deployment but i wouldnt invest heavily in pure JS based engines right now as there will be tremendous leaps in this space (eg Unreal Engine3) in the coming months.

That being said, this is an awesome Tool!

I wouldn't invest in JS.
This, so much. I can't believe companies are pushing to port everything to one of the worst language in existence. Okay, I get the benefits of easy deployment, but what about performance, debugging, ecosystem, typechecking, compile-time optimizations, general engineering, etc.?

Surely we must know better in 2013.

I don't see what makes Javascript the worst language in existence? Some of its cruft is being removed (mainly the horrible var scope) with ES6/7. I think some future revision of JS that removes most the cruft (like ; insertion) will be awesome.
Yes, mandatory semicolons are good, looking forward to it. People are also discovering best practices in JavaScript, which is also good. In lots of regards, however, it will always be inferior to languages that are thought through from the very beginning, and tons of headaches could be saved with just a little more investment in proper environments.
I wouldn't call it the worst language in existence by any means, but it does have some things I find extremely irritating - lack of a decent module system, overly verbose at times (like when creating anonymous functions), sneaky silent type conversions that still get me from time to time (sorting a list of integers - oops, lexicographical, not numerical ordering).

Having said that, it also has a lot of cool features and I use it every day. Most of the time, I find it a decent enough experience.

"Everything that can be written in JS will ultimately be written in JS".
So we should wait for browser vendors to agree on a new next generation language for the web and wait until everyone updates to a browser that supports it?

Like it or not these developments are turning JS into a bytecode for the web. Maybe one day there will be other language options but why not invest in making the best of what we do have?

So we should wait for browser vendors to agree on a new next generation language for the web and wait until everyone updates to a browser that supports it?

No, we should grab the first thing available and run with it, making sporadic additions and optimizations to do cool-thing-of-he-day, completely ignoring overall architecture and neglecting original purpose behind the technology we use. Next stop: compiler that will translate C code into Excel macros.

There are apparently some readers who are abusing the down votes. The hackernews voting system is not a "like" voting system. It is to sort out inappropriate comments and value informative and pertinent comments.
What would you invest in? I'm currently working on a small engine for an indy game using JS for the front and backend and am interested in alternatives that are perhaps more future proof.
Well, I don't know what you really mean by "future proof". JavaScript will probably remain the lowest common denominator, for years to come, so from that perspective, there's no safer bet.

However, for people who want to have an edge, as developers, working in their language of choice is one sure way to get it.

There are many different developments to make that happen, like languages that compile to JavaScript, or binaries that run in the browser via NaCL; I think there's a lot of potential there.

... JavaScript was not a language designed with software engineering in mind; that much should be clear. If you can choose the proper language for the task at hand, instead of simply being forced into JS, you'll be ahead.

Well , where are these 3d engines ? do i have to code in C++ ?... you get my point...
You will see Unreal Engine, Unity and others in the browser quite soon. They all offer scripting language support for languages like Lua, JS, C# etc
asm.js does not take the right approach - it's hackish. Don't worry :)
I can't wait for the day when three.js gets obsoleted. That would mean that someone would have done a free and open source 3d library that is easier to use and with a better designed API. Until then, we'll keep going.
If I could make one recommendation, it would be that you publish the api of three.js in someway that could be parsed by an external tool that might want to overlay a type system - maybe autogenerated from JS docs? There's probably a tool out there already.

I know projects like GWT or LibGDX would benefit greatly from something like this, and personally while I like coding JS, I prefer my prototypes to be in JS and my final code to be in Java. (I know, heresy).

You are doing amazing work btw.

That's right, I was really annoyed that there wasn't a series of explicit compilation steps during development, and that I had access to stuff like live coding.
Nothing much to add except, well, wow. You've clearly put a ton of work into making this great and fast. Random directions you could take this: level editor, interior design room layout, pop-up-book creator etc. The key is to get the UI right, which is a Hard Thing when it comes to translating 2D movements into 3D space.
I'm personally using it as a level editor. And I also used it for quickly modelling my flat before going to Ikea ;)
Just want to be clear, I am not the developer behind this. I found this and was looking for discussion on HN about it because it was quite impressive. I wasn't able to find it by searching so I submitted it in hopes that it would take me to the past article (that is how the url duplicate detection code used to work), but instead it created a new story.
what do i do in it. i just see the xyz grid. can i make a model or import an obj file?
You can add objects and lights using the "Add" menu.
thank you, I didn't even seen this till after I stared a while at it.
Yep, just drop the obj into the editor.
When I see things like this I like to go to the 90s on the Wayback Machine and remind myself just how far the web has come. This is really cool stuff.
This is brilliant. Great work.
Another direction the author could take with this: a CAD app. Specifically, because TinkerCAD is shutting down, 3D printing community desperately needs a new CAD tool usable by 10-years-old kids. There's a huge opportunity there.

TinkerCAD was very popular with 3D printing people, because it was stupidly simple and easy to learn, while still being a very functional CAD tool.

I am so incredibly sad TinkerCAD is closing. It has been my introduction to CAD and it has been phenomenally useful. I'm trying out Autodesk Inventor Fusion, but it's so much more complex, so it'll take a while before I feel comfortable in that.
Anyone is free to fork the editor and build a CAD app out of it :)
I worked at Tinkercad for about 6 months last year (mostly on the WebGL-based editor, but the engineering team was only 5 people so there was lots of other stuff to do as well). It's an awesome product; I'm surprised and sad to see it closing down, but at the same time I can understand why they decided to pivot the core tech into a new company.

Basically Tinkercad had two unique advantages: a world-class massively parallel solid geometry kernel, and a 3D design UI that made ease of use first priority. Tinkercad emphasized the latter in their product image, but it became somewhat pigeonholed as a "children's CAD", which made it difficult to switch the same product into a pro gear. They've now made the decision to pursue the revenue potential of the pro market, and that requires a new product image.

If someone wants to jump onto the opportunity of building a Tinkercad replacement, I know a few things about this space and am available for hire... ;)

Are they going to open source it?
Wow! This is the future of 3d!!

I'm a hardcore 3ds MAX fan and I simply LOVE this!!

Do you know of the possibilities this provides? Have a look at this:

http://carvisualizer.plus360degrees.com/threejs/

Content creation tools are extremely important for any technology to gain traction. That's how Flash (in the early days) gained traction (Macromedia Flash 4, remember?)

And this editor solves the problem (still a long way to go...but very much possible)

All the best!

When I access the page with my iPad 1, it's all blank and white. What am I suppose to see ? Is it a github problem ?
I think that is your iPad not supporting webGL.
How am I suppose to know there is webGL on this page and that the problem is the iPad and Safari browser ? What I don't understand are the down votes. What is the problem ?
Next time, use a real computer for accessing "cutting-edge/next-gen stuff" HN links, not a consumer toy (and an outdated one at that)..
uhm, i get a blank page in mountain lion Safari.
Worked for me, Mac OSX 10.8.3 Safari 6.0.3
This is cool. Three.Js has been a cool library to import 3d models in various file formats and render them, just using Javascript without need of flash or any 3d player. A editor is a good next step.

For those seeing empty screens or white-pages, your browser may not be configured or doesn't support webgl. Three JS supports a svg and a canvas renderer. Try samples on three.js github site.

This is a very impressive project. Kudos!

On a small side note, I got ridiculously excited about "Help -> Source Code". I really want that in every app.

Nice! Please add:

    * Import Objects
    
    * A Raytracer