diff options
| author | root <root@caddy-256phi.local> | 2026-03-22 22:36:36 +0100 |
|---|---|---|
| committer | root <root@caddy-256phi.local> | 2026-03-22 22:36:36 +0100 |
| commit | f6d1edb5e928b260afc8363b184123e017783285 (patch) | |
| tree | 51ad4e06b71e333797d052e8088e0327d4ca17ba /sun.js | |
| parent | 5c6f7592a7a81c98a8179ebbfa9546405ac1b576 (diff) | |
Initial commit of the original website
Diffstat (limited to 'sun.js')
| -rw-r--r-- | sun.js | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -0,0 +1,29 @@ +// sun.js +import * as THREE from 'https://unpkg.com/three@0.160.0/build/three.module.js'; + +export function createSun() { + const sunRadius = 15; + const sunSegments = 64; + + // Main sun mesh + const sunGeometry = new THREE.CircleGeometry(sunRadius, sunSegments); + const sunMaterial = new THREE.MeshBasicMaterial({ + color: 0xf49922, // neon pink + transparent: false, + opacity: 1 + }); + const sun = new THREE.Mesh(sunGeometry, sunMaterial); + sun.position.set(0, 5, -51); + + // Optional glow halo + const glowGeometry = new THREE.CircleGeometry(sunRadius * 1.4, sunSegments); + const glowMaterial = new THREE.MeshBasicMaterial({ + color: 0xf49922, + transparent: true, + opacity: 0.1 + }); + const glow = new THREE.Mesh(glowGeometry, glowMaterial); + glow.position.copy(sun.position); + + return { sun, glow }; +} |
