@bithero/monaco-glsl

1.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @bithero/monaco-glsl

Weekly Downloads

4

Version

1.1.0

License

GPL-3.0-or-later

Unpacked Size

59.7 kB

Total Files

11

Last publish

Collaborators

  • mai-lapyst