Skip to content

Poly haven optimizations#35

Merged
kwokcb merged 6 commits intomainfrom
PolyHaven_optimizations
Feb 25, 2026
Merged

Poly haven optimizations#35
kwokcb merged 6 commits intomainfrom
PolyHaven_optimizations

Conversation

@kwokcb
Copy link
Copy Markdown
Owner

@kwokcb kwokcb commented Feb 25, 2026

This pull request introduces several improvements to the PolyHaven MaterialX packaging workflow, focusing on performance, flexibility, and user experience. The most significant changes include switching ZIP compression from JSZip to fflate for faster and more efficient packaging, adding support for configurable texture formats, and enhancing the UI and loading behavior for the materials grid. Additionally, there are updates to documentation and minor code cleanups.

MaterialX Packaging and Compression:

  • Replaced JSZip with fflate for ZIP compression in jsPolyHavenLoader.js, resulting in faster package creation and reduced resource usage. All ZIP file creation and file addition logic now use fflate's API and Uint8Array blobs. [1] [2]
  • Improved concurrency for texture downloads when creating a MaterialX package, allowing parallel downloads and more robust error handling.

Texture Format Flexibility:

  • Added support for specifying desired texture format (e.g., PNG, JPG, EXR) via URL query string or UI selector. This includes preprocessing MaterialX content and texture file references to remap extensions and paths, ensuring compatibility with the selected format. [1] [2] [3] [4]

UI and Loading Experience:

  • Materials grid is now disabled until the viewer iframe signals readiness, preventing premature interaction and improving user experience. CSS for the disabled state is injected dynamically, and event listeners manage the transition. [1] [2]
  • Improved scrolling behavior for the materials grid by setting a fixed height and enabling vertical overflow in index.html.

These changes collectively enhance the performance, flexibility, and usability of the PolyHaven MaterialX workflow.

@kwokcb kwokcb merged commit 456508f into main Feb 25, 2026
@kwokcb kwokcb deleted the PolyHaven_optimizations branch February 25, 2026 21:17
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.

1 participant