Skip to content

Tag: three.js

OrbitControls on a shared camera cannot handle panning

I am trying to create two renderers on two different div containers. Each renderer wish has its own OrbitControls for updating the associated camera. The camera is shared between the two renderers. The goal is to sync the camera for OrbitControl (so that two containers can have the same camera view) and rende…

my three.js scene is not rendering. not sure why

my main.js file contains :- and my index.html :- All that appears on my screen is :- [what displays on my browser][1] [1]: https://i.stack.imgur.com/PQmJu.png I checked and my main.js file is definitely executing, but nothing is rendering on the screen Answer You have a few issues. This would select elements …

only one particle showing in the scene with three.js

I am trying to create a sphere with particles randomly floating on its surface. It will move depends on the position on mousemove. something like this Strangely, it is only displaying one particle on canvas. I am debugging with console.log(vertices), but it clearly shows all the vertices in the array. My code…

Three.js extrude vertically

I am new to three.js and I want to extrude a shape vertically. I can set the points of the 2D shape, but when I extrude it, the extrusion happens along the z axis. I want to extrude the shape along the y axis, how can I make this happen in the simplest way?(In this example I know could use