GLSL language definition for monaco
Go to file
Mai Lapyst d9341cebd9 v1.1.0 2023-09-17 21:08:12 +02:00
build Fixing AMD builds; release v1.0.1 2022-08-23 21:58:56 +02:00
src Fixing AMD builds; release v1.0.1 2022-08-23 21:58:56 +02:00
test Initial commit 2022-08-23 14:38:44 +02:00
.gitignore Initial commit 2022-08-23 14:38:44 +02:00
LICENSE Initial commit 2022-08-23 14:38:44 +02:00
package.json v1.1.0 2023-09-17 21:08:12 +02:00
readme.md Adding npm badge to readme 2022-10-06 20:11:09 +02:00
tsconfig.json Initial commit 2022-08-23 14:38:44 +02:00
yarn.lock Update dependencies: 2023-09-17 21:00:06 +02:00

readme.md

glsl-monaco

Npm package version

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...
});