Skip to content

actnwit/esbuild-plugin-shaderity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esbuild-plugin-shaderity

What's this?

A ESBuild plugin for shaderity, which is a web-oriented shader utility.

Config

Write a node program file as following:

// build.js
const esbuild = require('esbuild');
const shaderity  = require('esbuild-plugin-shaderity');
esbuild.build({
  entryPoints: ['./src/index.js'],
  bundle: true,
  outdir: 'dist',
  plugins: [
    shaderity(),
  ]
});

Code Sample

// simple.frag
precision mediump float;
in vec4 vColor;

void main() {
  gl_FlagColor = vColor;
}
// ./src/index.js
import simpleFragmentShader from './simple.frag';

console.log(simpleFragmentShader);

Build

Run the written build.js with node.

$ node build.js

The built file must be output to the ./dist directory.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published