Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/huasofoundries/systemjs-glsl-plugin

Loader plugin to treat (and build) OpenGL Shading Language (*.glsl) files as javascript modules
https://github.com/huasofoundries/systemjs-glsl-plugin

glsl javascript-modules loader-plugin opengl-shading-language

Last synced: 11 days ago
JSON representation

Loader plugin to treat (and build) OpenGL Shading Language (*.glsl) files as javascript modules

Awesome Lists containing this project

README

        

# systemjs-glsl-plugin

Loader plugin to treat (and build) OpenGL Shading Language (*.glsl) files as javascript modules. Made for `[email protected]`

This plugin is, for now, a POC to load *.glsl files (such as the ones found on the [THREE.js source](https://github.com/mrdoob/three.js) ) and let SystemJS treat them as javascript ES6 modules.

I made this loader to import some specific THREE.js submodules into one of my projects, then building a static build with [jspm-cli](https://github.com/jspm/jspm-cli), and getting [Rollup](https://github.com/rollup/rollup) to perform its three shaking magic on the result.

## Installation

Install it with `jspm` using:

```sh
jspm install glsl=npm:systemjs-glsl-plugin
```

## Config

This loader must be enabled in the `meta` section of `jspm.config.js`

```js
meta: {
"*.glsl": {
"defaultExtension": false,
"loader": "glsl"
},{
...
}
}
```