Since I have not yet implemented any optimizations, PseudoSun may have performance issues on your computer. In the future I hope to improve the speed and add various performance levels.
There are no limits on where you can go for now, so don’t be alarmed if you find yourself under the ocean or inside a mountain!
To manipulate and render the 3D geometry, it uses the Three.js
threejs.orgThree.js – JavaScript 3D Library 3D graphics library. This allows it to tap into the power of your graphics card directly from the browser (whenever possible).
To reduce the total number of points that need to be rendered, polygons are rendered with higher density nearer to the camera and lower density farther away, before stopping entirely. To achieve this, we create a custom geometry using the following steps:
Define a render distance and tile size. The tile size will be the length and width of our “tiles”, which are the square units that make up our overall geometry. The render distance will be the maximum distance from the camera at which we will render a tile.
For each tile within the render distance, assign it a resolution based on its distance from the camera. This resolution defines how many points make up its geometry, and should therefore be higher the closer we are to the camera.
Steps 1-3 only need to be executed when the program is initiated, and step 4 only happens when the camera has moved into the boundaries of a new tile. (When the camera crosses a tile boundary, it is reset back the length of one tile so that the geometry can remain stationary in virtual space).