Webgl / added time and resolution as default uniforms
Also added the `zoom` and `resolution` style operators
This commit is contained in:
@@ -314,6 +314,24 @@ Operators['time'] = {
|
||||
return 'u_time';
|
||||
}
|
||||
};
|
||||
Operators['zoom'] = {
|
||||
getReturnType: function(args) {
|
||||
return ValueTypes.NUMBER;
|
||||
},
|
||||
toGlsl: function(context, args) {
|
||||
assertArgsCount(args, 0);
|
||||
return 'u_zoom';
|
||||
}
|
||||
};
|
||||
Operators['resolution'] = {
|
||||
getReturnType: function(args) {
|
||||
return ValueTypes.NUMBER;
|
||||
},
|
||||
toGlsl: function(context, args) {
|
||||
assertArgsCount(args, 0);
|
||||
return 'u_resolution';
|
||||
}
|
||||
};
|
||||
Operators['*'] = {
|
||||
getReturnType: function(args) {
|
||||
return ValueTypes.NUMBER;
|
||||
|
||||
Reference in New Issue
Block a user