项目作者: HuasoFoundries

项目描述 :
Loader plugin to treat (and build) OpenGL Shading Language (*.glsl) files as javascript modules
高级语言: Makefile
项目地址: git://github.com/HuasoFoundries/systemjs-glsl-plugin.git
创建时间: 2016-08-01T12:10:38Z
项目社区:https://github.com/HuasoFoundries/systemjs-glsl-plugin

开源协议:MIT License

下载


systemjs-glsl-plugin

Loader plugin to treat (and build) OpenGL Shading Language (*.glsl) files as javascript modules. Made for jspm@0.17

This plugin is, for now, a POC to load *.glsl files (such as the ones found on the THREE.js source ) 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, and getting Rollup to perform its three shaking magic on the result.

Installation

Install it with jspm using:

  1. jspm install glsl=npm:systemjs-glsl-plugin

Config

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

  1. meta: {
  2. "*.glsl": {
  3. "defaultExtension": false,
  4. "loader": "glsl"
  5. },{
  6. ...
  7. }
  8. }