[Feature request] GLSL code formatting feature
See original GitHub issueI 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.
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.13/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.13/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.13/beautify-html.js"></script>
beautify.addEventListener('click', () => {
const opts = {
indent_size: 4
};
editor.setValue(js_beautify(editor.getValue(), opts));
}, false);
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Ability to edit GLSL shader code in Vuo Editor
Write your shader code in the code editor. The code will be in Vuo's extended version of VIDVOX's Interactive Shader Format (ISF).
Read more >GLSL language integration - Visual Studio Marketplace
VSIX Project that provides GLSL language integration. Includes syntax highlighting, code completion (OpenGL 4.6 + identifiers in shader ...
Read more >[feature request] support for syntax highlight of inline GLSL ...
I've created a PR on cpp-textmate-grammar repository with this feature added. Please consider adding this to the default c++ syntax highlighter.
Read more >Core Language (GLSL) - OpenGL Wiki - Khronos Group
The OpenGL Shading Language is a C-style language, so it covers most of the features you would expect with such a language.
Read more >OSL implementation? - Feature requests - Babylon.js Forum
We support glsl shaders which you can use to create custom materials. To get OSL working you will need to convert it to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
wow! this is a good idea. However, would you mind if I change the position and design of the bracket icons by myself?
This could certainly be useful.