summaryrefslogtreecommitdiff
path: root/serve
diff options
context:
space:
mode:
Diffstat (limited to 'serve')
-rw-r--r--serve/index.html43
1 files changed, 25 insertions, 18 deletions
diff --git a/serve/index.html b/serve/index.html
index de0690d..a3cc391 100644
--- a/serve/index.html
+++ b/serve/index.html
@@ -1732,27 +1732,34 @@ function rcTick() {
// ---------- THE TRIAGONS (оммаж, колоссальные, за пределами карты) по заявке @devcpp ----------
(function buildTriagons() {
const TRI = new THREE.Group(); scene.add(TRI);
- const gar = (c, e) => new THREE.MeshStandardMaterial({ color: c, emissive: e, emissiveIntensity: 1.1, roughness: 0.5, metalness: 0.1, flatShading: true });
- const specs = [
- { a: 0.5, r: 560, y: 300, s: 95, c: 0x39ff14, e: 0x0e6a10 },
- { a: 2.5, r: 650, y: 260, s: 78, c: 0xff00aa, e: 0x6a0044 },
- { a: 4.4, r: 600, y: 360, s: 110, c: 0xffd000, e: 0x6a5000 },
- { a: 3.5, r: 720, y: 220, s: 70, c: 0x00e6ff, e: 0x006a7a }
- ];
- const tris = [];
- for (const sp of specs) {
- const m = new THREE.Mesh(new THREE.TetrahedronGeometry(sp.s, 0), gar(sp.c, sp.e));
- m.position.set(Math.cos(sp.a) * sp.r, sp.y, Math.sin(sp.a) * sp.r);
- m.rotation.set(0, sp.a, 0.2);
- TRI.add(m); tris.push({ m, sp });
+ const greenMat = new THREE.MeshStandardMaterial({ color: 0x5f8f3c, roughness: 0.96, metalness: 0.0 });
+ const beadMat = new THREE.MeshStandardMaterial({ color: 0x0a0a26, roughness: 0.1, metalness: 0.4 });
+ function makeTri(px, pz, pillarH, pillarR, tilt) {
+ const g = new THREE.Group(); g.position.set(px, 0, pz);
+ const pillar = new THREE.Mesh(new THREE.CylinderGeometry(pillarR * 0.82, pillarR, pillarH, 22), greenMat);
+ pillar.position.y = pillarH / 2; g.add(pillar);
+ const cap = new THREE.Mesh(new THREE.SphereGeometry(pillarR * 0.85, 20, 12, 0, Math.PI * 2, 0, Math.PI * 0.5), greenMat);
+ cap.position.y = pillarH; g.add(cap);
+ const dir = new THREE.Vector3(Math.sin(tilt), 1.5, Math.cos(tilt)).normalize();
+ const pos = new THREE.Vector3(0, pillarH, 0);
+ let r = pillarR * 1.15;
+ for (let i = 0; i < 9; i++) {
+ pos.addScaledVector(dir, r * 1.42);
+ const b = new THREE.Mesh(new THREE.SphereGeometry(r, 22, 16), beadMat);
+ b.position.copy(pos); g.add(b);
+ r *= 0.85; dir.x += 0.09; dir.z += 0.035; dir.normalize();
+ }
+ TRI.add(g); return g;
}
+ const list = [
+ makeTri(470, 250, 380, 34, 0.4),
+ makeTri(-300, 500, 440, 40, 2.2),
+ makeTri(540, -410, 350, 30, 4.1),
+ makeTri(-540, -300, 410, 36, 5.4)
+ ];
(function _t() {
const t = performance.now() / 1000;
- for (let i = 0; i < tris.length; i++) {
- const o = tris[i]; o.m.rotation.y = t * 0.06 * (i % 2 ? -1 : 1) + o.sp.a;
- o.m.rotation.x = 0.15 * Math.sin(t * 0.2 + i); o.m.position.y = o.sp.y + Math.sin(t * 0.15 + i) * 12;
- o.m.material.emissiveIntensity = 0.9 + 0.35 * Math.sin(t * 0.5 + i * 1.7);
- }
+ for (let i = 0; i < list.length; i++) list[i].rotation.y = t * 0.05 * (i % 2 ? -1 : 1);
requestAnimationFrame(_t);
})();
})();