Questions tagged [three.js]
Three.js is a lightweight cross-browser JavaScript library/API used to create and display animated 3D computer graphics on a Web browser. Three.js scripts may be used in conjunction with the HTML5 canvas element, SVG or WebGL.
three.js
21,186
questions
11
votes
5
answers
9k
views
How to solve different FPS in requestAnimationFrame on different browsers?
How to solve different FPS in requestAnimationFrame on different browsers?
I am making a 3D game using THREE.js that uses requestAnimationFrame and it is fast on Google Chrome 15.
However, it is ...
1
vote
1
answer
2k
views
Displaying multiple frames of a video element simultaneously
Some background: graphics newbie here, have just dipped my toes into the world of 3D in the browser with mrdoob's excellent three.js. I intend to go through all the tuts at http://learningwebgl.com/ ...
13
votes
5
answers
19k
views
WebGL - Textured terrain with heightmap
I'm trying to create a 3D terrain using WebGL. I have a jpg with the texture for the terrain, and another jpg with the height values (-1 to 1).
I've looked at various wrapper libraries (like SpiderGL ...
3
votes
2
answers
5k
views
Rotate, then translate in three.js
I would like to rotate then a plane created with THREE.PlaneGeometry, but I have some problems.
What's the axis in front of the camera with FirstPersonCamera ?
My own tests have revealed a X-front/...
0
votes
1
answer
872
views
What is the best way of writing box-box ray collision detection in three.js?
The objects in this experiment are moving around randomly: http://deeplogic.info/project/webGL/
What is the best way of writing a box-box ray collision detection for this using the three.js library?
0
votes
1
answer
100
views
For a given Z depth, how do I find the rectangle of the viewable area?
Or, to ask the same thing another way: For a given Z depth in a 3D scene, I want the X and Y coordinates that will allow me to place an object just outside of the viewable area.
I'm using three.js ...
0
votes
1
answer
772
views
THREE.js: problem loading Particle
If anyone can get this guy's small bit of code working on their machine, I'd be grateful if they could help me out by letting me know how.
I've taken the HTML and JS from this page: http://projects....
4
votes
1
answer
3k
views
3D JS Engine for 2D development?
I'm about to jump into some simple game development with Javascript. I would like to one day transition to 3D development but for now am only going to be doing 2D "top down" objects.
I know that this ...
0
votes
2
answers
2k
views
WebGL - Rotating object in the direction it is travelling
In this example: http://deeplogic.info/project/webGL/
How can I rotate the object in the direction in which it is travelling?
1
vote
1
answer
2k
views
Three.js custom textured meshes
Is it possible to add a textured material to an object with a custom mesh in Three.js?
Whenever I try exporting an object from Blender to Three.js with a texture on it, the object disappears. Looking ...
1
vote
1
answer
981
views
Z-Axis Coordination in WebGL and Three.js
I'm experimenting with WebGL and Three.js,
But how to calculate the Z-Axis coordination while moving mouse?
I use this for X and Y:
function getCoord(e) {
X = e.layerX - canvas.offsetLeft;
...
3
votes
1
answer
2k
views
How does the calculation of the light model work in a shader program?
I am trying to read up this tutorial:
https://aerotwist.com/tutorials/an-introduction-to-shaders-part-2/
but I am not able to follow up. Basically the code creates a directional light by using ...
9
votes
6
answers
4k
views
From where can I get learning resources for three.js
I am just trying my hands at three.js. This is the link:
https://github.com/mrdoob/three.js/
But there seems to be no documentation for this and rightly so because it is developed by a small(but ...
9
votes
4
answers
10k
views
How do I use texture on a sphere in three.js
I've downloaded a sphere example from: http://aerotwist.com/lab/getting-started-with-three-js/ and I can see the nice red sphere. I'd like to use a texture on it. I've tried this:
var texture = THREE....
0
votes
1
answer
328
views
How to create pivot screens in Javascript?
How can I create such an effect in Javascript (Three.js usind canvas elements?) like there described?
Pivot Screen:
http://www.smashingmagazine.com/2011/07/27/what-web-designers-can-learn-from-video-...