Skip to content

Commit

Permalink
Update Expression effect to use latest version of jsep
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchirls committed Jan 15, 2014
1 parent aac3365 commit 8d9f302
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions effects/seriously.expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
source: [
'const vec3 lumaCoeffs = vec3(0.2125,0.7154,0.0721);',
'float luminance(float r, float g, float b) {',
' return dot(vec3(r, g, b), vec3(0.2125,0.7154,0.0721));',
' return dot(vec3(r, g, b), lumaCoeffs);',
'}'
].join('\n'),
global: true
Expand Down Expand Up @@ -556,8 +556,8 @@
title: 'Expression'
});

/*! jsep - v0.2.1 - 2013-12-06 5:34:35 PM */
!function(a){"use strict";var b=["-","!","~","+"],c=["+","-","*","/","%","&&","||","&","|","<<",">>","===","==","!==","!=",">=","<=","<",">"],d=c.length,e={"true":!0,"false":!1,"null":null},f="this",g=function(a){switch(a){case"||":return 1;case"&&":return 2;case"|":return 3;case"^":return 4;case"&":return 5;case"==":case"!=":case"===":case"!==":return 6;case"<":case">":case"<=":case">=":return 7;case"<<":case">>":case">>>":return 8;case"+":case"-":return 9;case"*":case"/":case"%":return 11}return 0},h=function(a,b,c){var d="||"===a||"&&"===a?s:r;return{type:d,operator:a,left:b,right:c}},i=function(a){return a>=48&&57>=a},j=function(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a||a>=48&&57>=a},k="Compound",l="Identifier",m="MemberExpression",n="Literal",o="ThisExpression",p="CallExpression",q="UnaryExpression",r="BinaryExpression",s="LogicalExpression",t=(new RegExp("^['\"]"),new RegExp("^(\\d+(\\.\\d+)?)"),function(a){var r=0,s=a.length,t=function(){for(var b,c,d=[];s>r;)if(b=a[r],";"===b||","===b)r++;else if(c=v())d.push(c);else if(s>r)throw new Error("Unexpected '"+a[r]+"' at character "+r);return 1===d.length?d[0]:{type:k,body:d}},u=function(){var b,e,f,g;x();a:for(e=0;d>e;e++){for(b=c[e],g=b.length,f=0;g>f;f++)if(b[f]!==a[r+f])continue a;return r+=g,b}return!1},v=function(){var a,b,c,d,e,f,i,j;if(f=w(),b=u(),c=g(b),0===c)return f;if(e={value:b,prec:c},i=w(),!i)throw new Error("Expected expression after "+b+" at character "+r);for(d=[f,e,i];(b=u())&&(c=g(b),0!==c);){for(e={value:b,prec:c};d.length>2&&c<=d[d.length-2].prec;)i=d.pop(),b=d.pop().value,f=d.pop(),a=h(b,f,i),d.push(a);if(a=w(),!a)throw new Error("Expected expression after "+b+" at character "+r);d.push(e),d.push(a)}for(j=d.length-1,a=d[j];j>1;)a=h(d[j-1].value,d[j-2],a),j-=2;return a},w=function(){var c,d;return x(),c=a.charCodeAt(r),i(c)||46===c?y():39===c||34===c?z():j(c)?C():(d=b.indexOf(c))>=0?(r++,{type:q,operator:b[d],argument:w(),prefix:!0}):40===c?(r++,D()):!1},x=function(){for(var b=a.charCodeAt(r);32===b||9===b;)b=a.charCodeAt(++r)},y=function(){for(var b="";i(a.charCodeAt(r));)b+=a[r++];if("."===a[r])for(b+=a[r++];i(a.charCodeAt(r));)b+=a[r++];return{type:n,value:parseFloat(b),raw:b}},z=function(){for(var b,c="",d=a[r++],e=!1;s>r;){if(b=a[r++],b===d){e=!0;break}if("\\"===b)switch(b=a[r++]){case"n":c+="\n";break;case"r":c+="\r";break;case"t":c+=" ";break;case"b":c+="\b";break;case"f":c+="\f";break;case"v":c+=" "}else c+=b}if(!e)throw new Error('Unclosed quote after "'+c+'"');return{type:n,value:c,raw:d+c+d}},A=function(){for(var b,c,d=r;s>r&&(b=a.charCodeAt(r),j(b));)r++;return c=a.slice(d,r),e.hasOwnProperty(c)?{type:n,value:e[c],raw:c}:c===f?{type:o}:{type:l,name:c}},B=function(){for(var b,c,d=[];s>r;){if(x(),b=a[r],")"===b){r++;break}if(","===b)r++;else{if(c=v(),!c||c.type===k)throw new Error("Expected comma at character "+r);d.push(c)}}return d},C=function(){var b,c,d;for(c=A(),b=a[r];"."===b||"["===b||"("===b;){if("."===b)r++,c={type:m,computed:!1,object:c,property:A()};else if("["===b){if(d=r,r++,c={type:m,computed:!0,object:c,property:v()},x(),b=a[r],"]"!==b)throw new Error("Unclosed [ at character "+r);r++}else"("===b&&(r++,c={type:p,arguments:B(),callee:c});b=a[r]}return c},D=function(){var b=v();if(x(),")"===a[r])return r++,b;throw new Error("Unclosed ( at character "+r)};return t()});if(t.version="0.2.1","undefined"!=typeof exports)"undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports.do_parse=t;else{var u=a.jsep;a.jsep=t,t.noConflict=function(){var b=a.jsep;return a.jsep=u,b}}}(this || window);
/* jsep v0.2.9 (http://jsep.from.so/) */
!function(a){"use strict";var b="Compound",c="Identifier",d="MemberExpression",e="Literal",f="ThisExpression",g="CallExpression",h="UnaryExpression",i="BinaryExpression",j="LogicalExpression",k=!0,l={"-":k,"!":k,"~":k,"+":k},m={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},n=function(a){var b,c=0;for(var d in a)(b=d.length)>c&&a.hasOwnProperty(d)&&(c=b);return c},o=n(l),p=n(m),q={"true":!0,"false":!1,"null":null},r="this",s=function(a){return m[a]||0},t=function(a,b,c){var d="||"===a||"&&"===a?j:i;return{type:d,operator:a,left:b,right:c}},u=function(a){return a>=48&&57>=a},v=function(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a},w=function(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a||a>=48&&57>=a},x=function(a){for(var i,j,k=0,n=a.charAt,x=a.charCodeAt,y=function(b){return n.call(a,b)},z=function(b){return x.call(a,b)},A=a.length,B=function(){for(var a=z(k);32===a||9===a;)a=z(++k)},C=function(){B();for(var b=a.substr(k,p),c=b.length;c>0;){if(m.hasOwnProperty(b))return k+=c,b;b=b.substr(0,--c)}return!1},D=function(){var a,b,c,d,e,f,g,h;if(f=E(),b=C(),!b)return f;if(e={value:b,prec:s(b)},g=E(),!g)throw new Error("Expected expression after "+b+" at character "+k);for(d=[f,e,g];(b=C())&&(c=s(b),0!==c);){for(e={value:b,prec:c};d.length>2&&c<=d[d.length-2].prec;)g=d.pop(),b=d.pop().value,f=d.pop(),a=t(b,f,g),d.push(a);if(a=E(),!a)throw new Error("Expected expression after "+b+" at character "+k);d.push(e),d.push(a)}for(h=d.length-1,a=d[h];h>1;)a=t(d[h-1].value,d[h-2],a),h-=2;return a},E=function(){var b,c,d;if(B(),b=z(k),u(b)||46===b)return F();if(39===b||34===b)return G();if(v(b))return J();if(40===b)return K();for(c=a.substr(k,o),d=c.length;d>0;){if(l.hasOwnProperty(c))return k+=d,{type:h,operator:c,argument:E(),prefix:!0};c=c.substr(0,--d)}return!1},F=function(){for(var a="";u(z(k));)a+=y(k++);if("."===y(k))for(a+=y(k++);u(z(k));)a+=y(k++);if("e"===y(k)||"E"===y(k)){for(a+=y(k++),("+"===y(k)||"-"===y(k))&&(a+=y(k++));u(z(k));)a+=y(k++);if(!u(z(k-1)))throw new Error("Expected exponent ("+a+y(k)+") at character "+k)}if(v(z(k)))throw new Error("Variable names cannot start with a number ("+a+y(k)+") at character "+k);return{type:e,value:parseFloat(a),raw:a}},G=function(){for(var a,b="",c=y(k++),d=!1;A>k;){if(a=y(k++),a===c){d=!0;break}if("\\"===a)switch(a=y(k++)){case"n":b+="\n";break;case"r":b+="\r";break;case"t":b+=" ";break;case"b":b+="\b";break;case"f":b+="\f";break;case"v":b+=" "}else b+=a}if(!d)throw new Error('Unclosed quote after "'+b+'"');return{type:e,value:b,raw:c+b+c}},H=function(){var b,d=z(k),g=k;if(!v(d))throw new Error("Unexpected "+y(k)+"at character "+k);for(k++;A>k&&(d=z(k),w(d));)k++;return b=a.slice(g,k),q.hasOwnProperty(b)?{type:e,value:q[b],raw:b}:b===r?{type:f}:{type:c,name:b}},I=function(){for(var a,c,d=[];A>k;){if(B(),a=y(k),")"===a){k++;break}if(","===a)k++;else{if(c=D(),!c||c.type===b)throw new Error("Expected comma at character "+k);d.push(c)}}return d},J=function(){var a,b,c;for(b=H(),B(),a=y(k);"."===a||"["===a||"("===a;){if("."===a)k++,B(),b={type:d,computed:!1,object:b,property:H()};else if("["===a){if(c=k,k++,b={type:d,computed:!0,object:b,property:D()},B(),a=y(k),"]"!==a)throw new Error("Unclosed [ at character "+k);k++,B()}else"("===a&&(k++,b={type:g,arguments:I(),callee:b});B(),a=y(k)}return b},K=function(){k++;var a=D();if(B(),")"===y(k))return k++,a;throw new Error("Unclosed ( at character "+k)},L=[];A>k;)if(i=y(k),";"===i||","===i)k++;else if(j=D())L.push(j);else if(A>k)throw new Error("Unexpected '"+y(k)+"' at character "+k);return 1===L.length?L[0]:{type:b,body:L}};if(x.version="0.2.9",x.toString=function(){return"JavaScript Expression Parser (JSEP) v"+x.version},x.addUnaryOp=function(a){return l[a]=k,this},x.addBinaryOp=function(a,b){return p=Math.max(a.length,p),m[a]=b,this},x.removeUnaryOp=function(a){return delete l[a],a.length===o&&(o=n(l)),this},x.removeBinaryOp=function(a){return delete m[a],a.length===p&&(p=n(m)),this},"undefined"==typeof exports){var y=a.jsep;a.jsep=x,x.noConflict=function(){return a.jsep===x&&(a.jsep=y),x}}else"undefined"!=typeof module&&module.exports?exports=module.exports=x:exports.parse=x}(window);

jsep = window.jsep.noConflict();
}));

0 comments on commit 8d9f302

Please sign in to comment.