ChristopherChudzicki / math3d-react

A user-friendly 3d graphing calculator for the web. Create, share, and animate 3d mathematical scenes.
https://www.math3d.org
Mozilla Public License 2.0
245 stars 34 forks source link

Grid is incorrect when I share one specific graph #375

Open assaultdoor opened 1 year ago

assaultdoor commented 1 year ago

I've made a few changes to your vertical shell graph (https://www.math3d.org/vertical_revolution_shell_method), which uses an xz grid. When I share it, I instead get an xy grid, even though the xy grid is disabled and the xz grid is enabled under the Axes & Camera menu.

Here is what the original looks like. Note that, for some reason, the z axis is labeled "y".

original

Here is what happens when I tried sharing it:

shared

Turning the xy axis on and off and the xz axis off and on fixes this problem.

This is when I realized that the z axis was called y. I fixed this, and now I get both the xy and xz grids when I try to share:

the plot thickens

This still happens even if I change the name of the z axis back to y. Changing the other axes doesn't seem to do anything.

I tested this on Safari on OS X and both Chrome and Firefox on Windows, so I assume it isn't a browser issue.

I have tried this with other graphs, including the original https://www.math3d.org/vertical_revolution_shell_method without any changes, and I have not seen this problem show up again. I'm not sure if I added, deleted, or changed something to cause this.

A link to the offending graph is https://www.math3d.org/du8Uwhjbv

ChristopherChudzicki commented 1 year ago

Hi @assaultdoor! I'm not sure what's happening here. I don't see any obvious errors.

But... I did the following:

  1. Toggled the xy grid on and off in the user interface
  2. Clicked "Share" again to generate a new URL

The result https://www.math3d.org/4UL85coAG appears to behave as expected.

assaultdoor commented 1 year ago

Yep, that works. Thanks!