Skip to content

problem with 3d camera and uirevision #5050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nicolaskruchten opened this issue Aug 5, 2020 · 3 comments
Open

problem with 3d camera and uirevision #5050

nicolaskruchten opened this issue Aug 5, 2020 · 3 comments
Labels
bug something broken P3 backlog

Comments

@nicolaskruchten
Copy link
Contributor

In this pen https://codepen.io/nicolaskruchten/pen/BajgePw?editors=0010

case 1: good

  1. newPlot 0
  2. react 1 (this just changes the uirevision and camera angle, so far so good)
  3. react 2 (this just changes the data, good)

case 2: good

  1. newPlot 1
  2. rotate the camera a bit
  3. react 2 (just changes the data and leaves the camera angle alone, good)

case 3: bad (both together)

  1. newPlot 0
  2. react 1
  3. rotate the scene a bit
  4. react 2 (the camera angle is wrong now!)
@nicolaskruchten nicolaskruchten added the bug something broken label Aug 5, 2020
@alexcjohnson
Copy link
Collaborator

That’s a weird one indeed! The key question, I would say, is how can the state possibly be different immediately prior to the rotation in case 2 vs case 3? Ideally, (newPlot 1) and (newPlot 0 -> react 1) should be identical in both visible and internal state.

One observation - that doesn't directly get at this "key question" but could be important in finding a solution, and in fact may represent another bug: camera.eye has some pieces the same and some different between states 0 and 1. But we should treat any change to any component of camera.eye as invalidating user edits to all of camera.eye. See https://codepen.io/alexcjohnson/pen/wvGvREO?editors=0010 where I've set uirevision to a constant for all three figures, and do:

  1. newPlot 0
  2. rotate the scene
  3. react 1

Ideally (based on my argument above), this would be the same as just newPlot 1, but you can see that it's different if you then click newPlot 1.

We may need to look into how attributes are recorded in _preGUI, and have this and possibly other attributes recorded together rather than separately.

@nicolaskruchten
Copy link
Contributor Author

The fact that to trigger the bug we need to newPlot-0/react-1 makes it smell like #5005 which needs the same "setup" step.

@Dmitriymush
Copy link

was that fixed ? When data is being constantly updated (like 1 sec in period) it's really huge problem.

@gvwilson gvwilson self-assigned this Jul 4, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson changed the title 3d camera and uirevision problem with 3d camera and uirevision Aug 9, 2024
@gvwilson gvwilson added the P3 backlog label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

4 participants