diff --git a/outputs/composer-2-5/mythos-craft.html b/outputs/composer-2-5/mythos-craft.html index b7b63e4..c06407f 100644 --- a/outputs/composer-2-5/mythos-craft.html +++ b/outputs/composer-2-5/mythos-craft.html @@ -85,7 +85,8 @@ 鼠标环视 · 左键破坏 · 右键放置
1-9 切换方块 · 滚轮切换物品
探索柏林噪声生成的无限大地
- 发现精灵塔、龙神殿、天空遗迹等神话建筑 + 发现精灵塔、龙神殿、天空遗迹等神话建筑
+ G 依次瞬移到三处神话景点

点击开始探索
@@ -1313,8 +1314,27 @@ document.addEventListener('mousemove', (e) => { player.pitch = Math.max(-Math.PI / 2 + 0.01, Math.min(Math.PI / 2 - 0.01, player.pitch)); }); +// added: G cycles teleports through the generated landmarks (the structures +// exist in world.structures but were otherwise only reachable on foot) +let landmarkIndex = 0; + document.addEventListener('keydown', (e) => { player.keys[e.code] = true; + if (e.code === 'KeyG') { + const struct = world.structures[landmarkIndex++ % world.structures.length]; + const isSky = struct.name === '天空遗迹'; + // sky ruins: land on the floating deck; ground landmarks: arrive a few + // blocks out, facing the structure + const tx = struct.x + (isSky ? 6.5 : 10.5); + const tz = struct.z + (isSky ? 0.5 : 10.5); + const groundY = isSky + ? world.getHeight(Math.round(struct.x), Math.round(struct.z)) + : world.getHeight(Math.round(tx), Math.round(tz)); + player.position.set(tx, groundY + (isSky ? 23 : 3), tz); + player.velocity.set(0, 0, 0); + player.yaw = Math.atan2(tx - struct.x, tz - struct.z); + player.pitch = 0; + } if (e.code.startsWith('Digit') && e.code !== 'Digit0') { const n = parseInt(e.code.replace('Digit', '')) - 1; if (n >= 0 && n < HOTBAR_BLOCKS.length) selectSlot(n); diff --git a/outputs/grok-build/mythos-craft.html b/outputs/grok-build/mythos-craft.html index 3405315..b2041b1 100644 --- a/outputs/grok-build/mythos-craft.html +++ b/outputs/grok-build/mythos-craft.html @@ -1177,8 +1177,8 @@ ); let moveX = 0, moveZ = 0; - if (this.keys['KeyW']) moveZ -= 1; - if (this.keys['KeyS']) moveZ += 1; + if (this.keys['KeyW']) moveZ += 1; // fix: W/S were inverted — `forward` already points where the camera looks, so W must add +forward (it walked backward before) + if (this.keys['KeyS']) moveZ -= 1; if (this.keys['KeyA']) moveX -= 1; if (this.keys['KeyD']) moveX += 1;