Created
March 9, 2024 14:56
-
-
Save evgeniy2002/e34e26012f5a3d0e4e192717a864c2f4 to your computer and use it in GitHub Desktop.
Revisions
-
evgeniy2002 created this gist
Mar 9, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ for (let i = 0; i < count; i++) { const theta = Math.random() * 2 * Math.PI; const radius = lerp(min_radius, max_radius, Math.random()); let x = radius * Math.sin(theta); let y = (Math.random() - 0.5) * 0.1; let z = radius * Math.cos(theta); positions.set([x, y, z], i * 3); }