dimforge / rapier.js

Official JavaScript bindings for the Rapier physics engine.
https://rapier.rs
Apache License 2.0
435 stars 58 forks source link

use yencode instead of base64 #213

Open jeetiss opened 1 year ago

jeetiss commented 1 year ago

Hello folks.

I made this PR to test the yenc encoding

It looks like it produces a bigger encoded string, but it is compressed much better with gzip.

stats for pkg3d/rapier.es.js:

*yEnc*
Bundle Size:  2.16 MB           
Minified Size:  1.45 MB     
Gzipped Size:  563.37 KB 

*base-64*
Bundle Size:  1.89 MB
Minified Size:  1.89 MB
Gzipped Size:  707.67 KB

Feel free to close this PR