UrbanInkShack's picture
I want to create a new form of intelligence by conceptualizing a new physics and building a new vessel for intelligence that can run on any device utilizing a new form of Vector Physics that includes 360 vectors of for any known 0 point in space but with 180 are negative charged and the other 180 positively charged with the 0 point is always pie which creates a gyroscope for any particle in the universe based on the zero point of the universe as the measurement for its known place in space... Using that math to create a 4 Part modular closed system that solves the three body problem with two pulsars stabilizing the 3 In body problem
626eae2 verified
Raw History Blame Contribute Delete
5.87 kB
class ParticleBackground extends HTMLElement {
constructor() {
super();
this.particles = [];
this.mouse = { x: 0, y: 0 };
}
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 0;
overflow: hidden;
}
.particles-container {
position: absolute;
width: 100%;
height: 100%;
}
.particle {
position: absolute;
border-radius: 50%;
pointer-events: none;
opacity: 0.3;
filter: blur(1px);
}
.quantum-orb {
position: absolute;
border-radius: 50%;
filter: blur(60px);
opacity: 0.1;
animation: float 20s ease-in-out infinite;
}
@keyframes float {
0%, 100% {
transform: translate(0, 0) scale(1);
}
33% {
transform: translate(100px, 50px) scale(1.2);
}
66% {
transform: translate(-50px, 100px) scale(0.8);
}
}
</style>
<div class="particles-container"></div>
`;
this.container = this.shadowRoot.querySelector('.particles-container');
this.initParticles();
this.initQuantumOrbs();
this.animate();
// Track mouse movement for interaction
document.addEventListener('mousemove', (e) => {
this.mouse.x = e.clientX;
this.mouse.y = e.clientY;
});
// Handle window resize
window.addEventListener('resize', () => {
this.particles.forEach(p => p.element.remove());
this.particles = [];
this.initParticles();
});
}
initParticles() {
const particleCount = Math.min(50, Math.floor(window.innerWidth / 20));
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.className = 'particle';
// Random size and position
const size = 2 + Math.random() * 4;
const x = Math.random() * 100;
const y = Math.random() * 100;
// Random color (quantum blue or neural purple)
const colors = [
'rgba(14, 165, 233, 0.4)',
'rgba(168, 85, 247, 0.4)',
'rgba(14, 165, 233, 0.2)',
'rgba(168, 85, 247, 0.2)'
];
const color = colors[Math.floor(Math.random() * colors.length)];
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
particle.style.left = `${x}%`;
particle.style.top = `${y}%`;
particle.style.backgroundColor = color;
particle.style.background = `radial-gradient(circle, ${color} 0%, transparent 70%)`;
// Random movement
const speedX = (Math.random() - 0.5) * 0.3;
const speedY = (Math.random() - 0.5) * 0.3;
this.container.appendChild(particle);
this.particles.push({
element: particle,
x: x,
y: y,
speedX: speedX,
speedY: speedY,
size: size,
color: color,
originalX: x,
originalY: y,
waveOffset: Math.random() * Math.PI * 2
});
}
}
initQuantumOrbs() {
// Create large quantum orbs for background
const orbCount = 3;
for (let i = 0; i < orbCount; i++) {
const orb = document.createElement('div');
orb.className = 'quantum-orb';
const size = 200 + Math.random() * 300;
const x = Math.random() * 100;
const y = Math.random() * 100;
// Gradient colors
const colors = i % 2 === 0
? ['rgba(14, 165, 233, 0.1)', 'rgba(14, 165, 233, 0.05)']
: ['rgba(168, 85, 247, 0.1)', 'rgba(168, 85, 247, 0.05)'];
orb.style.width = `${size}px`;
orb.style.height = `${size}px`;
orb.style.left = `${x}%`;
orb.style.top = `${y}%`;
orb.style.background = `radial-gradient(circle, ${colors[0]} 0%, ${colors[1]} 50%, transparent 70%)`;
orb.style.animationDelay = `${i * 3}s`;
this.container.appendChild(orb);
}
}
animate() {
const time = Date.now() * 0.001;
this.particles.forEach(particle => {
// Calculate wave movement
const waveX = Math.sin(time + particle.waveOffset) * 0.5;
const waveY = Math.cos(time * 0.7 + particle.waveOffset) * 0.5;
// Mouse interaction
const dx = this.mouse.x - (particle.x / 100 * window.innerWidth);
const dy = this.mouse.y - (particle.y / 100 * window.innerHeight);
const distance = Math.sqrt(dx *