New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gl-shader

Package Overview
Dependencies
Maintainers
6
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gl-shader - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

15

lib/create-uniforms.js
'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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc