twgl.js 5.5.2 → 5.5.4
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 +14 -14
- package/dist/5.x/twgl-full.js +218 -302
- package/dist/5.x/twgl-full.module.js +7 -7
- package/dist/5.x/twgl.d.ts +14 -14
- package/dist/5.x/twgl.js +181 -236
- package/package.json +19 -19
package/dist/5.x/twgl-full.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license twgl.js 5.5.
|
|
2
|
+
* @license twgl.js 5.5.4 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
|
*/
|
|
@@ -12,106 +12,20 @@
|
|
|
12
12
|
exports["twgl"] = factory();
|
|
13
13
|
else
|
|
14
14
|
root["twgl"] = factory();
|
|
15
|
-
})(typeof self !== 'undefined' ? self : this,
|
|
16
|
-
return /******/ (
|
|
17
|
-
/******/
|
|
18
|
-
/******/ var
|
|
19
|
-
/******/
|
|
20
|
-
/******/ // The require function
|
|
21
|
-
/******/ function __webpack_require__(moduleId) {
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Check if module is in cache
|
|
24
|
-
/******/ if(installedModules[moduleId]) {
|
|
25
|
-
/******/ return installedModules[moduleId].exports;
|
|
26
|
-
/******/ }
|
|
27
|
-
/******/ // Create a new module (and put it into the cache)
|
|
28
|
-
/******/ var module = installedModules[moduleId] = {
|
|
29
|
-
/******/ i: moduleId,
|
|
30
|
-
/******/ l: false,
|
|
31
|
-
/******/ exports: {}
|
|
32
|
-
/******/ };
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // Execute the module function
|
|
35
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // Flag the module as loaded
|
|
38
|
-
/******/ module.l = true;
|
|
39
|
-
/******/
|
|
40
|
-
/******/ // Return the exports of the module
|
|
41
|
-
/******/ return module.exports;
|
|
42
|
-
/******/ }
|
|
43
|
-
/******/
|
|
44
|
-
/******/
|
|
45
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
46
|
-
/******/ __webpack_require__.m = modules;
|
|
47
|
-
/******/
|
|
48
|
-
/******/ // expose the module cache
|
|
49
|
-
/******/ __webpack_require__.c = installedModules;
|
|
50
|
-
/******/
|
|
51
|
-
/******/ // define getter function for harmony exports
|
|
52
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
53
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
54
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
55
|
-
/******/ }
|
|
56
|
-
/******/ };
|
|
57
|
-
/******/
|
|
58
|
-
/******/ // define __esModule on exports
|
|
59
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
60
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
61
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
62
|
-
/******/ }
|
|
63
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
64
|
-
/******/ };
|
|
65
|
-
/******/
|
|
66
|
-
/******/ // create a fake namespace object
|
|
67
|
-
/******/ // mode & 1: value is a module id, require it
|
|
68
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
69
|
-
/******/ // mode & 4: return value when already ns object
|
|
70
|
-
/******/ // mode & 8|1: behave like require
|
|
71
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
72
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
73
|
-
/******/ if(mode & 8) return value;
|
|
74
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
75
|
-
/******/ var ns = Object.create(null);
|
|
76
|
-
/******/ __webpack_require__.r(ns);
|
|
77
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
78
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
79
|
-
/******/ return ns;
|
|
80
|
-
/******/ };
|
|
81
|
-
/******/
|
|
82
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
83
|
-
/******/ __webpack_require__.n = function(module) {
|
|
84
|
-
/******/ var getter = module && module.__esModule ?
|
|
85
|
-
/******/ function getDefault() { return module['default']; } :
|
|
86
|
-
/******/ function getModuleExports() { return module; };
|
|
87
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
88
|
-
/******/ return getter;
|
|
89
|
-
/******/ };
|
|
90
|
-
/******/
|
|
91
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
92
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
93
|
-
/******/
|
|
94
|
-
/******/ // __webpack_public_path__
|
|
95
|
-
/******/ __webpack_require__.p = "";
|
|
96
|
-
/******/
|
|
97
|
-
/******/
|
|
98
|
-
/******/ // Load entry module and return exports
|
|
99
|
-
/******/ return __webpack_require__(__webpack_require__.s = "./src/twgl-full.js");
|
|
100
|
-
/******/ })
|
|
101
|
-
/************************************************************************/
|
|
102
|
-
/******/ ({
|
|
15
|
+
})(typeof self !== 'undefined' ? self : this, () => {
|
|
16
|
+
return /******/ (() => { // webpackBootstrap
|
|
17
|
+
/******/ "use strict";
|
|
18
|
+
/******/ var __webpack_modules__ = ({
|
|
103
19
|
|
|
104
20
|
/***/ "./src/attributes.js":
|
|
105
21
|
/*!***************************!*\
|
|
106
22
|
!*** ./src/attributes.js ***!
|
|
107
23
|
\***************************/
|
|
108
|
-
|
|
109
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
24
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
110
25
|
|
|
111
|
-
"use strict";
|
|
112
26
|
|
|
113
27
|
|
|
114
|
-
function _typeof(
|
|
28
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
115
29
|
exports.__esModule = true;
|
|
116
30
|
exports.createAttribsFromArrays = createAttribsFromArrays;
|
|
117
31
|
exports.createBufferFromArray = createBufferFromArray;
|
|
@@ -125,8 +39,8 @@ exports.setAttributeDefaults_ = setDefaults;
|
|
|
125
39
|
exports.setAttributePrefix = setAttributePrefix;
|
|
126
40
|
var typedArrays = _interopRequireWildcard(__webpack_require__(/*! ./typedarrays.js */ "./src/typedarrays.js"));
|
|
127
41
|
var helper = _interopRequireWildcard(__webpack_require__(/*! ./helper.js */ "./src/helper.js"));
|
|
128
|
-
function _getRequireWildcardCache(
|
|
129
|
-
function _interopRequireWildcard(
|
|
42
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
43
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
130
44
|
/*
|
|
131
45
|
* Copyright 2019 Gregg Tavares
|
|
132
46
|
*
|
|
@@ -262,7 +176,6 @@ function guessNumComponentsFromName(name, length) {
|
|
|
262
176
|
} else {
|
|
263
177
|
numComponents = 3; // position, normals, indices ...
|
|
264
178
|
}
|
|
265
|
-
|
|
266
179
|
if (length % numComponents > 0) {
|
|
267
180
|
throw new Error("Can not guess numComponents for attribute '".concat(name, "'. Tried ").concat(numComponents, " but ").concat(length, " values is not evenly divisible by ").concat(numComponents, ". You should specify it."));
|
|
268
181
|
}
|
|
@@ -626,7 +539,6 @@ function getNumElementsFromNonIndexedArrays(arrays) {
|
|
|
626
539
|
if (length === undefined) {
|
|
627
540
|
return 1; // There's no arrays
|
|
628
541
|
}
|
|
629
|
-
|
|
630
542
|
var numComponents = getNumComponents(array, key);
|
|
631
543
|
var numElements = length / numComponents;
|
|
632
544
|
if (length % numComponents > 0) {
|
|
@@ -654,7 +566,6 @@ function getNumElementsFromAttributes(gl, attribs) {
|
|
|
654
566
|
if (!attrib.buffer) {
|
|
655
567
|
return 1; // There's no buffer
|
|
656
568
|
}
|
|
657
|
-
|
|
658
569
|
gl.bindBuffer(ARRAY_BUFFER, attrib.buffer);
|
|
659
570
|
var numBytes = gl.getBufferParameter(ARRAY_BUFFER, BUFFER_SIZE);
|
|
660
571
|
gl.bindBuffer(ARRAY_BUFFER, null);
|
|
@@ -868,19 +779,17 @@ function createBuffersFromArrays(gl, arrays) {
|
|
|
868
779
|
/*!*********************!*\
|
|
869
780
|
!*** ./src/draw.js ***!
|
|
870
781
|
\*********************/
|
|
871
|
-
|
|
872
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
782
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
873
783
|
|
|
874
|
-
"use strict";
|
|
875
784
|
|
|
876
785
|
|
|
877
|
-
function _typeof(
|
|
786
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
878
787
|
exports.__esModule = true;
|
|
879
788
|
exports.drawBufferInfo = drawBufferInfo;
|
|
880
789
|
exports.drawObjectList = drawObjectList;
|
|
881
790
|
var programs = _interopRequireWildcard(__webpack_require__(/*! ./programs.js */ "./src/programs.js"));
|
|
882
|
-
function _getRequireWildcardCache(
|
|
883
|
-
function _interopRequireWildcard(
|
|
791
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
792
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
884
793
|
/*
|
|
885
794
|
* Copyright 2019 Gregg Tavares
|
|
886
795
|
*
|
|
@@ -1044,21 +953,19 @@ function drawObjectList(gl, objectsToDraw) {
|
|
|
1044
953
|
/*!*****************************!*\
|
|
1045
954
|
!*** ./src/framebuffers.js ***!
|
|
1046
955
|
\*****************************/
|
|
1047
|
-
|
|
1048
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
956
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1049
957
|
|
|
1050
|
-
"use strict";
|
|
1051
958
|
|
|
1052
959
|
|
|
1053
|
-
function _typeof(
|
|
960
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1054
961
|
exports.__esModule = true;
|
|
1055
962
|
exports.bindFramebufferInfo = bindFramebufferInfo;
|
|
1056
963
|
exports.createFramebufferInfo = createFramebufferInfo;
|
|
1057
964
|
exports.resizeFramebufferInfo = resizeFramebufferInfo;
|
|
1058
965
|
var textures = _interopRequireWildcard(__webpack_require__(/*! ./textures.js */ "./src/textures.js"));
|
|
1059
966
|
var helper = _interopRequireWildcard(__webpack_require__(/*! ./helper.js */ "./src/helper.js"));
|
|
1060
|
-
function _getRequireWildcardCache(
|
|
1061
|
-
function _interopRequireWildcard(
|
|
967
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
968
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
1062
969
|
/*
|
|
1063
970
|
* Copyright 2019 Gregg Tavares
|
|
1064
971
|
*
|
|
@@ -1417,10 +1324,8 @@ function bindFramebufferInfo(gl, framebufferInfo, target) {
|
|
|
1417
1324
|
/*!***********************!*\
|
|
1418
1325
|
!*** ./src/helper.js ***!
|
|
1419
1326
|
\***********************/
|
|
1420
|
-
|
|
1421
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1327
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1422
1328
|
|
|
1423
|
-
"use strict";
|
|
1424
1329
|
|
|
1425
1330
|
|
|
1426
1331
|
exports.__esModule = true;
|
|
@@ -1433,7 +1338,7 @@ exports.isSampler = isSampler;
|
|
|
1433
1338
|
exports.isShader = isShader;
|
|
1434
1339
|
exports.isTexture = isTexture;
|
|
1435
1340
|
exports.warn = warn;
|
|
1436
|
-
function _typeof(
|
|
1341
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1437
1342
|
/*
|
|
1438
1343
|
* Copyright 2019 Gregg Tavares
|
|
1439
1344
|
*
|
|
@@ -1538,13 +1443,11 @@ function isSampler(gl, t) {
|
|
|
1538
1443
|
/*!*******************!*\
|
|
1539
1444
|
!*** ./src/m4.js ***!
|
|
1540
1445
|
\*******************/
|
|
1541
|
-
|
|
1542
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1446
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1543
1447
|
|
|
1544
|
-
"use strict";
|
|
1545
1448
|
|
|
1546
1449
|
|
|
1547
|
-
function _typeof(
|
|
1450
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1548
1451
|
exports.__esModule = true;
|
|
1549
1452
|
exports.axisRotate = axisRotate;
|
|
1550
1453
|
exports.axisRotation = axisRotation;
|
|
@@ -1578,8 +1481,8 @@ exports.translate = translate;
|
|
|
1578
1481
|
exports.translation = translation;
|
|
1579
1482
|
exports.transpose = transpose;
|
|
1580
1483
|
var v3 = _interopRequireWildcard(__webpack_require__(/*! ./v3.js */ "./src/v3.js"));
|
|
1581
|
-
function _getRequireWildcardCache(
|
|
1582
|
-
function _interopRequireWildcard(
|
|
1484
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
1485
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
1583
1486
|
/*
|
|
1584
1487
|
* Copyright 2019 Gregg Tavares
|
|
1585
1488
|
*
|
|
@@ -2750,13 +2653,11 @@ function transformNormal(m, v, dst) {
|
|
|
2750
2653
|
/*!***************************!*\
|
|
2751
2654
|
!*** ./src/primitives.js ***!
|
|
2752
2655
|
\***************************/
|
|
2753
|
-
|
|
2754
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2656
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2755
2657
|
|
|
2756
|
-
"use strict";
|
|
2757
2658
|
|
|
2758
2659
|
|
|
2759
|
-
function _typeof(
|
|
2660
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2760
2661
|
exports.__esModule = true;
|
|
2761
2662
|
exports.concatVertices = concatVertices;
|
|
2762
2663
|
exports.create3DFBuffers = exports.create3DFBufferInfo = void 0;
|
|
@@ -2793,8 +2694,8 @@ var helper = _interopRequireWildcard(__webpack_require__(/*! ./helper.js */ "./s
|
|
|
2793
2694
|
var typedArrays = _interopRequireWildcard(__webpack_require__(/*! ./typedarrays.js */ "./src/typedarrays.js"));
|
|
2794
2695
|
var m4 = _interopRequireWildcard(__webpack_require__(/*! ./m4.js */ "./src/m4.js"));
|
|
2795
2696
|
var v3 = _interopRequireWildcard(__webpack_require__(/*! ./v3.js */ "./src/v3.js"));
|
|
2796
|
-
function _getRequireWildcardCache(
|
|
2797
|
-
function _interopRequireWildcard(
|
|
2697
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
2698
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
2798
2699
|
/*
|
|
2799
2700
|
* Copyright 2019 Gregg Tavares
|
|
2800
2701
|
*
|
|
@@ -4397,7 +4298,7 @@ function concatVertices(arrayOfArrays) {
|
|
|
4397
4298
|
var baseName;
|
|
4398
4299
|
// get names of all arrays.
|
|
4399
4300
|
// and numElements for each set of vertices
|
|
4400
|
-
var _loop = function _loop(
|
|
4301
|
+
var _loop = function _loop() {
|
|
4401
4302
|
var arrays = arrayOfArrays[ii];
|
|
4402
4303
|
Object.keys(arrays).forEach(function (name) {
|
|
4403
4304
|
// eslint-disable-line
|
|
@@ -4415,7 +4316,7 @@ function concatVertices(arrayOfArrays) {
|
|
|
4415
4316
|
});
|
|
4416
4317
|
};
|
|
4417
4318
|
for (var ii = 0; ii < arrayOfArrays.length; ++ii) {
|
|
4418
|
-
_loop(
|
|
4319
|
+
_loop();
|
|
4419
4320
|
}
|
|
4420
4321
|
|
|
4421
4322
|
// compute length of combined array
|
|
@@ -4485,54 +4386,31 @@ function duplicateVertices(arrays) {
|
|
|
4485
4386
|
});
|
|
4486
4387
|
return newArrays;
|
|
4487
4388
|
}
|
|
4488
|
-
var create3DFBufferInfo = createBufferInfoFunc(create3DFVertices);
|
|
4489
|
-
exports.
|
|
4490
|
-
var
|
|
4491
|
-
exports.
|
|
4492
|
-
var
|
|
4493
|
-
exports.
|
|
4494
|
-
var
|
|
4495
|
-
exports.
|
|
4496
|
-
var
|
|
4497
|
-
exports.
|
|
4498
|
-
var
|
|
4499
|
-
exports.
|
|
4500
|
-
var
|
|
4501
|
-
exports.
|
|
4502
|
-
var
|
|
4503
|
-
exports.
|
|
4504
|
-
var
|
|
4505
|
-
exports.
|
|
4506
|
-
var
|
|
4507
|
-
exports.
|
|
4508
|
-
var createXYQuadBufferInfo = createBufferInfoFunc(createXYQuadVertices);
|
|
4509
|
-
exports.createXYQuadBufferInfo = createXYQuadBufferInfo;
|
|
4510
|
-
var createXYQuadBuffers = createBufferFunc(createXYQuadVertices);
|
|
4511
|
-
exports.createXYQuadBuffers = createXYQuadBuffers;
|
|
4512
|
-
var createCrescentBufferInfo = createBufferInfoFunc(createCrescentVertices);
|
|
4513
|
-
exports.createCrescentBufferInfo = createCrescentBufferInfo;
|
|
4514
|
-
var createCrescentBuffers = createBufferFunc(createCrescentVertices);
|
|
4515
|
-
exports.createCrescentBuffers = createCrescentBuffers;
|
|
4516
|
-
var createCylinderBufferInfo = createBufferInfoFunc(createCylinderVertices);
|
|
4517
|
-
exports.createCylinderBufferInfo = createCylinderBufferInfo;
|
|
4518
|
-
var createCylinderBuffers = createBufferFunc(createCylinderVertices);
|
|
4519
|
-
exports.createCylinderBuffers = createCylinderBuffers;
|
|
4520
|
-
var createTorusBufferInfo = createBufferInfoFunc(createTorusVertices);
|
|
4521
|
-
exports.createTorusBufferInfo = createTorusBufferInfo;
|
|
4522
|
-
var createTorusBuffers = createBufferFunc(createTorusVertices);
|
|
4523
|
-
exports.createTorusBuffers = createTorusBuffers;
|
|
4524
|
-
var createDiscBufferInfo = createBufferInfoFunc(createDiscVertices);
|
|
4525
|
-
exports.createDiscBufferInfo = createDiscBufferInfo;
|
|
4526
|
-
var createDiscBuffers = createBufferFunc(createDiscVertices);
|
|
4389
|
+
var create3DFBufferInfo = exports.create3DFBufferInfo = createBufferInfoFunc(create3DFVertices);
|
|
4390
|
+
var create3DFBuffers = exports.create3DFBuffers = createBufferFunc(create3DFVertices);
|
|
4391
|
+
var createCubeBufferInfo = exports.createCubeBufferInfo = createBufferInfoFunc(createCubeVertices);
|
|
4392
|
+
var createCubeBuffers = exports.createCubeBuffers = createBufferFunc(createCubeVertices);
|
|
4393
|
+
var createPlaneBufferInfo = exports.createPlaneBufferInfo = createBufferInfoFunc(createPlaneVertices);
|
|
4394
|
+
var createPlaneBuffers = exports.createPlaneBuffers = createBufferFunc(createPlaneVertices);
|
|
4395
|
+
var createSphereBufferInfo = exports.createSphereBufferInfo = createBufferInfoFunc(createSphereVertices);
|
|
4396
|
+
var createSphereBuffers = exports.createSphereBuffers = createBufferFunc(createSphereVertices);
|
|
4397
|
+
var createTruncatedConeBufferInfo = exports.createTruncatedConeBufferInfo = createBufferInfoFunc(createTruncatedConeVertices);
|
|
4398
|
+
var createTruncatedConeBuffers = exports.createTruncatedConeBuffers = createBufferFunc(createTruncatedConeVertices);
|
|
4399
|
+
var createXYQuadBufferInfo = exports.createXYQuadBufferInfo = createBufferInfoFunc(createXYQuadVertices);
|
|
4400
|
+
var createXYQuadBuffers = exports.createXYQuadBuffers = createBufferFunc(createXYQuadVertices);
|
|
4401
|
+
var createCrescentBufferInfo = exports.createCrescentBufferInfo = createBufferInfoFunc(createCrescentVertices);
|
|
4402
|
+
var createCrescentBuffers = exports.createCrescentBuffers = createBufferFunc(createCrescentVertices);
|
|
4403
|
+
var createCylinderBufferInfo = exports.createCylinderBufferInfo = createBufferInfoFunc(createCylinderVertices);
|
|
4404
|
+
var createCylinderBuffers = exports.createCylinderBuffers = createBufferFunc(createCylinderVertices);
|
|
4405
|
+
var createTorusBufferInfo = exports.createTorusBufferInfo = createBufferInfoFunc(createTorusVertices);
|
|
4406
|
+
var createTorusBuffers = exports.createTorusBuffers = createBufferFunc(createTorusVertices);
|
|
4407
|
+
var createDiscBufferInfo = exports.createDiscBufferInfo = createBufferInfoFunc(createDiscVertices);
|
|
4408
|
+
var createDiscBuffers = exports.createDiscBuffers = createBufferFunc(createDiscVertices);
|
|
4527
4409
|
|
|
4528
4410
|
// these were mis-spelled until 4.12
|
|
4529
|
-
exports.
|
|
4530
|
-
var
|
|
4531
|
-
exports.
|
|
4532
|
-
var createCresentBuffers = createCrescentBuffers;
|
|
4533
|
-
exports.createCresentBuffers = createCresentBuffers;
|
|
4534
|
-
var createCresentVertices = createCrescentVertices;
|
|
4535
|
-
exports.createCresentVertices = createCresentVertices;
|
|
4411
|
+
var createCresentBufferInfo = exports.createCresentBufferInfo = createCrescentBufferInfo;
|
|
4412
|
+
var createCresentBuffers = exports.createCresentBuffers = createCrescentBuffers;
|
|
4413
|
+
var createCresentVertices = exports.createCresentVertices = createCrescentVertices;
|
|
4536
4414
|
|
|
4537
4415
|
/***/ }),
|
|
4538
4416
|
|
|
@@ -4540,13 +4418,11 @@ exports.createCresentVertices = createCresentVertices;
|
|
|
4540
4418
|
/*!*************************!*\
|
|
4541
4419
|
!*** ./src/programs.js ***!
|
|
4542
4420
|
\*************************/
|
|
4543
|
-
|
|
4544
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4421
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
4545
4422
|
|
|
4546
|
-
"use strict";
|
|
4547
4423
|
|
|
4548
4424
|
|
|
4549
|
-
function _typeof(
|
|
4425
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4550
4426
|
exports.__esModule = true;
|
|
4551
4427
|
exports.bindTransformFeedbackInfo = bindTransformFeedbackInfo;
|
|
4552
4428
|
exports.bindUniformBlock = bindUniformBlock;
|
|
@@ -4576,25 +4452,47 @@ exports.setUniforms = setUniforms;
|
|
|
4576
4452
|
exports.setUniformsAndBindTextures = void 0;
|
|
4577
4453
|
var utils = _interopRequireWildcard(__webpack_require__(/*! ./utils.js */ "./src/utils.js"));
|
|
4578
4454
|
var helper = _interopRequireWildcard(__webpack_require__(/*! ./helper.js */ "./src/helper.js"));
|
|
4579
|
-
function _getRequireWildcardCache(
|
|
4580
|
-
function _interopRequireWildcard(
|
|
4581
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4582
|
-
function ownKeys(
|
|
4583
|
-
function _objectSpread(
|
|
4584
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4455
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
4456
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
4457
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
4458
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4459
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4460
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4461
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4462
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4585
4463
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4586
4464
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4587
4465
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4588
4466
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4589
|
-
function _iterableToArrayLimit(
|
|
4467
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
4590
4468
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
4591
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(
|
|
4469
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
4592
4470
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4593
4471
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4594
4472
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4595
4473
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4596
4474
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
4597
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
4475
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /*
|
|
4476
|
+
* Copyright 2019 Gregg Tavares
|
|
4477
|
+
*
|
|
4478
|
+
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
4479
|
+
* copy of this software and associated documentation files (the "Software"),
|
|
4480
|
+
* to deal in the Software without restriction, including without limitation
|
|
4481
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
4482
|
+
* and/or sell copies of the Software, and to permit persons to whom the
|
|
4483
|
+
* Software is furnished to do so, subject to the following conditions:
|
|
4484
|
+
*
|
|
4485
|
+
* The above copyright notice and this permission notice shall be included in
|
|
4486
|
+
* all copies or substantial portions of the Software.
|
|
4487
|
+
*
|
|
4488
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4489
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4490
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
4491
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4492
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
4493
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
4494
|
+
* DEALINGS IN THE SOFTWARE.
|
|
4495
|
+
*/
|
|
4598
4496
|
/**
|
|
4599
4497
|
* Low level shader program related functions
|
|
4600
4498
|
*
|
|
@@ -5584,7 +5482,7 @@ function createProgramNoCheck(gl, shaders, programOptions) {
|
|
|
5584
5482
|
* @param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
|
|
5585
5483
|
* @param {WebGLShader[]|string[]} shaders The shaders to attach, or element ids for their source, or strings that contain their source
|
|
5586
5484
|
* @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in
|
|
5587
|
-
* @param {number[]
|
|
5485
|
+
* @param {number[]|module:twgl.ErrorCallback} [opt_locations] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback.
|
|
5588
5486
|
* @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console
|
|
5589
5487
|
* on error. If you want something else pass an callback. It's passed an error message.
|
|
5590
5488
|
* @return {WebGLProgram?} the created program or null if error of a callback was provided.
|
|
@@ -5651,13 +5549,13 @@ function wrapCallbackFnToAsyncFn(fn) {
|
|
|
5651
5549
|
* @param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
|
|
5652
5550
|
* @param {WebGLShader[]|string[]} shaders The shaders to attach, or element ids for their source, or strings that contain their source
|
|
5653
5551
|
* @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in
|
|
5654
|
-
* @param {number[]
|
|
5552
|
+
* @param {number[]|module:twgl.ErrorCallback} [opt_locations] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback.
|
|
5655
5553
|
* @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console
|
|
5656
5554
|
* on error. If you want something else pass an callback. It's passed an error message.
|
|
5657
5555
|
* @return {Promise<WebGLProgram>} The created program
|
|
5658
5556
|
* @memberOf module:twgl/programs
|
|
5659
5557
|
*/
|
|
5660
|
-
var createProgramAsync = wrapCallbackFnToAsyncFn(createProgram);
|
|
5558
|
+
var createProgramAsync = exports.createProgramAsync = wrapCallbackFnToAsyncFn(createProgram);
|
|
5661
5559
|
|
|
5662
5560
|
/**
|
|
5663
5561
|
* Same as createProgramInfo but returns a promise
|
|
@@ -5668,15 +5566,13 @@ var createProgramAsync = wrapCallbackFnToAsyncFn(createProgram);
|
|
|
5668
5566
|
* shaders or ids. The first is assumed to be the vertex shader,
|
|
5669
5567
|
* the second the fragment shader.
|
|
5670
5568
|
* @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in
|
|
5671
|
-
* @param {number[]
|
|
5569
|
+
* @param {number[]|module:twgl.ErrorCallback} [opt_locations] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback.
|
|
5672
5570
|
* @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console
|
|
5673
5571
|
* on error. If you want something else pass an callback. It's passed an error message.
|
|
5674
5572
|
* @return {Promise<module:twgl.ProgramInfo>} The created ProgramInfo
|
|
5675
5573
|
* @memberOf module:twgl/programs
|
|
5676
5574
|
*/
|
|
5677
|
-
exports.
|
|
5678
|
-
var createProgramInfoAsync = wrapCallbackFnToAsyncFn(createProgramInfo);
|
|
5679
|
-
exports.createProgramInfoAsync = createProgramInfoAsync;
|
|
5575
|
+
var createProgramInfoAsync = exports.createProgramInfoAsync = wrapCallbackFnToAsyncFn(createProgramInfo);
|
|
5680
5576
|
function waitForProgramLinkCompletionAsync(_x, _x2) {
|
|
5681
5577
|
return _waitForProgramLinkCompletionAsync.apply(this, arguments);
|
|
5682
5578
|
}
|
|
@@ -5684,31 +5580,29 @@ function _waitForProgramLinkCompletionAsync() {
|
|
|
5684
5580
|
_waitForProgramLinkCompletionAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(gl, program) {
|
|
5685
5581
|
var ext, checkFn, waitTime;
|
|
5686
5582
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5687
|
-
while (1) {
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
return _context.stop();
|
|
5711
|
-
}
|
|
5583
|
+
while (1) switch (_context.prev = _context.next) {
|
|
5584
|
+
case 0:
|
|
5585
|
+
ext = gl.getExtension('KHR_parallel_shader_compile');
|
|
5586
|
+
checkFn = ext ? function (gl, program) {
|
|
5587
|
+
return gl.getProgramParameter(program, ext.COMPLETION_STATUS_KHR);
|
|
5588
|
+
} : function () {
|
|
5589
|
+
return true;
|
|
5590
|
+
};
|
|
5591
|
+
waitTime = 0;
|
|
5592
|
+
case 3:
|
|
5593
|
+
_context.next = 5;
|
|
5594
|
+
return wait(waitTime);
|
|
5595
|
+
case 5:
|
|
5596
|
+
// must wait at least once
|
|
5597
|
+
waitTime = 1000 / 60;
|
|
5598
|
+
case 6:
|
|
5599
|
+
if (!checkFn(gl, program)) {
|
|
5600
|
+
_context.next = 3;
|
|
5601
|
+
break;
|
|
5602
|
+
}
|
|
5603
|
+
case 7:
|
|
5604
|
+
case "end":
|
|
5605
|
+
return _context.stop();
|
|
5712
5606
|
}
|
|
5713
5607
|
}, _callee);
|
|
5714
5608
|
}));
|
|
@@ -5716,38 +5610,37 @@ function _waitForProgramLinkCompletionAsync() {
|
|
|
5716
5610
|
}
|
|
5717
5611
|
function waitForAllProgramsLinkCompletionAsync(_x3, _x4) {
|
|
5718
5612
|
return _waitForAllProgramsLinkCompletionAsync.apply(this, arguments);
|
|
5719
|
-
}
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5613
|
+
}
|
|
5614
|
+
/**
|
|
5615
|
+
* Check a program's link status
|
|
5616
|
+
* @param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
|
|
5617
|
+
* @param {WebGLProgram} program Program to check
|
|
5618
|
+
* @param {ErrorCallback} [errFn] func for errors
|
|
5619
|
+
* @return {string?} errors if program is failed, else undefined
|
|
5620
|
+
* @private
|
|
5621
|
+
*/
|
|
5727
5622
|
function _waitForAllProgramsLinkCompletionAsync() {
|
|
5728
5623
|
_waitForAllProgramsLinkCompletionAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(gl, programs) {
|
|
5729
|
-
var
|
|
5624
|
+
var _i3, _Object$values2, program;
|
|
5730
5625
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
5731
|
-
while (1) {
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
_context2.next = 8;
|
|
5738
|
-
break;
|
|
5739
|
-
}
|
|
5740
|
-
program = _Object$values2[_i4];
|
|
5741
|
-
_context2.next = 5;
|
|
5742
|
-
return waitForProgramLinkCompletionAsync(gl, program);
|
|
5743
|
-
case 5:
|
|
5744
|
-
_i4++;
|
|
5745
|
-
_context2.next = 1;
|
|
5626
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
5627
|
+
case 0:
|
|
5628
|
+
_i3 = 0, _Object$values2 = Object.values(programs);
|
|
5629
|
+
case 1:
|
|
5630
|
+
if (!(_i3 < _Object$values2.length)) {
|
|
5631
|
+
_context2.next = 8;
|
|
5746
5632
|
break;
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5633
|
+
}
|
|
5634
|
+
program = _Object$values2[_i3];
|
|
5635
|
+
_context2.next = 5;
|
|
5636
|
+
return waitForProgramLinkCompletionAsync(gl, program);
|
|
5637
|
+
case 5:
|
|
5638
|
+
_i3++;
|
|
5639
|
+
_context2.next = 1;
|
|
5640
|
+
break;
|
|
5641
|
+
case 8:
|
|
5642
|
+
case "end":
|
|
5643
|
+
return _context2.stop();
|
|
5751
5644
|
}
|
|
5752
5645
|
}, _callee2);
|
|
5753
5646
|
}));
|
|
@@ -5789,7 +5682,7 @@ function getProgramErrors(gl, program, errFn) {
|
|
|
5789
5682
|
* tags for the shaders. The first is assumed to be the
|
|
5790
5683
|
* vertex shader, the second the fragment shader.
|
|
5791
5684
|
* @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in
|
|
5792
|
-
* @param {number[]
|
|
5685
|
+
* @param {number[]|module:twgl.ErrorCallback} [opt_locations] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback.
|
|
5793
5686
|
* @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console
|
|
5794
5687
|
* on error. If you want something else pass an callback. It's passed an error message.
|
|
5795
5688
|
* @return {WebGLProgram?} the created program or null if error or a callback was provided.
|
|
@@ -5833,7 +5726,7 @@ function createProgramFromScripts(gl, shaderScriptIds, opt_attribs, opt_location
|
|
|
5833
5726
|
* shaders. The first is assumed to be the vertex shader,
|
|
5834
5727
|
* the second the fragment shader.
|
|
5835
5728
|
* @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in
|
|
5836
|
-
* @param {number[]
|
|
5729
|
+
* @param {number[]|module:twgl.ErrorCallback} [opt_locations] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback.
|
|
5837
5730
|
* @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console
|
|
5838
5731
|
* on error. If you want something else pass an callback. It's passed an error message.
|
|
5839
5732
|
* @return {WebGLProgram?} the created program or null if error or a callback was provided.
|
|
@@ -5882,7 +5775,6 @@ function addSetterToUniformTree(fullPath, setter, node, uniformSetters) {
|
|
|
5882
5775
|
if (isArrayIndex) {
|
|
5883
5776
|
path += tokens[tokenNdx++]; // skip ']'
|
|
5884
5777
|
}
|
|
5885
|
-
|
|
5886
5778
|
var isLastToken = tokenNdx === tokens.length;
|
|
5887
5779
|
if (isLastToken) {
|
|
5888
5780
|
node[accessor] = setter;
|
|
@@ -5931,7 +5823,6 @@ function createUniformSetters(gl, program) {
|
|
|
5931
5823
|
if (!typeInfo) {
|
|
5932
5824
|
throw new Error("unknown type: 0x".concat(type.toString(16))); // we should never get here.
|
|
5933
5825
|
}
|
|
5934
|
-
|
|
5935
5826
|
var setter;
|
|
5936
5827
|
if (typeInfo.bindPoint) {
|
|
5937
5828
|
// it's a sampler
|
|
@@ -6650,7 +6541,7 @@ function setUniforms(setters) {
|
|
|
6650
6541
|
* @param {Object.<string, ?>} values an object with values for the
|
|
6651
6542
|
* @memberOf module:twgl/programs
|
|
6652
6543
|
*/
|
|
6653
|
-
var setUniformsAndBindTextures = setUniforms;
|
|
6544
|
+
var setUniformsAndBindTextures = exports.setUniformsAndBindTextures = setUniforms;
|
|
6654
6545
|
|
|
6655
6546
|
/**
|
|
6656
6547
|
* Creates setter functions for all attributes of a shader
|
|
@@ -6662,7 +6553,6 @@ var setUniformsAndBindTextures = setUniforms;
|
|
|
6662
6553
|
* @return {Object.<string, function>} an object with a setter for each attribute by name.
|
|
6663
6554
|
* @memberOf module:twgl/programs
|
|
6664
6555
|
*/
|
|
6665
|
-
exports.setUniformsAndBindTextures = setUniformsAndBindTextures;
|
|
6666
6556
|
function createAttributeSetters(gl, program) {
|
|
6667
6557
|
var attribSetters = {};
|
|
6668
6558
|
var numAttribs = gl.getProgramParameter(program, ACTIVE_ATTRIBUTES);
|
|
@@ -6859,7 +6749,7 @@ var notIdRE = /\s|{|}|;/;
|
|
|
6859
6749
|
* shaders or ids. The first is assumed to be the vertex shader,
|
|
6860
6750
|
* the second the fragment shader.
|
|
6861
6751
|
* @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in
|
|
6862
|
-
* @param {number[]
|
|
6752
|
+
* @param {number[]|module:twgl.ErrorCallback} [opt_locations] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback.
|
|
6863
6753
|
* @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console
|
|
6864
6754
|
* on error. If you want something else pass an callback. It's passed an error message.
|
|
6865
6755
|
* @return {module:twgl.ProgramInfo?} The created ProgramInfo or null if it failed to link or compile
|
|
@@ -6899,8 +6789,8 @@ function createProgramInfo(gl, shaderSources, opt_attribs, opt_locations, opt_er
|
|
|
6899
6789
|
}
|
|
6900
6790
|
function checkAllPrograms(gl, programs, programSpecs, noDeleteShadersSet, programOptions) {
|
|
6901
6791
|
// check errors for everything.
|
|
6902
|
-
for (var
|
|
6903
|
-
var _Object$entries$_i = _slicedToArray(_Object$entries[
|
|
6792
|
+
for (var _i = 0, _Object$entries = Object.entries(programs); _i < _Object$entries.length; _i++) {
|
|
6793
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
6904
6794
|
name = _Object$entries$_i[0],
|
|
6905
6795
|
program = _Object$entries$_i[1];
|
|
6906
6796
|
var options = _objectSpread({}, programOptions);
|
|
@@ -6911,8 +6801,8 @@ function checkAllPrograms(gl, programs, programSpecs, noDeleteShadersSet, progra
|
|
|
6911
6801
|
var errors = getProgramErrors(gl, program, options.errorCallback);
|
|
6912
6802
|
if (errors) {
|
|
6913
6803
|
// delete everything we created
|
|
6914
|
-
for (var
|
|
6915
|
-
var _program = _Object$values[
|
|
6804
|
+
for (var _i2 = 0, _Object$values = Object.values(programs); _i2 < _Object$values.length; _i2++) {
|
|
6805
|
+
var _program = _Object$values[_i2];
|
|
6916
6806
|
var shaders = gl.getAttachedShaders(_program);
|
|
6917
6807
|
gl.deleteProgram(_program);
|
|
6918
6808
|
var _iterator3 = _createForOfIteratorHelper(shaders),
|
|
@@ -7073,7 +6963,7 @@ function createProgramInfos(gl, programSpecs, programOptions) {
|
|
|
7073
6963
|
* @param {module:twgl.ProgramOptions} [programOptions] options to apply to all programs
|
|
7074
6964
|
* @return {Object.<string, WebGLProgram>?} the created programInfos by name
|
|
7075
6965
|
*/
|
|
7076
|
-
var createProgramsAsync = wrapCallbackFnToAsyncFn(createPrograms);
|
|
6966
|
+
var createProgramsAsync = exports.createProgramsAsync = wrapCallbackFnToAsyncFn(createPrograms);
|
|
7077
6967
|
|
|
7078
6968
|
/**
|
|
7079
6969
|
* Creates multiple programInfos asynchronously
|
|
@@ -7097,9 +6987,7 @@ var createProgramsAsync = wrapCallbackFnToAsyncFn(createPrograms);
|
|
|
7097
6987
|
* @param {module:twgl.ProgramOptions} [programOptions] options to apply to all programs
|
|
7098
6988
|
* @return {Promise<Object.<string, module:twgl.ProgramInfo>>} the created programInfos by name
|
|
7099
6989
|
*/
|
|
7100
|
-
exports.
|
|
7101
|
-
var createProgramInfosAsync = wrapCallbackFnToAsyncFn(createProgramInfos);
|
|
7102
|
-
exports.createProgramInfosAsync = createProgramInfosAsync;
|
|
6990
|
+
var createProgramInfosAsync = exports.createProgramInfosAsync = wrapCallbackFnToAsyncFn(createProgramInfos);
|
|
7103
6991
|
|
|
7104
6992
|
/***/ }),
|
|
7105
6993
|
|
|
@@ -7107,13 +6995,11 @@ exports.createProgramInfosAsync = createProgramInfosAsync;
|
|
|
7107
6995
|
/*!*************************!*\
|
|
7108
6996
|
!*** ./src/textures.js ***!
|
|
7109
6997
|
\*************************/
|
|
7110
|
-
|
|
7111
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
6998
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7112
6999
|
|
|
7113
|
-
"use strict";
|
|
7114
7000
|
|
|
7115
7001
|
|
|
7116
|
-
function _typeof(
|
|
7002
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7117
7003
|
exports.__esModule = true;
|
|
7118
7004
|
exports.canFilter = canFilter;
|
|
7119
7005
|
exports.canGenerateMipmap = canGenerateMipmap;
|
|
@@ -7137,8 +7023,8 @@ exports.setTextureParameters = setTextureParameters;
|
|
|
7137
7023
|
var utils = _interopRequireWildcard(__webpack_require__(/*! ./utils.js */ "./src/utils.js"));
|
|
7138
7024
|
var typedArrays = _interopRequireWildcard(__webpack_require__(/*! ./typedarrays.js */ "./src/typedarrays.js"));
|
|
7139
7025
|
var helper = _interopRequireWildcard(__webpack_require__(/*! ./helper.js */ "./src/helper.js"));
|
|
7140
|
-
function _getRequireWildcardCache(
|
|
7141
|
-
function _interopRequireWildcard(
|
|
7026
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
7027
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
7142
7028
|
/*
|
|
7143
7029
|
* Copyright 2019 Gregg Tavares
|
|
7144
7030
|
*
|
|
@@ -8596,7 +8482,6 @@ function loadImage(url, crossOrigin, callback) {
|
|
|
8596
8482
|
if (crossOrigin) {
|
|
8597
8483
|
options.mode = 'cors'; // TODO: not sure how to translate image.crossOrigin
|
|
8598
8484
|
}
|
|
8599
|
-
|
|
8600
8485
|
fetch(url, options).then(function (response) {
|
|
8601
8486
|
if (!response.ok) {
|
|
8602
8487
|
throw response;
|
|
@@ -9279,13 +9164,11 @@ function createTextures(gl, textureOptions, callback) {
|
|
|
9279
9164
|
/*!**************************!*\
|
|
9280
9165
|
!*** ./src/twgl-full.js ***!
|
|
9281
9166
|
\**************************/
|
|
9282
|
-
|
|
9283
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9167
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9284
9168
|
|
|
9285
|
-
"use strict";
|
|
9286
9169
|
|
|
9287
9170
|
|
|
9288
|
-
function _typeof(
|
|
9171
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9289
9172
|
exports.__esModule = true;
|
|
9290
9173
|
var _exportNames = {
|
|
9291
9174
|
m4: true,
|
|
@@ -9306,8 +9189,8 @@ Object.keys(_twgl).forEach(function (key) {
|
|
|
9306
9189
|
if (key in exports && exports[key] === _twgl[key]) return;
|
|
9307
9190
|
exports[key] = _twgl[key];
|
|
9308
9191
|
});
|
|
9309
|
-
function _getRequireWildcardCache(
|
|
9310
|
-
function _interopRequireWildcard(
|
|
9192
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
9193
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
9311
9194
|
|
|
9312
9195
|
/***/ }),
|
|
9313
9196
|
|
|
@@ -9315,13 +9198,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
9315
9198
|
/*!*********************!*\
|
|
9316
9199
|
!*** ./src/twgl.js ***!
|
|
9317
9200
|
\*********************/
|
|
9318
|
-
|
|
9319
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9201
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9320
9202
|
|
|
9321
|
-
"use strict";
|
|
9322
9203
|
|
|
9323
9204
|
|
|
9324
|
-
function _typeof(
|
|
9205
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9325
9206
|
exports.__esModule = true;
|
|
9326
9207
|
var _exportNames = {
|
|
9327
9208
|
addExtensionsToContext: true,
|
|
@@ -9411,8 +9292,8 @@ Object.keys(vertexArrays).forEach(function (key) {
|
|
|
9411
9292
|
if (key in exports && exports[key] === vertexArrays[key]) return;
|
|
9412
9293
|
exports[key] = vertexArrays[key];
|
|
9413
9294
|
});
|
|
9414
|
-
function _getRequireWildcardCache(
|
|
9415
|
-
function _interopRequireWildcard(
|
|
9295
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
9296
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
9416
9297
|
/*
|
|
9417
9298
|
* Copyright 2019 Gregg Tavares
|
|
9418
9299
|
*
|
|
@@ -9545,7 +9426,6 @@ function setDefaults(newDefaults) {
|
|
|
9545
9426
|
attributes.setAttributeDefaults_(newDefaults); // eslint-disable-line
|
|
9546
9427
|
textures.setTextureDefaults_(newDefaults); // eslint-disable-line
|
|
9547
9428
|
}
|
|
9548
|
-
|
|
9549
9429
|
var prefixRE = /^(.*?)_/;
|
|
9550
9430
|
function addExtensionToContext(gl, extensionName) {
|
|
9551
9431
|
utils.glEnumToString(gl, 0);
|
|
@@ -9768,16 +9648,25 @@ function resizeCanvasToDisplaySize(canvas, multiplier) {
|
|
|
9768
9648
|
return false;
|
|
9769
9649
|
}
|
|
9770
9650
|
|
|
9651
|
+
// function notPrivate(name) {
|
|
9652
|
+
// return name[name.length - 1] !== '_';
|
|
9653
|
+
// }
|
|
9654
|
+
//
|
|
9655
|
+
// function copyPublicProperties(src, dst) {
|
|
9656
|
+
// Object.keys(src).filter(notPrivate).forEach(function(key) {
|
|
9657
|
+
// dst[key] = src[key];
|
|
9658
|
+
// });
|
|
9659
|
+
// return dst;
|
|
9660
|
+
// }
|
|
9661
|
+
|
|
9771
9662
|
/***/ }),
|
|
9772
9663
|
|
|
9773
9664
|
/***/ "./src/typedarrays.js":
|
|
9774
9665
|
/*!****************************!*\
|
|
9775
9666
|
!*** ./src/typedarrays.js ***!
|
|
9776
9667
|
\****************************/
|
|
9777
|
-
|
|
9778
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9668
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
9779
9669
|
|
|
9780
|
-
"use strict";
|
|
9781
9670
|
|
|
9782
9671
|
|
|
9783
9672
|
exports.__esModule = true;
|
|
@@ -9946,12 +9835,11 @@ function getTypedArrayTypeForGLType(type) {
|
|
|
9946
9835
|
}
|
|
9947
9836
|
return CTOR;
|
|
9948
9837
|
}
|
|
9949
|
-
var isArrayBuffer = typeof SharedArrayBuffer !== 'undefined' ? function isArrayBufferOrSharedArrayBuffer(a) {
|
|
9838
|
+
var isArrayBuffer = exports.isArrayBuffer = typeof SharedArrayBuffer !== 'undefined' ? function isArrayBufferOrSharedArrayBuffer(a) {
|
|
9950
9839
|
return a && a.buffer && (a.buffer instanceof ArrayBuffer || a.buffer instanceof SharedArrayBuffer);
|
|
9951
9840
|
} : function isArrayBuffer(a) {
|
|
9952
9841
|
return a && a.buffer && a.buffer instanceof ArrayBuffer;
|
|
9953
9842
|
};
|
|
9954
|
-
exports.isArrayBuffer = isArrayBuffer;
|
|
9955
9843
|
|
|
9956
9844
|
/***/ }),
|
|
9957
9845
|
|
|
@@ -9959,10 +9847,8 @@ exports.isArrayBuffer = isArrayBuffer;
|
|
|
9959
9847
|
/*!**********************!*\
|
|
9960
9848
|
!*** ./src/utils.js ***!
|
|
9961
9849
|
\**********************/
|
|
9962
|
-
|
|
9963
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9850
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
9964
9851
|
|
|
9965
|
-
"use strict";
|
|
9966
9852
|
|
|
9967
9853
|
|
|
9968
9854
|
exports.__esModule = true;
|
|
@@ -10078,7 +9964,7 @@ function isWebGL1(gl) {
|
|
|
10078
9964
|
* @memberOf module:twgl
|
|
10079
9965
|
* @function glEnumToString
|
|
10080
9966
|
*/
|
|
10081
|
-
var glEnumToString = function () {
|
|
9967
|
+
var glEnumToString = exports.glEnumToString = function () {
|
|
10082
9968
|
var haveEnumsForType = {};
|
|
10083
9969
|
var enums = {};
|
|
10084
9970
|
function addEnums(gl) {
|
|
@@ -10098,7 +9984,6 @@ var glEnumToString = function () {
|
|
|
10098
9984
|
return enums[value] || (typeof value === 'number' ? "0x".concat(value.toString(16)) : value);
|
|
10099
9985
|
};
|
|
10100
9986
|
}();
|
|
10101
|
-
exports.glEnumToString = glEnumToString;
|
|
10102
9987
|
|
|
10103
9988
|
/***/ }),
|
|
10104
9989
|
|
|
@@ -10106,10 +9991,8 @@ exports.glEnumToString = glEnumToString;
|
|
|
10106
9991
|
/*!*******************!*\
|
|
10107
9992
|
!*** ./src/v3.js ***!
|
|
10108
9993
|
\*******************/
|
|
10109
|
-
|
|
10110
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9994
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10111
9995
|
|
|
10112
|
-
"use strict";
|
|
10113
9996
|
|
|
10114
9997
|
|
|
10115
9998
|
exports.__esModule = true;
|
|
@@ -10536,20 +10419,18 @@ function divide(a, b, dst) {
|
|
|
10536
10419
|
/*!******************************!*\
|
|
10537
10420
|
!*** ./src/vertex-arrays.js ***!
|
|
10538
10421
|
\******************************/
|
|
10539
|
-
|
|
10540
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
10422
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
10541
10423
|
|
|
10542
|
-
"use strict";
|
|
10543
10424
|
|
|
10544
10425
|
|
|
10545
|
-
function _typeof(
|
|
10426
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10546
10427
|
exports.__esModule = true;
|
|
10547
10428
|
exports.createVAOAndSetAttributes = createVAOAndSetAttributes;
|
|
10548
10429
|
exports.createVAOFromBufferInfo = createVAOFromBufferInfo;
|
|
10549
10430
|
exports.createVertexArrayInfo = createVertexArrayInfo;
|
|
10550
10431
|
var programs = _interopRequireWildcard(__webpack_require__(/*! ./programs.js */ "./src/programs.js"));
|
|
10551
|
-
function _getRequireWildcardCache(
|
|
10552
|
-
function _interopRequireWildcard(
|
|
10432
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10433
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
10553
10434
|
/*
|
|
10554
10435
|
* Copyright 2019 Gregg Tavares
|
|
10555
10436
|
*
|
|
@@ -10695,6 +10576,41 @@ function createVAOFromBufferInfo(gl, programInfo, bufferInfo) {
|
|
|
10695
10576
|
|
|
10696
10577
|
/***/ })
|
|
10697
10578
|
|
|
10698
|
-
/******/
|
|
10579
|
+
/******/ });
|
|
10580
|
+
/************************************************************************/
|
|
10581
|
+
/******/ // The module cache
|
|
10582
|
+
/******/ var __webpack_module_cache__ = {};
|
|
10583
|
+
/******/
|
|
10584
|
+
/******/ // The require function
|
|
10585
|
+
/******/ function __webpack_require__(moduleId) {
|
|
10586
|
+
/******/ // Check if module is in cache
|
|
10587
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
10588
|
+
/******/ if (cachedModule !== undefined) {
|
|
10589
|
+
/******/ return cachedModule.exports;
|
|
10590
|
+
/******/ }
|
|
10591
|
+
/******/ // Create a new module (and put it into the cache)
|
|
10592
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
10593
|
+
/******/ // no module.id needed
|
|
10594
|
+
/******/ // no module.loaded needed
|
|
10595
|
+
/******/ exports: {}
|
|
10596
|
+
/******/ };
|
|
10597
|
+
/******/
|
|
10598
|
+
/******/ // Execute the module function
|
|
10599
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
10600
|
+
/******/
|
|
10601
|
+
/******/ // Return the exports of the module
|
|
10602
|
+
/******/ return module.exports;
|
|
10603
|
+
/******/ }
|
|
10604
|
+
/******/
|
|
10605
|
+
/************************************************************************/
|
|
10606
|
+
/******/
|
|
10607
|
+
/******/ // startup
|
|
10608
|
+
/******/ // Load entry module and return exports
|
|
10609
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
10610
|
+
/******/ var __webpack_exports__ = __webpack_require__("./src/twgl-full.js");
|
|
10611
|
+
/******/
|
|
10612
|
+
/******/ return __webpack_exports__;
|
|
10613
|
+
/******/ })()
|
|
10614
|
+
;
|
|
10699
10615
|
});
|
|
10700
10616
|
//# sourceMappingURL=twgl-full.js.map
|