Skip to main content

Questions tagged [three.js]

Three.js is a JavaScript 3D Library which makes use of WebGL

Filter by
Sorted by
Tagged with
0 votes
1 answer
1k views

I'm trying to create a Portal-like effect in webGL using THREE.js. I have two scenes connected by a pair of portals. The view of the 2nd scene in rendered inside the 1st portal using stencils and ...
vorsk's user avatar
  • 1
2 votes
1 answer
260 views

I instantiate one PlaneGeometry, then I instantiate 200 meshes sharing this geometry and with their own instance of a given shaderMaterial. Here is a simplified version of the code : ...
Eturcim's user avatar
  • 141
1 vote
2 answers
6k views

Does anybody know how to load anything created in Clara.io into your Three.js scene? Clara.io allows export of ThreeJS geometry, object or scene. I tried all those in combination with all THREE ...
lot's user avatar
  • 223
4 votes
1 answer
942 views

I'm working on a flow field with particle systems and starting to learn about shaders in three.js. Current state of my work is available here. As such amount of calculations is quite heavy for a big ...
mjanisz1's user avatar
  • 247
0 votes
1 answer
925 views

I have created a particle system which movement is controlled by a flow field over perlin noise - Available here. I would be very thankful for any ideas and tips how to control their movement on the ...
mjanisz1's user avatar
  • 247
0 votes
0 answers
516 views

After some time looking or it on the internet I can't find the proper answer to my concern. I'm currently generating 3D textures on a shader for my planets to avoid sphere mapping issues (pole, ...
StackHola's user avatar
  • 267
0 votes
1 answer
343 views

I simply want an outline/edge detection of the character/item/object that is selected or doing something. I'm seeing lots of versions of this question for different languages, but I would appreciate ...
expiredninja's user avatar
15 votes
1 answer
39k views

I have a texture loaded in three.js, then passed to the shaders. In the vertex shader I compute the normal, and I save into a variable the uv vector. ...
Ramy Al Zuhouri's user avatar
3 votes
1 answer
3k views

I'm working on a WebGL game using Three.js, its been a few days and I found my first issue, render time on big maps. The game runs great, there are even some AI mobs that run around randomly like ...
Jesuso Ortiz's user avatar
1 vote
1 answer
799 views

I am trying to make a game where you have to keep the ball on a green platform. At this point the ball is a div with a ball image. You can move the ball over the ...
Maurice's user avatar
  • 115
1 vote
1 answer
790 views

I load collada models, exported via Google Sketchup, into my Three.js (v63) scene with the Three.js collada loader. The models are loaded, but with some, textures aren't well mapped, like in the ...
Eturcim's user avatar
  • 141
2 votes
1 answer
3k views

Assume I have a simple Physijs object like this car. How can I adapt something like this to "jump" (hydraulics ftw!) when pressing spacebar for instance? I'm currently thinking ...
Micah Bolen's user avatar
1 vote
1 answer
1k views

I have a spherical clipmap based planet terrain. The entire planet is made from a ring geometry of 1 unit which the vertex shader moves to cover the entire planet of 6 million unit radius. But the ...
RodgerDodger's user avatar
6 votes
2 answers
2k views

I'm working on a game which involves walking your character on the surface of a sphere. Using the answer to Arbitrary Rotation about a Sphere, I've written my code as: ...
Tom Leese's user avatar
  • 163
1 vote
2 answers
4k views

I'm just getting into Three.js and the camera is causing some problems. Basically, I want to implement spectator-like movement controls, so that I can move around freely in the scene. The problem is ...
user avatar
2 votes
1 answer
294 views

A question I've often had, how good at Math do I need to be to create 3 dimensional games? I get along with 2d games just fine. I understand everything I'm doing without problems after practise. ...
jskidd3's user avatar
  • 141
1 vote
0 answers
267 views

Does Three.js offer an out-of-the-box way to create custom non-convex polygon, or do I have to use THREE.Geometry and set faces manually? I'm guessing that ...
23k's user avatar
  • 191
4 votes
1 answer
776 views

Game engines like Three.js, Ogre3d and Unity3d often don't provide a default rotate method on their vector class. You usually have to do something like: ...
MaiaVictor's user avatar
  • 1,180
2 votes
1 answer
610 views

I'm working on a 2D javascript/Three.js multiplayer game, using web sockets and an authoritative server currently written in Python. The combat mechanic will be similar to Geometry Wars however i'm ...
Nathan's user avatar
  • 153
0 votes
1 answer
905 views

I am in the way of creating a 3D web game using threeJS library. This is a multi-player game that players are 3D human models in game, and I need to add a human 3D model for each player that enters ...
Mahdi7s's user avatar
  • 103
2 votes
2 answers
10k views

I'm making a game using THREE.JS, and I want my character to walk on the terrain, and collide with static 3D objects (=AABB boxes) that are on that terrain. The problem is: THREE.JS has only a ...
Nick's user avatar
  • 1,605
3 votes
2 answers
6k views

Is there any possibility to limit quaternions to move only in x & y axis (like in Eulers- yaw and pitch, without rolling)? I's there any equation or something similar to do this? Some example: ...
Bartosz Walicki's user avatar
4 votes
2 answers
5k views

I have the following scene: And I have two 3D vectors, the camera position, and the focus position. The focus vector is always behind the monster. I know how to rotate the camera around the focus with ...
jcora's user avatar
  • 7,917
1 vote
2 answers
8k views

I'm trying to have a camera in Threejs react to respective left/right/up/down/forward/backward keys, always based on the direction the camera is currently facing. It works fine left/right (camera....
Philipp Lenssen's user avatar
3 votes
1 answer
13k views

I'm using Three.JS to render some objects. I'm struggling with some very simple object rendering and translation. The scenario is that I spawn an object at 0,0,0 in world space with 0,0,0 rotation. <...
Kwaak's user avatar
  • 133