Skip to content

feat: Add web view component#75

Open
AlejandroFernandezLuces wants to merge 19 commits into
mainfrom
feat/webview
Open

feat: Add web view component#75
AlejandroFernandezLuces wants to merge 19 commits into
mainfrom
feat/webview

Conversation

@AlejandroFernandezLuces
Copy link
Copy Markdown
Collaborator

@AlejandroFernandezLuces AlejandroFernandezLuces commented May 20, 2026

Overview

In this PR I implemented a conversor from OpenUSD files, including our custom USD files with VTK assets, to HTML component. It seizes the GLTF format to represent the 3D scene in a web component. In particular, we use a binary representation of the file, called GLB, to embed the scene.

The implementation is quite low level, the basic idea is to initialize a GLB constructor, go through the USD stages, and add the supported elements through conversors. The final result is converted to binary and appended into an self contained HTML component that can be embedded in other webpages.

Example

The example shows a fairly complex scene, with different types of textures and so on. I think this should be enough for the most common PyAnsys cases. However, we may need to add modifications as new unsupported use cases come.

Recording.2026-05-26.102603.mp4

@github-actions github-actions Bot added maintenance Package and maintenance related testing Anything related to testing labels May 20, 2026
@AlejandroFernandezLuces AlejandroFernandezLuces changed the title feat: Add web view component (WIP) feat: Add web view component May 26, 2026
@AlejandroFernandezLuces AlejandroFernandezLuces marked this pull request as ready for review May 26, 2026 13:01
Copy link
Copy Markdown
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments - overall LGTM!

Comment thread src/ansys/tools/usdviewer/web/templates.py
Comment thread src/ansys/tools/usdviewer/web/glb.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Package and maintenance related testing Anything related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants