Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including glsl-token-string with all npm packages installed. Try it out:

var glslTokenString = require("glsl-token-string")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

glsl-token-string v1.0.1

Converts an array of GLSL tokens to a plain source string



Simple helper package that converts an array of GLSL tokens to a plain GLSL source string.



src = stringify(tokens)

var tokenize  = require('glsl-tokenizer/string')
var stringify = require('glsl-token-string')
var assert    = require('assert')

var src    = 'vec3 light = vec3(1.0);'
var tokens = tokenize(src)

assert(stringify(tokens) === src)

See Also


MIT. See for details.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free