twgl.js 5.0.0 → 5.0.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.
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Not including the shaders (which is a simple quad shader) here's the entire code
|
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
18
|
<canvas id="c"></canvas>
|
|
19
|
-
<script src="../dist/
|
|
19
|
+
<script src="../dist/5.x/twgl-full.min.js"></script>
|
|
20
20
|
<script>
|
|
21
21
|
const gl = document.getElementById("c").getContext("webgl");
|
|
22
22
|
const programInfo = twgl.createProgramInfo(gl, ["vs", "fs"]);
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license twgl.js
|
|
2
|
+
* @license twgl.js 5.0.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
|
*/
|
|
@@ -349,7 +349,9 @@ function makeTypedArray(array, name) {
|
|
|
349
349
|
* @property {boolean} [normalize] whether or not to normalize the data. Default = false
|
|
350
350
|
* @property {number} [offset] offset into buffer in bytes. Default = 0
|
|
351
351
|
* @property {number} [stride] the stride in bytes per element. Default = 0
|
|
352
|
-
* @property {number} [divisor] the divisor in instances. Default = 0.
|
|
352
|
+
* @property {number} [divisor] the divisor in instances. Default = 0.
|
|
353
|
+
* Requires WebGL2 or the ANGLE_instanced_arrays extension.
|
|
354
|
+
* and, if you using WebGL1 you must have called {@link module:twgl.addExtensionsToContext}
|
|
353
355
|
* @property {WebGLBuffer} buffer the buffer that contains the data for this attribute
|
|
354
356
|
* @property {number} [drawType] the draw type passed to gl.bufferData. Default = gl.STATIC_DRAW
|
|
355
357
|
* @memberOf module:twgl
|
|
@@ -371,7 +373,9 @@ function makeTypedArray(array, name) {
|
|
|
371
373
|
* @property {boolean} [normalize] normalize for `vertexAttribPointer`. Default is true if type is `Int8Array` or `Uint8Array` otherwise false.
|
|
372
374
|
* @property {number} [stride] stride for `vertexAttribPointer`. Default = 0
|
|
373
375
|
* @property {number} [offset] offset for `vertexAttribPointer`. Default = 0
|
|
374
|
-
* @property {number} [divisor] divisor for `vertexAttribDivisor`. Default = 0.
|
|
376
|
+
* @property {number} [divisor] divisor for `vertexAttribDivisor`. Default = 0.
|
|
377
|
+
* Requires WebGL2 or the ANGLE_instanced_arrays extension.
|
|
378
|
+
* and, if you using WebGL1 you must have called {@link module:twgl.addExtensionsToContext}
|
|
375
379
|
* @property {string} [attrib] name of attribute this array maps to. Defaults to same name as array prefixed by the default attribPrefix.
|
|
376
380
|
* @property {string} [name] synonym for `attrib`.
|
|
377
381
|
* @property {string} [attribName] synonym for `attrib`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @license twgl.js
|
|
1
|
+
/* @license twgl.js 5.0.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
|
/*
|
|
@@ -2148,7 +2148,9 @@ function makeTypedArray(array, name) {
|
|
|
2148
2148
|
* @property {boolean} [normalize] whether or not to normalize the data. Default = false
|
|
2149
2149
|
* @property {number} [offset] offset into buffer in bytes. Default = 0
|
|
2150
2150
|
* @property {number} [stride] the stride in bytes per element. Default = 0
|
|
2151
|
-
* @property {number} [divisor] the divisor in instances. Default = 0.
|
|
2151
|
+
* @property {number} [divisor] the divisor in instances. Default = 0.
|
|
2152
|
+
* Requires WebGL2 or the ANGLE_instanced_arrays extension.
|
|
2153
|
+
* and, if you using WebGL1 you must have called {@link module:twgl.addExtensionsToContext}
|
|
2152
2154
|
* @property {WebGLBuffer} buffer the buffer that contains the data for this attribute
|
|
2153
2155
|
* @property {number} [drawType] the draw type passed to gl.bufferData. Default = gl.STATIC_DRAW
|
|
2154
2156
|
* @memberOf module:twgl
|
|
@@ -2170,7 +2172,9 @@ function makeTypedArray(array, name) {
|
|
|
2170
2172
|
* @property {boolean} [normalize] normalize for `vertexAttribPointer`. Default is true if type is `Int8Array` or `Uint8Array` otherwise false.
|
|
2171
2173
|
* @property {number} [stride] stride for `vertexAttribPointer`. Default = 0
|
|
2172
2174
|
* @property {number} [offset] offset for `vertexAttribPointer`. Default = 0
|
|
2173
|
-
* @property {number} [divisor] divisor for `vertexAttribDivisor`. Default = 0.
|
|
2175
|
+
* @property {number} [divisor] divisor for `vertexAttribDivisor`. Default = 0.
|
|
2176
|
+
* Requires WebGL2 or the ANGLE_instanced_arrays extension.
|
|
2177
|
+
* and, if you using WebGL1 you must have called {@link module:twgl.addExtensionsToContext}
|
|
2174
2178
|
* @property {string} [attrib] name of attribute this array maps to. Defaults to same name as array prefixed by the default attribPrefix.
|
|
2175
2179
|
* @property {string} [name] synonym for `attrib`.
|
|
2176
2180
|
* @property {string} [attribName] synonym for `attrib`.
|
|
File without changes
|
package/dist/{4.x → 5.x}/twgl.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license twgl.js
|
|
2
|
+
* @license twgl.js 5.0.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
|
*/
|
|
@@ -349,7 +349,9 @@ function makeTypedArray(array, name) {
|
|
|
349
349
|
* @property {boolean} [normalize] whether or not to normalize the data. Default = false
|
|
350
350
|
* @property {number} [offset] offset into buffer in bytes. Default = 0
|
|
351
351
|
* @property {number} [stride] the stride in bytes per element. Default = 0
|
|
352
|
-
* @property {number} [divisor] the divisor in instances. Default = 0.
|
|
352
|
+
* @property {number} [divisor] the divisor in instances. Default = 0.
|
|
353
|
+
* Requires WebGL2 or the ANGLE_instanced_arrays extension.
|
|
354
|
+
* and, if you using WebGL1 you must have called {@link module:twgl.addExtensionsToContext}
|
|
353
355
|
* @property {WebGLBuffer} buffer the buffer that contains the data for this attribute
|
|
354
356
|
* @property {number} [drawType] the draw type passed to gl.bufferData. Default = gl.STATIC_DRAW
|
|
355
357
|
* @memberOf module:twgl
|
|
@@ -371,7 +373,9 @@ function makeTypedArray(array, name) {
|
|
|
371
373
|
* @property {boolean} [normalize] normalize for `vertexAttribPointer`. Default is true if type is `Int8Array` or `Uint8Array` otherwise false.
|
|
372
374
|
* @property {number} [stride] stride for `vertexAttribPointer`. Default = 0
|
|
373
375
|
* @property {number} [offset] offset for `vertexAttribPointer`. Default = 0
|
|
374
|
-
* @property {number} [divisor] divisor for `vertexAttribDivisor`. Default = 0.
|
|
376
|
+
* @property {number} [divisor] divisor for `vertexAttribDivisor`. Default = 0.
|
|
377
|
+
* Requires WebGL2 or the ANGLE_instanced_arrays extension.
|
|
378
|
+
* and, if you using WebGL1 you must have called {@link module:twgl.addExtensionsToContext}
|
|
375
379
|
* @property {string} [attrib] name of attribute this array maps to. Defaults to same name as array prefixed by the default attribPrefix.
|
|
376
380
|
* @property {string} [name] synonym for `attrib`.
|
|
377
381
|
* @property {string} [attribName] synonym for `attrib`.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twgl.js",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "A Tiny WebGL helper library",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"types": "dist/
|
|
7
|
-
"module": "dist/
|
|
5
|
+
"main": "dist/5.x/twgl-full.js",
|
|
6
|
+
"types": "dist/5.x/twgl-full.d.ts",
|
|
7
|
+
"module": "dist/5.x/twgl-full.module.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"check-ci": "npm run lint && npm run build && npm test",
|
|
10
10
|
"test": "npm run testts && npm run testbrowser",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/greggman/twgl.js",
|
|
40
40
|
"files": [
|
|
41
|
-
"dist/
|
|
42
|
-
"dist/
|
|
43
|
-
"dist/
|
|
44
|
-
"dist/
|
|
45
|
-
"dist/
|
|
41
|
+
"dist/5.x/twgl-full.js",
|
|
42
|
+
"dist/5.x/twgl.js",
|
|
43
|
+
"dist/5.x/twgl-full.d.ts",
|
|
44
|
+
"dist/5.x/twgl.d.ts",
|
|
45
|
+
"dist/5.x/twgl-full.module.js"
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/core": "^7.11.6",
|