Skip to content

Update glvis-js v0.4 -> v0.5 - #26

Merged
najlkin merged 8 commits into
masterfrom
update-to-glvis-js-v0.5
Oct 27, 2026
Merged

najlkin merged 8 commits into
masterfrom
update-to-glvis-js-v0.5

Conversation

@justinlaughlin

@justinlaughlin justinlaughlin commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor

Updating to glvis-js v0.5

-  mfem: "v4.8",
-  glvis: "v4.4",
+  mfem: "v4.9",
+  glvis: "v4.5",

@najlkin

najlkin commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Are all (new) keys supported? 🤔

@najlkin

najlkin commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Also there are more examples now.

@tzanio
tzanio self-requested a review February 11, 2026 16:09
@najlkin

najlkin commented Feb 13, 2026 •

Copy link
Copy Markdown
Contributor

TODO:

  • Update data submodule
  • Add examples to src/live/index.html
  • fix resolution
  • fix example 22 - vector

Optional:

  • Add buttons for new(ish) features, but as they are context-dependent, it cannot be statically in HTML, but dynamically enabled/added by JS perhaps? 🤔

@najlkin

najlkin commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

I have updated data and added (hopefully) all missing examples, but I have noticed some bugs:

  • The new support for all commands is nice, but changes of window size cause some blurring do to rescaling, which is carried over to other examples. Possible solutions:
    • Filter out that command
    • Reset size after loading a different example
    • Remove the command from the streams (the only bad guys are distance.saved, shifted.saved and ex6-dofs-numbering.saved)
    • Remove the examples
  • Loading example 22 (vector) gives different results sometimes, not clear what is happening

@najlkin

najlkin commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Ok, I fixed the resolution problem, so all examples can be loaded 👍 .
That example 22 - vector depends on timing, sometimes U key is ignored 😬 . That is a bug in GLVis itself and has nothing (directly) to do with glvis-js or complex functions visualization. It is just the only example, which uses U key. Anyway, I would leave it for now and proceed. We will just know one of the examples is a bit funky 🤪 .

@najlkin

najlkin commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Ok, I think it is pretty clear what is happening for U, it uses static variables, which are initialized only once, which is fine for native GLVis, but the web live version generates new instances of visualization scenes, which do not reinit these static variables. We should really get rid of these 🤢 . I will open a PR in GLVis, but we may merge this independently.

@najlkin

najlkin commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Fixed example 22 - vector in GLVis/glvis#366 🚀 .

@najlkin

najlkin commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Updated glvis.js from GLVis/glvis-js#38, which is build at the current master of glvis-js, MFEM v4.9 and GLVis/glvis@a803ebf (merge of GLVis/glvis#366).
All tests seem to work as intended 👍(But test it 🧐 ) Now we can:

  • Merge this as it is, which uses no longer a tagged version of glvis-js nor GLVis.
  • Merge PR Recompiled with fixed GLVis glvis-js#38 and tag it v5.2 let us say, but it does not change anything about this PR, as the version of glvis-js does not appear anywhere 🤔
  • Change the version string of GLVis to indicate it is not a clean version, but we do not want to put the whole SHA probably, as it appears in the live app 🤔
    Edit: The build script already provides an abbreviated version-like string for GLVis.

@najlkin

najlkin commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Ok, I merged GLVis/glvis-js#38 , so we are ready to go forward here 🙌 The changes are already included here, but:

@tzanio

tzanio commented Oct 16, 2026

Copy link
Copy Markdown
Member

🤖 Suggestions from an AI review. Feel free to ignore if not relevant.

With the new bundle, the startup call to updateCanvasSize() reaches g.resizeWindow() before the native visualization window exists, producing an unhandled RuntimeError: null function from State.setSize(). The viewer recovers when the first stream loads. Could we preserve the requested canvas dimensions during initialization and defer the native resize until the window exists?

@najlkin

najlkin commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

I do not think this is new, it is coming from the horrible design of aux_vis.cpp in GLVis with global variables and functions - something that Max wanted to remove in GLVis/glvis#170 . The fix would be simple on the side of GLVis to check if the global window pointer wnd is not null before dereferencing it. I will open a PR for these at least. Anyway, it is not a big deal, it only happens at the first load of the page and wasm recovers from it, so let us not delay this PR because of that.

@tzanio

tzanio commented Oct 22, 2026

Copy link
Copy Markdown
Member

let us not delay this PR because of that

I have approved it 😁. @camierjs?

@najlkin
najlkin merged commit 729bb32 into master Oct 27, 2026
@najlkin
najlkin deleted the update-to-glvis-js-v0.5 branch October 27, 2026 20:09
@najlkin

najlkin commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Merged (with GLVis/glvis-js#39) and tagged the new glvis-js as v0.5.2.

@najlkin

najlkin commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@tzanio , we are ready to deploy the pages (hopefully)🤞

@tzanio

tzanio commented Oct 27, 2026

Copy link
Copy Markdown
Member

@najlkin

najlkin commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Looks good except the complex function examples, it seems the data submodule is outdated when deploying, but the repo version looks fine 🤔

@tzanio

tzanio commented Oct 27, 2026

Copy link
Copy Markdown
Member

how about now: https://github.com/GLVis/web/actions/runs/40605727686?

@najlkin

najlkin commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Beautiful 🤩 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants