New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export BufferTransform from luma.gl #8726
Export BufferTransform from luma.gl #8726
Conversation
I don't have a strong objection against this particular request, however, the pre-built bundle is not really designed for complex applications. If you need something else from luma that is not actively used in core, I would say no, because we want to prioritize bundle size over niche advanced use cases. Also just FYI |
@Pessimistress Thanks, I wouldn't suggest increasing the bundle size if it were anything else not used by deck.gl itself. Possibly no luma.gl parts should be exported by deck.gl bundle after all? Regarding using deck.gl and luma.gl bundles together, this works:
Just there is a tricky part that version numbers inlined in the bundles are off-by-one. Both deck.gl 9.0.3 and luma.gl 9.0.8 bundles contain luma.gl version number 9.0.7, should be 9.0.8. This provides a misleading console log if a mismatching luma.gl version is used. I suppose BufferTransform changes are aimed towards WebGPU compute shaders? |
2c78257
to
ff4bde4
Compare
Since the conversation took us here, the luma exports are technically a necessity. deck/luma still uses
Thanks for flagging this, it should be a luma.gl bug. |
cc @ibgreen who advocates for exporting everything from core |
Well, not quite.
Now, if the presence of these internal exports were the main reason for cherry-picking, then one option could be to "export everything from core". If there are other reasons, then perhaps not. Finally, obviously, FWIW |
Thanks for merging and fixing the bundled luma.gl version.
As 9.1 is going to solve the concern with internal exports, it seems deck could return back to export everything as before #8574. I understand the need to minimize the deck.gl bundle size, but it seems it went too far about this. Depends if there should be only a single deck.gl bundle with everything included or multiple smaller bundles with supported overlaps. In any case, somehow the entire luma.gl public API needs to be available. |
Background
#8574 in v9 limited luma.gl exports only to a few selected classes. There is a removed TODO "Cherry-pick luma core exports that are relevant to deck". Following this reasoning, can we export BufferTransform as well? It's used in GPUInterpolationTransition.
My need for it is driven by a custom layer in a pure-JS environment, where deck.gl is imported with a script tag. As parts of luma.gl are still exported, it seems this case is still supported. Otherwise it would be necessary to import a full luma.gl bundle with a matching version.
Change List