@hscmap/gl-wrapper
Advanced tools
Comparing version 0.4.2 to 0.5.0
@@ -24,2 +24,5 @@ import { AttribList } from './attrib_list'; | ||
}, transpose?: boolean): void; | ||
uniformMatrix3fv(matrices: { | ||
[name: string]: Float32Array; | ||
}, transpose?: boolean): void; | ||
uniform1f(vars: { | ||
@@ -26,0 +29,0 @@ [name: string]: number; |
@@ -78,20 +78,27 @@ "use strict"; | ||
}; | ||
Program.prototype.uniformMatrix3fv = function (matrices, transpose) { | ||
if (transpose === void 0) { transpose = false; } | ||
for (var name_2 in matrices) { | ||
var matrix = matrices[name_2]; | ||
this.gl.uniformMatrix3fv(this.uniformLocation(name_2), transpose, matrix); | ||
} | ||
}; | ||
Program.prototype.uniform1f = function (vars) { | ||
for (var name_2 in vars) { | ||
this.gl.uniform1f(this.uniformLocation(name_2), vars[name_2]); | ||
for (var name_3 in vars) { | ||
this.gl.uniform1f(this.uniformLocation(name_3), vars[name_3]); | ||
} | ||
}; | ||
Program.prototype.uniform1i = function (vars) { | ||
for (var name_3 in vars) { | ||
this.gl.uniform1i(this.uniformLocation(name_3), vars[name_3]); | ||
for (var name_4 in vars) { | ||
this.gl.uniform1i(this.uniformLocation(name_4), vars[name_4]); | ||
} | ||
}; | ||
Program.prototype.uniform3fv = function (vars) { | ||
for (var name_4 in vars) { | ||
this.gl.uniform3fv(this.uniformLocation(name_4), vars[name_4]); | ||
for (var name_5 in vars) { | ||
this.gl.uniform3fv(this.uniformLocation(name_5), vars[name_5]); | ||
} | ||
}; | ||
Program.prototype.uniform4fv = function (vars) { | ||
for (var name_5 in vars) { | ||
this.gl.uniform4fv(this.uniformLocation(name_5), vars[name_5]); | ||
for (var name_6 in vars) { | ||
this.gl.uniform4fv(this.uniformLocation(name_6), vars[name_6]); | ||
} | ||
@@ -98,0 +105,0 @@ }; |
{ | ||
"name": "@hscmap/gl-wrapper", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts", |
167164
5162