Skip to content

Commit

Permalink
Merge pull request #88 from Bruno-Odinukweze/main
Browse files Browse the repository at this point in the history
  • Loading branch information
looeee authored Dec 5, 2022
2 parents 624d9cf + da6b820 commit 6e0dbc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion markdown/en/book/first-steps/ambient-lighting.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ One solution to the problem of our poorly illuminated cube is to add more direct
1. We have to keep track of the lights to make sure all directions are illuminated.
2. Lights are expensive, and we want to add as few lights as possible to our scenes.

Adding more and more direct lights to your scene will quickly kill you framerate, so direct lights alone are rarely the best choice.
Adding more and more direct lights to your scene will quickly kill your framerate, so direct lights alone are rarely the best choice.

### No Lights at All!

Expand Down
2 changes: 1 addition & 1 deletion markdown/en/book/first-steps/organizing-with-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const geometry = new SphereBufferGeometry(

{{< /code >}}

The radius defines how big the sphere will be. More interesting are the next two parameters, which specify how much detail the geometry has around its width (equator) and height, respectively. The [`BoxBufferGeometry` has similar parameters]({{< relref "/book/first-steps/first-scene#the-geometry" >}} "`BoxBufferGeometry` has similar parameters"), however, they are less important as they don't change the shape of the box. The reason for this that all geometries are made out of triangles - you can see these outlined on the sphere in the scene above. To create a curved surface like a sphere we need to use lots of very tiny triangles.
The radius defines how big the sphere will be. More interesting are the next two parameters, which specify how much detail the geometry has around its width (equator) and height, respectively. The [`BoxBufferGeometry` has similar parameters]({{< relref "/book/first-steps/first-scene#the-geometry" >}} "`BoxBufferGeometry` has similar parameters"), however, they are less important as they don't change the shape of the box. The reason for this is that all geometries are made out of triangles - you can see these outlined on the sphere in the scene above. To create a curved surface like a sphere we need to use lots of very tiny triangles.

Try experimenting with different values for `widthSegments` and `heightSegments` to see how these settings affect the quality of the geometry. It's important to use the smallest value that looks good for both settings. The number of triangles the sphere is built from increases very quickly when you use larger values for these parameters. What you're looking for is a tradeoff between quality and performance. If the sphere is far away from the camera or very small, you might be able to get away with a low-quality geometry made out of very few triangles, while if the sphere is the main focal point of your scene (such as a globe or planet), you will probably want to use a higher quality geometry.

Expand Down

0 comments on commit 6e0dbc8

Please sign in to comment.