glsl-monaco
An plugin to add a language definition for glsl to the monaco-editor.
license
This project is licensed under GPL-3.0. See the LICENSE
file for more informations.
usage
Simply import it:
import '@bithero/monaco-glsl';
browsers
Inside browsers the usage is slightly different:
For AMD builds (min
/dev
):
require.config({
paths: {
vs: '...', // configure the vs path like always
bithero: '...' // set to the web-path where the glsl.js file lies in
}
});
require(['vs/editor/editor.main'], function() {
// require it async; literally any other way will fail!
require(['bithero/glsl'], function() {});
// you can also setup a monaco instance via monaco.editor.create here;
// but if you want it safer, do it inside the callback of the glsl require...
});