← Back to community index
# contributor·Active

! Rushabh | Linux Shill - @Mustafa7 can you tak...

mention can you take a look, we are depricating renderGLTFToPNGBufferFromGLBBuffer as it is not browser safe, i am replacing them with renderGLTFToPNGFromGLB which is browser safe these changes are in an effort to make the poppygl browser safe.

Started by ! Rushabh | Linux ShillJun 11, 20269 messages

Discussion

Last active 29 days ago · plain text
! Rushabh | Linux Shilloriginal post
<@1079361271687807026> can you take a look, we are depricating `renderGLTFToPNGBufferFromGLBBuffer` as it is not browser safe, i am replacing them with `renderGLTFToPNGFromGLB` which is browser safe these changes are in an effort to make the `poppygl` browser safe.
! Rushabh | Linux Shill
https://github.com/tscircuit/jscad-electronics/pull/296 https://github.com/tscircuit/svg.tscircuit.com/pull/1562
! Rushabh | Linux Shill
<@809856037376491570>
! Rushabh | Linux Shill
I added browser-safe equivalents in poppygl, and I’m now replacing the older Node-oriented calls in downstream repos. The reason is that the old functions pull Node-specific behavior into places that only need PNG bytes. Functions like renderGLTFToPNGBufferFromGLBBuffer, renderGLTFToPNGBufferFromURL, and encodePNGToBuffer are tied to Buffer/Node-style output, while the new browser-safe functions return plain Uint8Array, which works in both browser and server environments. By switching downstream repos to the browser-safe functions: the root poppygl API becomes safe to import in browser bundles
! Rushabh | Linux Shill
https://github.com/tscircuit/easyeda-converter/pull/394
! Rushabh | Linux Shill
<@398467566588264449>
Abse
we have some urgent work I will check it later sry
! Rushabh | Linux Shill
<@757706909351411845> can you take a look when you are free
! Rushabh | Linux Shill
<@757706909351411845> TL;DR Functions like `renderGLTFToPNGBufferFromGLBBuffer`, `renderGLTFToPNGBufferFromURL`, and `encodePNGToBuffer` are tied to Buffer/Node-style output while the new browser-safe functions return plain Uint8Array, which works in both browser and server environments. To use `poppygl` in web we need to stop exporting them, i am replacing the old functions with the new browser compatible ones in these repos first https://github.com/tscircuit/jscad-electronics/pull/296 https://github.com/tscircuit/svg.tscircuit.com/pull/1562 so we can remove them from exporting

Want to add to the conversation?

Reply in Discord so your notes stay connected to the source.
Continue in Discord ↗