Comparing version 1.1.3 to 1.1.4
@@ -119,3 +119,3 @@ 'use strict' | ||
} | ||
attributes[name] = {name: info.name, type: type, size: size, data: []} | ||
attributes[info.name] = {name: info.name, type: type, size: size, data: []} | ||
} | ||
@@ -122,0 +122,0 @@ |
{ | ||
"name": "gl-util", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Set of practical webgl utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -160,4 +160,6 @@ 'use strict' | ||
let len = data && data.length || 1; | ||
if (texture.width == null) texture.width = options.width || data && data.width || (texture.format === gl.ALPHA ? len : Math.max(len / 4, 1)); | ||
if (texture.height == null) texture.height = options.height || (data && data.height) || 1; | ||
if (options.width) texture.width = options.width; | ||
else if (texture.width == null) texture.width = data && data.width || (texture.format === gl.ALPHA ? len : Math.max(len / 4, 1)); | ||
if (options.height) texture.height = options.height; | ||
else if (texture.height == null) texture.height = (data && data.height) || 1; | ||
} | ||
@@ -164,0 +166,0 @@ texture.data = data == null ? null : texture.type === gl.FLOAT ? new Float32Array(data) : texture.type === gl.UNSIGNED_SHORT ? new Uint16Array(data) : new Uint8Array(data); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87321
628