twgl.js 5.4.0 → 5.5.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.
- package/dist/5.x/twgl-full.d.ts +4 -0
- package/dist/5.x/twgl-full.js +15 -5
- package/dist/5.x/twgl-full.module.js +15 -6
- package/dist/5.x/twgl.d.ts +4 -0
- package/dist/5.x/twgl.js +15 -5
- package/package.json +1 -1
package/dist/5.x/twgl-full.d.ts
CHANGED
|
@@ -681,6 +681,8 @@ export type TextureFunc = (gl: WebGLRenderingContext, options: TextureOptions) =
|
|
|
681
681
|
* @property {number} [maxLod] TEXTURE_MAX_LOD setting
|
|
682
682
|
* @property {number} [baseLevel] TEXTURE_BASE_LEVEL setting
|
|
683
683
|
* @property {number} [maxLevel] TEXTURE_MAX_LEVEL setting
|
|
684
|
+
* @property {number} [compareFunc] TEXTURE_COMPARE_FUNC setting
|
|
685
|
+
* @property {number} [compareMode] TEXTURE_COMPARE_MODE setting
|
|
684
686
|
* @property {number} [unpackAlignment] The `gl.UNPACK_ALIGNMENT` used when uploading an array. Defaults to 1.
|
|
685
687
|
* @property {number[]|ArrayBufferView} [color] Color to initialize this texture with if loading an image asynchronously.
|
|
686
688
|
* The default use a blue 1x1 pixel texture. You can set another default by calling `twgl.setDefaults`
|
|
@@ -764,6 +766,8 @@ export type TextureOptions = {
|
|
|
764
766
|
maxLod?: number;
|
|
765
767
|
baseLevel?: number;
|
|
766
768
|
maxLevel?: number;
|
|
769
|
+
compareFunc?: number;
|
|
770
|
+
compareMode?: number;
|
|
767
771
|
unpackAlignment?: number;
|
|
768
772
|
color?: number[] | ArrayBufferView;
|
|
769
773
|
premultiplyAlpha?: number;
|
package/dist/5.x/twgl-full.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license twgl.js 5.
|
|
2
|
+
* @license twgl.js 5.5.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
|
*/
|
|
@@ -7254,6 +7254,8 @@ var TEXTURE_MIN_LOD = 0x813a;
|
|
|
7254
7254
|
var TEXTURE_MAX_LOD = 0x813b;
|
|
7255
7255
|
var TEXTURE_BASE_LEVEL = 0x813c;
|
|
7256
7256
|
var TEXTURE_MAX_LEVEL = 0x813d;
|
|
7257
|
+
var TEXTURE_COMPARE_MODE = 0x884C;
|
|
7258
|
+
var TEXTURE_COMPARE_FUNC = 0x884D;
|
|
7257
7259
|
|
|
7258
7260
|
/* Pixel store */
|
|
7259
7261
|
var UNPACK_ALIGNMENT = 0x0cf5;
|
|
@@ -8058,6 +8060,8 @@ function setDefaults(newDefaults) {
|
|
|
8058
8060
|
* @property {number} [maxLod] TEXTURE_MAX_LOD setting
|
|
8059
8061
|
* @property {number} [baseLevel] TEXTURE_BASE_LEVEL setting
|
|
8060
8062
|
* @property {number} [maxLevel] TEXTURE_MAX_LEVEL setting
|
|
8063
|
+
* @property {number} [compareFunc] TEXTURE_COMPARE_FUNC setting
|
|
8064
|
+
* @property {number} [compareMode] TEXTURE_COMPARE_MODE setting
|
|
8061
8065
|
* @property {number} [unpackAlignment] The `gl.UNPACK_ALIGNMENT` used when uploading an array. Defaults to 1.
|
|
8062
8066
|
* @property {number[]|ArrayBufferView} [color] Color to initialize this texture with if loading an image asynchronously.
|
|
8063
8067
|
* The default use a blue 1x1 pixel texture. You can set another default by calling `twgl.setDefaults`
|
|
@@ -8193,18 +8197,24 @@ function setTextureSamplerParameters(gl, target, parameteriFn, options) {
|
|
|
8193
8197
|
if (options.wrapT) {
|
|
8194
8198
|
parameteriFn.call(gl, target, TEXTURE_WRAP_T, options.wrapT);
|
|
8195
8199
|
}
|
|
8196
|
-
if (options.minLod) {
|
|
8200
|
+
if (options.minLod !== undefined) {
|
|
8197
8201
|
parameteriFn.call(gl, target, TEXTURE_MIN_LOD, options.minLod);
|
|
8198
8202
|
}
|
|
8199
|
-
if (options.maxLod) {
|
|
8203
|
+
if (options.maxLod !== undefined) {
|
|
8200
8204
|
parameteriFn.call(gl, target, TEXTURE_MAX_LOD, options.maxLod);
|
|
8201
8205
|
}
|
|
8202
|
-
if (options.baseLevel) {
|
|
8206
|
+
if (options.baseLevel !== undefined) {
|
|
8203
8207
|
parameteriFn.call(gl, target, TEXTURE_BASE_LEVEL, options.baseLevel);
|
|
8204
8208
|
}
|
|
8205
|
-
if (options.maxLevel) {
|
|
8209
|
+
if (options.maxLevel !== undefined) {
|
|
8206
8210
|
parameteriFn.call(gl, target, TEXTURE_MAX_LEVEL, options.maxLevel);
|
|
8207
8211
|
}
|
|
8212
|
+
if (options.compareFunc !== undefined) {
|
|
8213
|
+
parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.maxLevel);
|
|
8214
|
+
}
|
|
8215
|
+
if (options.compareMode !== undefined) {
|
|
8216
|
+
parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.maxLevel);
|
|
8217
|
+
}
|
|
8208
8218
|
}
|
|
8209
8219
|
|
|
8210
8220
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @license twgl.js 5.
|
|
1
|
+
/* @license twgl.js 5.5.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
|
/*
|
|
@@ -5104,7 +5104,8 @@ const TEXTURE_MIN_LOD = 0x813a;
|
|
|
5104
5104
|
const TEXTURE_MAX_LOD = 0x813b;
|
|
5105
5105
|
const TEXTURE_BASE_LEVEL = 0x813c;
|
|
5106
5106
|
const TEXTURE_MAX_LEVEL = 0x813d;
|
|
5107
|
-
|
|
5107
|
+
const TEXTURE_COMPARE_MODE = 0x884C;
|
|
5108
|
+
const TEXTURE_COMPARE_FUNC = 0x884D;
|
|
5108
5109
|
|
|
5109
5110
|
/* Pixel store */
|
|
5110
5111
|
const UNPACK_ALIGNMENT = 0x0cf5;
|
|
@@ -5526,6 +5527,8 @@ function setDefaults$1(newDefaults) {
|
|
|
5526
5527
|
* @property {number} [maxLod] TEXTURE_MAX_LOD setting
|
|
5527
5528
|
* @property {number} [baseLevel] TEXTURE_BASE_LEVEL setting
|
|
5528
5529
|
* @property {number} [maxLevel] TEXTURE_MAX_LEVEL setting
|
|
5530
|
+
* @property {number} [compareFunc] TEXTURE_COMPARE_FUNC setting
|
|
5531
|
+
* @property {number} [compareMode] TEXTURE_COMPARE_MODE setting
|
|
5529
5532
|
* @property {number} [unpackAlignment] The `gl.UNPACK_ALIGNMENT` used when uploading an array. Defaults to 1.
|
|
5530
5533
|
* @property {number[]|ArrayBufferView} [color] Color to initialize this texture with if loading an image asynchronously.
|
|
5531
5534
|
* The default use a blue 1x1 pixel texture. You can set another default by calling `twgl.setDefaults`
|
|
@@ -5661,18 +5664,24 @@ function setTextureSamplerParameters(gl, target, parameteriFn, options) {
|
|
|
5661
5664
|
if (options.wrapT) {
|
|
5662
5665
|
parameteriFn.call(gl, target, TEXTURE_WRAP_T, options.wrapT);
|
|
5663
5666
|
}
|
|
5664
|
-
if (options.minLod) {
|
|
5667
|
+
if (options.minLod !== undefined) {
|
|
5665
5668
|
parameteriFn.call(gl, target, TEXTURE_MIN_LOD, options.minLod);
|
|
5666
5669
|
}
|
|
5667
|
-
if (options.maxLod) {
|
|
5670
|
+
if (options.maxLod !== undefined) {
|
|
5668
5671
|
parameteriFn.call(gl, target, TEXTURE_MAX_LOD, options.maxLod);
|
|
5669
5672
|
}
|
|
5670
|
-
if (options.baseLevel) {
|
|
5673
|
+
if (options.baseLevel !== undefined) {
|
|
5671
5674
|
parameteriFn.call(gl, target, TEXTURE_BASE_LEVEL, options.baseLevel);
|
|
5672
5675
|
}
|
|
5673
|
-
if (options.maxLevel) {
|
|
5676
|
+
if (options.maxLevel !== undefined) {
|
|
5674
5677
|
parameteriFn.call(gl, target, TEXTURE_MAX_LEVEL, options.maxLevel);
|
|
5675
5678
|
}
|
|
5679
|
+
if (options.compareFunc !== undefined) {
|
|
5680
|
+
parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.maxLevel);
|
|
5681
|
+
}
|
|
5682
|
+
if (options.compareMode !== undefined) {
|
|
5683
|
+
parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.maxLevel);
|
|
5684
|
+
}
|
|
5676
5685
|
}
|
|
5677
5686
|
|
|
5678
5687
|
/**
|
package/dist/5.x/twgl.d.ts
CHANGED
|
@@ -681,6 +681,8 @@ export type TextureFunc = (gl: WebGLRenderingContext, options: TextureOptions) =
|
|
|
681
681
|
* @property {number} [maxLod] TEXTURE_MAX_LOD setting
|
|
682
682
|
* @property {number} [baseLevel] TEXTURE_BASE_LEVEL setting
|
|
683
683
|
* @property {number} [maxLevel] TEXTURE_MAX_LEVEL setting
|
|
684
|
+
* @property {number} [compareFunc] TEXTURE_COMPARE_FUNC setting
|
|
685
|
+
* @property {number} [compareMode] TEXTURE_COMPARE_MODE setting
|
|
684
686
|
* @property {number} [unpackAlignment] The `gl.UNPACK_ALIGNMENT` used when uploading an array. Defaults to 1.
|
|
685
687
|
* @property {number[]|ArrayBufferView} [color] Color to initialize this texture with if loading an image asynchronously.
|
|
686
688
|
* The default use a blue 1x1 pixel texture. You can set another default by calling `twgl.setDefaults`
|
|
@@ -764,6 +766,8 @@ export type TextureOptions = {
|
|
|
764
766
|
maxLod?: number;
|
|
765
767
|
baseLevel?: number;
|
|
766
768
|
maxLevel?: number;
|
|
769
|
+
compareFunc?: number;
|
|
770
|
+
compareMode?: number;
|
|
767
771
|
unpackAlignment?: number;
|
|
768
772
|
color?: number[] | ArrayBufferView;
|
|
769
773
|
premultiplyAlpha?: number;
|
package/dist/5.x/twgl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license twgl.js 5.
|
|
2
|
+
* @license twgl.js 5.5.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
|
*/
|
|
@@ -4252,6 +4252,8 @@ var TEXTURE_MIN_LOD = 0x813a;
|
|
|
4252
4252
|
var TEXTURE_MAX_LOD = 0x813b;
|
|
4253
4253
|
var TEXTURE_BASE_LEVEL = 0x813c;
|
|
4254
4254
|
var TEXTURE_MAX_LEVEL = 0x813d;
|
|
4255
|
+
var TEXTURE_COMPARE_MODE = 0x884C;
|
|
4256
|
+
var TEXTURE_COMPARE_FUNC = 0x884D;
|
|
4255
4257
|
|
|
4256
4258
|
/* Pixel store */
|
|
4257
4259
|
var UNPACK_ALIGNMENT = 0x0cf5;
|
|
@@ -5056,6 +5058,8 @@ function setDefaults(newDefaults) {
|
|
|
5056
5058
|
* @property {number} [maxLod] TEXTURE_MAX_LOD setting
|
|
5057
5059
|
* @property {number} [baseLevel] TEXTURE_BASE_LEVEL setting
|
|
5058
5060
|
* @property {number} [maxLevel] TEXTURE_MAX_LEVEL setting
|
|
5061
|
+
* @property {number} [compareFunc] TEXTURE_COMPARE_FUNC setting
|
|
5062
|
+
* @property {number} [compareMode] TEXTURE_COMPARE_MODE setting
|
|
5059
5063
|
* @property {number} [unpackAlignment] The `gl.UNPACK_ALIGNMENT` used when uploading an array. Defaults to 1.
|
|
5060
5064
|
* @property {number[]|ArrayBufferView} [color] Color to initialize this texture with if loading an image asynchronously.
|
|
5061
5065
|
* The default use a blue 1x1 pixel texture. You can set another default by calling `twgl.setDefaults`
|
|
@@ -5191,18 +5195,24 @@ function setTextureSamplerParameters(gl, target, parameteriFn, options) {
|
|
|
5191
5195
|
if (options.wrapT) {
|
|
5192
5196
|
parameteriFn.call(gl, target, TEXTURE_WRAP_T, options.wrapT);
|
|
5193
5197
|
}
|
|
5194
|
-
if (options.minLod) {
|
|
5198
|
+
if (options.minLod !== undefined) {
|
|
5195
5199
|
parameteriFn.call(gl, target, TEXTURE_MIN_LOD, options.minLod);
|
|
5196
5200
|
}
|
|
5197
|
-
if (options.maxLod) {
|
|
5201
|
+
if (options.maxLod !== undefined) {
|
|
5198
5202
|
parameteriFn.call(gl, target, TEXTURE_MAX_LOD, options.maxLod);
|
|
5199
5203
|
}
|
|
5200
|
-
if (options.baseLevel) {
|
|
5204
|
+
if (options.baseLevel !== undefined) {
|
|
5201
5205
|
parameteriFn.call(gl, target, TEXTURE_BASE_LEVEL, options.baseLevel);
|
|
5202
5206
|
}
|
|
5203
|
-
if (options.maxLevel) {
|
|
5207
|
+
if (options.maxLevel !== undefined) {
|
|
5204
5208
|
parameteriFn.call(gl, target, TEXTURE_MAX_LEVEL, options.maxLevel);
|
|
5205
5209
|
}
|
|
5210
|
+
if (options.compareFunc !== undefined) {
|
|
5211
|
+
parameteriFn.call(gl, target, TEXTURE_COMPARE_FUNC, options.maxLevel);
|
|
5212
|
+
}
|
|
5213
|
+
if (options.compareMode !== undefined) {
|
|
5214
|
+
parameteriFn.call(gl, target, TEXTURE_COMPARE_MODE, options.maxLevel);
|
|
5215
|
+
}
|
|
5206
5216
|
}
|
|
5207
5217
|
|
|
5208
5218
|
/**
|