Commit Graph

98 Commits

Author SHA1 Message Date
63a569f904 Merge pull request #2339 from syfyra/fix/studio-stats-labels-i18n
studio: show the EU strings the page already defines (STUDIO-EU-STRINGS)
2026-12-01 16:19:43 +01:00
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
72f278dd56 Merge pull request #2335 from syfyra/feat/studio-model-details
studio: list the shown model's size, meshes, materials and textures (STUDIO-MODEL-DETAILS)
2026-12-01 16:19:06 +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
25cf1aa4ec Merge pull request #2250 from kirigayakazima/codex/studio-dds-cube-face
studio: select cube faces for DDS previews and texels
2026-11-29 03:16:26 +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
ed72a793f5 Merge pull request #918 from TuroYT/fix/viewer-world-json-read-error
viewer: say the world file could not be read when the body read fails, not that the JSON is invalid (WORLD-JSON-READ-MISREPORTED)
2026-11-29 03:15:49 +01:00
21bdf6b60d Merge pull request #1138 from Okachamie/studio-model-load-progress
viewer: keep the loading bar visible for the current model
2026-11-29 03:15:35 +01:00
ce8afe3c2a Merge pull request #1490 from xel1uz/fix/studio-reset-camera
studio: reset the camera to the current model's fitted view
2026-11-29 03:15:21 +01:00
b44eece29e Merge pull request #2100 from Saauf/studio-failed-load-selection
studio: go back to the shown model's row when a download fails (STUDIO-FAILED-LOAD-SELECTION)
2026-11-29 03:15:08 +01:00
0a4274338a docs(viewer): add viewer/README.md for serve.py, synthetic terrain, and CDN pinning
Document viewer/serve.py flags and loopback/path security guards, synthetic terrain
fallback, Three.js 0.160.0 jsDelivr SRI pinning, and offline viewer test commands.

AI-assisted: Antigravity gemini-4-neon.
2026-11-26 20:48:50 -03:00
3c9a09f12a studio: show the EU strings the page already defines (STUDIO-EU-STRINGS)
viewer/studio.html has an RU/EU switch and an I18N table, but several
of its entries were never applied, so the EU page kept Russian text: the
five stats labels (Модель, Категория, Полигонов, Вершин, Размер файла),
the reset-camera button, the texture gallery heading, the "Все" category
chip, the texture count, and the empty-list messages for models and
textures. The "show all" button and the texture load error had no
entries at all.

Apply them: applyTranslations sets the labels (each is the text node in
front of its value, so the markup stays as it is), the button, the
heading, the chip and the count; the lists, which re-render on a switch,
read their messages from I18N. Two entries are added for the "show all"
button and the load error. The category names and the model download
alert are left for later.

Tested: new test in tests/test_viewer_studio.cjs (fails before the
change, passes after); the existing studio tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:05:05 +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
d83cee900c studio: list the shown model's size, meshes, materials and textures (STUDIO-MODEL-DETAILS)
The studio's stats panel gave a model's triangles, vertices and file
size. Checking an export needs the next layer too: how big the model is,
how many meshes and materials it has, and which textures each material
uses at what size. Add that to the panel, read from the loaded glTF
alone:

- the bounding-box size in metres (glTF units), three significant
  digits, so a ring and a building both read sensibly;
- meshes / materials / textures (GLTFLoader makes one mesh per glTF
  primitive; a texture used in two slots counts once);
- a collapsible list of the materials, each with the meshes using it
  and its texture slots with their sizes. A material with neither a
  texture nor vertex colours is marked "no texture", the flat-colour
  look of a texture the export lost.

In clay and normals mode the list keeps the model's own materials.
Names are escaped, the new labels follow the RU/EU switch, and a failed
or stale download leaves the shown model's details in place.

Tested: three new node tests in tests/test_viewer_studio.cjs (fail
before the change, pass after); in a browser with tools/gallery.py and
a synthetic .glb (two meshes sharing a textured material, an untextured
one, a vertex-coloured one).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:00:26 +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
42cc70344c studio: select cube faces for DDS previews and texels 2026-11-26 18:18:00 +08: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
515fc75c0d studio: go back to the shown model's row when a download fails (STUDIO-FAILED-LOAD-SELECTION)
After a failed download the list kept the failed model selected, while the
viewport and the statistics still showed the previous one. Remember the model
that is shown and select its row again, without rebuilding the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:37:36 +01:00
662f8c3df4 studio: reset the camera to the current model's fitted view 2026-11-25 02:35:34 +01:00
442c348843 viewer: keep the loading bar visible for the current model 2026-11-24 13:52:03 -05: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
9280ce0370 viewer/studio: escape texture preview URL and format in texture grid cards 2026-11-24 20:25:01 +08: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
dba337b128 Merge remote-tracking branch 'origin/pr/8949' 2026-11-23 17:41:06 -05:00
e59eb29bec Studio: show dimensions for single-plane DDS textures (BUILD-3940) 2026-11-24 01:02:13 +03:00
87ad0f13af viewer: --port accepts only plain ASCII decimal digits
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 20:50:45 +01:00
2a3b3b554b studio: a texture preview that fails to load no longer fires its error handler forever (#6529)
Squash-merged after diff review of PR #6529
2026-11-23 12:52:27 -06:00
b9466fda20 Studio: keep large model categories paginated (#6793)
Squash-merged after diff review of PR #6793 - Studio: keep large model categories paginated
2026-11-23 09:52:24 -06:00
aa4ed4c2d5 Studio: inspect original half-float DDS texel values (#6896)
Squash-merged after diff review of PR #6896 - Studio: inspect original half-float DDS texel values
2026-11-23 09:46:54 -06: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
9df9fbfee4 Merge pull request #3923 from Maxime Mansiet
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:35 -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
f487e2a9d1 studio: dispose the previous model's geometry, materials and textures
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-22 23:26:17 +01:00
c6ad43620a studio: show only the latest model a click asked for
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-22 23:23:55 +01:00
2baf85b035 Viewer: time out stalled startup manifests (TEST-858) 2026-11-23 01:23:21 +03:00
e616e64480 studio: render model and texture names as text, not HTML
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-22 23:22:39 +01: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
0763843dac Merge pull request #3502 from shdann 2026-11-22 17:02:22 -05:00
ca79926396 Merge pull request #3395 from kotorvr 2026-11-22 17:01: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
f0bdc5789b viewer: a second viewer on a port a running one serves is refused on Windows too
HTTPServer sets SO_REUSEADDR. On Windows that lets a second socket bind a
port that is already being listened on, so a second `serve.py --port N`
printed its URL and then received no requests while the first viewer kept
answering. ViewerServer leaves the option off on Windows, where a restart
needs none, and keeps it elsewhere; the second viewer now stops with the
existing "can't listen on port" line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 23:43:11 +03:00
a45ec655f6 viewer: serve only the page outside /world/
serve.py put its device-name, alternate-data-stream and trailing-dot
guards in front of /world/ only; every other path went straight to
SimpleHTTPRequestHandler. On Windows GET /NUL opened the device (200,
empty) and /index.html::$DATA, /index.html. and /index.html%20 were
served. The viewer folder holds one page, so outside /world/ the server
now answers "/" and "/index.html" and nothing else (404), matched
before any decoding. Without --world, /world/ is 404 as well instead of
falling through to a world folder that happens to sit beside the page.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:21:49 +00:00