Spaces:
Running
Running
Add 2 files
Browse files- index.html +439 -1
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -35,12 +35,21 @@
|
|
| 35 |
align-items: center;
|
| 36 |
}
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
.grid-bg {
|
| 39 |
position: absolute;
|
| 40 |
width: 100%;
|
| 41 |
height: 100%;
|
| 42 |
background:
|
| 43 |
-
linear-gradient(rgba(15, 15, 26, 0.
|
| 44 |
url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M20 0v40M0 20h40" stroke="%23444" stroke-width="0.5"/></svg>');
|
| 45 |
z-index: 1;
|
| 46 |
}
|
|
@@ -313,9 +322,47 @@
|
|
| 313 |
.temperature-card:hover h3 {
|
| 314 |
color: var(--warm-amber);
|
| 315 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
</style>
|
| 317 |
</head>
|
| 318 |
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
<!-- Full-screen Hero Section -->
|
| 320 |
<div class="hero-container textured-surface">
|
| 321 |
<!-- Dark grid background -->
|
|
@@ -396,6 +443,391 @@
|
|
| 396 |
</div>
|
| 397 |
|
| 398 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
// Create random electric nodes and arcs
|
| 400 |
function createElectricElements() {
|
| 401 |
const container = document.getElementById('electric-nodes');
|
|
@@ -478,6 +910,12 @@
|
|
| 478 |
window.addEventListener('load', () => {
|
| 479 |
createElectricElements();
|
| 480 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 481 |
// Recreate elements periodically for variety
|
| 482 |
setInterval(() => {
|
| 483 |
document.getElementById('electric-nodes').innerHTML = '';
|
|
|
|
| 35 |
align-items: center;
|
| 36 |
}
|
| 37 |
|
| 38 |
+
#webgl-canvas {
|
| 39 |
+
position: absolute;
|
| 40 |
+
top: 0;
|
| 41 |
+
left: 0;
|
| 42 |
+
width: 100%;
|
| 43 |
+
height: 100%;
|
| 44 |
+
z-index: 0;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
.grid-bg {
|
| 48 |
position: absolute;
|
| 49 |
width: 100%;
|
| 50 |
height: 100%;
|
| 51 |
background:
|
| 52 |
+
linear-gradient(rgba(15, 15, 26, 0.7), rgba(15, 15, 26, 0.7)),
|
| 53 |
url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M20 0v40M0 20h40" stroke="%23444" stroke-width="0.5"/></svg>');
|
| 54 |
z-index: 1;
|
| 55 |
}
|
|
|
|
| 322 |
.temperature-card:hover h3 {
|
| 323 |
color: var(--warm-amber);
|
| 324 |
}
|
| 325 |
+
|
| 326 |
+
/* Fallback animation for low-power devices */
|
| 327 |
+
.fallback-animation {
|
| 328 |
+
position: absolute;
|
| 329 |
+
width: 100%;
|
| 330 |
+
height: 100%;
|
| 331 |
+
z-index: 0;
|
| 332 |
+
background: radial-gradient(circle, var(--electric-purple) 0%, var(--deep-space) 70%);
|
| 333 |
+
opacity: 0.1;
|
| 334 |
+
animation: fallbackPulse 8s infinite alternate;
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
@keyframes fallbackPulse {
|
| 338 |
+
0% { transform: scale(1); opacity: 0.05; }
|
| 339 |
+
50% { transform: scale(1.2); opacity: 0.15; }
|
| 340 |
+
100% { transform: scale(1); opacity: 0.05; }
|
| 341 |
+
}
|
| 342 |
+
|
| 343 |
+
/* WebGL canvas container */
|
| 344 |
+
.canvas-container {
|
| 345 |
+
position: fixed;
|
| 346 |
+
top: 0;
|
| 347 |
+
left: 0;
|
| 348 |
+
width: 100%;
|
| 349 |
+
height: 100%;
|
| 350 |
+
z-index: 0;
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
/* Hide fallback when WebGL is supported */
|
| 354 |
+
.webgl-supported .fallback-animation {
|
| 355 |
+
display: none;
|
| 356 |
+
}
|
| 357 |
</style>
|
| 358 |
</head>
|
| 359 |
<body>
|
| 360 |
+
<!-- WebGL Canvas Container -->
|
| 361 |
+
<div class="canvas-container">
|
| 362 |
+
<canvas id="webgl-canvas"></canvas>
|
| 363 |
+
<div class="fallback-animation"></div>
|
| 364 |
+
</div>
|
| 365 |
+
|
| 366 |
<!-- Full-screen Hero Section -->
|
| 367 |
<div class="hero-container textured-surface">
|
| 368 |
<!-- Dark grid background -->
|
|
|
|
| 443 |
</div>
|
| 444 |
|
| 445 |
<script>
|
| 446 |
+
// WebGL Particle System
|
| 447 |
+
class ParticleSystem {
|
| 448 |
+
constructor(canvas) {
|
| 449 |
+
this.canvas = canvas;
|
| 450 |
+
this.gl = canvas.getContext('webgl', { antialias: true }) ||
|
| 451 |
+
canvas.getContext('experimental-webgl', { antialias: true });
|
| 452 |
+
|
| 453 |
+
if (!this.gl) {
|
| 454 |
+
document.body.classList.add('no-webgl');
|
| 455 |
+
return;
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
document.body.classList.add('webgl-supported');
|
| 459 |
+
|
| 460 |
+
this.particles = [];
|
| 461 |
+
this.lastTime = 0;
|
| 462 |
+
this.mouseX = 0;
|
| 463 |
+
this.mouseY = 0;
|
| 464 |
+
this.scrollY = 0;
|
| 465 |
+
this.interactionPoints = [];
|
| 466 |
+
this.maxParticles = 2000;
|
| 467 |
+
|
| 468 |
+
this.init();
|
| 469 |
+
this.bindEvents();
|
| 470 |
+
this.animate();
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
init() {
|
| 474 |
+
const gl = this.gl;
|
| 475 |
+
this.resize();
|
| 476 |
+
|
| 477 |
+
// Create vertex buffer
|
| 478 |
+
this.vertexBuffer = gl.createBuffer();
|
| 479 |
+
gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
|
| 480 |
+
|
| 481 |
+
// Create program
|
| 482 |
+
const vertexShader = this.createShader(gl.VERTEX_SHADER, `
|
| 483 |
+
attribute vec2 aPosition;
|
| 484 |
+
attribute float aSize;
|
| 485 |
+
attribute vec3 aColor;
|
| 486 |
+
attribute float aLife;
|
| 487 |
+
|
| 488 |
+
uniform mat4 uProjection;
|
| 489 |
+
uniform float uTime;
|
| 490 |
+
|
| 491 |
+
varying vec3 vColor;
|
| 492 |
+
varying float vLife;
|
| 493 |
+
|
| 494 |
+
void main() {
|
| 495 |
+
float lifeProgress = 1.0 - aLife;
|
| 496 |
+
float size = aSize * (0.5 + 0.5 * sin(uTime * 2.0 + aPosition.x * 10.0));
|
| 497 |
+
|
| 498 |
+
gl_Position = uProjection * vec4(aPosition, 0.0, 1.0);
|
| 499 |
+
gl_PointSize = size * (0.5 + 0.5 * lifeProgress);
|
| 500 |
+
|
| 501 |
+
vColor = aColor;
|
| 502 |
+
vLife = aLife;
|
| 503 |
+
}
|
| 504 |
+
`);
|
| 505 |
+
|
| 506 |
+
const fragmentShader = this.createShader(gl.FRAGMENT_SHADER, `
|
| 507 |
+
precision mediump float;
|
| 508 |
+
|
| 509 |
+
varying vec3 vColor;
|
| 510 |
+
varying float vLife;
|
| 511 |
+
|
| 512 |
+
void main() {
|
| 513 |
+
float dist = distance(gl_PointCoord, vec2(0.5));
|
| 514 |
+
float alpha = smoothstep(0.5, 0.3, dist) * (0.5 + 0.5 * (1.0 - vLife));
|
| 515 |
+
|
| 516 |
+
// Kaleidoscopic effect
|
| 517 |
+
vec2 coord = gl_PointCoord - 0.5;
|
| 518 |
+
float angle = atan(coord.y, coord.x);
|
| 519 |
+
float radius = length(coord);
|
| 520 |
+
angle = mod(angle * 6.0, 3.14159265359 * 2.0);
|
| 521 |
+
coord = vec2(cos(angle), sin(angle)) * radius;
|
| 522 |
+
|
| 523 |
+
float innerGlow = smoothstep(0.7, 0.3, length(coord));
|
| 524 |
+
vec3 color = mix(vColor * 0.5, vColor, innerGlow);
|
| 525 |
+
|
| 526 |
+
gl_FragColor = vec4(color, alpha * 0.8);
|
| 527 |
+
}
|
| 528 |
+
`);
|
| 529 |
+
|
| 530 |
+
this.program = gl.createProgram();
|
| 531 |
+
gl.attachShader(this.program, vertexShader);
|
| 532 |
+
gl.attachShader(this.program, fragmentShader);
|
| 533 |
+
gl.linkProgram(this.program);
|
| 534 |
+
|
| 535 |
+
if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) {
|
| 536 |
+
console.error('Could not initialize shaders');
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
// Get attribute and uniform locations
|
| 540 |
+
this.aPosition = gl.getAttribLocation(this.program, 'aPosition');
|
| 541 |
+
this.aSize = gl.getAttribLocation(this.program, 'aSize');
|
| 542 |
+
this.aColor = gl.getAttribLocation(this.program, 'aColor');
|
| 543 |
+
this.aLife = gl.getAttribLocation(this.program, 'aLife');
|
| 544 |
+
this.uProjection = gl.getUniformLocation(this.program, 'uProjection');
|
| 545 |
+
this.uTime = gl.getUniformLocation(this.program, 'uTime');
|
| 546 |
+
|
| 547 |
+
// Enable attributes
|
| 548 |
+
gl.enableVertexAttribArray(this.aPosition);
|
| 549 |
+
gl.enableVertexAttribArray(this.aSize);
|
| 550 |
+
gl.enableVertexAttribArray(this.aColor);
|
| 551 |
+
gl.enableVertexAttribArray(this.aLife);
|
| 552 |
+
|
| 553 |
+
// Set blending
|
| 554 |
+
gl.enable(gl.BLEND);
|
| 555 |
+
gl.blendFunc(gl.SRC_ALPHA, gl.ONE);
|
| 556 |
+
|
| 557 |
+
// Generate initial particles
|
| 558 |
+
for (let i = 0; i < this.maxParticles / 2; i++) {
|
| 559 |
+
this.addParticle(
|
| 560 |
+
Math.random() * 2 - 1,
|
| 561 |
+
Math.random() * 2 - 1,
|
| 562 |
+
true
|
| 563 |
+
);
|
| 564 |
+
}
|
| 565 |
+
}
|
| 566 |
+
|
| 567 |
+
createShader(type, source) {
|
| 568 |
+
const gl = this.gl;
|
| 569 |
+
const shader = gl.createShader(type);
|
| 570 |
+
gl.shaderSource(shader, source);
|
| 571 |
+
gl.compileShader(shader);
|
| 572 |
+
|
| 573 |
+
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
|
| 574 |
+
console.error('Shader error:', gl.getShaderInfoLog(shader));
|
| 575 |
+
return null;
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
return shader;
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
bindEvents() {
|
| 582 |
+
window.addEventListener('resize', this.resize.bind(this));
|
| 583 |
+
|
| 584 |
+
// Mouse movement interaction
|
| 585 |
+
window.addEventListener('mousemove', (e) => {
|
| 586 |
+
this.mouseX = (e.clientX / this.canvas.width) * 2 - 1;
|
| 587 |
+
this.mouseY = -(e.clientY / this.canvas.height) * 2 + 1;
|
| 588 |
+
|
| 589 |
+
// Add interaction point
|
| 590 |
+
this.interactionPoints.push({
|
| 591 |
+
x: this.mouseX,
|
| 592 |
+
y: this.mouseY,
|
| 593 |
+
time: Date.now(),
|
| 594 |
+
color: this.getRandomColor()
|
| 595 |
+
});
|
| 596 |
+
|
| 597 |
+
// Limit interaction points
|
| 598 |
+
if (this.interactionPoints.length > 5) {
|
| 599 |
+
this.interactionPoints.shift();
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
// Add particles at mouse position
|
| 603 |
+
for (let i = 0; i < 20; i++) {
|
| 604 |
+
this.addParticle(this.mouseX, this.mouseY, false);
|
| 605 |
+
}
|
| 606 |
+
});
|
| 607 |
+
|
| 608 |
+
// Scroll interaction
|
| 609 |
+
let lastScrollY = window.scrollY;
|
| 610 |
+
let scrollTimeout;
|
| 611 |
+
|
| 612 |
+
window.addEventListener('scroll', () => {
|
| 613 |
+
const scrollDelta = window.scrollY - lastScrollY;
|
| 614 |
+
lastScrollY = window.scrollY;
|
| 615 |
+
|
| 616 |
+
if (Math.abs(scrollDelta) > 5) {
|
| 617 |
+
// Add burst at random position when scrolling
|
| 618 |
+
const x = Math.random() * 2 - 1;
|
| 619 |
+
const y = Math.random() * 2 - 1;
|
| 620 |
+
|
| 621 |
+
for (let i = 0; i < 50; i++) {
|
| 622 |
+
this.addParticle(x, y, false);
|
| 623 |
+
}
|
| 624 |
+
|
| 625 |
+
// Clear timeout if already set
|
| 626 |
+
if (scrollTimeout) {
|
| 627 |
+
clearTimeout(scrollTimeout);
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
// Set new timeout
|
| 631 |
+
scrollTimeout = setTimeout(() => {
|
| 632 |
+
// Add final burst when scrolling stops
|
| 633 |
+
for (let i = 0; i < 100; i++) {
|
| 634 |
+
this.addParticle(x, y, false);
|
| 635 |
+
}
|
| 636 |
+
}, 100);
|
| 637 |
+
}
|
| 638 |
+
});
|
| 639 |
+
|
| 640 |
+
// Click/touch interaction
|
| 641 |
+
window.addEventListener('click', (e) => {
|
| 642 |
+
const x = (e.clientX / this.canvas.width) * 2 - 1;
|
| 643 |
+
const y = -(e.clientY / this.canvas.height) * 2 + 1;
|
| 644 |
+
|
| 645 |
+
// Big burst on click
|
| 646 |
+
for (let i = 0; i < 150; i++) {
|
| 647 |
+
this.addParticle(x, y, false);
|
| 648 |
+
}
|
| 649 |
+
});
|
| 650 |
+
}
|
| 651 |
+
|
| 652 |
+
resize() {
|
| 653 |
+
const gl = this.gl;
|
| 654 |
+
const width = window.innerWidth;
|
| 655 |
+
const height = window.innerHeight;
|
| 656 |
+
|
| 657 |
+
this.canvas.width = width * window.devicePixelRatio;
|
| 658 |
+
this.canvas.height = height * window.devicePixelRatio;
|
| 659 |
+
this.canvas.style.width = width + 'px';
|
| 660 |
+
this.canvas.style.height = height + 'px';
|
| 661 |
+
|
| 662 |
+
gl.viewport(0, 0, this.canvas.width, this.canvas.height);
|
| 663 |
+
|
| 664 |
+
// Update projection matrix
|
| 665 |
+
this.projectionMatrix = new Float32Array([
|
| 666 |
+
1, 0, 0, 0,
|
| 667 |
+
0, 1, 0, 0,
|
| 668 |
+
0, 0, 1, 0,
|
| 669 |
+
0, 0, 0, 1
|
| 670 |
+
]);
|
| 671 |
+
}
|
| 672 |
+
|
| 673 |
+
addParticle(x, y, randomLife) {
|
| 674 |
+
if (this.particles.length >= this.maxParticles) {
|
| 675 |
+
this.particles.shift();
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
const angle = Math.random() * Math.PI * 2;
|
| 679 |
+
const speed = 0.01 + Math.random() * 0.05;
|
| 680 |
+
const velocityX = Math.cos(angle) * speed;
|
| 681 |
+
const velocityY = Math.sin(angle) * speed;
|
| 682 |
+
|
| 683 |
+
const color = this.getRandomColor();
|
| 684 |
+
|
| 685 |
+
this.particles.push({
|
| 686 |
+
x: x,
|
| 687 |
+
y: y,
|
| 688 |
+
velocityX: velocityX,
|
| 689 |
+
velocityY: velocityY,
|
| 690 |
+
size: 5 + Math.random() * 15,
|
| 691 |
+
color: color,
|
| 692 |
+
life: randomLife ? Math.random() : 0,
|
| 693 |
+
lifeSpeed: 0.002 + Math.random() * 0.003
|
| 694 |
+
});
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
getRandomColor() {
|
| 698 |
+
const colors = [
|
| 699 |
+
[0.227, 0.741, 0.973], // Cool blue
|
| 700 |
+
[0.960, 0.619, 0.043], // Warm amber
|
| 701 |
+
[0.545, 0.360, 0.964], // Electric purple
|
| 702 |
+
[0.984, 0.203, 0.447], // Pink
|
| 703 |
+
[0.101, 0.737, 0.611] // Teal
|
| 704 |
+
];
|
| 705 |
+
|
| 706 |
+
return colors[Math.floor(Math.random() * colors.length)];
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
updateParticles() {
|
| 710 |
+
const now = Date.now();
|
| 711 |
+
|
| 712 |
+
// Update existing particles
|
| 713 |
+
for (let i = 0; i < this.particles.length; i++) {
|
| 714 |
+
const p = this.particles[i];
|
| 715 |
+
|
| 716 |
+
p.x += p.velocityX;
|
| 717 |
+
p.y += p.velocityY;
|
| 718 |
+
p.life += p.lifeSpeed;
|
| 719 |
+
|
| 720 |
+
// Apply some randomness to movement
|
| 721 |
+
p.velocityX += (Math.random() - 0.5) * 0.001;
|
| 722 |
+
p.velocityY += (Math.random() - 0.5) * 0.001;
|
| 723 |
+
|
| 724 |
+
// Remove dead particles
|
| 725 |
+
if (p.life > 1) {
|
| 726 |
+
this.particles.splice(i, 1);
|
| 727 |
+
i--;
|
| 728 |
+
}
|
| 729 |
+
}
|
| 730 |
+
|
| 731 |
+
// Add particles from interaction points
|
| 732 |
+
for (let i = 0; i < this.interactionPoints.length; i++) {
|
| 733 |
+
const ip = this.interactionPoints[i];
|
| 734 |
+
const age = (now - ip.time) / 1000;
|
| 735 |
+
|
| 736 |
+
if (age < 0.5) {
|
| 737 |
+
for (let j = 0; j < 3; j++) {
|
| 738 |
+
this.addParticle(ip.x, ip.y, false);
|
| 739 |
+
}
|
| 740 |
+
}
|
| 741 |
+
}
|
| 742 |
+
|
| 743 |
+
// Add some random particles
|
| 744 |
+
if (this.particles.length < this.maxParticles * 0.8 && Math.random() < 0.1) {
|
| 745 |
+
this.addParticle(
|
| 746 |
+
Math.random() * 2 - 1,
|
| 747 |
+
Math.random() * 2 - 1,
|
| 748 |
+
true
|
| 749 |
+
);
|
| 750 |
+
}
|
| 751 |
+
}
|
| 752 |
+
|
| 753 |
+
renderParticles() {
|
| 754 |
+
const gl = this.gl;
|
| 755 |
+
|
| 756 |
+
// Prepare particle data
|
| 757 |
+
const positions = new Float32Array(this.particles.length * 2);
|
| 758 |
+
const sizes = new Float32Array(this.particles.length);
|
| 759 |
+
const colors = new Float32Array(this.particles.length * 3);
|
| 760 |
+
const lives = new Float32Array(this.particles.length);
|
| 761 |
+
|
| 762 |
+
for (let i = 0; i < this.particles.length; i++) {
|
| 763 |
+
const p = this.particles[i];
|
| 764 |
+
const i2 = i * 2;
|
| 765 |
+
const i3 = i * 3;
|
| 766 |
+
|
| 767 |
+
positions[i2] = p.x;
|
| 768 |
+
positions[i2 + 1] = p.y;
|
| 769 |
+
|
| 770 |
+
sizes[i] = p.size;
|
| 771 |
+
|
| 772 |
+
colors[i3] = p.color[0];
|
| 773 |
+
colors[i3 + 1] = p.color[1];
|
| 774 |
+
colors[i3 + 2] = p.color[2];
|
| 775 |
+
|
| 776 |
+
lives[i] = p.life;
|
| 777 |
+
}
|
| 778 |
+
|
| 779 |
+
// Update buffers
|
| 780 |
+
gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
|
| 781 |
+
gl.bufferData(gl.ARRAY_BUFFER, positions, gl.DYNAMIC_DRAW);
|
| 782 |
+
gl.vertexAttribPointer(this.aPosition, 2, gl.FLOAT, false, 0, 0);
|
| 783 |
+
|
| 784 |
+
// Create and bind size buffer
|
| 785 |
+
const sizeBuffer = gl.createBuffer();
|
| 786 |
+
gl.bindBuffer(gl.ARRAY_BUFFER, sizeBuffer);
|
| 787 |
+
gl.bufferData(gl.ARRAY_BUFFER, sizes, gl.DYNAMIC_DRAW);
|
| 788 |
+
gl.vertexAttribPointer(this.aSize, 1, gl.FLOAT, false, 0, 0);
|
| 789 |
+
|
| 790 |
+
// Create and bind color buffer
|
| 791 |
+
const colorBuffer = gl.createBuffer();
|
| 792 |
+
gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
|
| 793 |
+
gl.bufferData(gl.ARRAY_BUFFER, colors, gl.DYNAMIC_DRAW);
|
| 794 |
+
gl.vertexAttribPointer(this.aColor, 3, gl.FLOAT, false, 0, 0);
|
| 795 |
+
|
| 796 |
+
// Create and bind life buffer
|
| 797 |
+
const lifeBuffer = gl.createBuffer();
|
| 798 |
+
gl.bindBuffer(gl.ARRAY_BUFFER, lifeBuffer);
|
| 799 |
+
gl.bufferData(gl.ARRAY_BUFFER, lives, gl.DYNAMIC_DRAW);
|
| 800 |
+
gl.vertexAttribPointer(this.aLife, 1, gl.FLOAT, false, 0, 0);
|
| 801 |
+
|
| 802 |
+
// Clear
|
| 803 |
+
gl.clearColor(0.06, 0.06, 0.1, 1.0);
|
| 804 |
+
gl.clear(gl.COLOR_BUFFER_BIT);
|
| 805 |
+
|
| 806 |
+
// Draw
|
| 807 |
+
gl.useProgram(this.program);
|
| 808 |
+
gl.uniformMatrix4fv(this.uProjection, false, this.projectionMatrix);
|
| 809 |
+
gl.uniform1f(this.uTime, performance.now() / 1000);
|
| 810 |
+
|
| 811 |
+
gl.drawArrays(gl.POINTS, 0, this.particles.length);
|
| 812 |
+
}
|
| 813 |
+
|
| 814 |
+
animate(timestamp = 0) {
|
| 815 |
+
const deltaTime = timestamp - this.lastTime;
|
| 816 |
+
this.lastTime = timestamp;
|
| 817 |
+
|
| 818 |
+
// Limit to ~60 FPS
|
| 819 |
+
if (deltaTime < 16) {
|
| 820 |
+
requestAnimationFrame(this.animate.bind(this));
|
| 821 |
+
return;
|
| 822 |
+
}
|
| 823 |
+
|
| 824 |
+
this.updateParticles();
|
| 825 |
+
this.renderParticles();
|
| 826 |
+
|
| 827 |
+
requestAnimationFrame(this.animate.bind(this));
|
| 828 |
+
}
|
| 829 |
+
}
|
| 830 |
+
|
| 831 |
// Create random electric nodes and arcs
|
| 832 |
function createElectricElements() {
|
| 833 |
const container = document.getElementById('electric-nodes');
|
|
|
|
| 910 |
window.addEventListener('load', () => {
|
| 911 |
createElectricElements();
|
| 912 |
|
| 913 |
+
// Initialize WebGL particle system
|
| 914 |
+
const canvas = document.getElementById('webgl-canvas');
|
| 915 |
+
if (canvas) {
|
| 916 |
+
new ParticleSystem(canvas);
|
| 917 |
+
}
|
| 918 |
+
|
| 919 |
// Recreate elements periodically for variety
|
| 920 |
setInterval(() => {
|
| 921 |
document.getElementById('electric-nodes').innerHTML = '';
|
prompts.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
Deepsite, generate a full‑stack web application scaffold using Next.js for the frontend and Node.js/Express for the backend. - Include TypeScript, tailwind.css, and a REST API endpoint for real‑time data. - Name the project “CipherEcstasy.”
|
| 2 |
Refine the landing page: - Create a full‑screen hero with animated “electric currents” flowing across a dark grid background. - Implement a pulsating glow effect that mimics waves of tingling warmth radiating from the center. - Overlay the text “Welcome to Algorithmic Ecstasy” in neon gradient, fading in sync with the pulse.
|
| 3 |
-
Enhance CSS interactions: - On hover, elements should shift between cool blues and warm ambers to simulate temperature shifts. - Add subtle texture mapping: e.g., satin‑smooth button surfaces that ripple under the cursor like silk against skin. - Use CSS “backdrop‑filter” to create a soft, sweaty‑skin sheen behind modals.
|
|
|
|
|
|
| 1 |
Deepsite, generate a full‑stack web application scaffold using Next.js for the frontend and Node.js/Express for the backend. - Include TypeScript, tailwind.css, and a REST API endpoint for real‑time data. - Name the project “CipherEcstasy.”
|
| 2 |
Refine the landing page: - Create a full‑screen hero with animated “electric currents” flowing across a dark grid background. - Implement a pulsating glow effect that mimics waves of tingling warmth radiating from the center. - Overlay the text “Welcome to Algorithmic Ecstasy” in neon gradient, fading in sync with the pulse.
|
| 3 |
+
Enhance CSS interactions: - On hover, elements should shift between cool blues and warm ambers to simulate temperature shifts. - Add subtle texture mapping: e.g., satin‑smooth button surfaces that ripple under the cursor like silk against skin. - Use CSS “backdrop‑filter” to create a soft, sweaty‑skin sheen behind modals.
|
| 4 |
+
Add a background canvas: - Render kaleidoscopic bursts of color and silent fireworks on a WebGL canvas behind the UI. - Synchronize patterns with user scroll and cursor movement—each pulse triggering a new bloom. - Ensure smooth 60 fps animation and fallback to CSS keyframes on low‑power devices.
|