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
54 views

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’...
Blue Herring's user avatar
13 votes
1 answer
4k views

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 ...
Gabriel Machado's user avatar
3 votes
1 answer
793 views

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 ...
Miguel Myers's user avatar
1 vote
2 answers
390 views

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 ...
Imperial A's user avatar
0 votes
0 answers
107 views

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 ...
B''H Bi'ezras -- Boruch Hashem's user avatar
0 votes
1 answer
185 views

Im creating a game with React and Three.js and vanilla Javascript, i have several clases, representing objects in the game, do i need to create a camera, scene, renderer for each class or i simply ...
Jorge Carretero's user avatar
0 votes
0 answers
132 views

In this three.js Text example they animate text, i am trying to implement it on React/Three.js but i got the error TypeError: can't access property "length", geometry.faces is undefined in ...
Jorge Carretero's user avatar
1 vote
0 answers
126 views

I'm trying to calculate an uniformly accelerated rotation for the autopilot module in my 3d space game shooter. The autopilot should fly the spaceship to any given point in the 3d space on the ...
user2850375's user avatar
0 votes
0 answers
59 views

I have this terrain I generated using Perlin Noise layers whose colors are applied based on the height of the vertex, just for reference before I am done being clear about how I will implement the ...
alon's user avatar
  • 5
0 votes
0 answers
234 views

I am trying visualize a human finger's pose with a 3D model in Three.js. The 3D model is composed of 3 bones that represent the proximal, middle, and distal bones of the human finger, connected in ...
Ietpt123's user avatar
0 votes
1 answer
60 views

Let's say we have two vectors A and B. Is there a way to use Three.js' Ray or Raycaster classes to cast a line between vector A and vector B and check is it passes through a mesh in the scene? I know ...
Rick Stanley's user avatar
0 votes
1 answer
1k views

I am moving a rigidbody (the character) on the surface of a sphere, like what is described here. I am facing the following issue that I am having hard time to solve: After moving the character, it ...
Eturcim's user avatar
  • 141
0 votes
1 answer
592 views

I'm looking at this three.js cubemap example, and it runs fine in my browser when loaded from that page. After much strain to find and download the files - it does not run? What am I doing wrong, with ...
greenthings's user avatar
1 vote
1 answer
2k views

I am trying to understand a way in THREE.JS (and the mathematical foundation) to get the direction an object should rotate to lookAt other but without actually rotate it. I've tried to use ...
Rui d'Orey's user avatar
-1 votes
1 answer
2k views

what is the problem with linear interpolation? in update() in case this is animate() and when I call zoomCamera() in update() there is lerp with smooth but when I call here ...
grzesiekmq's user avatar
0 votes
0 answers
710 views

I seem to find only examples to use the raycaster with the camera, but none that just have a raycaster from Point A to Point B. I have a working raycaster, it retrieves my Helpers, Lines etc. but it ...
Robin Crama's user avatar
1 vote
1 answer
386 views

I am creating a FPS game online. I want the user to be able to use a sensitivity they are familiar with from games they've played. In this case, I want them to use their Fortnite sensitivity. I am ...
Ben Stallwood's user avatar
0 votes
0 answers
1k views

I'm currently trying to map a seamless texture onto a 3d wall object but when it comes to the edges of the texture there are visible artifacts. closeup: Here is the shader code i use for the texture ...
Tom B.'s user avatar
  • 101
0 votes
1 answer
277 views

I'm trying to make a rotation vertically and horizontally around a point at the same time but I'm not able to combine both. I have this formula for the horizontal rotation: ...
Enzo's user avatar
  • 115
1 vote
0 answers
2k views

I've loaded an object and set its position on vector(5,2,-5) by threejs. And I wanted it to rotate around the origin point in the world coodinate system. I found a method in class Object3D called '...
tedyage's user avatar
  • 23
1 vote
1 answer
3k views

I'm trying to make a 3rd person camera for a game with THREE.js and Physijs (if that's important), and so far I have set it up so that the camera follows behind the player using cos and sin etc. but I ...
B''H Bi'ezras -- Boruch Hashem's user avatar
0 votes
1 answer
3k views

I am working on a 3D tool for desktop and iPad. Everything is working fine except for two issues: Issue 1 - When I select a 3D object with the mouse and move it on an iPad (as opposed to on desktop, ...
Nishant9969's user avatar
0 votes
1 answer
304 views

I have a large model (roughly 400k faces) and a large number of points on this model (roughly 2000) and I need to calculate a normal per point based on the closest face on the model. Is there a faster ...
Cobertos's user avatar
  • 1,644
3 votes
1 answer
8k views

Use case: I have a currentRotation quaternion and a targetRotation quaternion and need to calculate the relative rotation ...
AtiX's user avatar
  • 61
1 vote
1 answer
237 views

I have an engine that uses either three.js (3D WebGL rendering library) or pixi.js (2D rendering library) depending on the game. ...
nialna2's user avatar
  • 930