Relative Content

Tag Archive for three.js

three.js rendering spheres in wrong position

I am new to three.js and I was trying this code but I encountered unexpected output so wanted to check what I am doing wrong here or looking to find reason behind output i am seeing.

three.js set break when using Line2 and LineMaterial

I have a bunch of points that are part of each cube face and are set in consecutive order.
when passing all those points to the LineGeometry there is a diagonal lines as a result of connecting all the data points. Is there a way of jumping onto a new point?
What I tried is to set vertex colors, however, it creates a weird effect and I also can not set a transparent color.

Three.js render the boundary lines of a cube mesh

I tried setting the wireframe prop as true to render the edges as lines. However, since the mesh is made out of triangles, all it’s edges get visible. I only want to render the boundary lines from the cube!

Why lights do not work properly in Three.js

I began learning Three js and it has been bothering me that some of the lights does not work for me. While following a tutorial on Youtube (https://www.youtube.com/watch?v=XXzqSAt3UIw&list=PLjcjAqAnHd1EIxV4FSZIiJZvsdrBc1Xho&index=2), everything works fine except for the lights that are supposed to illuminate the planets (like in the video at 4:21). When I tested it out, there is not even the faintest light illuminating any planets.

how to add arcs that rise up from the surface of the sphere using threejs?

I’m attempting to recreate some of the features of the sun shown here. I’ve managed to create a dynamically changing surface using shaders. However, I’m unable to create the flares (arcs in the demo) that rise up and drop down. How would one go about adding those arcs that rise and drop down to an existing shader.