GiBlox

Играй. Дружи. Говори.

0

Рекомендуемые игры

Robux и Premium

Донат-вещи

Настройка аватара

Игроки GiBlox

Диалоги

Выбери диалог

Войс-чат (настоящий, между игроками)

Твой войс-код
не подключён
Включи войс, чтобы получить код
Подключиться к другу
Друг открывает этот же файл на своём устройстве, включает войс и присылает тебе свой код
Прямой чат (работает поверх голосового соединения)
⚡Hosted on Drop2Host
#fb8c00','#fdd835','#43a047','#1e88e5','#8e24aa'][idx % 6] })); function frame() { loopId = requestAnimationFrame(frame); const sp = 4.6; if (k.w) { px += Math.sin(yaw) * sp; pz += Math.cos(yaw) * sp; } if (k.s) { px -= Math.sin(yaw) * sp; pz -= Math.cos(yaw) * sp; } if (k.a) { px -= Math.cos(yaw) * sp; pz += Math.sin(yaw) * sp; } if (k.d) { px += Math.cos(yaw) * sp; pz -= Math.sin(yaw) * sp; } px = Math.max(-460, Math.min(460, px)); pz = Math.max(-460, Math.min(460, pz)); let floorY = 0; if (currentMap === 'tower') { towerSteps.forEach(s => { if (Math.abs(px - s.x) < 55 && Math.abs(pz - s.z) < 55 && py >= s.y - 10) floorY = Math.max(floorY, s.y); }); } py += vy; if (py > floorY) vy -= 0.75; else { py = floorY; vy = 0; } // НЕБО И ПОЛ ПО РЕЖИМАМ const sky = currentMap === 'tavern' ? '#2c1e16' : (currentMap === 'mm2' ? '#1a1a2e' : (currentMap === 'tower' ? '#1e1b2e' : '#7ec8e3')); const ground = currentMap === 'tavern' ? '#5d4037' : (currentMap === 'mm2' ? '#37474f' : (currentMap === 'tower' ? '#263238' : '#4caf50')); ctx.fillStyle = sky; ctx.fillRect(0, 0, cv.width, cv.height); const corners = [proj(-500, 0, -500), proj(500, 0, -500), proj(500, 0, 500), proj(-500, 0, 500)]; if (corners.every(Boolean)) { ctx.fillStyle = ground; ctx.beginPath(); ctx.moveTo(corners[0].sx, corners[0].sy); corners.forEach(c => ctx.lineTo(c.sx, c.sy)); ctx.closePath(); ctx.fill(); } // ДЕКОРАЦИИ РАЗНЫХ РЕЖИМОВ if (currentMap === 'brook') { drawBox3D(-220, 0, 220, 140, 110, 140, '#ef5350', '#c62828'); drawBox3D(220, 0, 220, 140, 120, 140, '#42a5f5', '#1565c0'); drawBox3D(0, 0, 320, 180, 90, 110, '#ffee58', '#f9a825'); } else if (currentMap === 'tavern') { drawBox3D(0, 0, 240, 260, 42, 60, '#8d6e63', '#4e342e'); // Барная стойка drawBox3D(-150, 0, 100, 70, 30, 70, '#a1887f', '#5d4037'); // Стол 1 drawBox3D(150, 0, 100, 70, 30, 70, '#a1887f', '#5d4037'); // Стол 2 drawBox3D(0, 0, -260, 320, 130, 40, '#6d4c41', '#3e2723'); // Стена таверны } else if (currentMap === 'tower') { towerSteps.forEach(s => drawBox3D(s.x, s.y - 10, s.z, 90, 12, 90, s.col, '#111')); } else if (currentMap === 'mm2') { drawBox3D(0, 0, 260, 280, 150, 160, '#546e7a', '#263238'); // Особняк drawBox3D(-180, 0, 80, 60, 50, 60, '#78909c', '#37474f'); } BOTS.forEach((b, i) => { b.x += Math.sin(Date.now() * 0.001 + i) * 0.9; drawChar(b.x, 0, b.z, { h: '#f5d061', b: b.col, hat: 'cap', leg: 'norm' }, b.nick, botBubbles[b.nick]); }); drawChar(px, py, pz, me.skin, me.nick, myBubble); } frame(); } function exit3D() { cancelAnimationFrame(loopId); document.getElementById('world3d').classList.add('hidden'); } window.onload = () => { const s = localStorage.getItem(CUR), u = getU(); if (s && u[s]) { me = u[s]; startApp(); } }; tion.z + Math.cos(camYaw) * 8 ); camera.lookAt(playerMesh.position.x, playerMesh.position.y + 1.5, playerMesh.position.z); renderer.render(scene, camera); } animate(); } function exit3DWorld() { cancelAnimationFrame(animId); document.getElementById('world3d').classList.add('hidden'); } window.addEventListener('keydown', e => { const k = e.key.toLowerCase(); if (k === 'w' || e.key === 'ArrowUp') keys.w = true; if (k === 's' || e.key === 'ArrowDown') keys.s = true; if (k === 'a' || e.key === 'ArrowLeft') keys.a = true; if (k === 'd' || e.key === 'ArrowRight') keys.d = true; if (e.code === 'Space' && !document.getElementById('world3d').classList.contains('hidden')) jump3D(); }); window.addEventListener('keyup', e => { const k = e.key.toLowerCase(); if (k === 'w' || e.key === 'ArrowUp') keys.w = false; if (k === 's' || e.key === 'ArrowDown') keys.s = false; if (k === 'a' || e.key === 'ArrowLeft') keys.a = false; if (k === 'd' || e.key === 'ArrowRight') keys.d = false; }); window.onload = () => { const s = localStorage.getItem(CUR_KEY), u = getUsers(); if (s && u[s]) { currentUser = u[s]; enterApp(); } };