# Visual validation of the PTP1B laboratory

An external Chromium process rendered the offline HTML with network requests blocked. The record at `provenance/offline_browser_validation.json` describes the tested build.

## 1. Blender (verified)

| Check | Result | Evidence |
|---|---|---|
| Blender installed and reachable | Blender 5.3.0, add-on protocol 15, up to date | `get_addon_status` through the `blender-local` connector |
| MCP server operational, tools available | `execute_blender_code`, `get_scene_info`, `look` all returned results | run log, phase "blender" |
| Test scene created and saved | `scene/blender/connectivity_test.blend` (63 333 bytes) written with `bpy.data.libraries.write` | run `notebook-run-1795149048923-39` |
| Room built in an isolated scene | Scene `PTP1B_Lab`: 85 mesh objects, 31 038 triangles, 42 PBR materials, 9 area lights, camera; 8 display surfaces; 3 pedestal markers; 23 colliders | `scene/lab_layout.json`, `scene/blender/build_lab.py` |
| Session file untouched | The open file `instrument_test.blend` was not saved or modified on disk; only the lab scene and its dependencies were written | `scene/blender/export_lab.py` |
| `.blend` and GLB saved | `scene/ptp1b_research_lab.blend`, `scene/ptp1b_laboratory.glb` | `scene/blender_export_record.json`; independently checked in `scene/asset_audit.json` (written by the local verification process) |
| Render inspected | EEVEE camera render viewed: benches with reagent shelving, microscopes, centrifuge, stools, central pedestal, wall displays, ceiling panels and ducting are present and correctly placed; first render was over-exposed and preview lighting was reduced | `scene/renders/blender_camera_rendered.png` |

The room contains: two island benches with under-bench cabinets and reagent shelving, two compound and two stereo microscopes, a centrifuge, pipette stands, tube racks, crystallisation plates and a drop-setting robot, two desk workstations with monitors, keyboards, towers and chairs, a −80 °C freezer, a glass-door crystal incubator, shelving with cryo-boxes, two liquid-nitrogen dewars, an X-ray diffractometer enclosure, four wall displays, a freestanding molecular display and three display pedestals. All of it is illustrative scenery; none of it encodes scientific data.

Limits of the Blender model: flat PBR materials without image textures; no baked lighting; simplified equipment silhouettes. It is a clean, plausible laboratory rather than a photoreal one.

## 2. Offline HTML — tested without a browser

Tested file: `scene/ptp1b_research_lab.html`, SHA-256 in `scene/tests/node_smoke_test_result.json` (`html_sha256`).

| Check | Result |
|---|---|
| Single file, no external resources | No `<script>`, `<link>`, `<img>` or `<iframe>` with an `http(s)` source; template and CSS contain no remote references (`scene/html_build_record.json`) |
| Embedded libraries | three.js r160 + GLTFLoader and 3Dmol.js inlined from `scene/vendor`; neither contains a closing script tag |
| Embedded data parses | The embedded JSON bundle parses with `JSON.parse` (the defect found in a real browser — unquoted `NaN` — is fixed and the builder now rejects non-finite numbers) |
| GLB loads through the embedded GLTFLoader | 85 meshes, 31 038 triangles; 8 `SCREEN_*` surfaces with UVs and 3 `PEDESTAL_*` markers found; every display centre is within 1 cm of `lab_layout.json` after the Z-up → Y-up conversion; room bounds 12.2 × 3.3 × 9.3 m |
| Research panels build | All seven panels (literature, analysis, molecular viewer, comparison, allosteric site, verification, timeline) build against a stand-in DOM with every tab, file and thumbnail button clicked: 0 exceptions |
| Coordinates ↔ calculations | Five quantities recomputed by the page's own code from the embedded coordinates agree with the result tables to < 0.001 Å (loop RMSD 3.1405 vs 3.1406 Å; ligand–Cys215 Sγ 20.82 Å) |
| JavaScript syntax | Both source files compile |

Script: `scene/tests/node_smoke_test.js`. Result: `scene/tests/node_smoke_test_result.json`.

## 3. Browser observations

The browser entered the room, moved with WASD and opened a station with the E key. All seven stations and their tabs opened. The test switched between experimental structures, ribbon and sticks, toggled a molecular surface, and exercised side-by-side and superposed views. It opened a source-data dialog from the alignment report. No external HTTP(S) requests or uncaught JavaScript errors were recorded. The screenshots and the final package-level UI test are in the delivery directory’s `acceptance/` folder.

Detailed inspection of every individual atom pick and hardware frame-rate benchmarking were outside the scope of this browser test.

## 5. Performance measures built in

- Geometry merged per (group, material) in Blender: 85 draw-call units for the room.
- Atoms on the pedestals drawn with `InstancedMesh` (one draw call per atom set).
- One shadow-casting light (2048² map, PCF soft); nine point lights without shadows; one PMREM environment generated once from a plain lit box, no HDRI file.
- Display textures are canvases drawn once; pixel ratio capped at 2.
- The room stops rendering while a research panel is open; 3Dmol viewers are disposed when a panel or tab closes.
- The HUD shows frames per second, draw calls and triangles from `renderer.info`.

## Native preview

The published artifact opened inside the application’s sandboxed right-hand preview and expanded to a file dialog. In that dialog two separate molecular canvases rendered the experimental structures. Details are in `provenance/source_sidebar_validation.json`.

## CSV tables and sightlines

The offline browser test compared every cell in 20 CSV tables (5,976 data rows) with the source files, including later pages. The figure captions open the same sortable, searchable reader. The notebook has 19 structured table outputs. Each was matched to its recorded pandas text before the rich display was added.

The timeline and literature displays are both 2.60 × 1.46 m and share a 1.75 m mounting centre and title-bar height. The left island holds a low reagent tray. From seven viewpoints, all 5,425 sampled rays to the timeline lettering and event markers reached the screen. The timeline title, event count, markers, failure legend and interaction hint occupy separate bands. All three molecular placards measure each line against their inner margins. The scene was checked at 1396 × 736 and 460 × 780 pixels, including the entrance, molecular pedestal and timeline station. The current build hash and test counts are in `provenance/display_validation.json`. The earlier screenshots document the original room.
