Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaëtan Renaudeau committed Jan 4, 2014
1 parent 37a7058 commit 7234047
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dist/glsl-transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -8233,16 +8233,18 @@ function identity (x) { return x; }
* GlslTransition(canvas)
* Creates a Transitions context with a canvas.
*/
function GlslTransition (canvas) {
function GlslTransition (canvas, opts) {
if (arguments.length !== 1 || !("getContext" in canvas))
throw new Error("Bad arguments. usage: GlslTransition(canvas)");

var contextAttributes = extend({}, opts && opts.contextAttributes || {}, GlslTransition.defaults.contextAttributes);

// First level variables
var gl, currentShader, currentAnimationD, transitions;

function init () {
transitions = [];
gl = getWebGLContext(canvas, GlslTransition.defaults.contextAttributes);
gl = getWebGLContext(canvas, contextAttributes);
canvas.addEventListener("webglcontextlost", onContextLost, false);
canvas.addEventListener("webglcontextrestored", onContextRestored, false);
}
Expand Down Expand Up @@ -8307,11 +8309,11 @@ function GlslTransition (canvas) {

/**
* ~~~ Second Call in the API
* createTransition(glslSource, [options])
* createTransition(glslSource, [uniforms])
* Creates a GLSL Transition for the current canvas context.
*/
function createTransition (glsl, options) {
var defaultUniforms = options && options.uniforms || {};
function createTransition (glsl, defaultUniforms) {
if (!defaultUniforms) defaultUniforms = {};
if (arguments.length < 1 || arguments.length > 2 || typeof glsl !== "string")
throw new Error("Bad arguments. usage: T(glsl [, options])");

Expand Down

0 comments on commit 7234047

Please sign in to comment.