twgl.js 5.5.0 → 5.5.1

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.
@@ -3696,7 +3696,25 @@ declare module primitives {
3696
3696
  /**
3697
3697
  * @typedef {(Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array)} TypedArray
3698
3698
  */
3699
+
3699
3700
  export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array;
3701
+
3702
+ export type AugmentedTypedArrayHelper = {
3703
+ numComponents: number;
3704
+ readonly numElements: number;
3705
+ /**
3706
+ * Push elements into typed array
3707
+ */
3708
+ push(...elements: (number | TypedArray | number[])[]): void;
3709
+ /**
3710
+ * Reset push cursor
3711
+ */
3712
+ reset(index?: number): void;
3713
+ };
3714
+
3715
+ export type AugmentedTypedArray<T extends TypedArray> = T & AugmentedTypedArrayHelper
3716
+
3717
+
3700
3718
  /**
3701
3719
  * creates a typed array with a `push` function attached
3702
3720
  * so that you can easily *push* values.
@@ -3719,7 +3737,9 @@ declare module primitives {
3719
3737
  * @return {ArrayBufferView} A typed array.
3720
3738
  * @memberOf module:twgl/primitives
3721
3739
  */
3722
- export function createAugmentedTypedArray(numComponents: number, numElements: number, opt_type: Function): ArrayBufferView;
3740
+ export function createAugmentedTypedArray<T extends TypedArrayConstructor>(numComponents: number, numElements: number, type: T): AugmentedTypedArray<InstanceType<T>>;
3741
+ export function createAugmentedTypedArray<T extends Float32Array>(numComponents: number, numElements: number): AugmentedTypedArray<Float32Array>;
3742
+
3723
3743
  /**
3724
3744
  * Given indexed vertices creates a new set of vertices un-indexed by expanding the indexed vertices.
3725
3745
  * @param {Object.<string, TypedArray>} vertices The indexed vertices to deindex
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @license twgl.js 5.5.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
+ * @license twgl.js 5.5.1 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
  */
@@ -8210,10 +8210,10 @@ function setTextureSamplerParameters(gl, target, parameteriFn, options) {
8210
8210
  parameteriFn.call(gl, target, TEXTURE_MAX_LEVEL, options.maxLevel);
8211
8211
  }
8212
8212
  if (options.compareFunc !== undefined) {
8213
- parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.maxLevel);
8213
+ parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.compareFunc);
8214
8214
  }
8215
8215
  if (options.compareMode !== undefined) {
8216
- parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.maxLevel);
8216
+ parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.compareMode);
8217
8217
  }
8218
8218
  }
8219
8219
 
@@ -1,4 +1,4 @@
1
- /* @license twgl.js 5.5.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
1
+ /* @license twgl.js 5.5.1 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
  /*
@@ -5677,10 +5677,10 @@ function setTextureSamplerParameters(gl, target, parameteriFn, options) {
5677
5677
  parameteriFn.call(gl, target, TEXTURE_MAX_LEVEL, options.maxLevel);
5678
5678
  }
5679
5679
  if (options.compareFunc !== undefined) {
5680
- parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.maxLevel);
5680
+ parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.compareFunc);
5681
5681
  }
5682
5682
  if (options.compareMode !== undefined) {
5683
- parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.maxLevel);
5683
+ parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.compareMode);
5684
5684
  }
5685
5685
  }
5686
5686
 
package/dist/5.x/twgl.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @license twgl.js 5.5.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
+ * @license twgl.js 5.5.1 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
  */
@@ -5208,10 +5208,10 @@ function setTextureSamplerParameters(gl, target, parameteriFn, options) {
5208
5208
  parameteriFn.call(gl, target, TEXTURE_MAX_LEVEL, options.maxLevel);
5209
5209
  }
5210
5210
  if (options.compareFunc !== undefined) {
5211
- parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.maxLevel);
5211
+ parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.compareFunc);
5212
5212
  }
5213
5213
  if (options.compareMode !== undefined) {
5214
- parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.maxLevel);
5214
+ parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.compareMode);
5215
5215
  }
5216
5216
  }
5217
5217
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twgl.js",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
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",