Skip to content
Advertisement

Tag: three.js

THREE.js collision detection and stop/move again

I have a rounded ground and there is a ball on it. trying to move the ball inside the ground with using smartphone orientation. no problem with that part. the ball is moving and make the ball stop at the edge by using three.js intersectsSphere. but couldn’t manage the move the ball again if the orientation points opposite direction. here

How to find all mesh faces illuminated by a SpotLight?

I have a THREE.Mesh consisting of a THREE.BufferGeometry with “position” and “normal” THREE.BufferAttributes. The mesh is illuminated by a THREE.SpotLight (a cone-shaped light source). Is there a way to find all mesh faces illuminated by the cone? There are no other objects in the scene so I don’t need to worry about blocking. Answer A basic approach From a very

How to download all of three.js

I’ve been following this documentation on three.js and downloaded the entire (or so I thought) library from here. But every now and then I run into these functionalities like OrbitControl and OBJLoader and I can’t seem to find it within the downloaded three.js library. What is the problem? Are these just extensions to the main framework? How do I go

Three js hdr turns off but never back on

I’m trying to turn on and off a hdr map in three js. This is how I create it }) So far so good. I then add it to the gui: Finally, I try to specify the on/off logic, but when I read the console logs, it’s always printing ‘false’ Note that the hdr loads correctly, turns off correctly when

Advertisement