twgl.js 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @license twgl.js 5.2.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
+ * @license twgl.js 5.3.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
3
3
  * Available via the MIT license.
4
4
  * see: http://github.com/greggman/twgl.js for details
5
5
  */
@@ -4816,7 +4816,7 @@ function samplerSetter(gl, type, unit, location) {
4816
4816
  return utils.isWebGL2(gl) ? function (textureOrPair) {
4817
4817
  var texture;
4818
4818
  var sampler;
4819
- if (helper.isTexture(gl, textureOrPair)) {
4819
+ if (!textureOrPair || helper.isTexture(gl, textureOrPair)) {
4820
4820
  texture = textureOrPair;
4821
4821
  sampler = null;
4822
4822
  } else {
@@ -1,4 +1,4 @@
1
- /* @license twgl.js 5.2.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
1
+ /* @license twgl.js 5.3.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
2
  Available via the MIT license.
3
3
  see: http://github.com/greggman/twgl.js for details */
4
4
  /*
@@ -7071,7 +7071,7 @@ function samplerSetter(gl, type, unit, location) {
7071
7071
  return isWebGL2(gl) ? function(textureOrPair) {
7072
7072
  let texture;
7073
7073
  let sampler;
7074
- if (isTexture(gl, textureOrPair)) {
7074
+ if (!textureOrPair || isTexture(gl, textureOrPair)) {
7075
7075
  texture = textureOrPair;
7076
7076
  sampler = null;
7077
7077
  } else {
package/dist/5.x/twgl.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @license twgl.js 5.2.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
+ * @license twgl.js 5.3.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
3
3
  * Available via the MIT license.
4
4
  * see: http://github.com/greggman/twgl.js for details
5
5
  */
@@ -1814,7 +1814,7 @@ function samplerSetter(gl, type, unit, location) {
1814
1814
  return utils.isWebGL2(gl) ? function (textureOrPair) {
1815
1815
  var texture;
1816
1816
  var sampler;
1817
- if (helper.isTexture(gl, textureOrPair)) {
1817
+ if (!textureOrPair || helper.isTexture(gl, textureOrPair)) {
1818
1818
  texture = textureOrPair;
1819
1819
  sampler = null;
1820
1820
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twgl.js",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "A Tiny WebGL helper library",
5
5
  "main": "dist/5.x/twgl-full.js",
6
6
  "types": "dist/5.x/twgl-full.d.ts",