Hacker News new | comments | show | ask | jobs | submit login

I would love to understand more about the concepts of threejs. I went through the source of this example and identified this code as responsible for drawing the texture onto the sphere: http://pastebin.com/FLPaKppr .

I have problems however to understand the details of the API. Let us see an excerpt of the code as an example.

this.geometry = new THREE.SphereGeometry(this.planet_radius, this.planet_geom_segments, this.planet_geom_rings);


I have no clue why for example he calls "computeTangents" right after he builds this "Sphere"-object. What are "Tangents" and why do they need to be computed now?

The entire script is like that to me. Statements that make the library do the right thing, but the intention on why they are necessary at this step of the way are left out. I have no idea how I can get a hold of that knowledge.

Does anybody know where I can learn that? Because if you look at the code, you have no idea WHY it is done that way, which is a barrier to creating things like that myself.

TL;DR: What theoretical background knowledge is necessary to build apps like that?


That is awesome. Adding you to Skype you as I am typing this.

You're right - there should be more comments. I apologize.

There are a number of three.js specific tutorials out there - Google will find them for you - that will give you a simple app to play with and then it's just a case of experimenting, asking targeted questions and having fun :)

For me, the beauty of this approach is that all I need is my browser and an editor - make a change and hit reload and you see the results vs the more traditional edit/compile/link/run that I'm used to.

OpenGL experience.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact