Complete 3D metaverse platform with: - Three.js 3D rendering - Cannon.js physics engine - Pointer lock controls - Procedural cityscape - Floating islands - Portal system - Particle effects - WebXR/VR support ready - Multiplayer ready (Socket.io) Features: - First-person controls (WASD + mouse) - Jump and run mechanics - Chat system - Real-time HUD - Loading screen - Responsive design Built with Vite for fast builds and hot reload. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
645 B
JavaScript
46 lines
645 B
JavaScript
let interval = null;
|
|
let result = null;
|
|
|
|
function initJank() {
|
|
|
|
const button = document.getElementById( 'button' );
|
|
button.addEventListener( 'click', function () {
|
|
|
|
if ( interval === null ) {
|
|
|
|
interval = setInterval( jank, 1000 / 60 );
|
|
|
|
button.textContent = 'STOP JANK';
|
|
|
|
} else {
|
|
|
|
clearInterval( interval );
|
|
interval = null;
|
|
|
|
button.textContent = 'START JANK';
|
|
result.textContent = '';
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
result = document.getElementById( 'result' );
|
|
|
|
}
|
|
|
|
function jank() {
|
|
|
|
let number = 0;
|
|
|
|
for ( let i = 0; i < 10000000; i ++ ) {
|
|
|
|
number += Math.random();
|
|
|
|
}
|
|
|
|
result.textContent = number;
|
|
|
|
}
|
|
|
|
export default initJank;
|