4 ms·
What tool is used for embedded code? It’s really nice! I like the folding of non focused snippets
by matt3210 2y ago
What tool is used for embedded code? It’s really nice! I like the folding of non focused snippets
- dhooper 2y agoI made the live shader editor myself. It uses CodeMirror to display the code, and a webgl canvas for the preview. Took some work to support having lots of editors on the page. If you do the naïve thing and create a webgl canvas for every one and instantiate all CodeMirror editors at page load time, the whole page would freeze for several seconds. So I create the editors as they are about to be scrolled into view. I also create only one webgl canvas, and when a preview is paused I cache the preview to an img, and move the canvas to the newly active editor instance.