Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "gl-util", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Set of practical webgl utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -146,9 +146,9 @@ 'use strict' | ||
if (options && options.shape) { | ||
texture.width = options.shape[0]; | ||
texture.height = options.shape[1]; | ||
if (texture.width == null) texture.width = options.shape[0]; | ||
if (texture.height == null) texture.height = options.shape[1]; | ||
} | ||
else { | ||
let len = data && data.length || 1; | ||
texture.width = options.width || data && data.width || (texture.format === gl.ALPHA ? len : Math.max(len / 4, 1)); | ||
texture.height = options.height || (data && data.height) || 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; | ||
} | ||
@@ -155,0 +155,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
81839