fix: migrate to renderGLTFToPNGFromGLB and widen snapshot types to Uint8Array#3310
Open
rushabhcodes wants to merge 3 commits into
Open
fix: migrate to renderGLTFToPNGFromGLB and widen snapshot types to Uint8Array#3310rushabhcodes wants to merge 3 commits into
rushabhcodes wants to merge 3 commits into
Conversation
…nderGLTFToPNGFromGLB Bump poppygl to 0.0.24 and replace the deprecated export with the new renderGLTFToPNGFromGLB across all three call sites. Updated 3D snapshot baselines reflect the new renderer output.
…Buffer Widen png3d and compareAndCreateDiff params to Uint8Array to match the return type of renderGLTFToPNGFromGLB, avoiding unnecessary Buffer.from conversions. looksSame still receives Buffer via an internal cast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps `poppygl` from `0.0.20` to `0.0.24` and migrates all call sites from the deprecated `renderGLTFToPNGBufferFromGLBBuffer` to the new `renderGLTFToPNGFromGLB`. The new function returns `Uint8Array` instead of `Buffer`, so snapshot types and `compareAndCreateDiff` are widened accordingly — avoiding unnecessary `Buffer.from` conversions at call sites.
Changes
cli/build/worker-output-generators.ts— updated import and call sitecli/build/build-preview-images.ts— updated import and call sitelib/shared/process-snapshot-file.ts— updated import, call site, and `png3d` type (`Buffer → Uint8Array`)lib/shared/compare-images.ts— widened `compareAndCreateDiff` params to `Uint8Array`; internal `Buffer.from` cast before passing to `looksSame`Why
Using the deprecated export risks breakage on the next major `poppygl` bump. The new function name is consistent with the rest of the `poppygl` API surface (`renderGLTFToPNGFromURL`, `renderGLTFToPNGBuffer`, etc.).
Test plan