Questions tagged [three.js]
Three.js is a JavaScript 3D Library which makes use of WebGL
125 questions
0
votes
1
answer
54
views
Best way to sync PhysicalObj to player headset position?
I’m in the process of designing a threejs-based webxr engine for simple VR games. Right now, I’m working on implementing physics with cannon-es, but I’m struggling to figure out how to sync the player’...
0
votes
1
answer
715
views
Shade a box different colors for two ends with one material in Three.js
First, I knew the following basic knowledges,
GLSL Language, Learn WebGL2 - GLSL
* GLSL Shaders
OpenGL - Coordinate Systems, [OpenGL - Advanced GLSL]
3D Game Shaders For Beginners - GLSL
...
0
votes
1
answer
728
views
What is the best rate at which to send updates to clients for a first person shooter NodeJS WebSocket server?
I developed a multiplayer FPS using WebGL, Nodejs and WebSockets.
So far it is running great.
I am currently using setInterval(sendPlayerPositions, 16); to send updates to WebGL clients.
Ideally I ...
0
votes
0
answers
88
views
My Collision isn't working the way I want it to
I am trying to make a game slimier to Minecraft, where there is a world of blocks, and a player that can walk, jump, and place blocks. Lately, I've been struggling to get collision detection between ...
13
votes
1
answer
4k
views
How to play hundreds of explosion sounds
I am developing an RTS game with boats, the boats can shoot very frequently and I am having a hard time dealing with the explosion sounds. I am using three.js and the audio API it has that uses the ...
0
votes
0
answers
46
views
Steering around a track in R3F
I posted this on stackoverflow, then thought it might be better here where the gamedev experts are:
I am experimenting with threejs and react three fibre. I have a box which I am sending around a ...
1
vote
1
answer
665
views
My GLTF models made in Blender are transparent from certain directions
When I rotate the camera some of my blender models become transparent from different angles. They are gltf models
Here is the Python to save the gltfs
...
0
votes
3
answers
655
views
Center Perspective Camera on Coordinates
I've got a PerspectiveCamera and set of coordinates (x,y,z).
How could I pan the camera to make these coordinates at the center of the screen?
3
votes
1
answer
801
views
How To Make Seamless Custom CubeMap?
I'm currently working on a Three.js project, and I'm aiming to create a seamless cube map. To achieve this, I created six planes and assembled them into a cube. Then, I utilized a shader to generate ...
0
votes
1
answer
129
views
Discontinuous Normals on a Normalized Cube Mesh with Displacement Texture
In my project, I have created a normalized cube using six plane meshes. To improve its visual quality, I added a displacement texture and calculated the normals for that texture to ensure proper ...
2
votes
2
answers
10k
views
Adding multiple materials to a single mesh in three.js
I've been doing some reading and can't seem to figure out a good way to do this..
I have a simple globe with a material on it like so:
...
15
votes
1
answer
39k
views
How to compute tangent and bitangent vectors
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.
...
1
vote
2
answers
390
views
How to publish WebXR game on Quest or Steam stores?
I would like to develop a simple and small game for WebXR so that Quest, Index, etc. can play it. I would eventually like to be able to put it on the Quest store and Steam.
Is there a way to publish a ...
0
votes
0
answers
107
views
Octree build time crashes page for complex mesh
Using the standard three.js FPS example of octree implementation with a more advanced mesh, crashes the page on load.
My first idea is to write a few functions to save the octee data to a file, then ...
0
votes
1
answer
262
views
Multiplayer game - Player position updates transmission pattern
I'm building a very basic 3D multiplayer game using Three.js and Socket.io where all the player does is move in an environment.
Considering there will be ~ 100 players in a single room and all data ...