glslify-lite
A fast, lightweight fork of glslify
Last updated a year ago by fand .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install glslify-lite 
SYNC missed versions from official npm registry.

glslify-lite

A fast, lightweight fork of glslify. Intended to provide more useful APIs for linters, live coding apps, etc.

Why?

glslify is great, but has some problems especially in realtime usage such as linters, live coding, etc.

  • Synchronous, blocking API by design
  • No support for sourcemaps

glslify-lite overcomes these problems. However, we don't provide completely same features as glslify.

glslify glslify-lite
API Sync Async
Sourcemaps -
Output code is clean -
Transformer support Only built-in
Tagged template literal -
Browserify -

Install

npm i glslify-lite

Usage

CLI

The CLI can take a file as its first argument, and output to a file using the -o flag:

glslify-lite index.glsl -o output.glsl

It can also read input from stdin and output to stdout:

cat index.glsl | glslify-lite > output.glsl

API

glslify.compile(src, opts): Promise<string>

Compile a shader string from a string src.

Optionally provide:

  • opts.basedir - directory to resolve relative paths in src

glslify.file(filename, opts): Promise<string>

Compile a shader from a filename.

Optionally provide:

  • opts.basedir - directory to resolve relative paths in src

LICENSE

MIT

Current Tags

  • 0.0.7                                ...           latest (a year ago)

7 Versions

  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |