All Questions
932
questions
0
votes
1
answer
60
views
How to make completely white floor with shadows?
Please help. I want white floor and shadows on it, but all I get is lightgray floor with very thin shadow:
lightgray floor
My floor and light configuration:
const ModelSceneEnvironment = () => {
...
0
votes
0
answers
57
views
ThreeJS ShaderMaterial WebGL conversion
I'm working to convert the SplaTV WebGL library to use ThreeJS and I'm struggling to get it converted. The code in the original repo is challenging to understand as it's not documented and while I ...
1
vote
1
answer
580
views
Why is WebGPU performance so bad in my benchmark compared to WebGL?
Here's the code of my benchmark, tested it on Latest Chrome Canary on Win11 (with vsync disabled and fps unlocked).
WebGPU has around 1/3 the FPS of WebGL bench, I can't figure out why is that.
Code:
...
0
votes
0
answers
41
views
Using VideoTexture with ShaderMaterial
I'm currently trying to implement a scroll effect with THREE.js that meets the following conditions.
When the page is loaded the three element should be scaled down to 0.3.
When the page is scrolled ...
0
votes
1
answer
57
views
How to make 2 objects to collide each other?
Description
I am trying to make 2 objects to collide each other. The collision I am trying to make detects weather the 2 objects are touching / intersecting each other by first calculating their Box3(...
0
votes
1
answer
54
views
Three.js Cube Render displays nothing
I'm trying to render a cube with Three.js. I wrote the code exactly as stated in the tutorial from tutorialspoint and I'm getting a blank screen.
I'm trying to render the code, but nothing displays ...
1
vote
1
answer
77
views
How to extrude a certain triangle in a mesh in three.js
Description:
My three.js scene is based upon a selection tool in which if we click and drag over the mesh it colors the triangles of the mesh red, I want to create a function that when runs checks the ...
0
votes
1
answer
93
views
Threejs splited torus is showing black dotted
my goal is to split the shape e.g. like a torus but it could be a circle triangle etc. I want to split the shape by using a custom plane. Once the torus is split-into two parts both parts need to be ...
0
votes
0
answers
74
views
Threejs - TypeError: Cannot read properties of undefined (reading 'uniforms')
I'm learning Threejs by following this tutorial
I'm stuck at making the boilderplate. It got error: "Uncaught TypeError: Cannot read properties of undefined (reading 'uniforms').
In my code, i ...
-2
votes
1
answer
33
views
Add environmental texture to Autodesk Forge Viewer
How to add an environmental texture to Autodesk Forge Viewer v6.0?
In Three.js, you can assign a texture to the scene background and environment, so how can I do the same in APS viewer?
I'm not ...
0
votes
0
answers
46
views
Drawing anti-aliased round dots from vertices in three.js
I am trying to make a grid of points in three.js. I want them to look nice and round, as well as implement distance attenuation. the default PointsMaterial offered by three.js draws square vertices. ...
0
votes
0
answers
18
views
three js merged geometry vertices
const wallGeometry = new THREE1.BoxGeometry(0.2, 5, 2); const wallMaterial = new THREE1.MeshStandardMaterial({ color: 0x00ff00 }); const wallMesh = new THREE1.Mesh(wallGeometry, wallMaterial); const ...
2
votes
1
answer
168
views
Can't avoid interpolation of UV : " 'flat' : Illegal use of reserved word "
I want to made that UV are not interpolated, so I can get the exact pixel (As a beginner I see this from that video). Why using 'flat' gives an error?
If I past flat before varying of Uv (I named it ...
0
votes
0
answers
45
views
Three.js DracoLoader - "Cannot read properties of undefined (reading 'Promise')
I am working on a Three.js project and using DracoLoader for mesh compression. However, I am encountering the following error:
Uncaught TypeError: Cannot read properties of undefined (reading 'Promise'...
0
votes
1
answer
159
views
How do you display a webcam feed in GLSL, using Three.js?
There are multiple examples on how to display a webcam video using ThreeJS by creating a video texture like so :
video = document.getElementById( 'video' );
const texture = new THREE.VideoTexture( ...