🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

gl-util

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gl-util - npm Package Compare versions

Comparing version

to
1.0.5

2

package.json
{
"name": "gl-util",
"version": "1.0.4",
"version": "1.0.5",
"description": "Set of practical webgl utils",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -32,3 +32,3 @@ 'use strict'

let textures = texturesCache.has(program) ? texturesCache.get(program) : texturesCache.set(program, {}).get(program);
let textures = texturesCache.has(gl) ? texturesCache.get(gl) : texturesCache.set(gl, {}).get(gl);

@@ -58,5 +58,8 @@ //return all textures if no name provided

//detect location
if (texture.location == null) {
texture.location = gl.getUniformLocation(program, name);
if (texture.locations == null) {
texture.locations = new WeakMap();
}
if (!texture.locations.has(program)) {
texture.locations.set(program, gl.getUniformLocation(program, name))
}

@@ -74,3 +77,3 @@ //if no options passed - just return known texture info

texturesIdx.set(program, textureCount);
texture.location && gl.uniform1i(texture.location, texture.index);
gl.uniform1i(texture.locations.get(program), texture.index);
}

@@ -77,0 +80,0 @@