Skip to content

Viewpoint.go() does nothing, silently, when the viewpoint has no world #842

Open

Description

@helenkwok

Viewpoint.go() returns without doing anything when the viewpoint has no world: if (!this.world) return; in packages/core/src/core/Viewpoints/src/viewpoint.ts. A few lines below, a wrong camera type throws a clear error, so the two cases behave differently.

The easy way to hit it: viewpoints created by BCFTopics.load take Viewpoints.world, which is null unless the app sets it. go() then resolves and the camera does not move, with no message. Reported by @cmartif in #826 (comment).

Steps (components on main):

const components = new OBC.Components();
const viewpoint = components.get(OBC.Viewpoints).create(); // Viewpoints.world is null
await viewpoint.go(); // resolves, nothing happens

Expected: an error that says the viewpoint has no world and how to give it one. updateCamera() and takeSnapshot() already report it by resolving false; go() returns Promise<void>, so the caller has no way to tell.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions