(axis: string)
| 100 | /** Bell-shaped seeded noise avoids shells, grids and concentric rings. */ |
| 101 | function cloudPoint(key: string, scale: number): Point { |
| 102 | const coordinate = (axis: string) => { |
| 103 | let sum = 0; |
| 104 | for (let i = 0; i < 6; i++) sum += hash(`${key}:${axis}:${i}`) / 0x100000000; |
| 105 | return (sum - 3) * scale; |
| 106 | }; |
| 107 | return { x: coordinate('x'), y: coordinate('y'), z: coordinate('z') }; |
| 108 | } |
| 109 |