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>
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>
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>