twgl.js 5.3.0 → 5.4.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 +3927 -0
- package/dist/5.x/twgl-full.js +5 -4
- package/dist/5.x/twgl-full.module.js +5 -4
- package/dist/5.x/twgl.d.ts +2773 -0
- package/dist/5.x/twgl.js +5 -4
- package/package.json +2 -2
package/dist/5.x/twgl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license twgl.js 5.
|
|
2
|
+
* @license twgl.js 5.4.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
|
*/
|
|
@@ -391,6 +391,7 @@ function attribBufferFromArrayLike(gl, array, arrayName) {
|
|
|
391
391
|
* position: bufferInfo1.attribs.position, // use the same buffer from bufferInfo1
|
|
392
392
|
* });
|
|
393
393
|
*
|
|
394
|
+
* @property {number} [drawType] the draw type passed to gl.bufferData. Default = gl.STATIC_DRAW
|
|
394
395
|
* @memberOf module:twgl
|
|
395
396
|
*/
|
|
396
397
|
|
|
@@ -1843,7 +1844,7 @@ function samplerArraySetter(gl, type, unit, location, size) {
|
|
|
1843
1844
|
gl.activeTexture(TEXTURE0 + units[index]);
|
|
1844
1845
|
var texture;
|
|
1845
1846
|
var sampler;
|
|
1846
|
-
if (helper.isTexture(gl, textureOrPair)) {
|
|
1847
|
+
if (!textureOrPair || helper.isTexture(gl, textureOrPair)) {
|
|
1847
1848
|
texture = textureOrPair;
|
|
1848
1849
|
sampler = null;
|
|
1849
1850
|
} else {
|
|
@@ -3485,7 +3486,7 @@ function setUniformTree(tree, values) {
|
|
|
3485
3486
|
* ],
|
|
3486
3487
|
* };
|
|
3487
3488
|
*
|
|
3488
|
-
* gl.useProgram(program);
|
|
3489
|
+
* gl.useProgram(programInfo.program);
|
|
3489
3490
|
*
|
|
3490
3491
|
* This will automatically bind the textures AND set the
|
|
3491
3492
|
* uniforms.
|
|
@@ -3494,7 +3495,7 @@ function setUniformTree(tree, values) {
|
|
|
3494
3495
|
*
|
|
3495
3496
|
* For the example above it is equivalent to
|
|
3496
3497
|
*
|
|
3497
|
-
*
|
|
3498
|
+
* let texUnit = 0;
|
|
3498
3499
|
* gl.activeTexture(gl.TEXTURE0 + texUnit);
|
|
3499
3500
|
* gl.bindTexture(gl.TEXTURE_2D, tex1);
|
|
3500
3501
|
* gl.uniform1i(u_someSamplerLocation, texUnit++);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twgl.js",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"load-grunt-tasks": "^5.1.0",
|
|
73
73
|
"marked": "^4.1.1",
|
|
74
74
|
"minami": "^1.2.3",
|
|
75
|
-
"puppeteer": "^19.
|
|
75
|
+
"puppeteer": "^19.6.3",
|
|
76
76
|
"requirejs": "^2.3.5",
|
|
77
77
|
"rollup": "^3.2.2",
|
|
78
78
|
"semver": "^7.3.8",
|