Ttanasart-pt / Pixel-Composer

Node base VFX editor for pixel art.
MIT License
681 stars 30 forks source link

[Enahncement] PXC File JSON Minification #30

Closed Synthoid closed 1 year ago

Synthoid commented 1 year ago

Currently the JSON for a .pxc file is fairly minified, but it does leave some spaces that can be removed to reduce file size even more.

Empty Project (Current)

{ "nodes": [ ], "graph": { "graph_x": 560.0, "graph_y": 338.0 }, "version": 1100.0, "animator": { "framerate": 8.0, "frames_total": 16.0 } }

Empty Project (Minified)

{"nodes":[],"graph":{"graph_x":560.0,"graph_y":338.0},"version":1100.0,"animator":{"framerate":8.0,"frames_total":16.0}}

This minor data optimization could probably be implemented whenever since it shouldn't affect functionality, and would help shave off some KB as files get larger and larger.

Ttanasart-pt commented 1 year ago

Sure, currently I just use default GameMaker json function. I think I can optimize save file a lot more (also deal with those weirdly long decimal value e.g. 0.10000000000000000555111512312578)

Ttanasart-pt commented 1 year ago

Implemented in 1.12