-
Notifications
You must be signed in to change notification settings - Fork 52
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
[Feature request] GLSL code formatting feature #13
Comments
wow! this is a good idea. |
Yes. I'll leave it to you to decide how to implement it. |
BTW, I found one problem with JS Beautifier. before) #define X(s,l)d=s*sqrt(h);if(h>0.&&d>m&&sin(atan(d,P.y)+P.x*3.+t*l*4.)>.9)m=d; after) #define X(s, l) d = s * sqrt(h);
if (h > 0. && d > m && sin(atan(d, P.y) + P.x * 3. + t * l * 4.) > .9) m = d; Unfortunately, I don't know how to solve this. I hope someone can help us. |
That possibility occurred to me right away. When I get some time, I might give it a shot! |
I haven't tried it, but the following |
Here's one: http://evanw.github.io/glslx/ It can both format/prettify, and minify. Might be useful for writing expanded code, then hitting minify to see if it fits in a tweet, then undoing and continuing editing, etc. |
This could certainly be useful. |
BTW, In the future, AI may help make code easier to read. |
I like to look at the
twigl
code on Twitter.However, much of that code is obfuscated to keep it short.
How about a formatting feature to make the obfuscated code easier to read?
I think
js-beautify
can be used to format the code.https://github.com/beautify-web/js-beautify
The following is an implementation image.
before:
after:
I think
js-beautify
can be called as follows.The text was updated successfully, but these errors were encountered: