Skip to main content

All Questions

1 vote
2 answers
93 views

How can I optimize three.js the rendering of a gltf model? I tried 4 ways, but the result is the same

I'm trying to find a way to optimize three.js . I have a gltf tree model with 2144 triangles. I am adding 1000 trees to the scene in different ways. I clone the tree in a simple loop. I use ...
sana-kruf 1's user avatar
1 vote
0 answers
73 views

object looks translucent even though opacity is 1 in three js

Why is my three.js cube looking translucent when I change the metalness, roughness, and color even though opacity stays at 1. The translucence only appears with a rectangle light, not a point light. ...
Dashiell Rose Bark-Huss's user avatar
0 votes
1 answer
97 views

ThreeJS point light gives weird texture look

I use ThreeJS, more specificaly React Three Fiber to create a 3D Canvas. I added a glb model, point light and ambient light and the result was really bad. Why does the texture look so choppy? Is it ...
LCAYSS's user avatar
  • 45
0 votes
0 answers
29 views

identify similar meshes in threejs

I was trying to identify the meshes which are similar. I did able to check this by comparing triangles and vertices, but i also want to compare dimensions of 2 meshes. how to do this ? bounding box ...
chaitanya's user avatar
  • 188
4 votes
1 answer
659 views

Threejs: Pointlight not lighting up my geometries

I'm trying to create a scene from a set of triangles using Threejs. To get the shape of all the triangles i used a BufferGeometry which seems to create the shape correctly. However, it does not ...
Vetle Hofsøy-Woie's user avatar
0 votes
0 answers
491 views

How to add AxexHelper at a specifc position in ThreeJs?

I try to fix position of axeshelper on three js. But it rotates when the scene rotates. I need to fix the axeshelper at bottom left corner like every 3D application has. How can I set the position for ...
zenhanu's user avatar
  • 31
0 votes
0 answers
174 views

Given 2d control points, how to write a vertex shader that evaluates a cubic bezier curve?

I need to write a program that evaluates a cubic bezier curve, using threejs and vertex shader. I tried to calculate the bezier curve based on the x axis and the control points using the cubic bezier ...
Jonas's user avatar
  • 113
1 vote
1 answer
128 views

How to apply HemisphereLight to ShaderMaterial?

I want to add HemisphereLight to light an object which is built with ShaderMaterial. But when I simply add the light to the screen, the object doesn't seem to be affected. In fact, I've tried with all ...
Jonas's user avatar
  • 113
1 vote
1 answer
904 views

How to add HemisphereLight to a simple threejs scene?

I'm trying to add light and see its changes in a simple scene in threejs but no matter the intensity or the color I set for the light, I see no change. Actually, if I don't include the light code, ...
Jonas's user avatar
  • 113
2 votes
1 answer
1k views

How to manipulate the background color of a scene in three.js with shaders?

I'd like to change the background color of a simple three.js scene, like the one you change with renderer.setClearColor(/*insert color here*/) or scene.background = new THREE.Color(/*insert color ...
Jonas's user avatar
  • 454
1 vote
0 answers
209 views

Is there a way to detect collisions on a complex mesh using ammo.js?

I am working on a project that needs to detect collisions between the player car and procedural generated cars. However, all the car meshes are using Three.js Group and consist of several different ...
Weeboo's user avatar
  • 41
0 votes
1 answer
52 views

Rendering multiple boxes only displays correctly if perfectly squared

I'm using some logic to add boxes to my scene, based on how many items in height, width and depth, and that works well when they are all perfectly squared. The problem comes if I want to use a ...
Terje Nygård's user avatar
1 vote
1 answer
415 views

How can I colour points differently in three.js using dat.gui depending on their distance from the origin?

I'm currently working on a 3D Pi Estimator built in three.js, for which the source code can be seen at https://jsfiddle.net/fny94e7w/. let num_points = 5000; let in_sphere = 0; ...
rocketstar31's user avatar
1 vote
0 answers
492 views

Three.js flickering only on macbook pro retina screen

I'm running into an issue with flickering when rendering a moving point cloud in Three.js. The issue only appears when the page is loaded on a Macbook Pro Retina screen. Interestingly, if the page is ...
nbh's user avatar
  • 181
2 votes
1 answer
119 views

Progressively reveal circle in loop

I currently have this: Codepen (embedded snippet below). I would like to be able to change the color progressively after the scanline, something like this: After searching online and trying to find ...
rosaqq's user avatar
  • 426

15 30 50 per page
1
2 3 4 5 6