XcryptoX
2.25K subscribers
257 photos
3 videos
210 links
Download Telegram
5 Live Campaigns with $1M+ in rewards
Mindshare Growth Across Telegram for Tonso's Partner Projects:
- @useTria: 0.82% → 17.25% (21×)
- @solsticefi: 1.07% → 25.26% (24×)
- @intodotspace: 0.93% → 22.35% (24×)
- @Vault777Casino: 0% → 10.30%
-@TonsoAI – User and creator @GetYieldFi
Up to +300% Telegram audience growth (new channel subscribers
FB id হ্যাক হয়ছে তো কেউ যদি টাকা চাই দিবেন না দিলে দায় আপনার
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Gesture Controlled 3D Particle System</title>
<style>
body { margin: 0; overflow: hidden; background: black; }
video { display: none; }
</style>
</head>
<body>

<video id="video" autoplay playsinline></video>

<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r152/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/hands/hands.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js"></script>

<script>
let scene, camera, renderer, particles;
let particleGeometry, particleMaterial;
let currentShapeIndex = 0;
let shapes = ["sphere", "heart", "flower", "saturn", "fireworks"];
let scaleFactor = 1;
let hue = 0;

init();
animate();

function init() {

scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000);
camera.position.z = 5;

renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);

createParticles("sphere");

window.addEventListener('resize', () => {
camera.aspect = window.innerWidth/window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});

initHandTracking();
}

function createParticles(type) {

if (particles) scene.remove(particles);

const count = 3000;
particleGeometry = new THREE.BufferGeometry();
const positions = new Float32Array(count * 3);

for (let i = 0; i < count; i++) {

let x, y, z;

if (type === "sphere") {
const radius = 1.5;
const theta = Math.random() * Math.PI * 2;
const phi = Math.acos(2*Math.random()-1);
x = radius * Math.sin(phi) * Math.cos(theta);
y = radius * Math.sin(phi) * Math.sin(theta);
z = radius * Math.cos(phi);
}

else if (type === "heart") {
const t = Math.random() * Math.PI * 2;
x = 16 * Math.pow(Math.sin(t),3)/16;
y = (13*Math.cos(t) - 5*Math.cos(2*t) - 2*Math.cos(3*t) - Math.cos(4*t))/16;
z = (Math.random()-0.5)*0.5;
}

else if (type === "flower") {
const t = Math.random() * Math.PI * 2;
const r = Math.sin(6*t);
x = r * Math.cos(t);
y = r * Math.sin(t);
z = (Math.random()-0.5)*0.3;
}

else if (type === "saturn") {
const angle = Math.random() * Math.PI * 2;
const radius = 1 + Math.random()*0.3;
x = radius * Math.cos(angle);
y = (Math.random()-0.5)*0.2;
z = radius * Math.sin(angle);
}

else if (type === "fireworks") {
const r = Math.random()*1.5;
const theta = Math.random()*Math.PI*2;
const phi = Math.random()*Math.PI;
x = r * Math.sin(phi)*Math.cos(theta);
y = r * Math.sin(phi)*Math.sin(theta);
z = r * Math.cos(phi);
}

positions[i*3] = x;
positions[i*3+1] = y;
positions[i*3+2] = z;
}

particleGeometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));

particleMaterial = new THREE.PointsMaterial({
size: 0.03,
color: new THREE.Color(hsl(${hue},100%,50%))
});

particles = new THREE.Points(particleGeometry, particleMaterial);
scene.add(particles);
}

function animate() {
requestAnimationFrame(animate);

particles.rotation.y += 0.003;
particles.scale.set(scaleFactor, scaleFactor, scaleFactor);

renderer.render(scene, camera);
}

function initHandTracking() {

const video = document.getElementById('video');

const hands = new Hands({
locateFile: file => https://cdn.jsdelivr.net/npm/@mediapipe/hands/${file}
});

hands.setOptions({
maxNumHands: 1,
minDetectionConfidence: 0.7,
minTrackingConfidence: 0.7
});
hands.onResults(results => {

if (!results.multiHandLandmarks) return;

const lm = results.multiHandLandmarks[0];

const thumb = lm[4];
const index = lm[8];

const pinchDistance = Math.hypot(
thumb.x - index.x,
thumb.y - index.y
);

// Pinch = Change Color
if (pinchDistance < 0.05) {
hue = (hue + 5) % 360;
particleMaterial.color.set(hsl(${hue},100%,50%));
}

// Fist detection (rough)
if (lm[8].y > lm[6].y) {
scaleFactor = Math.max(0.5, scaleFactor - 0.02);
} else {
scaleFactor = Math.min(2.5, scaleFactor + 0.02);
}

// One finger up → switch shape
if (lm[8].y < lm[6].y && lm[12].y > lm[10].y) {
currentShapeIndex = (currentShapeIndex + 1) % shapes.length;
createParticles(shapes[currentShapeIndex]);
}
});

const cameraUtils = new Camera(video, {
onFrame: async () => { await hands.send({image: video}); },
width: 640,
height: 480
});

cameraUtils.start();
}
</script>
</body>
</html>
Create a real-time interactive 3D particle system in Three.js.

The system should use the camera to track hand gestures and dynamically control particle behavior-including expansion, color changes, and switching between particle templates such as hearts, flowers, Saturn shapes, fireworks, and more.

G
Guys Degen Share a Opportunity to Win @DegenList & @Greedy Degen Role in Discord...

This Role Winner can win WL in DEGEN 777 NFT


"Every verified degen you bring in pushes you higher on the leaderboard"

REWARDS
➡️Top 1–2 on the leaderboard@DegenList
➡️Top 3–10 → Receive the exclusive @Greedy Degen role
➡️Bonus: One @DegenList spot will be raffled between ranks 3–10 (Even if you miss the top 2, you still have a chance)


Don't Miss This Opportunity Join Fast...
Choose any link to Join Bullish DEGEN Discord -
➡️ https://discord.gg/5j9nuEDn

➡️ https://discord.gg/BycrXDsM

➡️ https://discord.gg/X7QRaE7N.
👍77🤩74🔥65😁63😍211
XcryptoX pinned a photo
تَقَبَّلَ اللّهُ مِنَّ وَ مِنْكُمْ.

তাকাব্বালাল্লাহু মিন্না ওয়া মিনকুম

🌙
🤲