Can you recommend any glsl compressor? The one which will be compatible with playcanvas shaders chunks format (template literals)?
Or do i better extend rollup.config.js to remove comments, extra tabs and spaces, minify local vars, etc. ?
@yaustar Hi again. Here is a small report on this thread.
I removed some of the modules that I don’t use in one specific project of mine (animations, a large part of the UI, legacy components, collision, sprites and some others) and thereby saved almost 300kb. Theoretically, if completely abandon the Playcanvas UI (sad sacrifice for the weight of the engine ) in favor of simple HTML, we can save another ±100kb.
If we use the lz4.js compressor together with this, it will save another 500kb.
In the end, I got a fully working project with an engine of about 500kb, which gives even more space for logic and assets in Playable Ads.
I hope it will also be useful to others looking for ways to reduce the critical weight of their project.
This is after compression with lz4 (400-500kb). Without compression, it weighs 0.9-1 MB
Edit: This is specifically for me, since I do not use some components other than UI (animations, collision, sprites). If someone wants to cut out components that they are not using in their particular project, then the weight may vary slightly