Skip to content

Viewpoint: go() applies neither field_of_view nor view_to_world_scale, and updateCamera() stores the orthographic height without the zoom #850

Open

Description

@BiroBotond0

Describe the bug 📝

go() sets the projection, the position and the target only. A viewpoint with a 35.98° field of view (as in buildingSMART's BCF 3.0 test cases) is shown at 60°, and an orthographic one at whatever zoom the camera had. Saving an orthographic view is off too: updateCamera() stores view_to_world_scale: top − bottom, but the orthographic camera zooms through camera.zoom, so at zoom 2 the stored visible height is twice the real one.

issue-4

buildingSMART's "all components and spaces visible" test case (35.98°). Left: as in its snapshot. Right: BCFTopics.load + go(), at 60°.

Expected: go() sets threePersp.fov (and calls updateProjectionMatrix()), or zooms the orthographic camera to (top − bottom) / view_to_world_scale; updateCamera() stores (top − bottom) / zoom, as That Open's own projection switch already divides by the zoom.

Also found by reading the code (not in the repro): go() calls camera.projection.set(this.projection) without await. Switching to perspective is async (it ends with controls.zoomTo(1)), so it can finish after setLookAt.

Where in the code

Reproduction ▶️

https://github.com/BiroBotond0/thatopen-bcf-bug-reproduction/tree/main/issue-4

Steps to reproduce 🔢

  1. In the repro: npm install, npm run dev, open issue-4/example.html. Both worlds load buildingSMART's Architectural.ifc.
  2. Perspective: field of view 35.98° restores the "all components and spaces visible" test case, on the left as BCF means it and on the right with BCFTopics.load + go().
  3. Orthographic: 18.97 m high does the same with the "Component selection" test case. Then the right view is zoomed by hand to the file's height and captured with updateCamera().
  4. The panel's Results:
BUG go() field of view: got 60, expected 35.983
BUG go() orthographic visible height: got 92.376, expected 18.974
BUG updateCamera() view_to_world_scale: got 92.376, expected 18.974

System Info 💻

System:
    OS: Windows 11 10.0.26200
    CPU: (16) x64 Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
    Memory: 33.34 GB / 63.76 GB
  Binaries:
    Node: 22.22.1 - C:\nvm4w\nodejs\node.EXE
    npm: 11.12.0 - C:\nvm4w\nodejs\npm.CMD
  Browsers:
    Chrome: 156.0.8078.48
    Edge: Chromium (152.0.4191.53)
  npmPackages:
    @thatopen/components: 3.6.0 => 3.6.0
    @thatopen/components-front: 3.6.0 => 3.6.0
    @thatopen/fragments: 3.6.0 => 3.6.0
    @thatopen/ui: 3.4.17 => 3.4.17
    camera-controls: 3.1.2 => 3.1.2
    three: 0.184.0 => 0.184.0
    web-ifc: 0.0.77 => 0.0.77

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Community.
  • The provided reproduction is a minimal reproducible example of the bug.

Activity

  1. added
    bug
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions