Comparing version 4.0.0 to 4.0.1
'use strict' | ||
var dup = require('dup') | ||
var coallesceUniforms = require('./reflect') | ||
@@ -14,2 +13,10 @@ | ||
function makeVector(length, fill) { | ||
var result = new Array(length) | ||
for(var i=0; i<length; ++i) { | ||
result[i] = fill | ||
} | ||
return result | ||
} | ||
//Create shims for uniforms | ||
@@ -121,5 +128,5 @@ function createUniformWrapper(gl, wrapper, uniforms, locations) { | ||
if(type.charAt(0) === 'b') { | ||
return dup(d, false) | ||
return makeVector(d, false) | ||
} | ||
return dup(d) | ||
return makeVector(d, 0) | ||
} else if(type.indexOf('mat') === 0 && type.length === 4) { | ||
@@ -130,3 +137,3 @@ var d = type.charCodeAt(type.length-1) - 48 | ||
} | ||
return dup(d*d) | ||
return makeVector(d*d, 0) | ||
} else { | ||
@@ -133,0 +140,0 @@ throw new Error('gl-shader: Unknown uniform data type for ' + name + ': ' + type) |
{ | ||
"name": "gl-shader", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "WebGL shader wrapper", | ||
@@ -10,3 +10,2 @@ "main": "index.js", | ||
"dependencies": { | ||
"dup": "^1.0.0", | ||
"weakmap-shim": "^1.1.0" | ||
@@ -13,0 +12,0 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33765
1
844
3
- Removeddup@^1.0.0
- Removeddup@1.0.0(transitive)