Viewer polish, cursor fix, Grok rename + W/S fix, Composer G teleport
Site: - Cursor follower fades out over iframes (it froze on top of running artifacts since iframes swallow pointer events) and when the pointer leaves the window - HTML viewer: full-bleed width on xl screens (up to 90rem), height capped to 100dvh-10rem so the frame plus its action row always fits the viewport (big iframes ate wheel events and trapped page scroll), fullscreen button (overlay + footer action), and Run now auto-aligns the frame below the fixed header Artifacts: - grok-build: W/S were inverted against the forward vector (W walked backward); model label renamed to Grok Build - composer-2-5: added G-key cycle teleport to its three generated landmarks (elven tower, dragon temple, sky ruins) with a start-screen hint - they were previously only reachable on foot; ground landmarks arrive 10 blocks out facing the structure, sky ruins land on the deck Run notes updated accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37f4c8ae86
commit
cd2af84f34
2 files changed
+23
-3
No files matched your search
@@ -85,7 +85,8 @@
|
||||
鼠标环视 · 左键破坏 · 右键放置<br>
|
||||
1-9 切换方块 · 滚轮切换物品<br>
|
||||
探索柏林噪声生成的无限大地<br>
|
||||
发现精灵塔、龙神殿、天空遗迹等神话建筑
|
||||
发现精灵塔、龙神殿、天空遗迹等神话建筑<br>
|
||||
G 依次瞬移到三处神话景点
|
||||
</p>
|
||||
<div class="start">点击开始探索</div>
|
||||
</div>
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user