(i, count)
| 106 | } |
| 107 | |
| 108 | function createVortex(i, count) { |
| 109 | // Vortex parameters |
| 110 | const height = 60; // Total height of the vortex |
| 111 | const maxRadius = 35; // Maximum radius at the top |
| 112 | const minRadius = 5; // Minimum radius at the bottom |
| 113 | const numRotations = 3; // Number of full rotations from top to bottom |
| 114 | |
| 115 | // Calculate normalized height position (0 = bottom, 1 = top) |
| 116 | const t = i / count; |
| 117 | |
| 118 | // Add some randomness to distribute particles more naturally |
| 119 | const randomOffset = 0.05 * Math.random(); |
| 120 | const heightPosition = t + randomOffset; |
| 121 | |
| 122 | // Calculate radius that decreases from top to bottom |
| 123 | const radius = minRadius + (maxRadius - minRadius) * heightPosition; |
| 124 | |
| 125 | // Calculate angle with more rotations at the bottom |
| 126 | const angle = numRotations * Math.PI * 2 * (1 - heightPosition) + (i * 0.1); |
| 127 | |
| 128 | // Calculate the vertical position (from bottom to top) |
| 129 | const y = (heightPosition - 0.5) * height; |
| 130 | |
| 131 | return new THREE.Vector3( |
| 132 | Math.cos(angle) * radius, |
| 133 | y, |
| 134 | Math.sin(angle) * radius |
| 135 | ); |
| 136 | } |
| 137 | |
| 138 | function createGalaxy(i, count) { |
| 139 | // Galaxy parameters |
nothing calls this directly
no outgoing calls
no test coverage detected