Commit Graph

50 Commits

Author SHA1 Message Date
ec232cad48 Merge pull request #2338 from syfyra/feat/viewer-overview-map
viewer: an overview map of the world's chunks, with click to fly there (VIEWER-OVERVIEW-MAP)
2026-12-01 16:19:30 +01:00
13e0f40b61 Merge pull request #2329 from syfyra/feat/viewer-follow-cam-link
viewer: follow a camera link opened in the open page (VIEWER-FOLLOW-CAM-LINK)
2026-12-01 16:18:54 +01:00
5addc0128b Merge pull request #2243 from syfyra/fix/viewer-slow-key
viewer: slow flight on C instead of Ctrl (VIEWER-SLOW-KEY-CTRL-W)
2026-12-01 16:18:16 +01:00
b58f74a956 Merge pull request #651 from kirigayakazima/fix/viewer-chunk-idle-timeout
viewer: reset chunk download deadline while body bytes stream (VIEWER-CHUNK-IDLE-TIMEOUT)
2026-11-29 03:16:02 +01:00
ad1c662716 viewer: an overview map of the world's chunks, with click to fly there (VIEWER-OVERVIEW-MAP)
The map viewer loads only what is near the camera, and nothing in it shows
where the rest of a world is: a placed world is kilometres across, and a
chunk that fails to load is only a number in the HUD.

M opens a map of the whole world from above, drawn from world.json alone:
one rectangle per chunk (its cell when it names a tier, otherwise the X/Z
extent of its bounds), coloured by its streaming state (not loaded,
loading, loaded, failed). It shows the camera and its view direction, the
spawn point and, without LOD sets, the loading radius. The line under it
names the point under the cursor, in a placed world also as RAGE X and Y,
and the chunk there with its state. A click moves the camera there, 10 m
above the full-detail geometry at that point unless it is already higher;
the wheel over the map zooms it about the cursor.

Nothing touches the page until the map is first opened, and an open map is
redrawn at most every 100 ms. tests/test_viewer_map.cjs runs the map's
code from the page together with the streaming code, in a new file so the
open pull requests on tests/test_viewer_streaming.cjs are not touched.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 15:04:06 +01:00
0370dc2a17 viewer: follow a camera link opened in the open page (VIEWER-FOLLOW-CAM-LINK)
The camera hash (#cam=x,y,z,yaw,pitch) was read once at startup. A link
pasted into the address bar of a tab that already shows the viewer, or
Back/Forward between two links, changes only the hash: the page does not
reload and the camera stayed where it was. The viewer now applies the
hash again on hashchange; a hash that is not a camera link is ignored,
as at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:50:04 +01:00
393dab2e73 viewer: slow flight on C instead of Ctrl (VIEWER-SLOW-KEY-CTRL-W)
The help line offered Ctrl as the slow modifier for W A S D and Q/E, but
with a movement key held Ctrl makes a browser shortcut: Ctrl+W closes
the tab (a page cannot cancel it in Chromium or Firefox), Ctrl+S and
Ctrl+D open the save-page and bookmark dialogs and Ctrl+E moves the
focus to the address bar. The keydown handler leaves modified keys to
the browser, so slow flight forward lost the whole viewer, and every
other slow direction left the page.

Slow is now the C key, which no browser binds. Ctrl leaves the speed
alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:08:00 +01:00
23b70597de viewer: report body read failures separately from invalid JSON (WORLD-JSON-READ-MISREPORTED)
loadWorld() read the body and parsed it in one try, so a 200 response whose
body read failed was reported as "could not be read as valid JSON".
The read and the parse now have separate stages, and the message names the
stage that failed. Tests cover a failed read, invalid JSON text and a valid body.
2026-11-24 16:10:56 +01:00
5e19f48910 viewer: reset chunk download deadline while body bytes stream (VIEWER-CHUNK-IDLE-TIMEOUT) 2026-11-24 18:59:02 +08:00
0868c821ad Merge pull request #237 from ddddddddwp/fix/viewer-horizontal-wheel-speed
viewer: a trackpad's sideways scroll leaves the camera speed alone (old #6256)
2026-11-23 22:09:20 -05:00
5accc8ee21 viewer: three.js loads from pinned CDN URLs checked by integrity hashes
index.html hashes the three.js module graph in its import map and modulepreload links; studio.html hashes its three classic scripts and its CDN fallback, which document.write now actually loads (setting src on a failed script never refetched). tests/test_viewer_cdn_integrity.py checks every remote URL in viewer/*.html.
2026-11-24 08:26:53 +05:30
c1f343a1ae viewer: a trackpad's sideways scroll leaves the camera speed alone (old #6256)
The free camera's wheel handler took every wheel event, so a trackpad's two-finger sideways scroll
(deltaX only, deltaY 0) hit the "deltaY >= 0" branch and divided the speed by 1.15 per event.

The handler now ignores an event whose horizontal component is larger than its vertical one, so a
pan does not slow the camera. test_viewer_streaming.cjs drives the captured wheel handler and
checks climb per frame: a sideways event keeps 4 m, a dominant horizontal diagonal keeps 4 m, and
one notch up gives 4.6 m (40 m/s * 1.15 * 0.1 s).
2026-11-24 10:50:36 +08:00
e5a05eccf0 Merge pull request #4284 from Atomic258
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:13:06 -05:00
04975128eb Merge pull request #3907 from Oleg Makarov
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:28 -05:00
9def8c5c3c Merge pull request #3199 from Tayar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:06:59 -05:00
a1642aea95 TEST-931: Dispose streamed chunk skeletons on eviction 2026-11-22 19:31:32 -05:00
2baf85b035 Viewer: time out stalled startup manifests (TEST-858) 2026-11-23 01:23:21 +03:00
e823aa1ffc Keep browser shortcuts from triggering viewer actions 2026-11-22 19:16:10 -03:00
1c4c6474e5 Merge pull request #3795 from Oleg Makarov 2026-11-22 17:03:51 -05:00
918acc3271 Merge pull request #3365 from shdann 2026-11-22 17:01:42 -05:00
40ccbab001 Viewer: time out stalled chunk downloads (BUILD-1074) 2026-11-23 00:36:18 +03:00
698d270ef2 viewer: the right Ctrl key slows the camera too
The help line says "Shift fast · Ctrl slow", and the speed factor tests
both Shift keys but only ControlLeft, so holding the right Ctrl key moved
at full speed.

The test runs the viewer's own main loop for one synthetic frame per key
and compares how far E climbs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 23:15:10 +03:00
670d84b904 Merge pull request #3140 from Max Hurst 2026-11-22 15:15:04 -05:00
39c984fe4a Merge pull request #3118 from airp1ane 2026-11-22 15:14:56 -05:00
5f5efae004 Merge pull request #2457 from Vonsek 2026-11-22 15:10:48 -05:00
6f06dfd46a Enable viewer drag-to-look on pointer lock error events 2026-11-22 19:29:57 +00:00
6ac2d12a42 Viewer: reject malformed LOD tier names 2026-11-22 14:26:50 -05:00
57400b83fa Merge pull request #2704 from Vonsek 2026-11-22 13:17:12 -05:00
722c4fd97c merge: preserve upstream changes alongside the asset fix 2026-11-22 19:08:58 +01:00
dd3a843435 fix(viewer): match normals across generated terrain borders
Neighboring tiles share heights, but their normals came from disjoint triangle neighborhoods and produced a lighting seam.
2026-11-22 18:56:36 +01:00
eef47a90d4 fix(viewer): keep orphan HD outside LOD handoffs
Standalone high-detail chunks have their own band and can share a cell with the normal detail chain.
2026-11-22 18:12:49 +01:00
ec670d350b fix(viewer): keep a cached LOD visible during tier loading
Crossing a draw-band boundary hid the existing tier while its replacement was still downloading or parsing, leaving an empty cell.
2026-11-22 18:06:20 +01:00
d18f8f65d8 Merge pull request #2156 from TripleA 2026-11-22 11:42:20 -05:00
0fcbbf3cbb fix(viewer): stop drag-to-look when the primary button is released 2026-11-22 17:07:57 +01:00
eee69f2bc4 Viewer: share the camera position through the URL hash (P key) 2026-11-22 16:57:00 +01:00
08f1822374 Viewer: show WebGL startup failures in the overlay 2026-11-22 15:26:47 +01:00
02ba5f28b2 Viewer: hide cached LOD chunks outside their draw band 2026-11-22 12:18:39 +01:00
99a40c54b1 world_build: instanced placements with bounded memory, and LOD chunk sets
--placements used to copy a model's geometry into every placement and keep
all copies until chunking (#1183 review: 22 GB for a 700 m box). Now each
model's OBJ is parsed once into a packed cache file, each chunk stores every
model it uses once, and the placements are instance transforms:
EXT_mesh_gpu_instancing by default (three.js GLTFLoader reads it), one plain
glTF node per placement with --instancing nodes, or the old baked copies
with --instancing bake. Chunks are written as soon as they are built; with
--jobs N, packing and chunk writing run in N processes, at most 4N jobs in
flight. Memory is about 100 bytes per placement plus the models of the
chunks being written.

Every instance TRS has a positive determinant. A negative XY scale is folded
into the rotation; a negative Z scale draws a mirrored copy of the mesh
(glTF Y negated, winding reversed). Zero-scale placements are counted as
degenerate_scale. iter_placements streams the rows load_placements selects,
with the same checks (load_placements is unchanged).

--lod-sets builds one chunk set per lodLevel tier (c_<tier>_<x>_<z>, with
the tier and grid cell in each chunk record) and writes lod_bands to
world.json: a camera-distance band per tier from the entities' median
childLodDist/lodDist. The viewer loads a tiered chunk while the horizontal
distance to its cell is in the band (32 m slack before unloading), so each
cell shows one tier; worlds without lod_bands stream as before, and the
manifest check rejects unknown tiers, unordered bands and missing cells.

glb_writer: pack_primitive and _MaterialTable are factored out of build_glb
(output unchanged), plus build_instanced_glb / write_instanced_glb and
instance_bounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:02:54 +00:00
86bb28b7b1 Viewer: defer chunk bounds helpers until requested 2026-11-22 05:12:09 +01:00
d54b9c3628 Merge pull request #824 from FreddyxS 2026-11-21 22:37:50 -05:00
93f319bb52 Viewer: track original materials outside glTF extras 2026-11-22 04:32:02 +01:00
2c3c14f3be Viewer: select generated terrain from world mode 2026-11-22 04:20:23 +01:00
06a8593f63 Viewer: resolve GLB dependencies after redirects 2026-11-22 02:23:55 +01:00
21ec948cf2 Release decoded bitmaps when a viewer chunk is discarded 2026-11-21 21:45:05 -03:00
a42b5e2c75 Skip unnecessary viewer chunk candidate scans 2026-11-22 00:35:52 +01:00
5da04fd204 Validate world manifests before viewer startup 2026-11-21 23:48:40 +01:00
c8081eb0ba Cancel distant viewer chunk downloads after camera moves 2026-11-21 23:12:33 +01:00
0c17741bf4 Viewer: retry failed chunk loads with bounded backoff 2026-11-21 17:29:15 -04:00
691527329c tools, viewer: add stdlib world.json/.glb chunk builder and harden viewer 2026-11-21 16:10:06 -03:00
db0dc8bd5e Initial commit: Leonida, build-it-yourself PC port groundwork
Shader pipeline (carve, FSSM unpack, gfx1013 disassembly, RDNA2 to SPIR-V),
asset export via rpf9-explorer's Core (submodule), PE loader and shim
skeleton, and make_game.py, which builds from the user's own copy of the game.
No game data, keys or executables are included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:22:16 -05:00