@luma.gl/engine 8.5.10 → 8.5.13
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/dist.js +1832 -1870
- package/dist/dist.min.js +1 -1
- package/dist/es5/bundle.js +2 -4
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/lib/animation-loop.js +1 -1
- package/dist/es5/lib/animation-loop.js.map +1 -1
- package/dist/esm/bundle.js +2 -4
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/lib/animation-loop.js +1 -1
- package/dist/esm/lib/animation-loop.js.map +1 -1
- package/package.json +7 -6
- package/src/bundle.js +2 -3
- package/src/lib/animation-loop.js +1 -1
package/dist/dist.js
CHANGED
|
@@ -96,54 +96,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
-
/***/ "../../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
|
|
100
|
-
/*!***********************************************************************************************!*\
|
|
101
|
-
!*** /Users/alasarr/dev/luma.gl/node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
|
102
|
-
\***********************************************************************************************/
|
|
103
|
-
/*! no static exports found */
|
|
104
|
-
/***/ (function(module, exports) {
|
|
105
|
-
|
|
106
|
-
function _interopRequireDefault(obj) {
|
|
107
|
-
return obj && obj.__esModule ? obj : {
|
|
108
|
-
"default": obj
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
module.exports = _interopRequireDefault;
|
|
113
|
-
|
|
114
|
-
/***/ }),
|
|
115
|
-
|
|
116
|
-
/***/ "../../node_modules/@babel/runtime/helpers/typeof.js":
|
|
117
|
-
/*!********************************************************************************!*\
|
|
118
|
-
!*** /Users/alasarr/dev/luma.gl/node_modules/@babel/runtime/helpers/typeof.js ***!
|
|
119
|
-
\********************************************************************************/
|
|
120
|
-
/*! no static exports found */
|
|
121
|
-
/***/ (function(module, exports) {
|
|
122
|
-
|
|
123
|
-
function _typeof(obj) {
|
|
124
|
-
"@babel/helpers - typeof";
|
|
125
|
-
|
|
126
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
127
|
-
module.exports = _typeof = function _typeof(obj) {
|
|
128
|
-
return typeof obj;
|
|
129
|
-
};
|
|
130
|
-
} else {
|
|
131
|
-
module.exports = _typeof = function _typeof(obj) {
|
|
132
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return _typeof(obj);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
module.exports = _typeof;
|
|
140
|
-
|
|
141
|
-
/***/ }),
|
|
142
|
-
|
|
143
99
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/base/math-array.js":
|
|
144
|
-
|
|
145
|
-
!*** /Users/
|
|
146
|
-
|
|
100
|
+
/*!**************************************************************************************************!*\
|
|
101
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/base/math-array.js ***!
|
|
102
|
+
\**************************************************************************************************/
|
|
147
103
|
/*! exports provided: default */
|
|
148
104
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
149
105
|
|
|
@@ -422,9 +378,9 @@ class MathArray extends _extendableBuiltin(Array) {
|
|
|
422
378
|
/***/ }),
|
|
423
379
|
|
|
424
380
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/base/matrix.js":
|
|
425
|
-
|
|
426
|
-
!*** /Users/
|
|
427
|
-
|
|
381
|
+
/*!**********************************************************************************************!*\
|
|
382
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/base/matrix.js ***!
|
|
383
|
+
\**********************************************************************************************/
|
|
428
384
|
/*! exports provided: default */
|
|
429
385
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
430
386
|
|
|
@@ -512,9 +468,9 @@ class Matrix extends _math_array__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
512
468
|
/***/ }),
|
|
513
469
|
|
|
514
470
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/base/vector.js":
|
|
515
|
-
|
|
516
|
-
!*** /Users/
|
|
517
|
-
|
|
471
|
+
/*!**********************************************************************************************!*\
|
|
472
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/base/vector.js ***!
|
|
473
|
+
\**********************************************************************************************/
|
|
518
474
|
/*! exports provided: default */
|
|
519
475
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
520
476
|
|
|
@@ -678,9 +634,9 @@ class Vector extends _math_array__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
678
634
|
/***/ }),
|
|
679
635
|
|
|
680
636
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/euler.js":
|
|
681
|
-
|
|
682
|
-
!*** /Users/
|
|
683
|
-
|
|
637
|
+
/*!****************************************************************************************!*\
|
|
638
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/euler.js ***!
|
|
639
|
+
\****************************************************************************************/
|
|
684
640
|
/*! exports provided: default */
|
|
685
641
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
686
642
|
|
|
@@ -1239,9 +1195,9 @@ class Euler extends _base_math_array__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
1239
1195
|
/***/ }),
|
|
1240
1196
|
|
|
1241
1197
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/matrix3.js":
|
|
1242
|
-
|
|
1243
|
-
!*** /Users/
|
|
1244
|
-
|
|
1198
|
+
/*!******************************************************************************************!*\
|
|
1199
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/matrix3.js ***!
|
|
1200
|
+
\******************************************************************************************/
|
|
1245
1201
|
/*! exports provided: default */
|
|
1246
1202
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1247
1203
|
|
|
@@ -1442,9 +1398,9 @@ class Matrix3 extends _base_matrix__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
1442
1398
|
/***/ }),
|
|
1443
1399
|
|
|
1444
1400
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/matrix4.js":
|
|
1445
|
-
|
|
1446
|
-
!*** /Users/
|
|
1447
|
-
|
|
1401
|
+
/*!******************************************************************************************!*\
|
|
1402
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/matrix4.js ***!
|
|
1403
|
+
\******************************************************************************************/
|
|
1448
1404
|
/*! exports provided: default */
|
|
1449
1405
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1450
1406
|
|
|
@@ -1917,9 +1873,9 @@ class Matrix4 extends _base_matrix__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
|
1917
1873
|
/***/ }),
|
|
1918
1874
|
|
|
1919
1875
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/pose.js":
|
|
1920
|
-
|
|
1921
|
-
!*** /Users/
|
|
1922
|
-
|
|
1876
|
+
/*!***************************************************************************************!*\
|
|
1877
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/pose.js ***!
|
|
1878
|
+
\***************************************************************************************/
|
|
1923
1879
|
/*! exports provided: default */
|
|
1924
1880
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1925
1881
|
|
|
@@ -2053,9 +2009,9 @@ class Pose {
|
|
|
2053
2009
|
/***/ }),
|
|
2054
2010
|
|
|
2055
2011
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/quaternion.js":
|
|
2056
|
-
|
|
2057
|
-
!*** /Users/
|
|
2058
|
-
|
|
2012
|
+
/*!*********************************************************************************************!*\
|
|
2013
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/quaternion.js ***!
|
|
2014
|
+
\*********************************************************************************************/
|
|
2059
2015
|
/*! exports provided: default */
|
|
2060
2016
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2061
2017
|
|
|
@@ -2301,9 +2257,9 @@ class Quaternion extends _base_math_array__WEBPACK_IMPORTED_MODULE_0__["default"
|
|
|
2301
2257
|
/***/ }),
|
|
2302
2258
|
|
|
2303
2259
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/spherical-coordinates.js":
|
|
2304
|
-
|
|
2305
|
-
!*** /Users/
|
|
2306
|
-
|
|
2260
|
+
/*!********************************************************************************************************!*\
|
|
2261
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/spherical-coordinates.js ***!
|
|
2262
|
+
\********************************************************************************************************/
|
|
2307
2263
|
/*! exports provided: default */
|
|
2308
2264
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2309
2265
|
|
|
@@ -2462,9 +2418,9 @@ class SphericalCoordinates {
|
|
|
2462
2418
|
/***/ }),
|
|
2463
2419
|
|
|
2464
2420
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/vector2.js":
|
|
2465
|
-
|
|
2466
|
-
!*** /Users/
|
|
2467
|
-
|
|
2421
|
+
/*!******************************************************************************************!*\
|
|
2422
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/vector2.js ***!
|
|
2423
|
+
\******************************************************************************************/
|
|
2468
2424
|
/*! exports provided: default */
|
|
2469
2425
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2470
2426
|
|
|
@@ -2574,9 +2530,9 @@ class Vector2 extends _base_vector__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2574
2530
|
/***/ }),
|
|
2575
2531
|
|
|
2576
2532
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/vector3.js":
|
|
2577
|
-
|
|
2578
|
-
!*** /Users/
|
|
2579
|
-
|
|
2533
|
+
/*!******************************************************************************************!*\
|
|
2534
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/vector3.js ***!
|
|
2535
|
+
\******************************************************************************************/
|
|
2580
2536
|
/*! exports provided: default */
|
|
2581
2537
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2582
2538
|
|
|
@@ -2732,9 +2688,9 @@ class Vector3 extends _base_vector__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2732
2688
|
/***/ }),
|
|
2733
2689
|
|
|
2734
2690
|
/***/ "../../node_modules/@math.gl/core/dist/esm/classes/vector4.js":
|
|
2735
|
-
|
|
2736
|
-
!*** /Users/
|
|
2737
|
-
|
|
2691
|
+
/*!******************************************************************************************!*\
|
|
2692
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/classes/vector4.js ***!
|
|
2693
|
+
\******************************************************************************************/
|
|
2738
2694
|
/*! exports provided: default */
|
|
2739
2695
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2740
2696
|
|
|
@@ -2867,9 +2823,9 @@ class Vector4 extends _base_vector__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2867
2823
|
/***/ }),
|
|
2868
2824
|
|
|
2869
2825
|
/***/ "../../node_modules/@math.gl/core/dist/esm/index.js":
|
|
2870
|
-
|
|
2871
|
-
!*** /Users/
|
|
2872
|
-
|
|
2826
|
+
/*!********************************************************************************!*\
|
|
2827
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/index.js ***!
|
|
2828
|
+
\********************************************************************************/
|
|
2873
2829
|
/*! exports provided: Vector2, Vector3, Vector4, Matrix3, Matrix4, Quaternion, config, configure, formatValue, isArray, clone, equals, exactEquals, toRadians, toDegrees, radians, degrees, sin, cos, tan, asin, acos, atan, clamp, lerp, withEpsilon, checkNumber, _MathUtils, SphericalCoordinates, Pose, Euler, assert, _SphericalCoordinates, _Pose, _Euler */
|
|
2874
2830
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2875
2831
|
|
|
@@ -2990,9 +2946,9 @@ global_.mathgl = {
|
|
|
2990
2946
|
/***/ }),
|
|
2991
2947
|
|
|
2992
2948
|
/***/ "../../node_modules/@math.gl/core/dist/esm/lib/assert.js":
|
|
2993
|
-
|
|
2994
|
-
!*** /Users/
|
|
2995
|
-
|
|
2949
|
+
/*!*************************************************************************************!*\
|
|
2950
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/lib/assert.js ***!
|
|
2951
|
+
\*************************************************************************************/
|
|
2996
2952
|
/*! exports provided: default */
|
|
2997
2953
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2998
2954
|
|
|
@@ -3009,9 +2965,9 @@ function assert(condition, message) {
|
|
|
3009
2965
|
/***/ }),
|
|
3010
2966
|
|
|
3011
2967
|
/***/ "../../node_modules/@math.gl/core/dist/esm/lib/common.js":
|
|
3012
|
-
|
|
3013
|
-
!*** /Users/
|
|
3014
|
-
|
|
2968
|
+
/*!*************************************************************************************!*\
|
|
2969
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/lib/common.js ***!
|
|
2970
|
+
\*************************************************************************************/
|
|
3015
2971
|
/*! exports provided: config, configure, formatValue, isArray, clone, toRadians, toDegrees, radians, degrees, sin, cos, tan, asin, acos, atan, clamp, lerp, equals, exactEquals, withEpsilon */
|
|
3016
2972
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3017
2973
|
|
|
@@ -3226,9 +3182,9 @@ function withEpsilon(EPSILON, func) {
|
|
|
3226
3182
|
/***/ }),
|
|
3227
3183
|
|
|
3228
3184
|
/***/ "../../node_modules/@math.gl/core/dist/esm/lib/gl-matrix-extras.js":
|
|
3229
|
-
|
|
3230
|
-
!*** /Users/
|
|
3231
|
-
|
|
3185
|
+
/*!***********************************************************************************************!*\
|
|
3186
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/lib/gl-matrix-extras.js ***!
|
|
3187
|
+
\***********************************************************************************************/
|
|
3232
3188
|
/*! exports provided: vec2_transformMat4AsVector, vec3_transformMat4AsVector, vec3_transformMat2, vec4_transformMat2, vec4_transformMat3 */
|
|
3233
3189
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3234
3190
|
|
|
@@ -3289,9 +3245,9 @@ function vec4_transformMat3(out, a, m) {
|
|
|
3289
3245
|
/***/ }),
|
|
3290
3246
|
|
|
3291
3247
|
/***/ "../../node_modules/@math.gl/core/dist/esm/lib/math-utils.js":
|
|
3292
|
-
|
|
3293
|
-
!*** /Users/
|
|
3294
|
-
|
|
3248
|
+
/*!*****************************************************************************************!*\
|
|
3249
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/lib/math-utils.js ***!
|
|
3250
|
+
\*****************************************************************************************/
|
|
3295
3251
|
/*! exports provided: default */
|
|
3296
3252
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3297
3253
|
|
|
@@ -3328,9 +3284,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3328
3284
|
/***/ }),
|
|
3329
3285
|
|
|
3330
3286
|
/***/ "../../node_modules/@math.gl/core/dist/esm/lib/validators.js":
|
|
3331
|
-
|
|
3332
|
-
!*** /Users/
|
|
3333
|
-
|
|
3287
|
+
/*!*****************************************************************************************!*\
|
|
3288
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@math.gl/core/dist/esm/lib/validators.js ***!
|
|
3289
|
+
\*****************************************************************************************/
|
|
3334
3290
|
/*! exports provided: validateVector, checkNumber, checkVector, deprecated */
|
|
3335
3291
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3336
3292
|
|
|
@@ -3380,435 +3336,690 @@ function deprecated(method, version) {
|
|
|
3380
3336
|
|
|
3381
3337
|
/***/ }),
|
|
3382
3338
|
|
|
3383
|
-
/***/ "../../node_modules/@probe.gl/
|
|
3384
|
-
|
|
3385
|
-
!*** /Users/
|
|
3386
|
-
|
|
3387
|
-
/*! exports provided:
|
|
3339
|
+
/***/ "../../node_modules/@probe.gl/env/dist/esm/index.js":
|
|
3340
|
+
/*!********************************************************************************!*\
|
|
3341
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/env/dist/esm/index.js ***!
|
|
3342
|
+
\********************************************************************************/
|
|
3343
|
+
/*! exports provided: VERSION, self, window, global, document, process, console, isBrowser, isBrowserMainThread, getBrowser, isMobile, isElectron, assert */
|
|
3388
3344
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3389
3345
|
|
|
3390
3346
|
"use strict";
|
|
3391
3347
|
__webpack_require__.r(__webpack_exports__);
|
|
3392
|
-
/* harmony import */ var
|
|
3393
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
3394
|
-
|
|
3395
|
-
/* harmony import */ var _lib_stat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
3396
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stat", function() { return _lib_stat__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
3397
|
-
|
|
3398
|
-
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
3399
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
|
3400
|
-
|
|
3348
|
+
/* harmony import */ var _utils_globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/globals */ "../../node_modules/@probe.gl/env/dist/esm/utils/globals.js");
|
|
3349
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return _utils_globals__WEBPACK_IMPORTED_MODULE_0__["VERSION"]; });
|
|
3401
3350
|
|
|
3351
|
+
/* harmony import */ var _lib_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/globals */ "../../node_modules/@probe.gl/env/dist/esm/lib/globals.js");
|
|
3352
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "self", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["self"]; });
|
|
3402
3353
|
|
|
3354
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["window"]; });
|
|
3403
3355
|
|
|
3404
|
-
|
|
3356
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "global", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["global"]; });
|
|
3405
3357
|
|
|
3406
|
-
|
|
3358
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "document", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["document"]; });
|
|
3407
3359
|
|
|
3408
|
-
|
|
3409
|
-
/*!************************************************************************************!*\
|
|
3410
|
-
!*** /Users/alasarr/dev/luma.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js ***!
|
|
3411
|
-
\************************************************************************************/
|
|
3412
|
-
/*! exports provided: default */
|
|
3413
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3360
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "process", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["process"]; });
|
|
3414
3361
|
|
|
3415
|
-
"
|
|
3416
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3417
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stat; });
|
|
3418
|
-
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
3362
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "console", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["console"]; });
|
|
3419
3363
|
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
this.name = name;
|
|
3423
|
-
this.type = type;
|
|
3424
|
-
this.sampleSize = 1;
|
|
3425
|
-
this.reset();
|
|
3426
|
-
}
|
|
3364
|
+
/* harmony import */ var _lib_is_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/is-browser */ "../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js");
|
|
3365
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return _lib_is_browser__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
|
3427
3366
|
|
|
3428
|
-
|
|
3429
|
-
this.sampleSize = samples;
|
|
3430
|
-
return this;
|
|
3431
|
-
}
|
|
3367
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBrowserMainThread", function() { return _lib_is_browser__WEBPACK_IMPORTED_MODULE_2__["isBrowserMainThread"]; });
|
|
3432
3368
|
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
return this;
|
|
3436
|
-
}
|
|
3369
|
+
/* harmony import */ var _lib_get_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/get-browser */ "../../node_modules/@probe.gl/env/dist/esm/lib/get-browser.js");
|
|
3370
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBrowser", function() { return _lib_get_browser__WEBPACK_IMPORTED_MODULE_3__["default"]; });
|
|
3437
3371
|
|
|
3438
|
-
|
|
3439
|
-
this.subtractCount(1);
|
|
3440
|
-
return this;
|
|
3441
|
-
}
|
|
3372
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return _lib_get_browser__WEBPACK_IMPORTED_MODULE_3__["isMobile"]; });
|
|
3442
3373
|
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
this._samples++;
|
|
3374
|
+
/* harmony import */ var _lib_is_electron__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/is-electron */ "../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js");
|
|
3375
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isElectron", function() { return _lib_is_electron__WEBPACK_IMPORTED_MODULE_4__["default"]; });
|
|
3446
3376
|
|
|
3447
|
-
|
|
3377
|
+
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/assert */ "../../node_modules/@probe.gl/env/dist/esm/utils/assert.js");
|
|
3378
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assert", function() { return _utils_assert__WEBPACK_IMPORTED_MODULE_5__["default"]; });
|
|
3448
3379
|
|
|
3449
|
-
return this;
|
|
3450
|
-
}
|
|
3451
3380
|
|
|
3452
|
-
subtractCount(value) {
|
|
3453
|
-
this._count -= value;
|
|
3454
|
-
this._samples++;
|
|
3455
3381
|
|
|
3456
|
-
this._checkSampling();
|
|
3457
3382
|
|
|
3458
|
-
return this;
|
|
3459
|
-
}
|
|
3460
3383
|
|
|
3461
|
-
addTime(time) {
|
|
3462
|
-
this._time += time;
|
|
3463
|
-
this.lastTiming = time;
|
|
3464
|
-
this._samples++;
|
|
3465
3384
|
|
|
3466
|
-
this._checkSampling();
|
|
3467
3385
|
|
|
3468
|
-
|
|
3469
|
-
}
|
|
3386
|
+
//# sourceMappingURL=index.js.map
|
|
3470
3387
|
|
|
3471
|
-
|
|
3472
|
-
this._startTime = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
3473
|
-
this._timerPending = true;
|
|
3474
|
-
return this;
|
|
3475
|
-
}
|
|
3388
|
+
/***/ }),
|
|
3476
3389
|
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3390
|
+
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/get-browser.js":
|
|
3391
|
+
/*!******************************************************************************************!*\
|
|
3392
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/get-browser.js ***!
|
|
3393
|
+
\******************************************************************************************/
|
|
3394
|
+
/*! exports provided: isMobile, default */
|
|
3395
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3481
3396
|
|
|
3482
|
-
|
|
3483
|
-
|
|
3397
|
+
"use strict";
|
|
3398
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3399
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
|
3400
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getBrowser; });
|
|
3401
|
+
/* harmony import */ var _is_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-browser */ "../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js");
|
|
3402
|
+
/* harmony import */ var _is_electron__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-electron */ "../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js");
|
|
3484
3403
|
|
|
3485
|
-
this._checkSampling();
|
|
3486
3404
|
|
|
3487
|
-
|
|
3405
|
+
const window = globalThis;
|
|
3406
|
+
function isMobile() {
|
|
3407
|
+
return typeof window.orientation !== 'undefined';
|
|
3408
|
+
}
|
|
3409
|
+
function getBrowser(mockUserAgent) {
|
|
3410
|
+
if (!mockUserAgent && !Object(_is_browser__WEBPACK_IMPORTED_MODULE_0__["default"])()) {
|
|
3411
|
+
return 'Node';
|
|
3488
3412
|
}
|
|
3489
3413
|
|
|
3490
|
-
|
|
3491
|
-
return
|
|
3414
|
+
if (Object(_is_electron__WEBPACK_IMPORTED_MODULE_1__["default"])(mockUserAgent)) {
|
|
3415
|
+
return 'Electron';
|
|
3492
3416
|
}
|
|
3493
3417
|
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
}
|
|
3418
|
+
const navigator_ = typeof navigator !== 'undefined' ? navigator : {};
|
|
3419
|
+
const userAgent = mockUserAgent || navigator_.userAgent || '';
|
|
3497
3420
|
|
|
3498
|
-
|
|
3499
|
-
return
|
|
3421
|
+
if (userAgent.indexOf('Edge') > -1) {
|
|
3422
|
+
return 'Edge';
|
|
3500
3423
|
}
|
|
3501
3424
|
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
}
|
|
3425
|
+
const isMSIE = userAgent.indexOf('MSIE ') !== -1;
|
|
3426
|
+
const isTrident = userAgent.indexOf('Trident/') !== -1;
|
|
3505
3427
|
|
|
3506
|
-
|
|
3507
|
-
return
|
|
3428
|
+
if (isMSIE || isTrident) {
|
|
3429
|
+
return 'IE';
|
|
3508
3430
|
}
|
|
3509
3431
|
|
|
3510
|
-
|
|
3511
|
-
return
|
|
3432
|
+
if (window.chrome) {
|
|
3433
|
+
return 'Chrome';
|
|
3512
3434
|
}
|
|
3513
3435
|
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
this.count = 0;
|
|
3517
|
-
this.samples = 0;
|
|
3518
|
-
this.lastTiming = 0;
|
|
3519
|
-
this.lastSampleTime = 0;
|
|
3520
|
-
this.lastSampleCount = 0;
|
|
3521
|
-
this._count = 0;
|
|
3522
|
-
this._time = 0;
|
|
3523
|
-
this._samples = 0;
|
|
3524
|
-
this._startTime = 0;
|
|
3525
|
-
this._timerPending = false;
|
|
3526
|
-
return this;
|
|
3436
|
+
if (window.safari) {
|
|
3437
|
+
return 'Safari';
|
|
3527
3438
|
}
|
|
3528
3439
|
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
this.lastSampleTime = this._time;
|
|
3532
|
-
this.lastSampleCount = this._count;
|
|
3533
|
-
this.count += this._count;
|
|
3534
|
-
this.time += this._time;
|
|
3535
|
-
this.samples += this._samples;
|
|
3536
|
-
this._time = 0;
|
|
3537
|
-
this._count = 0;
|
|
3538
|
-
this._samples = 0;
|
|
3539
|
-
}
|
|
3440
|
+
if (window.mozInnerScreenX) {
|
|
3441
|
+
return 'Firefox';
|
|
3540
3442
|
}
|
|
3541
3443
|
|
|
3444
|
+
return 'Unknown';
|
|
3542
3445
|
}
|
|
3543
|
-
//# sourceMappingURL=
|
|
3446
|
+
//# sourceMappingURL=get-browser.js.map
|
|
3544
3447
|
|
|
3545
3448
|
/***/ }),
|
|
3546
3449
|
|
|
3547
|
-
/***/ "../../node_modules/@probe.gl/
|
|
3548
|
-
|
|
3549
|
-
!*** /Users/
|
|
3550
|
-
|
|
3551
|
-
/*! exports provided:
|
|
3450
|
+
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/globals.js":
|
|
3451
|
+
/*!**************************************************************************************!*\
|
|
3452
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/globals.js ***!
|
|
3453
|
+
\**************************************************************************************/
|
|
3454
|
+
/*! exports provided: self, window, global, document, process, console */
|
|
3552
3455
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3553
3456
|
|
|
3554
3457
|
"use strict";
|
|
3555
3458
|
__webpack_require__.r(__webpack_exports__);
|
|
3556
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3557
|
-
/* harmony
|
|
3459
|
+
/* WEBPACK VAR INJECTION */(function(global, process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "self", function() { return self_; });
|
|
3460
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window_; });
|
|
3461
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "global", function() { return global_; });
|
|
3462
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "document", function() { return document_; });
|
|
3463
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "process", function() { return process_; });
|
|
3464
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "console", function() { return console_; });
|
|
3465
|
+
const globals = {
|
|
3466
|
+
self: typeof self !== 'undefined' && self,
|
|
3467
|
+
window: typeof window !== 'undefined' && window,
|
|
3468
|
+
global: typeof global !== 'undefined' && global,
|
|
3469
|
+
document: typeof document !== 'undefined' && document,
|
|
3470
|
+
process: typeof process === 'object' && process
|
|
3471
|
+
};
|
|
3472
|
+
const global_ = globalThis;
|
|
3473
|
+
const self_ = globals.self || globals.window || globals.global;
|
|
3474
|
+
const window_ = globals.window || globals.self || globals.global;
|
|
3475
|
+
const document_ = globals.document || {};
|
|
3476
|
+
const process_ = globals.process || {};
|
|
3477
|
+
const console_ = console;
|
|
3558
3478
|
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
id,
|
|
3562
|
-
stats
|
|
3563
|
-
}) {
|
|
3564
|
-
this.id = id;
|
|
3565
|
-
this.stats = {};
|
|
3566
|
-
|
|
3567
|
-
this._initializeStats(stats);
|
|
3479
|
+
//# sourceMappingURL=globals.js.map
|
|
3480
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
3568
3481
|
|
|
3569
|
-
|
|
3570
|
-
}
|
|
3482
|
+
/***/ }),
|
|
3571
3483
|
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3484
|
+
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js":
|
|
3485
|
+
/*!*****************************************************************************************!*\
|
|
3486
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/is-browser.js ***!
|
|
3487
|
+
\*****************************************************************************************/
|
|
3488
|
+
/*! exports provided: default, isBrowserMainThread */
|
|
3489
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3578
3490
|
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3491
|
+
"use strict";
|
|
3492
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3493
|
+
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isBrowser; });
|
|
3494
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserMainThread", function() { return isBrowserMainThread; });
|
|
3495
|
+
/* harmony import */ var _is_electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-electron */ "../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js");
|
|
3582
3496
|
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3497
|
+
function isBrowser() {
|
|
3498
|
+
const isNode = typeof process === 'object' && String(process) === '[object process]' && !process.browser;
|
|
3499
|
+
return !isNode || Object(_is_electron__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
3500
|
+
}
|
|
3501
|
+
function isBrowserMainThread() {
|
|
3502
|
+
return isBrowser() && typeof document !== 'undefined';
|
|
3503
|
+
}
|
|
3504
|
+
//# sourceMappingURL=is-browser.js.map
|
|
3505
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
3587
3506
|
|
|
3588
|
-
|
|
3589
|
-
}
|
|
3507
|
+
/***/ }),
|
|
3590
3508
|
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3509
|
+
/***/ "../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js":
|
|
3510
|
+
/*!******************************************************************************************!*\
|
|
3511
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/env/dist/esm/lib/is-electron.js ***!
|
|
3512
|
+
\******************************************************************************************/
|
|
3513
|
+
/*! exports provided: default */
|
|
3514
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3596
3515
|
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
average: stat.getAverageTime() || 0,
|
|
3604
|
-
hz: stat.getHz() || 0
|
|
3605
|
-
};
|
|
3606
|
-
});
|
|
3607
|
-
return table;
|
|
3516
|
+
"use strict";
|
|
3517
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3518
|
+
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isElectron; });
|
|
3519
|
+
function isElectron(mockUserAgent) {
|
|
3520
|
+
if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {
|
|
3521
|
+
return true;
|
|
3608
3522
|
}
|
|
3609
3523
|
|
|
3610
|
-
|
|
3611
|
-
|
|
3524
|
+
if (typeof process !== 'undefined' && typeof process.versions === 'object' && Boolean(process.versions.electron)) {
|
|
3525
|
+
return true;
|
|
3612
3526
|
}
|
|
3613
3527
|
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
return null;
|
|
3617
|
-
}
|
|
3618
|
-
|
|
3619
|
-
const {
|
|
3620
|
-
name,
|
|
3621
|
-
type
|
|
3622
|
-
} = stat;
|
|
3623
|
-
|
|
3624
|
-
if (!this.stats[name]) {
|
|
3625
|
-
if (stat instanceof _stat__WEBPACK_IMPORTED_MODULE_0__["default"]) {
|
|
3626
|
-
this.stats[name] = stat;
|
|
3627
|
-
} else {
|
|
3628
|
-
this.stats[name] = new _stat__WEBPACK_IMPORTED_MODULE_0__["default"](name, type);
|
|
3629
|
-
}
|
|
3630
|
-
}
|
|
3528
|
+
const realUserAgent = typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent;
|
|
3529
|
+
const userAgent = mockUserAgent || realUserAgent;
|
|
3631
3530
|
|
|
3632
|
-
|
|
3531
|
+
if (userAgent && userAgent.indexOf('Electron') >= 0) {
|
|
3532
|
+
return true;
|
|
3633
3533
|
}
|
|
3634
3534
|
|
|
3535
|
+
return false;
|
|
3635
3536
|
}
|
|
3636
|
-
//# sourceMappingURL=
|
|
3537
|
+
//# sourceMappingURL=is-electron.js.map
|
|
3538
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
3637
3539
|
|
|
3638
3540
|
/***/ }),
|
|
3639
3541
|
|
|
3640
|
-
/***/ "../../node_modules/@probe.gl/
|
|
3641
|
-
|
|
3642
|
-
!*** /Users/
|
|
3643
|
-
|
|
3542
|
+
/***/ "../../node_modules/@probe.gl/env/dist/esm/utils/assert.js":
|
|
3543
|
+
/*!***************************************************************************************!*\
|
|
3544
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/env/dist/esm/utils/assert.js ***!
|
|
3545
|
+
\***************************************************************************************/
|
|
3644
3546
|
/*! exports provided: default */
|
|
3645
3547
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3646
3548
|
|
|
3647
3549
|
"use strict";
|
|
3648
3550
|
__webpack_require__.r(__webpack_exports__);
|
|
3649
|
-
/*
|
|
3650
|
-
function
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
if (typeof window !== 'undefined' && window.performance) {
|
|
3654
|
-
timestamp = window.performance.now();
|
|
3655
|
-
} else if (typeof process !== 'undefined' && process.hrtime) {
|
|
3656
|
-
const timeParts = process.hrtime();
|
|
3657
|
-
timestamp = timeParts[0] * 1000 + timeParts[1] / 1e6;
|
|
3658
|
-
} else {
|
|
3659
|
-
timestamp = Date.now();
|
|
3551
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return assert; });
|
|
3552
|
+
function assert(condition, message) {
|
|
3553
|
+
if (!condition) {
|
|
3554
|
+
throw new Error(message || 'Assertion failed');
|
|
3660
3555
|
}
|
|
3661
|
-
|
|
3662
|
-
return timestamp;
|
|
3663
3556
|
}
|
|
3664
|
-
//# sourceMappingURL=
|
|
3665
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
3557
|
+
//# sourceMappingURL=assert.js.map
|
|
3666
3558
|
|
|
3667
3559
|
/***/ }),
|
|
3668
3560
|
|
|
3669
|
-
/***/ "../../node_modules
|
|
3670
|
-
|
|
3671
|
-
!*** /Users/
|
|
3672
|
-
|
|
3673
|
-
/*! exports provided:
|
|
3561
|
+
/***/ "../../node_modules/@probe.gl/env/dist/esm/utils/globals.js":
|
|
3562
|
+
/*!****************************************************************************************!*\
|
|
3563
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/env/dist/esm/utils/globals.js ***!
|
|
3564
|
+
\****************************************************************************************/
|
|
3565
|
+
/*! exports provided: self, window, global, document, process, console, VERSION, isBrowser */
|
|
3674
3566
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3675
3567
|
|
|
3676
3568
|
"use strict";
|
|
3677
3569
|
__webpack_require__.r(__webpack_exports__);
|
|
3678
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3679
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3680
|
-
/* harmony
|
|
3681
|
-
/* harmony
|
|
3682
|
-
/* harmony
|
|
3683
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; });
|
|
3684
|
-
/**
|
|
3685
|
-
* Common utilities
|
|
3686
|
-
* @module glMatrix
|
|
3687
|
-
*/
|
|
3688
|
-
// Configuration Constants
|
|
3689
|
-
var EPSILON = 0.000001;
|
|
3690
|
-
var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;
|
|
3691
|
-
var RANDOM = Math.random;
|
|
3692
|
-
/**
|
|
3693
|
-
* Sets the type of array used when creating new vectors and matrices
|
|
3694
|
-
*
|
|
3695
|
-
* @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array
|
|
3696
|
-
*/
|
|
3570
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
|
|
3571
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return isBrowser; });
|
|
3572
|
+
/* harmony import */ var _lib_is_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../lib/is-browser */ "../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js");
|
|
3573
|
+
/* harmony import */ var _lib_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/globals */ "../../node_modules/@probe.gl/env/dist/esm/lib/globals.js");
|
|
3574
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "self", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["self"]; });
|
|
3697
3575
|
|
|
3698
|
-
|
|
3699
|
-
ARRAY_TYPE = type;
|
|
3700
|
-
}
|
|
3701
|
-
var degree = Math.PI / 180;
|
|
3702
|
-
/**
|
|
3703
|
-
* Convert Degree To Radian
|
|
3704
|
-
*
|
|
3705
|
-
* @param {Number} a Angle in Degrees
|
|
3706
|
-
*/
|
|
3576
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["window"]; });
|
|
3707
3577
|
|
|
3708
|
-
|
|
3709
|
-
return a * degree;
|
|
3710
|
-
}
|
|
3711
|
-
/**
|
|
3712
|
-
* Tests whether or not the arguments have approximately the same value, within an absolute
|
|
3713
|
-
* or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less
|
|
3714
|
-
* than or equal to 1.0, and a relative tolerance is used for larger values)
|
|
3715
|
-
*
|
|
3716
|
-
* @param {Number} a The first number to test.
|
|
3717
|
-
* @param {Number} b The second number to test.
|
|
3718
|
-
* @returns {Boolean} True if the numbers are approximately equal, false otherwise.
|
|
3719
|
-
*/
|
|
3578
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "global", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["global"]; });
|
|
3720
3579
|
|
|
3721
|
-
|
|
3722
|
-
return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));
|
|
3723
|
-
}
|
|
3724
|
-
if (!Math.hypot) Math.hypot = function () {
|
|
3725
|
-
var y = 0,
|
|
3726
|
-
i = arguments.length;
|
|
3580
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "document", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["document"]; });
|
|
3727
3581
|
|
|
3728
|
-
|
|
3729
|
-
y += arguments[i] * arguments[i];
|
|
3730
|
-
}
|
|
3582
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "process", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["process"]; });
|
|
3731
3583
|
|
|
3732
|
-
|
|
3733
|
-
|
|
3584
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "console", function() { return _lib_globals__WEBPACK_IMPORTED_MODULE_1__["console"]; });
|
|
3585
|
+
|
|
3586
|
+
|
|
3587
|
+
|
|
3588
|
+
const VERSION = true ? "8.5.12" : undefined;
|
|
3589
|
+
const isBrowser = Object(_lib_is_browser__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
3590
|
+
//# sourceMappingURL=globals.js.map
|
|
3734
3591
|
|
|
3735
3592
|
/***/ }),
|
|
3736
3593
|
|
|
3737
|
-
/***/ "../../node_modules
|
|
3738
|
-
|
|
3739
|
-
!*** /Users/
|
|
3740
|
-
|
|
3741
|
-
/*! exports provided:
|
|
3594
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/index.js":
|
|
3595
|
+
/*!**********************************************************************************!*\
|
|
3596
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/stats/dist/esm/index.js ***!
|
|
3597
|
+
\**********************************************************************************/
|
|
3598
|
+
/*! exports provided: Stats, Stat, _getHiResTimestamp */
|
|
3742
3599
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3743
3600
|
|
|
3744
3601
|
"use strict";
|
|
3745
3602
|
__webpack_require__.r(__webpack_exports__);
|
|
3746
|
-
/* harmony
|
|
3747
|
-
/* harmony
|
|
3748
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; });
|
|
3749
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; });
|
|
3750
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; });
|
|
3751
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
|
|
3752
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
|
|
3753
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return transpose; });
|
|
3754
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return invert; });
|
|
3755
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjoint", function() { return adjoint; });
|
|
3756
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determinant", function() { return determinant; });
|
|
3757
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; });
|
|
3758
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "translate", function() { return translate; });
|
|
3759
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotate", function() { return rotate; });
|
|
3760
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; });
|
|
3761
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromTranslation", function() { return fromTranslation; });
|
|
3762
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotation", function() { return fromRotation; });
|
|
3763
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromScaling", function() { return fromScaling; });
|
|
3764
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromMat2d", function() { return fromMat2d; });
|
|
3765
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromQuat", function() { return fromQuat; });
|
|
3766
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalFromMat4", function() { return normalFromMat4; });
|
|
3767
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projection", function() { return projection; });
|
|
3768
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; });
|
|
3769
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frob", function() { return frob; });
|
|
3770
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; });
|
|
3771
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; });
|
|
3772
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalar", function() { return multiplyScalar; });
|
|
3773
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalarAndAdd", function() { return multiplyScalarAndAdd; });
|
|
3774
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; });
|
|
3775
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; });
|
|
3776
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; });
|
|
3777
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; });
|
|
3778
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "../../node_modules/gl-matrix/esm/common.js");
|
|
3603
|
+
/* harmony import */ var _lib_stats__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/stats */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js");
|
|
3604
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stats", function() { return _lib_stats__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
3779
3605
|
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
* @module mat3
|
|
3783
|
-
*/
|
|
3606
|
+
/* harmony import */ var _lib_stat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
3607
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stat", function() { return _lib_stat__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
3784
3608
|
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
*
|
|
3788
|
-
* @returns {mat3} a new 3x3 matrix
|
|
3789
|
-
*/
|
|
3609
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
3610
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getHiResTimestamp", function() { return _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
|
3790
3611
|
|
|
3791
|
-
function create() {
|
|
3792
|
-
var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](9);
|
|
3793
3612
|
|
|
3794
|
-
if (_common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"] != Float32Array) {
|
|
3795
|
-
out[1] = 0;
|
|
3796
|
-
out[2] = 0;
|
|
3797
|
-
out[3] = 0;
|
|
3798
|
-
out[5] = 0;
|
|
3799
|
-
out[6] = 0;
|
|
3800
|
-
out[7] = 0;
|
|
3801
|
-
}
|
|
3802
3613
|
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3614
|
+
|
|
3615
|
+
//# sourceMappingURL=index.js.map
|
|
3616
|
+
|
|
3617
|
+
/***/ }),
|
|
3618
|
+
|
|
3619
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js":
|
|
3620
|
+
/*!*************************************************************************************!*\
|
|
3621
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/stats/dist/esm/lib/stat.js ***!
|
|
3622
|
+
\*************************************************************************************/
|
|
3623
|
+
/*! exports provided: default */
|
|
3624
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3625
|
+
|
|
3626
|
+
"use strict";
|
|
3627
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3628
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stat; });
|
|
3629
|
+
/* harmony import */ var _utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/hi-res-timestamp */ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js");
|
|
3630
|
+
|
|
3631
|
+
class Stat {
|
|
3632
|
+
constructor(name, type) {
|
|
3633
|
+
this.name = name;
|
|
3634
|
+
this.type = type;
|
|
3635
|
+
this.sampleSize = 1;
|
|
3636
|
+
this.reset();
|
|
3637
|
+
}
|
|
3638
|
+
|
|
3639
|
+
setSampleSize(samples) {
|
|
3640
|
+
this.sampleSize = samples;
|
|
3641
|
+
return this;
|
|
3642
|
+
}
|
|
3643
|
+
|
|
3644
|
+
incrementCount() {
|
|
3645
|
+
this.addCount(1);
|
|
3646
|
+
return this;
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3649
|
+
decrementCount() {
|
|
3650
|
+
this.subtractCount(1);
|
|
3651
|
+
return this;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
addCount(value) {
|
|
3655
|
+
this._count += value;
|
|
3656
|
+
this._samples++;
|
|
3657
|
+
|
|
3658
|
+
this._checkSampling();
|
|
3659
|
+
|
|
3660
|
+
return this;
|
|
3661
|
+
}
|
|
3662
|
+
|
|
3663
|
+
subtractCount(value) {
|
|
3664
|
+
this._count -= value;
|
|
3665
|
+
this._samples++;
|
|
3666
|
+
|
|
3667
|
+
this._checkSampling();
|
|
3668
|
+
|
|
3669
|
+
return this;
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
addTime(time) {
|
|
3673
|
+
this._time += time;
|
|
3674
|
+
this.lastTiming = time;
|
|
3675
|
+
this._samples++;
|
|
3676
|
+
|
|
3677
|
+
this._checkSampling();
|
|
3678
|
+
|
|
3679
|
+
return this;
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
timeStart() {
|
|
3683
|
+
this._startTime = Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
3684
|
+
this._timerPending = true;
|
|
3685
|
+
return this;
|
|
3686
|
+
}
|
|
3687
|
+
|
|
3688
|
+
timeEnd() {
|
|
3689
|
+
if (!this._timerPending) {
|
|
3690
|
+
return this;
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3693
|
+
this.addTime(Object(_utils_hi_res_timestamp__WEBPACK_IMPORTED_MODULE_0__["default"])() - this._startTime);
|
|
3694
|
+
this._timerPending = false;
|
|
3695
|
+
|
|
3696
|
+
this._checkSampling();
|
|
3697
|
+
|
|
3698
|
+
return this;
|
|
3699
|
+
}
|
|
3700
|
+
|
|
3701
|
+
getSampleAverageCount() {
|
|
3702
|
+
return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
getSampleAverageTime() {
|
|
3706
|
+
return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3709
|
+
getSampleHz() {
|
|
3710
|
+
return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1000) : 0;
|
|
3711
|
+
}
|
|
3712
|
+
|
|
3713
|
+
getAverageCount() {
|
|
3714
|
+
return this.samples > 0 ? this.count / this.samples : 0;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3717
|
+
getAverageTime() {
|
|
3718
|
+
return this.samples > 0 ? this.time / this.samples : 0;
|
|
3719
|
+
}
|
|
3720
|
+
|
|
3721
|
+
getHz() {
|
|
3722
|
+
return this.time > 0 ? this.samples / (this.time / 1000) : 0;
|
|
3723
|
+
}
|
|
3724
|
+
|
|
3725
|
+
reset() {
|
|
3726
|
+
this.time = 0;
|
|
3727
|
+
this.count = 0;
|
|
3728
|
+
this.samples = 0;
|
|
3729
|
+
this.lastTiming = 0;
|
|
3730
|
+
this.lastSampleTime = 0;
|
|
3731
|
+
this.lastSampleCount = 0;
|
|
3732
|
+
this._count = 0;
|
|
3733
|
+
this._time = 0;
|
|
3734
|
+
this._samples = 0;
|
|
3735
|
+
this._startTime = 0;
|
|
3736
|
+
this._timerPending = false;
|
|
3737
|
+
return this;
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3740
|
+
_checkSampling() {
|
|
3741
|
+
if (this._samples === this.sampleSize) {
|
|
3742
|
+
this.lastSampleTime = this._time;
|
|
3743
|
+
this.lastSampleCount = this._count;
|
|
3744
|
+
this.count += this._count;
|
|
3745
|
+
this.time += this._time;
|
|
3746
|
+
this.samples += this._samples;
|
|
3747
|
+
this._time = 0;
|
|
3748
|
+
this._count = 0;
|
|
3749
|
+
this._samples = 0;
|
|
3750
|
+
}
|
|
3751
|
+
}
|
|
3752
|
+
|
|
3753
|
+
}
|
|
3754
|
+
//# sourceMappingURL=stat.js.map
|
|
3755
|
+
|
|
3756
|
+
/***/ }),
|
|
3757
|
+
|
|
3758
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js":
|
|
3759
|
+
/*!**************************************************************************************!*\
|
|
3760
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/stats/dist/esm/lib/stats.js ***!
|
|
3761
|
+
\**************************************************************************************/
|
|
3762
|
+
/*! exports provided: default */
|
|
3763
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3764
|
+
|
|
3765
|
+
"use strict";
|
|
3766
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3767
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Stats; });
|
|
3768
|
+
/* harmony import */ var _stat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stat */ "../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js");
|
|
3769
|
+
|
|
3770
|
+
class Stats {
|
|
3771
|
+
constructor({
|
|
3772
|
+
id,
|
|
3773
|
+
stats
|
|
3774
|
+
}) {
|
|
3775
|
+
this.id = id;
|
|
3776
|
+
this.stats = {};
|
|
3777
|
+
|
|
3778
|
+
this._initializeStats(stats);
|
|
3779
|
+
|
|
3780
|
+
Object.seal(this);
|
|
3781
|
+
}
|
|
3782
|
+
|
|
3783
|
+
get(name, type = 'count') {
|
|
3784
|
+
return this._getOrCreate({
|
|
3785
|
+
name,
|
|
3786
|
+
type
|
|
3787
|
+
});
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3790
|
+
get size() {
|
|
3791
|
+
return Object.keys(this.stats).length;
|
|
3792
|
+
}
|
|
3793
|
+
|
|
3794
|
+
reset() {
|
|
3795
|
+
for (const key in this.stats) {
|
|
3796
|
+
this.stats[key].reset();
|
|
3797
|
+
}
|
|
3798
|
+
|
|
3799
|
+
return this;
|
|
3800
|
+
}
|
|
3801
|
+
|
|
3802
|
+
forEach(fn) {
|
|
3803
|
+
for (const key in this.stats) {
|
|
3804
|
+
fn(this.stats[key]);
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
getTable() {
|
|
3809
|
+
const table = {};
|
|
3810
|
+
this.forEach(stat => {
|
|
3811
|
+
table[stat.name] = {
|
|
3812
|
+
time: stat.time || 0,
|
|
3813
|
+
count: stat.count || 0,
|
|
3814
|
+
average: stat.getAverageTime() || 0,
|
|
3815
|
+
hz: stat.getHz() || 0
|
|
3816
|
+
};
|
|
3817
|
+
});
|
|
3818
|
+
return table;
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
_initializeStats(stats = []) {
|
|
3822
|
+
stats.forEach(stat => this._getOrCreate(stat));
|
|
3823
|
+
}
|
|
3824
|
+
|
|
3825
|
+
_getOrCreate(stat) {
|
|
3826
|
+
if (!stat || !stat.name) {
|
|
3827
|
+
return null;
|
|
3828
|
+
}
|
|
3829
|
+
|
|
3830
|
+
const {
|
|
3831
|
+
name,
|
|
3832
|
+
type
|
|
3833
|
+
} = stat;
|
|
3834
|
+
|
|
3835
|
+
if (!this.stats[name]) {
|
|
3836
|
+
if (stat instanceof _stat__WEBPACK_IMPORTED_MODULE_0__["default"]) {
|
|
3837
|
+
this.stats[name] = stat;
|
|
3838
|
+
} else {
|
|
3839
|
+
this.stats[name] = new _stat__WEBPACK_IMPORTED_MODULE_0__["default"](name, type);
|
|
3840
|
+
}
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
return this.stats[name];
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3846
|
+
}
|
|
3847
|
+
//# sourceMappingURL=stats.js.map
|
|
3848
|
+
|
|
3849
|
+
/***/ }),
|
|
3850
|
+
|
|
3851
|
+
/***/ "../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js":
|
|
3852
|
+
/*!***************************************************************************************************!*\
|
|
3853
|
+
!*** /Users/missx/Source/luma.gl/node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js ***!
|
|
3854
|
+
\***************************************************************************************************/
|
|
3855
|
+
/*! exports provided: default */
|
|
3856
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3857
|
+
|
|
3858
|
+
"use strict";
|
|
3859
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3860
|
+
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getHiResTimestamp; });
|
|
3861
|
+
function getHiResTimestamp() {
|
|
3862
|
+
let timestamp;
|
|
3863
|
+
|
|
3864
|
+
if (typeof window !== 'undefined' && window.performance) {
|
|
3865
|
+
timestamp = window.performance.now();
|
|
3866
|
+
} else if (typeof process !== 'undefined' && process.hrtime) {
|
|
3867
|
+
const timeParts = process.hrtime();
|
|
3868
|
+
timestamp = timeParts[0] * 1000 + timeParts[1] / 1e6;
|
|
3869
|
+
} else {
|
|
3870
|
+
timestamp = Date.now();
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3873
|
+
return timestamp;
|
|
3874
|
+
}
|
|
3875
|
+
//# sourceMappingURL=hi-res-timestamp.js.map
|
|
3876
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
3877
|
+
|
|
3878
|
+
/***/ }),
|
|
3879
|
+
|
|
3880
|
+
/***/ "../../node_modules/gl-matrix/esm/common.js":
|
|
3881
|
+
/*!************************************************************************!*\
|
|
3882
|
+
!*** /Users/missx/Source/luma.gl/node_modules/gl-matrix/esm/common.js ***!
|
|
3883
|
+
\************************************************************************/
|
|
3884
|
+
/*! exports provided: EPSILON, ARRAY_TYPE, RANDOM, setMatrixArrayType, toRadian, equals */
|
|
3885
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3886
|
+
|
|
3887
|
+
"use strict";
|
|
3888
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3889
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EPSILON", function() { return EPSILON; });
|
|
3890
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_TYPE", function() { return ARRAY_TYPE; });
|
|
3891
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RANDOM", function() { return RANDOM; });
|
|
3892
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMatrixArrayType", function() { return setMatrixArrayType; });
|
|
3893
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toRadian", function() { return toRadian; });
|
|
3894
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; });
|
|
3895
|
+
/**
|
|
3896
|
+
* Common utilities
|
|
3897
|
+
* @module glMatrix
|
|
3898
|
+
*/
|
|
3899
|
+
// Configuration Constants
|
|
3900
|
+
var EPSILON = 0.000001;
|
|
3901
|
+
var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;
|
|
3902
|
+
var RANDOM = Math.random;
|
|
3903
|
+
/**
|
|
3904
|
+
* Sets the type of array used when creating new vectors and matrices
|
|
3905
|
+
*
|
|
3906
|
+
* @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array
|
|
3907
|
+
*/
|
|
3908
|
+
|
|
3909
|
+
function setMatrixArrayType(type) {
|
|
3910
|
+
ARRAY_TYPE = type;
|
|
3911
|
+
}
|
|
3912
|
+
var degree = Math.PI / 180;
|
|
3913
|
+
/**
|
|
3914
|
+
* Convert Degree To Radian
|
|
3915
|
+
*
|
|
3916
|
+
* @param {Number} a Angle in Degrees
|
|
3917
|
+
*/
|
|
3918
|
+
|
|
3919
|
+
function toRadian(a) {
|
|
3920
|
+
return a * degree;
|
|
3921
|
+
}
|
|
3922
|
+
/**
|
|
3923
|
+
* Tests whether or not the arguments have approximately the same value, within an absolute
|
|
3924
|
+
* or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less
|
|
3925
|
+
* than or equal to 1.0, and a relative tolerance is used for larger values)
|
|
3926
|
+
*
|
|
3927
|
+
* @param {Number} a The first number to test.
|
|
3928
|
+
* @param {Number} b The second number to test.
|
|
3929
|
+
* @returns {Boolean} True if the numbers are approximately equal, false otherwise.
|
|
3930
|
+
*/
|
|
3931
|
+
|
|
3932
|
+
function equals(a, b) {
|
|
3933
|
+
return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));
|
|
3934
|
+
}
|
|
3935
|
+
if (!Math.hypot) Math.hypot = function () {
|
|
3936
|
+
var y = 0,
|
|
3937
|
+
i = arguments.length;
|
|
3938
|
+
|
|
3939
|
+
while (i--) {
|
|
3940
|
+
y += arguments[i] * arguments[i];
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
return Math.sqrt(y);
|
|
3944
|
+
};
|
|
3945
|
+
|
|
3946
|
+
/***/ }),
|
|
3947
|
+
|
|
3948
|
+
/***/ "../../node_modules/gl-matrix/esm/mat3.js":
|
|
3949
|
+
/*!**********************************************************************!*\
|
|
3950
|
+
!*** /Users/missx/Source/luma.gl/node_modules/gl-matrix/esm/mat3.js ***!
|
|
3951
|
+
\**********************************************************************/
|
|
3952
|
+
/*! exports provided: create, fromMat4, clone, copy, fromValues, set, identity, transpose, invert, adjoint, determinant, multiply, translate, rotate, scale, fromTranslation, fromRotation, fromScaling, fromMat2d, fromQuat, normalFromMat4, projection, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */
|
|
3953
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3954
|
+
|
|
3955
|
+
"use strict";
|
|
3956
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3957
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; });
|
|
3958
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromMat4", function() { return fromMat4; });
|
|
3959
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; });
|
|
3960
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; });
|
|
3961
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; });
|
|
3962
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
|
|
3963
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
|
|
3964
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return transpose; });
|
|
3965
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return invert; });
|
|
3966
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjoint", function() { return adjoint; });
|
|
3967
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determinant", function() { return determinant; });
|
|
3968
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; });
|
|
3969
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "translate", function() { return translate; });
|
|
3970
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotate", function() { return rotate; });
|
|
3971
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; });
|
|
3972
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromTranslation", function() { return fromTranslation; });
|
|
3973
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromRotation", function() { return fromRotation; });
|
|
3974
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromScaling", function() { return fromScaling; });
|
|
3975
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromMat2d", function() { return fromMat2d; });
|
|
3976
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromQuat", function() { return fromQuat; });
|
|
3977
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalFromMat4", function() { return normalFromMat4; });
|
|
3978
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projection", function() { return projection; });
|
|
3979
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; });
|
|
3980
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "frob", function() { return frob; });
|
|
3981
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; });
|
|
3982
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; });
|
|
3983
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalar", function() { return multiplyScalar; });
|
|
3984
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiplyScalarAndAdd", function() { return multiplyScalarAndAdd; });
|
|
3985
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; });
|
|
3986
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; });
|
|
3987
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; });
|
|
3988
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; });
|
|
3989
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "../../node_modules/gl-matrix/esm/common.js");
|
|
3990
|
+
|
|
3991
|
+
/**
|
|
3992
|
+
* 3x3 Matrix
|
|
3993
|
+
* @module mat3
|
|
3994
|
+
*/
|
|
3995
|
+
|
|
3996
|
+
/**
|
|
3997
|
+
* Creates a new identity mat3
|
|
3998
|
+
*
|
|
3999
|
+
* @returns {mat3} a new 3x3 matrix
|
|
4000
|
+
*/
|
|
4001
|
+
|
|
4002
|
+
function create() {
|
|
4003
|
+
var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](9);
|
|
4004
|
+
|
|
4005
|
+
if (_common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"] != Float32Array) {
|
|
4006
|
+
out[1] = 0;
|
|
4007
|
+
out[2] = 0;
|
|
4008
|
+
out[3] = 0;
|
|
4009
|
+
out[5] = 0;
|
|
4010
|
+
out[6] = 0;
|
|
4011
|
+
out[7] = 0;
|
|
4012
|
+
}
|
|
4013
|
+
|
|
4014
|
+
out[0] = 1;
|
|
4015
|
+
out[4] = 1;
|
|
4016
|
+
out[8] = 1;
|
|
4017
|
+
return out;
|
|
4018
|
+
}
|
|
4019
|
+
/**
|
|
4020
|
+
* Copies the upper-left 3x3 values into the given mat3.
|
|
4021
|
+
*
|
|
4022
|
+
* @param {mat3} out the receiving 3x3 matrix
|
|
3812
4023
|
* @param {ReadonlyMat4} a the source 4x4 matrix
|
|
3813
4024
|
* @returns {mat3} out
|
|
3814
4025
|
*/
|
|
@@ -4558,9 +4769,9 @@ var sub = subtract;
|
|
|
4558
4769
|
/***/ }),
|
|
4559
4770
|
|
|
4560
4771
|
/***/ "../../node_modules/gl-matrix/esm/mat4.js":
|
|
4561
|
-
|
|
4562
|
-
!*** /Users/
|
|
4563
|
-
|
|
4772
|
+
/*!**********************************************************************!*\
|
|
4773
|
+
!*** /Users/missx/Source/luma.gl/node_modules/gl-matrix/esm/mat4.js ***!
|
|
4774
|
+
\**********************************************************************/
|
|
4564
4775
|
/*! exports provided: create, clone, copy, fromValues, set, identity, transpose, invert, adjoint, determinant, multiply, translate, scale, rotate, rotateX, rotateY, rotateZ, fromTranslation, fromScaling, fromRotation, fromXRotation, fromYRotation, fromZRotation, fromRotationTranslation, fromQuat2, getTranslation, getScaling, getRotation, fromRotationTranslationScale, fromRotationTranslationScaleOrigin, fromQuat, frustum, perspective, perspectiveFromFieldOfView, ortho, lookAt, targetTo, str, frob, add, subtract, multiplyScalar, multiplyScalarAndAdd, exactEquals, equals, mul, sub */
|
|
4565
4776
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4566
4777
|
|
|
@@ -6432,9 +6643,9 @@ var sub = subtract;
|
|
|
6432
6643
|
/***/ }),
|
|
6433
6644
|
|
|
6434
6645
|
/***/ "../../node_modules/gl-matrix/esm/quat.js":
|
|
6435
|
-
|
|
6436
|
-
!*** /Users/
|
|
6437
|
-
|
|
6646
|
+
/*!**********************************************************************!*\
|
|
6647
|
+
!*** /Users/missx/Source/luma.gl/node_modules/gl-matrix/esm/quat.js ***!
|
|
6648
|
+
\**********************************************************************/
|
|
6438
6649
|
/*! exports provided: create, identity, setAxisAngle, getAxisAngle, getAngle, multiply, rotateX, rotateY, rotateZ, calculateW, exp, ln, pow, slerp, random, invert, conjugate, fromMat3, fromEuler, str, clone, fromValues, copy, set, add, mul, scale, dot, lerp, length, len, squaredLength, sqrLen, normalize, exactEquals, equals, rotationTo, sqlerp, setAxes */
|
|
6439
6650
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6440
6651
|
|
|
@@ -7197,9 +7408,9 @@ var setAxes = function () {
|
|
|
7197
7408
|
/***/ }),
|
|
7198
7409
|
|
|
7199
7410
|
/***/ "../../node_modules/gl-matrix/esm/vec2.js":
|
|
7200
|
-
|
|
7201
|
-
!*** /Users/
|
|
7202
|
-
|
|
7411
|
+
/*!**********************************************************************!*\
|
|
7412
|
+
!*** /Users/missx/Source/luma.gl/node_modules/gl-matrix/esm/vec2.js ***!
|
|
7413
|
+
\**********************************************************************/
|
|
7203
7414
|
/*! exports provided: create, clone, fromValues, copy, set, add, subtract, multiply, divide, ceil, floor, min, max, round, scale, scaleAndAdd, distance, squaredDistance, length, squaredLength, negate, inverse, normalize, dot, cross, lerp, random, transformMat2, transformMat2d, transformMat3, transformMat4, rotate, angle, zero, str, exactEquals, equals, len, sub, mul, div, dist, sqrDist, sqrLen, forEach */
|
|
7204
7415
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7205
7416
|
|
|
@@ -7879,9 +8090,9 @@ var forEach = function () {
|
|
|
7879
8090
|
/***/ }),
|
|
7880
8091
|
|
|
7881
8092
|
/***/ "../../node_modules/gl-matrix/esm/vec3.js":
|
|
7882
|
-
|
|
7883
|
-
!*** /Users/
|
|
7884
|
-
|
|
8093
|
+
/*!**********************************************************************!*\
|
|
8094
|
+
!*** /Users/missx/Source/luma.gl/node_modules/gl-matrix/esm/vec3.js ***!
|
|
8095
|
+
\**********************************************************************/
|
|
7885
8096
|
/*! exports provided: create, clone, length, fromValues, copy, set, add, subtract, multiply, divide, ceil, floor, min, max, round, scale, scaleAndAdd, distance, squaredDistance, squaredLength, negate, inverse, normalize, dot, cross, lerp, hermite, bezier, random, transformMat4, transformMat3, transformQuat, rotateX, rotateY, rotateZ, angle, zero, str, exactEquals, equals, sub, mul, div, dist, sqrDist, len, sqrLen, forEach */
|
|
7886
8097
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7887
8098
|
|
|
@@ -8107,1634 +8318,1346 @@ function ceil(out, a) {
|
|
|
8107
8318
|
return out;
|
|
8108
8319
|
}
|
|
8109
8320
|
/**
|
|
8110
|
-
* Math.floor the components of a vec3
|
|
8111
|
-
*
|
|
8112
|
-
* @param {vec3} out the receiving vector
|
|
8113
|
-
* @param {ReadonlyVec3} a vector to floor
|
|
8114
|
-
* @returns {vec3} out
|
|
8115
|
-
*/
|
|
8116
|
-
|
|
8117
|
-
function floor(out, a) {
|
|
8118
|
-
out[0] = Math.floor(a[0]);
|
|
8119
|
-
out[1] = Math.floor(a[1]);
|
|
8120
|
-
out[2] = Math.floor(a[2]);
|
|
8121
|
-
return out;
|
|
8122
|
-
}
|
|
8123
|
-
/**
|
|
8124
|
-
* Returns the minimum of two vec3's
|
|
8125
|
-
*
|
|
8126
|
-
* @param {vec3} out the receiving vector
|
|
8127
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8128
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8129
|
-
* @returns {vec3} out
|
|
8130
|
-
*/
|
|
8131
|
-
|
|
8132
|
-
function min(out, a, b) {
|
|
8133
|
-
out[0] = Math.min(a[0], b[0]);
|
|
8134
|
-
out[1] = Math.min(a[1], b[1]);
|
|
8135
|
-
out[2] = Math.min(a[2], b[2]);
|
|
8136
|
-
return out;
|
|
8137
|
-
}
|
|
8138
|
-
/**
|
|
8139
|
-
* Returns the maximum of two vec3's
|
|
8140
|
-
*
|
|
8141
|
-
* @param {vec3} out the receiving vector
|
|
8142
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8143
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8144
|
-
* @returns {vec3} out
|
|
8145
|
-
*/
|
|
8146
|
-
|
|
8147
|
-
function max(out, a, b) {
|
|
8148
|
-
out[0] = Math.max(a[0], b[0]);
|
|
8149
|
-
out[1] = Math.max(a[1], b[1]);
|
|
8150
|
-
out[2] = Math.max(a[2], b[2]);
|
|
8151
|
-
return out;
|
|
8152
|
-
}
|
|
8153
|
-
/**
|
|
8154
|
-
* Math.round the components of a vec3
|
|
8155
|
-
*
|
|
8156
|
-
* @param {vec3} out the receiving vector
|
|
8157
|
-
* @param {ReadonlyVec3} a vector to round
|
|
8158
|
-
* @returns {vec3} out
|
|
8159
|
-
*/
|
|
8160
|
-
|
|
8161
|
-
function round(out, a) {
|
|
8162
|
-
out[0] = Math.round(a[0]);
|
|
8163
|
-
out[1] = Math.round(a[1]);
|
|
8164
|
-
out[2] = Math.round(a[2]);
|
|
8165
|
-
return out;
|
|
8166
|
-
}
|
|
8167
|
-
/**
|
|
8168
|
-
* Scales a vec3 by a scalar number
|
|
8169
|
-
*
|
|
8170
|
-
* @param {vec3} out the receiving vector
|
|
8171
|
-
* @param {ReadonlyVec3} a the vector to scale
|
|
8172
|
-
* @param {Number} b amount to scale the vector by
|
|
8173
|
-
* @returns {vec3} out
|
|
8174
|
-
*/
|
|
8175
|
-
|
|
8176
|
-
function scale(out, a, b) {
|
|
8177
|
-
out[0] = a[0] * b;
|
|
8178
|
-
out[1] = a[1] * b;
|
|
8179
|
-
out[2] = a[2] * b;
|
|
8180
|
-
return out;
|
|
8181
|
-
}
|
|
8182
|
-
/**
|
|
8183
|
-
* Adds two vec3's after scaling the second operand by a scalar value
|
|
8184
|
-
*
|
|
8185
|
-
* @param {vec3} out the receiving vector
|
|
8186
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8187
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8188
|
-
* @param {Number} scale the amount to scale b by before adding
|
|
8189
|
-
* @returns {vec3} out
|
|
8190
|
-
*/
|
|
8191
|
-
|
|
8192
|
-
function scaleAndAdd(out, a, b, scale) {
|
|
8193
|
-
out[0] = a[0] + b[0] * scale;
|
|
8194
|
-
out[1] = a[1] + b[1] * scale;
|
|
8195
|
-
out[2] = a[2] + b[2] * scale;
|
|
8196
|
-
return out;
|
|
8197
|
-
}
|
|
8198
|
-
/**
|
|
8199
|
-
* Calculates the euclidian distance between two vec3's
|
|
8200
|
-
*
|
|
8201
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8202
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8203
|
-
* @returns {Number} distance between a and b
|
|
8204
|
-
*/
|
|
8205
|
-
|
|
8206
|
-
function distance(a, b) {
|
|
8207
|
-
var x = b[0] - a[0];
|
|
8208
|
-
var y = b[1] - a[1];
|
|
8209
|
-
var z = b[2] - a[2];
|
|
8210
|
-
return Math.hypot(x, y, z);
|
|
8211
|
-
}
|
|
8212
|
-
/**
|
|
8213
|
-
* Calculates the squared euclidian distance between two vec3's
|
|
8214
|
-
*
|
|
8215
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8216
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8217
|
-
* @returns {Number} squared distance between a and b
|
|
8218
|
-
*/
|
|
8219
|
-
|
|
8220
|
-
function squaredDistance(a, b) {
|
|
8221
|
-
var x = b[0] - a[0];
|
|
8222
|
-
var y = b[1] - a[1];
|
|
8223
|
-
var z = b[2] - a[2];
|
|
8224
|
-
return x * x + y * y + z * z;
|
|
8225
|
-
}
|
|
8226
|
-
/**
|
|
8227
|
-
* Calculates the squared length of a vec3
|
|
8228
|
-
*
|
|
8229
|
-
* @param {ReadonlyVec3} a vector to calculate squared length of
|
|
8230
|
-
* @returns {Number} squared length of a
|
|
8231
|
-
*/
|
|
8232
|
-
|
|
8233
|
-
function squaredLength(a) {
|
|
8234
|
-
var x = a[0];
|
|
8235
|
-
var y = a[1];
|
|
8236
|
-
var z = a[2];
|
|
8237
|
-
return x * x + y * y + z * z;
|
|
8238
|
-
}
|
|
8239
|
-
/**
|
|
8240
|
-
* Negates the components of a vec3
|
|
8241
|
-
*
|
|
8242
|
-
* @param {vec3} out the receiving vector
|
|
8243
|
-
* @param {ReadonlyVec3} a vector to negate
|
|
8244
|
-
* @returns {vec3} out
|
|
8245
|
-
*/
|
|
8246
|
-
|
|
8247
|
-
function negate(out, a) {
|
|
8248
|
-
out[0] = -a[0];
|
|
8249
|
-
out[1] = -a[1];
|
|
8250
|
-
out[2] = -a[2];
|
|
8251
|
-
return out;
|
|
8252
|
-
}
|
|
8253
|
-
/**
|
|
8254
|
-
* Returns the inverse of the components of a vec3
|
|
8255
|
-
*
|
|
8256
|
-
* @param {vec3} out the receiving vector
|
|
8257
|
-
* @param {ReadonlyVec3} a vector to invert
|
|
8258
|
-
* @returns {vec3} out
|
|
8259
|
-
*/
|
|
8260
|
-
|
|
8261
|
-
function inverse(out, a) {
|
|
8262
|
-
out[0] = 1.0 / a[0];
|
|
8263
|
-
out[1] = 1.0 / a[1];
|
|
8264
|
-
out[2] = 1.0 / a[2];
|
|
8265
|
-
return out;
|
|
8266
|
-
}
|
|
8267
|
-
/**
|
|
8268
|
-
* Normalize a vec3
|
|
8269
|
-
*
|
|
8270
|
-
* @param {vec3} out the receiving vector
|
|
8271
|
-
* @param {ReadonlyVec3} a vector to normalize
|
|
8272
|
-
* @returns {vec3} out
|
|
8273
|
-
*/
|
|
8274
|
-
|
|
8275
|
-
function normalize(out, a) {
|
|
8276
|
-
var x = a[0];
|
|
8277
|
-
var y = a[1];
|
|
8278
|
-
var z = a[2];
|
|
8279
|
-
var len = x * x + y * y + z * z;
|
|
8280
|
-
|
|
8281
|
-
if (len > 0) {
|
|
8282
|
-
//TODO: evaluate use of glm_invsqrt here?
|
|
8283
|
-
len = 1 / Math.sqrt(len);
|
|
8284
|
-
}
|
|
8285
|
-
|
|
8286
|
-
out[0] = a[0] * len;
|
|
8287
|
-
out[1] = a[1] * len;
|
|
8288
|
-
out[2] = a[2] * len;
|
|
8289
|
-
return out;
|
|
8290
|
-
}
|
|
8291
|
-
/**
|
|
8292
|
-
* Calculates the dot product of two vec3's
|
|
8293
|
-
*
|
|
8294
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8295
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8296
|
-
* @returns {Number} dot product of a and b
|
|
8297
|
-
*/
|
|
8298
|
-
|
|
8299
|
-
function dot(a, b) {
|
|
8300
|
-
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
8301
|
-
}
|
|
8302
|
-
/**
|
|
8303
|
-
* Computes the cross product of two vec3's
|
|
8304
|
-
*
|
|
8305
|
-
* @param {vec3} out the receiving vector
|
|
8306
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8307
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8308
|
-
* @returns {vec3} out
|
|
8309
|
-
*/
|
|
8310
|
-
|
|
8311
|
-
function cross(out, a, b) {
|
|
8312
|
-
var ax = a[0],
|
|
8313
|
-
ay = a[1],
|
|
8314
|
-
az = a[2];
|
|
8315
|
-
var bx = b[0],
|
|
8316
|
-
by = b[1],
|
|
8317
|
-
bz = b[2];
|
|
8318
|
-
out[0] = ay * bz - az * by;
|
|
8319
|
-
out[1] = az * bx - ax * bz;
|
|
8320
|
-
out[2] = ax * by - ay * bx;
|
|
8321
|
-
return out;
|
|
8322
|
-
}
|
|
8323
|
-
/**
|
|
8324
|
-
* Performs a linear interpolation between two vec3's
|
|
8325
|
-
*
|
|
8326
|
-
* @param {vec3} out the receiving vector
|
|
8327
|
-
* @param {ReadonlyVec3} a the first operand
|
|
8328
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8329
|
-
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
8330
|
-
* @returns {vec3} out
|
|
8331
|
-
*/
|
|
8332
|
-
|
|
8333
|
-
function lerp(out, a, b, t) {
|
|
8334
|
-
var ax = a[0];
|
|
8335
|
-
var ay = a[1];
|
|
8336
|
-
var az = a[2];
|
|
8337
|
-
out[0] = ax + t * (b[0] - ax);
|
|
8338
|
-
out[1] = ay + t * (b[1] - ay);
|
|
8339
|
-
out[2] = az + t * (b[2] - az);
|
|
8340
|
-
return out;
|
|
8341
|
-
}
|
|
8342
|
-
/**
|
|
8343
|
-
* Performs a hermite interpolation with two control points
|
|
8321
|
+
* Math.floor the components of a vec3
|
|
8344
8322
|
*
|
|
8345
8323
|
* @param {vec3} out the receiving vector
|
|
8346
|
-
* @param {ReadonlyVec3} a
|
|
8347
|
-
* @param {ReadonlyVec3} b the second operand
|
|
8348
|
-
* @param {ReadonlyVec3} c the third operand
|
|
8349
|
-
* @param {ReadonlyVec3} d the fourth operand
|
|
8350
|
-
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
8324
|
+
* @param {ReadonlyVec3} a vector to floor
|
|
8351
8325
|
* @returns {vec3} out
|
|
8352
8326
|
*/
|
|
8353
8327
|
|
|
8354
|
-
function
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
var factor3 = factorTimes2 * (t - 1);
|
|
8359
|
-
var factor4 = factorTimes2 * (3 - 2 * t);
|
|
8360
|
-
out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
|
|
8361
|
-
out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
|
|
8362
|
-
out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
|
|
8328
|
+
function floor(out, a) {
|
|
8329
|
+
out[0] = Math.floor(a[0]);
|
|
8330
|
+
out[1] = Math.floor(a[1]);
|
|
8331
|
+
out[2] = Math.floor(a[2]);
|
|
8363
8332
|
return out;
|
|
8364
8333
|
}
|
|
8365
8334
|
/**
|
|
8366
|
-
*
|
|
8335
|
+
* Returns the minimum of two vec3's
|
|
8367
8336
|
*
|
|
8368
8337
|
* @param {vec3} out the receiving vector
|
|
8369
8338
|
* @param {ReadonlyVec3} a the first operand
|
|
8370
8339
|
* @param {ReadonlyVec3} b the second operand
|
|
8371
|
-
* @param {ReadonlyVec3} c the third operand
|
|
8372
|
-
* @param {ReadonlyVec3} d the fourth operand
|
|
8373
|
-
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
8374
8340
|
* @returns {vec3} out
|
|
8375
8341
|
*/
|
|
8376
8342
|
|
|
8377
|
-
function
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
var factor1 = inverseFactorTimesTwo * inverseFactor;
|
|
8382
|
-
var factor2 = 3 * t * inverseFactorTimesTwo;
|
|
8383
|
-
var factor3 = 3 * factorTimes2 * inverseFactor;
|
|
8384
|
-
var factor4 = factorTimes2 * t;
|
|
8385
|
-
out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
|
|
8386
|
-
out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
|
|
8387
|
-
out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
|
|
8343
|
+
function min(out, a, b) {
|
|
8344
|
+
out[0] = Math.min(a[0], b[0]);
|
|
8345
|
+
out[1] = Math.min(a[1], b[1]);
|
|
8346
|
+
out[2] = Math.min(a[2], b[2]);
|
|
8388
8347
|
return out;
|
|
8389
8348
|
}
|
|
8390
8349
|
/**
|
|
8391
|
-
*
|
|
8350
|
+
* Returns the maximum of two vec3's
|
|
8392
8351
|
*
|
|
8393
8352
|
* @param {vec3} out the receiving vector
|
|
8394
|
-
* @param {
|
|
8353
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8354
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8395
8355
|
* @returns {vec3} out
|
|
8396
8356
|
*/
|
|
8397
8357
|
|
|
8398
|
-
function
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
var zScale = Math.sqrt(1.0 - z * z) * scale;
|
|
8403
|
-
out[0] = Math.cos(r) * zScale;
|
|
8404
|
-
out[1] = Math.sin(r) * zScale;
|
|
8405
|
-
out[2] = z * scale;
|
|
8358
|
+
function max(out, a, b) {
|
|
8359
|
+
out[0] = Math.max(a[0], b[0]);
|
|
8360
|
+
out[1] = Math.max(a[1], b[1]);
|
|
8361
|
+
out[2] = Math.max(a[2], b[2]);
|
|
8406
8362
|
return out;
|
|
8407
8363
|
}
|
|
8408
8364
|
/**
|
|
8409
|
-
*
|
|
8410
|
-
* 4th vector component is implicitly '1'
|
|
8365
|
+
* Math.round the components of a vec3
|
|
8411
8366
|
*
|
|
8412
8367
|
* @param {vec3} out the receiving vector
|
|
8413
|
-
* @param {ReadonlyVec3} a
|
|
8414
|
-
* @param {ReadonlyMat4} m matrix to transform with
|
|
8368
|
+
* @param {ReadonlyVec3} a vector to round
|
|
8415
8369
|
* @returns {vec3} out
|
|
8416
8370
|
*/
|
|
8417
8371
|
|
|
8418
|
-
function
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
var w = m[3] * x + m[7] * y + m[11] * z + m[15];
|
|
8423
|
-
w = w || 1.0;
|
|
8424
|
-
out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
|
|
8425
|
-
out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
|
|
8426
|
-
out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
|
|
8372
|
+
function round(out, a) {
|
|
8373
|
+
out[0] = Math.round(a[0]);
|
|
8374
|
+
out[1] = Math.round(a[1]);
|
|
8375
|
+
out[2] = Math.round(a[2]);
|
|
8427
8376
|
return out;
|
|
8428
8377
|
}
|
|
8429
8378
|
/**
|
|
8430
|
-
*
|
|
8379
|
+
* Scales a vec3 by a scalar number
|
|
8431
8380
|
*
|
|
8432
8381
|
* @param {vec3} out the receiving vector
|
|
8433
|
-
* @param {ReadonlyVec3} a the vector to
|
|
8434
|
-
* @param {
|
|
8382
|
+
* @param {ReadonlyVec3} a the vector to scale
|
|
8383
|
+
* @param {Number} b amount to scale the vector by
|
|
8435
8384
|
* @returns {vec3} out
|
|
8436
8385
|
*/
|
|
8437
8386
|
|
|
8438
|
-
function
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
out[0] = x * m[0] + y * m[3] + z * m[6];
|
|
8443
|
-
out[1] = x * m[1] + y * m[4] + z * m[7];
|
|
8444
|
-
out[2] = x * m[2] + y * m[5] + z * m[8];
|
|
8387
|
+
function scale(out, a, b) {
|
|
8388
|
+
out[0] = a[0] * b;
|
|
8389
|
+
out[1] = a[1] * b;
|
|
8390
|
+
out[2] = a[2] * b;
|
|
8445
8391
|
return out;
|
|
8446
8392
|
}
|
|
8447
8393
|
/**
|
|
8448
|
-
*
|
|
8449
|
-
* Can also be used for dual quaternions. (Multiply it with the real part)
|
|
8394
|
+
* Adds two vec3's after scaling the second operand by a scalar value
|
|
8450
8395
|
*
|
|
8451
8396
|
* @param {vec3} out the receiving vector
|
|
8452
|
-
* @param {ReadonlyVec3} a the
|
|
8453
|
-
* @param {
|
|
8397
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8398
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8399
|
+
* @param {Number} scale the amount to scale b by before adding
|
|
8454
8400
|
* @returns {vec3} out
|
|
8455
8401
|
*/
|
|
8456
8402
|
|
|
8457
|
-
function
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
qz = q[2],
|
|
8462
|
-
qw = q[3];
|
|
8463
|
-
var x = a[0],
|
|
8464
|
-
y = a[1],
|
|
8465
|
-
z = a[2]; // var qvec = [qx, qy, qz];
|
|
8466
|
-
// var uv = vec3.cross([], qvec, a);
|
|
8467
|
-
|
|
8468
|
-
var uvx = qy * z - qz * y,
|
|
8469
|
-
uvy = qz * x - qx * z,
|
|
8470
|
-
uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);
|
|
8471
|
-
|
|
8472
|
-
var uuvx = qy * uvz - qz * uvy,
|
|
8473
|
-
uuvy = qz * uvx - qx * uvz,
|
|
8474
|
-
uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);
|
|
8475
|
-
|
|
8476
|
-
var w2 = qw * 2;
|
|
8477
|
-
uvx *= w2;
|
|
8478
|
-
uvy *= w2;
|
|
8479
|
-
uvz *= w2; // vec3.scale(uuv, uuv, 2);
|
|
8480
|
-
|
|
8481
|
-
uuvx *= 2;
|
|
8482
|
-
uuvy *= 2;
|
|
8483
|
-
uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));
|
|
8484
|
-
|
|
8485
|
-
out[0] = x + uvx + uuvx;
|
|
8486
|
-
out[1] = y + uvy + uuvy;
|
|
8487
|
-
out[2] = z + uvz + uuvz;
|
|
8403
|
+
function scaleAndAdd(out, a, b, scale) {
|
|
8404
|
+
out[0] = a[0] + b[0] * scale;
|
|
8405
|
+
out[1] = a[1] + b[1] * scale;
|
|
8406
|
+
out[2] = a[2] + b[2] * scale;
|
|
8488
8407
|
return out;
|
|
8489
8408
|
}
|
|
8490
8409
|
/**
|
|
8491
|
-
*
|
|
8492
|
-
*
|
|
8493
|
-
* @param {ReadonlyVec3} a
|
|
8494
|
-
* @param {ReadonlyVec3} b
|
|
8495
|
-
* @
|
|
8496
|
-
* @returns {vec3} out
|
|
8410
|
+
* Calculates the euclidian distance between two vec3's
|
|
8411
|
+
*
|
|
8412
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8413
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8414
|
+
* @returns {Number} distance between a and b
|
|
8497
8415
|
*/
|
|
8498
8416
|
|
|
8499
|
-
function
|
|
8500
|
-
var
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
p[1] = a[1] - b[1];
|
|
8505
|
-
p[2] = a[2] - b[2]; //perform rotation
|
|
8506
|
-
|
|
8507
|
-
r[0] = p[0];
|
|
8508
|
-
r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
|
|
8509
|
-
r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position
|
|
8510
|
-
|
|
8511
|
-
out[0] = r[0] + b[0];
|
|
8512
|
-
out[1] = r[1] + b[1];
|
|
8513
|
-
out[2] = r[2] + b[2];
|
|
8514
|
-
return out;
|
|
8417
|
+
function distance(a, b) {
|
|
8418
|
+
var x = b[0] - a[0];
|
|
8419
|
+
var y = b[1] - a[1];
|
|
8420
|
+
var z = b[2] - a[2];
|
|
8421
|
+
return Math.hypot(x, y, z);
|
|
8515
8422
|
}
|
|
8516
8423
|
/**
|
|
8517
|
-
*
|
|
8518
|
-
*
|
|
8519
|
-
* @param {ReadonlyVec3} a
|
|
8520
|
-
* @param {ReadonlyVec3} b
|
|
8521
|
-
* @
|
|
8522
|
-
* @returns {vec3} out
|
|
8424
|
+
* Calculates the squared euclidian distance between two vec3's
|
|
8425
|
+
*
|
|
8426
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8427
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8428
|
+
* @returns {Number} squared distance between a and b
|
|
8523
8429
|
*/
|
|
8524
8430
|
|
|
8525
|
-
function
|
|
8526
|
-
var
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
p[1] = a[1] - b[1];
|
|
8531
|
-
p[2] = a[2] - b[2]; //perform rotation
|
|
8532
|
-
|
|
8533
|
-
r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
|
|
8534
|
-
r[1] = p[1];
|
|
8535
|
-
r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position
|
|
8536
|
-
|
|
8537
|
-
out[0] = r[0] + b[0];
|
|
8538
|
-
out[1] = r[1] + b[1];
|
|
8539
|
-
out[2] = r[2] + b[2];
|
|
8540
|
-
return out;
|
|
8431
|
+
function squaredDistance(a, b) {
|
|
8432
|
+
var x = b[0] - a[0];
|
|
8433
|
+
var y = b[1] - a[1];
|
|
8434
|
+
var z = b[2] - a[2];
|
|
8435
|
+
return x * x + y * y + z * z;
|
|
8541
8436
|
}
|
|
8542
8437
|
/**
|
|
8543
|
-
*
|
|
8544
|
-
*
|
|
8545
|
-
* @param {ReadonlyVec3} a
|
|
8546
|
-
* @
|
|
8547
|
-
* @param {Number} rad The angle of rotation in radians
|
|
8548
|
-
* @returns {vec3} out
|
|
8438
|
+
* Calculates the squared length of a vec3
|
|
8439
|
+
*
|
|
8440
|
+
* @param {ReadonlyVec3} a vector to calculate squared length of
|
|
8441
|
+
* @returns {Number} squared length of a
|
|
8549
8442
|
*/
|
|
8550
8443
|
|
|
8551
|
-
function
|
|
8552
|
-
var
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
p[1] = a[1] - b[1];
|
|
8557
|
-
p[2] = a[2] - b[2]; //perform rotation
|
|
8558
|
-
|
|
8559
|
-
r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
|
|
8560
|
-
r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
|
|
8561
|
-
r[2] = p[2]; //translate to correct position
|
|
8562
|
-
|
|
8563
|
-
out[0] = r[0] + b[0];
|
|
8564
|
-
out[1] = r[1] + b[1];
|
|
8565
|
-
out[2] = r[2] + b[2];
|
|
8566
|
-
return out;
|
|
8444
|
+
function squaredLength(a) {
|
|
8445
|
+
var x = a[0];
|
|
8446
|
+
var y = a[1];
|
|
8447
|
+
var z = a[2];
|
|
8448
|
+
return x * x + y * y + z * z;
|
|
8567
8449
|
}
|
|
8568
8450
|
/**
|
|
8569
|
-
*
|
|
8570
|
-
*
|
|
8571
|
-
* @param {
|
|
8572
|
-
* @
|
|
8451
|
+
* Negates the components of a vec3
|
|
8452
|
+
*
|
|
8453
|
+
* @param {vec3} out the receiving vector
|
|
8454
|
+
* @param {ReadonlyVec3} a vector to negate
|
|
8455
|
+
* @returns {vec3} out
|
|
8573
8456
|
*/
|
|
8574
8457
|
|
|
8575
|
-
function
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
by = b[1],
|
|
8581
|
-
bz = b[2],
|
|
8582
|
-
mag1 = Math.sqrt(ax * ax + ay * ay + az * az),
|
|
8583
|
-
mag2 = Math.sqrt(bx * bx + by * by + bz * bz),
|
|
8584
|
-
mag = mag1 * mag2,
|
|
8585
|
-
cosine = mag && dot(a, b) / mag;
|
|
8586
|
-
return Math.acos(Math.min(Math.max(cosine, -1), 1));
|
|
8458
|
+
function negate(out, a) {
|
|
8459
|
+
out[0] = -a[0];
|
|
8460
|
+
out[1] = -a[1];
|
|
8461
|
+
out[2] = -a[2];
|
|
8462
|
+
return out;
|
|
8587
8463
|
}
|
|
8588
8464
|
/**
|
|
8589
|
-
*
|
|
8465
|
+
* Returns the inverse of the components of a vec3
|
|
8590
8466
|
*
|
|
8591
8467
|
* @param {vec3} out the receiving vector
|
|
8468
|
+
* @param {ReadonlyVec3} a vector to invert
|
|
8592
8469
|
* @returns {vec3} out
|
|
8593
8470
|
*/
|
|
8594
8471
|
|
|
8595
|
-
function
|
|
8596
|
-
out[0] =
|
|
8597
|
-
out[1] =
|
|
8598
|
-
out[2] =
|
|
8472
|
+
function inverse(out, a) {
|
|
8473
|
+
out[0] = 1.0 / a[0];
|
|
8474
|
+
out[1] = 1.0 / a[1];
|
|
8475
|
+
out[2] = 1.0 / a[2];
|
|
8599
8476
|
return out;
|
|
8600
8477
|
}
|
|
8601
8478
|
/**
|
|
8602
|
-
*
|
|
8479
|
+
* Normalize a vec3
|
|
8603
8480
|
*
|
|
8604
|
-
* @param {
|
|
8605
|
-
* @
|
|
8481
|
+
* @param {vec3} out the receiving vector
|
|
8482
|
+
* @param {ReadonlyVec3} a vector to normalize
|
|
8483
|
+
* @returns {vec3} out
|
|
8606
8484
|
*/
|
|
8607
8485
|
|
|
8608
|
-
function
|
|
8609
|
-
|
|
8486
|
+
function normalize(out, a) {
|
|
8487
|
+
var x = a[0];
|
|
8488
|
+
var y = a[1];
|
|
8489
|
+
var z = a[2];
|
|
8490
|
+
var len = x * x + y * y + z * z;
|
|
8491
|
+
|
|
8492
|
+
if (len > 0) {
|
|
8493
|
+
//TODO: evaluate use of glm_invsqrt here?
|
|
8494
|
+
len = 1 / Math.sqrt(len);
|
|
8495
|
+
}
|
|
8496
|
+
|
|
8497
|
+
out[0] = a[0] * len;
|
|
8498
|
+
out[1] = a[1] * len;
|
|
8499
|
+
out[2] = a[2] * len;
|
|
8500
|
+
return out;
|
|
8610
8501
|
}
|
|
8611
8502
|
/**
|
|
8612
|
-
*
|
|
8503
|
+
* Calculates the dot product of two vec3's
|
|
8613
8504
|
*
|
|
8614
|
-
* @param {ReadonlyVec3} a
|
|
8615
|
-
* @param {ReadonlyVec3} b
|
|
8616
|
-
* @returns {
|
|
8505
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8506
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8507
|
+
* @returns {Number} dot product of a and b
|
|
8617
8508
|
*/
|
|
8618
8509
|
|
|
8619
|
-
function
|
|
8620
|
-
return a[0]
|
|
8510
|
+
function dot(a, b) {
|
|
8511
|
+
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
8621
8512
|
}
|
|
8622
8513
|
/**
|
|
8623
|
-
*
|
|
8514
|
+
* Computes the cross product of two vec3's
|
|
8624
8515
|
*
|
|
8625
|
-
* @param {
|
|
8626
|
-
* @param {ReadonlyVec3}
|
|
8627
|
-
* @
|
|
8516
|
+
* @param {vec3} out the receiving vector
|
|
8517
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8518
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8519
|
+
* @returns {vec3} out
|
|
8628
8520
|
*/
|
|
8629
8521
|
|
|
8630
|
-
function
|
|
8631
|
-
var
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
var
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8522
|
+
function cross(out, a, b) {
|
|
8523
|
+
var ax = a[0],
|
|
8524
|
+
ay = a[1],
|
|
8525
|
+
az = a[2];
|
|
8526
|
+
var bx = b[0],
|
|
8527
|
+
by = b[1],
|
|
8528
|
+
bz = b[2];
|
|
8529
|
+
out[0] = ay * bz - az * by;
|
|
8530
|
+
out[1] = az * bx - ax * bz;
|
|
8531
|
+
out[2] = ax * by - ay * bx;
|
|
8532
|
+
return out;
|
|
8638
8533
|
}
|
|
8639
8534
|
/**
|
|
8640
|
-
*
|
|
8641
|
-
*
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
*
|
|
8647
|
-
* @function
|
|
8648
|
-
*/
|
|
8649
|
-
|
|
8650
|
-
var mul = multiply;
|
|
8651
|
-
/**
|
|
8652
|
-
* Alias for {@link vec3.divide}
|
|
8653
|
-
* @function
|
|
8654
|
-
*/
|
|
8655
|
-
|
|
8656
|
-
var div = divide;
|
|
8657
|
-
/**
|
|
8658
|
-
* Alias for {@link vec3.distance}
|
|
8659
|
-
* @function
|
|
8660
|
-
*/
|
|
8661
|
-
|
|
8662
|
-
var dist = distance;
|
|
8663
|
-
/**
|
|
8664
|
-
* Alias for {@link vec3.squaredDistance}
|
|
8665
|
-
* @function
|
|
8666
|
-
*/
|
|
8667
|
-
|
|
8668
|
-
var sqrDist = squaredDistance;
|
|
8669
|
-
/**
|
|
8670
|
-
* Alias for {@link vec3.length}
|
|
8671
|
-
* @function
|
|
8672
|
-
*/
|
|
8673
|
-
|
|
8674
|
-
var len = length;
|
|
8675
|
-
/**
|
|
8676
|
-
* Alias for {@link vec3.squaredLength}
|
|
8677
|
-
* @function
|
|
8535
|
+
* Performs a linear interpolation between two vec3's
|
|
8536
|
+
*
|
|
8537
|
+
* @param {vec3} out the receiving vector
|
|
8538
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8539
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8540
|
+
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
8541
|
+
* @returns {vec3} out
|
|
8678
8542
|
*/
|
|
8679
8543
|
|
|
8680
|
-
|
|
8544
|
+
function lerp(out, a, b, t) {
|
|
8545
|
+
var ax = a[0];
|
|
8546
|
+
var ay = a[1];
|
|
8547
|
+
var az = a[2];
|
|
8548
|
+
out[0] = ax + t * (b[0] - ax);
|
|
8549
|
+
out[1] = ay + t * (b[1] - ay);
|
|
8550
|
+
out[2] = az + t * (b[2] - az);
|
|
8551
|
+
return out;
|
|
8552
|
+
}
|
|
8681
8553
|
/**
|
|
8682
|
-
*
|
|
8554
|
+
* Performs a hermite interpolation with two control points
|
|
8683
8555
|
*
|
|
8684
|
-
* @param {
|
|
8685
|
-
* @param {
|
|
8686
|
-
* @param {
|
|
8687
|
-
* @param {
|
|
8688
|
-
* @param {
|
|
8689
|
-
* @param {
|
|
8690
|
-
* @returns {
|
|
8691
|
-
* @function
|
|
8556
|
+
* @param {vec3} out the receiving vector
|
|
8557
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8558
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8559
|
+
* @param {ReadonlyVec3} c the third operand
|
|
8560
|
+
* @param {ReadonlyVec3} d the fourth operand
|
|
8561
|
+
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
8562
|
+
* @returns {vec3} out
|
|
8692
8563
|
*/
|
|
8693
8564
|
|
|
8694
|
-
|
|
8695
|
-
var
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
}
|
|
8706
|
-
|
|
8707
|
-
if (count) {
|
|
8708
|
-
l = Math.min(count * stride + offset, a.length);
|
|
8709
|
-
} else {
|
|
8710
|
-
l = a.length;
|
|
8711
|
-
}
|
|
8712
|
-
|
|
8713
|
-
for (i = offset; i < l; i += stride) {
|
|
8714
|
-
vec[0] = a[i];
|
|
8715
|
-
vec[1] = a[i + 1];
|
|
8716
|
-
vec[2] = a[i + 2];
|
|
8717
|
-
fn(vec, vec, arg);
|
|
8718
|
-
a[i] = vec[0];
|
|
8719
|
-
a[i + 1] = vec[1];
|
|
8720
|
-
a[i + 2] = vec[2];
|
|
8721
|
-
}
|
|
8722
|
-
|
|
8723
|
-
return a;
|
|
8724
|
-
};
|
|
8725
|
-
}();
|
|
8726
|
-
|
|
8727
|
-
/***/ }),
|
|
8728
|
-
|
|
8729
|
-
/***/ "../../node_modules/gl-matrix/esm/vec4.js":
|
|
8730
|
-
/*!*********************************************************************!*\
|
|
8731
|
-
!*** /Users/alasarr/dev/luma.gl/node_modules/gl-matrix/esm/vec4.js ***!
|
|
8732
|
-
\*********************************************************************/
|
|
8733
|
-
/*! exports provided: create, clone, fromValues, copy, set, add, subtract, multiply, divide, ceil, floor, min, max, round, scale, scaleAndAdd, distance, squaredDistance, length, squaredLength, negate, inverse, normalize, dot, cross, lerp, random, transformMat4, transformQuat, zero, str, exactEquals, equals, sub, mul, div, dist, sqrDist, len, sqrLen, forEach */
|
|
8734
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8735
|
-
|
|
8736
|
-
"use strict";
|
|
8737
|
-
__webpack_require__.r(__webpack_exports__);
|
|
8738
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; });
|
|
8739
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; });
|
|
8740
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; });
|
|
8741
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; });
|
|
8742
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
|
|
8743
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; });
|
|
8744
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; });
|
|
8745
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; });
|
|
8746
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divide", function() { return divide; });
|
|
8747
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ceil", function() { return ceil; });
|
|
8748
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "floor", function() { return floor; });
|
|
8749
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
|
|
8750
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
|
|
8751
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "round", function() { return round; });
|
|
8752
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; });
|
|
8753
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scaleAndAdd", function() { return scaleAndAdd; });
|
|
8754
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distance", function() { return distance; });
|
|
8755
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squaredDistance", function() { return squaredDistance; });
|
|
8756
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "length", function() { return length; });
|
|
8757
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squaredLength", function() { return squaredLength; });
|
|
8758
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "negate", function() { return negate; });
|
|
8759
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inverse", function() { return inverse; });
|
|
8760
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return normalize; });
|
|
8761
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dot", function() { return dot; });
|
|
8762
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return cross; });
|
|
8763
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lerp", function() { return lerp; });
|
|
8764
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "random", function() { return random; });
|
|
8765
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformMat4", function() { return transformMat4; });
|
|
8766
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformQuat", function() { return transformQuat; });
|
|
8767
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zero", function() { return zero; });
|
|
8768
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; });
|
|
8769
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; });
|
|
8770
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; });
|
|
8771
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; });
|
|
8772
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; });
|
|
8773
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "div", function() { return div; });
|
|
8774
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dist", function() { return dist; });
|
|
8775
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrDist", function() { return sqrDist; });
|
|
8776
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "len", function() { return len; });
|
|
8777
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrLen", function() { return sqrLen; });
|
|
8778
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
|
|
8779
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "../../node_modules/gl-matrix/esm/common.js");
|
|
8780
|
-
|
|
8565
|
+
function hermite(out, a, b, c, d, t) {
|
|
8566
|
+
var factorTimes2 = t * t;
|
|
8567
|
+
var factor1 = factorTimes2 * (2 * t - 3) + 1;
|
|
8568
|
+
var factor2 = factorTimes2 * (t - 2) + t;
|
|
8569
|
+
var factor3 = factorTimes2 * (t - 1);
|
|
8570
|
+
var factor4 = factorTimes2 * (3 - 2 * t);
|
|
8571
|
+
out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
|
|
8572
|
+
out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
|
|
8573
|
+
out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
|
|
8574
|
+
return out;
|
|
8575
|
+
}
|
|
8781
8576
|
/**
|
|
8782
|
-
*
|
|
8783
|
-
*
|
|
8577
|
+
* Performs a bezier interpolation with two control points
|
|
8578
|
+
*
|
|
8579
|
+
* @param {vec3} out the receiving vector
|
|
8580
|
+
* @param {ReadonlyVec3} a the first operand
|
|
8581
|
+
* @param {ReadonlyVec3} b the second operand
|
|
8582
|
+
* @param {ReadonlyVec3} c the third operand
|
|
8583
|
+
* @param {ReadonlyVec3} d the fourth operand
|
|
8584
|
+
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
8585
|
+
* @returns {vec3} out
|
|
8784
8586
|
*/
|
|
8785
8587
|
|
|
8588
|
+
function bezier(out, a, b, c, d, t) {
|
|
8589
|
+
var inverseFactor = 1 - t;
|
|
8590
|
+
var inverseFactorTimesTwo = inverseFactor * inverseFactor;
|
|
8591
|
+
var factorTimes2 = t * t;
|
|
8592
|
+
var factor1 = inverseFactorTimesTwo * inverseFactor;
|
|
8593
|
+
var factor2 = 3 * t * inverseFactorTimesTwo;
|
|
8594
|
+
var factor3 = 3 * factorTimes2 * inverseFactor;
|
|
8595
|
+
var factor4 = factorTimes2 * t;
|
|
8596
|
+
out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
|
|
8597
|
+
out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
|
|
8598
|
+
out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
|
|
8599
|
+
return out;
|
|
8600
|
+
}
|
|
8786
8601
|
/**
|
|
8787
|
-
*
|
|
8602
|
+
* Generates a random vector with the given scale
|
|
8788
8603
|
*
|
|
8789
|
-
* @
|
|
8604
|
+
* @param {vec3} out the receiving vector
|
|
8605
|
+
* @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
|
|
8606
|
+
* @returns {vec3} out
|
|
8790
8607
|
*/
|
|
8791
8608
|
|
|
8792
|
-
function
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
}
|
|
8801
|
-
|
|
8609
|
+
function random(out, scale) {
|
|
8610
|
+
scale = scale || 1.0;
|
|
8611
|
+
var r = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2.0 * Math.PI;
|
|
8612
|
+
var z = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2.0 - 1.0;
|
|
8613
|
+
var zScale = Math.sqrt(1.0 - z * z) * scale;
|
|
8614
|
+
out[0] = Math.cos(r) * zScale;
|
|
8615
|
+
out[1] = Math.sin(r) * zScale;
|
|
8616
|
+
out[2] = z * scale;
|
|
8802
8617
|
return out;
|
|
8803
8618
|
}
|
|
8804
8619
|
/**
|
|
8805
|
-
*
|
|
8620
|
+
* Transforms the vec3 with a mat4.
|
|
8621
|
+
* 4th vector component is implicitly '1'
|
|
8806
8622
|
*
|
|
8807
|
-
* @param {
|
|
8808
|
-
* @
|
|
8623
|
+
* @param {vec3} out the receiving vector
|
|
8624
|
+
* @param {ReadonlyVec3} a the vector to transform
|
|
8625
|
+
* @param {ReadonlyMat4} m matrix to transform with
|
|
8626
|
+
* @returns {vec3} out
|
|
8809
8627
|
*/
|
|
8810
8628
|
|
|
8811
|
-
function
|
|
8812
|
-
var
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8629
|
+
function transformMat4(out, a, m) {
|
|
8630
|
+
var x = a[0],
|
|
8631
|
+
y = a[1],
|
|
8632
|
+
z = a[2];
|
|
8633
|
+
var w = m[3] * x + m[7] * y + m[11] * z + m[15];
|
|
8634
|
+
w = w || 1.0;
|
|
8635
|
+
out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
|
|
8636
|
+
out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
|
|
8637
|
+
out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
|
|
8817
8638
|
return out;
|
|
8818
8639
|
}
|
|
8819
8640
|
/**
|
|
8820
|
-
*
|
|
8641
|
+
* Transforms the vec3 with a mat3.
|
|
8821
8642
|
*
|
|
8822
|
-
* @param {
|
|
8823
|
-
* @param {
|
|
8824
|
-
* @param {
|
|
8825
|
-
* @
|
|
8826
|
-
* @returns {vec4} a new 4D vector
|
|
8643
|
+
* @param {vec3} out the receiving vector
|
|
8644
|
+
* @param {ReadonlyVec3} a the vector to transform
|
|
8645
|
+
* @param {ReadonlyMat3} m the 3x3 matrix to transform with
|
|
8646
|
+
* @returns {vec3} out
|
|
8827
8647
|
*/
|
|
8828
8648
|
|
|
8829
|
-
function
|
|
8830
|
-
var
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
out[
|
|
8834
|
-
out[
|
|
8649
|
+
function transformMat3(out, a, m) {
|
|
8650
|
+
var x = a[0],
|
|
8651
|
+
y = a[1],
|
|
8652
|
+
z = a[2];
|
|
8653
|
+
out[0] = x * m[0] + y * m[3] + z * m[6];
|
|
8654
|
+
out[1] = x * m[1] + y * m[4] + z * m[7];
|
|
8655
|
+
out[2] = x * m[2] + y * m[5] + z * m[8];
|
|
8835
8656
|
return out;
|
|
8836
8657
|
}
|
|
8837
8658
|
/**
|
|
8838
|
-
*
|
|
8659
|
+
* Transforms the vec3 with a quat
|
|
8660
|
+
* Can also be used for dual quaternions. (Multiply it with the real part)
|
|
8839
8661
|
*
|
|
8840
|
-
* @param {
|
|
8841
|
-
* @param {
|
|
8842
|
-
* @
|
|
8662
|
+
* @param {vec3} out the receiving vector
|
|
8663
|
+
* @param {ReadonlyVec3} a the vector to transform
|
|
8664
|
+
* @param {ReadonlyQuat} q quaternion to transform with
|
|
8665
|
+
* @returns {vec3} out
|
|
8843
8666
|
*/
|
|
8844
8667
|
|
|
8845
|
-
function
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8668
|
+
function transformQuat(out, a, q) {
|
|
8669
|
+
// benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed
|
|
8670
|
+
var qx = q[0],
|
|
8671
|
+
qy = q[1],
|
|
8672
|
+
qz = q[2],
|
|
8673
|
+
qw = q[3];
|
|
8674
|
+
var x = a[0],
|
|
8675
|
+
y = a[1],
|
|
8676
|
+
z = a[2]; // var qvec = [qx, qy, qz];
|
|
8677
|
+
// var uv = vec3.cross([], qvec, a);
|
|
8678
|
+
|
|
8679
|
+
var uvx = qy * z - qz * y,
|
|
8680
|
+
uvy = qz * x - qx * z,
|
|
8681
|
+
uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);
|
|
8682
|
+
|
|
8683
|
+
var uuvx = qy * uvz - qz * uvy,
|
|
8684
|
+
uuvy = qz * uvx - qx * uvz,
|
|
8685
|
+
uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);
|
|
8686
|
+
|
|
8687
|
+
var w2 = qw * 2;
|
|
8688
|
+
uvx *= w2;
|
|
8689
|
+
uvy *= w2;
|
|
8690
|
+
uvz *= w2; // vec3.scale(uuv, uuv, 2);
|
|
8691
|
+
|
|
8692
|
+
uuvx *= 2;
|
|
8693
|
+
uuvy *= 2;
|
|
8694
|
+
uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));
|
|
8695
|
+
|
|
8696
|
+
out[0] = x + uvx + uuvx;
|
|
8697
|
+
out[1] = y + uvy + uuvy;
|
|
8698
|
+
out[2] = z + uvz + uuvz;
|
|
8850
8699
|
return out;
|
|
8851
8700
|
}
|
|
8852
8701
|
/**
|
|
8853
|
-
*
|
|
8854
|
-
*
|
|
8855
|
-
* @param {
|
|
8856
|
-
* @param {
|
|
8857
|
-
* @param {Number}
|
|
8858
|
-
* @
|
|
8859
|
-
* @param {Number} w W component
|
|
8860
|
-
* @returns {vec4} out
|
|
8702
|
+
* Rotate a 3D vector around the x-axis
|
|
8703
|
+
* @param {vec3} out The receiving vec3
|
|
8704
|
+
* @param {ReadonlyVec3} a The vec3 point to rotate
|
|
8705
|
+
* @param {ReadonlyVec3} b The origin of the rotation
|
|
8706
|
+
* @param {Number} rad The angle of rotation in radians
|
|
8707
|
+
* @returns {vec3} out
|
|
8861
8708
|
*/
|
|
8862
8709
|
|
|
8863
|
-
function
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8710
|
+
function rotateX(out, a, b, rad) {
|
|
8711
|
+
var p = [],
|
|
8712
|
+
r = []; //Translate point to the origin
|
|
8713
|
+
|
|
8714
|
+
p[0] = a[0] - b[0];
|
|
8715
|
+
p[1] = a[1] - b[1];
|
|
8716
|
+
p[2] = a[2] - b[2]; //perform rotation
|
|
8717
|
+
|
|
8718
|
+
r[0] = p[0];
|
|
8719
|
+
r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
|
|
8720
|
+
r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position
|
|
8721
|
+
|
|
8722
|
+
out[0] = r[0] + b[0];
|
|
8723
|
+
out[1] = r[1] + b[1];
|
|
8724
|
+
out[2] = r[2] + b[2];
|
|
8868
8725
|
return out;
|
|
8869
8726
|
}
|
|
8870
8727
|
/**
|
|
8871
|
-
*
|
|
8872
|
-
*
|
|
8873
|
-
* @param {
|
|
8874
|
-
* @param {
|
|
8875
|
-
* @param {
|
|
8876
|
-
* @returns {
|
|
8728
|
+
* Rotate a 3D vector around the y-axis
|
|
8729
|
+
* @param {vec3} out The receiving vec3
|
|
8730
|
+
* @param {ReadonlyVec3} a The vec3 point to rotate
|
|
8731
|
+
* @param {ReadonlyVec3} b The origin of the rotation
|
|
8732
|
+
* @param {Number} rad The angle of rotation in radians
|
|
8733
|
+
* @returns {vec3} out
|
|
8877
8734
|
*/
|
|
8878
8735
|
|
|
8879
|
-
function
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8736
|
+
function rotateY(out, a, b, rad) {
|
|
8737
|
+
var p = [],
|
|
8738
|
+
r = []; //Translate point to the origin
|
|
8739
|
+
|
|
8740
|
+
p[0] = a[0] - b[0];
|
|
8741
|
+
p[1] = a[1] - b[1];
|
|
8742
|
+
p[2] = a[2] - b[2]; //perform rotation
|
|
8743
|
+
|
|
8744
|
+
r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
|
|
8745
|
+
r[1] = p[1];
|
|
8746
|
+
r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position
|
|
8747
|
+
|
|
8748
|
+
out[0] = r[0] + b[0];
|
|
8749
|
+
out[1] = r[1] + b[1];
|
|
8750
|
+
out[2] = r[2] + b[2];
|
|
8884
8751
|
return out;
|
|
8885
8752
|
}
|
|
8886
8753
|
/**
|
|
8887
|
-
*
|
|
8754
|
+
* Rotate a 3D vector around the z-axis
|
|
8755
|
+
* @param {vec3} out The receiving vec3
|
|
8756
|
+
* @param {ReadonlyVec3} a The vec3 point to rotate
|
|
8757
|
+
* @param {ReadonlyVec3} b The origin of the rotation
|
|
8758
|
+
* @param {Number} rad The angle of rotation in radians
|
|
8759
|
+
* @returns {vec3} out
|
|
8760
|
+
*/
|
|
8761
|
+
|
|
8762
|
+
function rotateZ(out, a, b, rad) {
|
|
8763
|
+
var p = [],
|
|
8764
|
+
r = []; //Translate point to the origin
|
|
8765
|
+
|
|
8766
|
+
p[0] = a[0] - b[0];
|
|
8767
|
+
p[1] = a[1] - b[1];
|
|
8768
|
+
p[2] = a[2] - b[2]; //perform rotation
|
|
8769
|
+
|
|
8770
|
+
r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
|
|
8771
|
+
r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
|
|
8772
|
+
r[2] = p[2]; //translate to correct position
|
|
8773
|
+
|
|
8774
|
+
out[0] = r[0] + b[0];
|
|
8775
|
+
out[1] = r[1] + b[1];
|
|
8776
|
+
out[2] = r[2] + b[2];
|
|
8777
|
+
return out;
|
|
8778
|
+
}
|
|
8779
|
+
/**
|
|
8780
|
+
* Get the angle between two 3D vectors
|
|
8781
|
+
* @param {ReadonlyVec3} a The first operand
|
|
8782
|
+
* @param {ReadonlyVec3} b The second operand
|
|
8783
|
+
* @returns {Number} The angle in radians
|
|
8784
|
+
*/
|
|
8785
|
+
|
|
8786
|
+
function angle(a, b) {
|
|
8787
|
+
var ax = a[0],
|
|
8788
|
+
ay = a[1],
|
|
8789
|
+
az = a[2],
|
|
8790
|
+
bx = b[0],
|
|
8791
|
+
by = b[1],
|
|
8792
|
+
bz = b[2],
|
|
8793
|
+
mag1 = Math.sqrt(ax * ax + ay * ay + az * az),
|
|
8794
|
+
mag2 = Math.sqrt(bx * bx + by * by + bz * bz),
|
|
8795
|
+
mag = mag1 * mag2,
|
|
8796
|
+
cosine = mag && dot(a, b) / mag;
|
|
8797
|
+
return Math.acos(Math.min(Math.max(cosine, -1), 1));
|
|
8798
|
+
}
|
|
8799
|
+
/**
|
|
8800
|
+
* Set the components of a vec3 to zero
|
|
8888
8801
|
*
|
|
8889
|
-
* @param {
|
|
8890
|
-
* @
|
|
8891
|
-
* @param {ReadonlyVec4} b the second operand
|
|
8892
|
-
* @returns {vec4} out
|
|
8802
|
+
* @param {vec3} out the receiving vector
|
|
8803
|
+
* @returns {vec3} out
|
|
8893
8804
|
*/
|
|
8894
8805
|
|
|
8895
|
-
function
|
|
8896
|
-
out[0] =
|
|
8897
|
-
out[1] =
|
|
8898
|
-
out[2] =
|
|
8899
|
-
out[3] = a[3] - b[3];
|
|
8806
|
+
function zero(out) {
|
|
8807
|
+
out[0] = 0.0;
|
|
8808
|
+
out[1] = 0.0;
|
|
8809
|
+
out[2] = 0.0;
|
|
8900
8810
|
return out;
|
|
8901
8811
|
}
|
|
8902
8812
|
/**
|
|
8903
|
-
*
|
|
8813
|
+
* Returns a string representation of a vector
|
|
8904
8814
|
*
|
|
8905
|
-
* @param {
|
|
8906
|
-
* @
|
|
8907
|
-
* @param {ReadonlyVec4} b the second operand
|
|
8908
|
-
* @returns {vec4} out
|
|
8815
|
+
* @param {ReadonlyVec3} a vector to represent as a string
|
|
8816
|
+
* @returns {String} string representation of the vector
|
|
8909
8817
|
*/
|
|
8910
8818
|
|
|
8911
|
-
function
|
|
8912
|
-
|
|
8913
|
-
out[1] = a[1] * b[1];
|
|
8914
|
-
out[2] = a[2] * b[2];
|
|
8915
|
-
out[3] = a[3] * b[3];
|
|
8916
|
-
return out;
|
|
8819
|
+
function str(a) {
|
|
8820
|
+
return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
|
|
8917
8821
|
}
|
|
8918
8822
|
/**
|
|
8919
|
-
*
|
|
8823
|
+
* Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
|
|
8920
8824
|
*
|
|
8921
|
-
* @param {
|
|
8922
|
-
* @param {
|
|
8923
|
-
* @
|
|
8924
|
-
* @returns {vec4} out
|
|
8825
|
+
* @param {ReadonlyVec3} a The first vector.
|
|
8826
|
+
* @param {ReadonlyVec3} b The second vector.
|
|
8827
|
+
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
8925
8828
|
*/
|
|
8926
8829
|
|
|
8927
|
-
function
|
|
8928
|
-
|
|
8929
|
-
out[1] = a[1] / b[1];
|
|
8930
|
-
out[2] = a[2] / b[2];
|
|
8931
|
-
out[3] = a[3] / b[3];
|
|
8932
|
-
return out;
|
|
8830
|
+
function exactEquals(a, b) {
|
|
8831
|
+
return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];
|
|
8933
8832
|
}
|
|
8934
8833
|
/**
|
|
8935
|
-
*
|
|
8834
|
+
* Returns whether or not the vectors have approximately the same elements in the same position.
|
|
8936
8835
|
*
|
|
8937
|
-
* @param {
|
|
8938
|
-
* @param {
|
|
8939
|
-
* @returns {
|
|
8836
|
+
* @param {ReadonlyVec3} a The first vector.
|
|
8837
|
+
* @param {ReadonlyVec3} b The second vector.
|
|
8838
|
+
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
8940
8839
|
*/
|
|
8941
8840
|
|
|
8942
|
-
function
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8841
|
+
function equals(a, b) {
|
|
8842
|
+
var a0 = a[0],
|
|
8843
|
+
a1 = a[1],
|
|
8844
|
+
a2 = a[2];
|
|
8845
|
+
var b0 = b[0],
|
|
8846
|
+
b1 = b[1],
|
|
8847
|
+
b2 = b[2];
|
|
8848
|
+
return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a2), Math.abs(b2));
|
|
8948
8849
|
}
|
|
8949
8850
|
/**
|
|
8950
|
-
*
|
|
8951
|
-
*
|
|
8952
|
-
* @param {vec4} out the receiving vector
|
|
8953
|
-
* @param {ReadonlyVec4} a vector to floor
|
|
8954
|
-
* @returns {vec4} out
|
|
8851
|
+
* Alias for {@link vec3.subtract}
|
|
8852
|
+
* @function
|
|
8955
8853
|
*/
|
|
8956
8854
|
|
|
8957
|
-
|
|
8958
|
-
out[0] = Math.floor(a[0]);
|
|
8959
|
-
out[1] = Math.floor(a[1]);
|
|
8960
|
-
out[2] = Math.floor(a[2]);
|
|
8961
|
-
out[3] = Math.floor(a[3]);
|
|
8962
|
-
return out;
|
|
8963
|
-
}
|
|
8855
|
+
var sub = subtract;
|
|
8964
8856
|
/**
|
|
8965
|
-
*
|
|
8966
|
-
*
|
|
8967
|
-
* @param {vec4} out the receiving vector
|
|
8968
|
-
* @param {ReadonlyVec4} a the first operand
|
|
8969
|
-
* @param {ReadonlyVec4} b the second operand
|
|
8970
|
-
* @returns {vec4} out
|
|
8857
|
+
* Alias for {@link vec3.multiply}
|
|
8858
|
+
* @function
|
|
8971
8859
|
*/
|
|
8972
8860
|
|
|
8973
|
-
|
|
8974
|
-
out[0] = Math.min(a[0], b[0]);
|
|
8975
|
-
out[1] = Math.min(a[1], b[1]);
|
|
8976
|
-
out[2] = Math.min(a[2], b[2]);
|
|
8977
|
-
out[3] = Math.min(a[3], b[3]);
|
|
8978
|
-
return out;
|
|
8979
|
-
}
|
|
8861
|
+
var mul = multiply;
|
|
8980
8862
|
/**
|
|
8981
|
-
*
|
|
8982
|
-
*
|
|
8983
|
-
* @param {vec4} out the receiving vector
|
|
8984
|
-
* @param {ReadonlyVec4} a the first operand
|
|
8985
|
-
* @param {ReadonlyVec4} b the second operand
|
|
8986
|
-
* @returns {vec4} out
|
|
8863
|
+
* Alias for {@link vec3.divide}
|
|
8864
|
+
* @function
|
|
8987
8865
|
*/
|
|
8988
8866
|
|
|
8989
|
-
|
|
8990
|
-
out[0] = Math.max(a[0], b[0]);
|
|
8991
|
-
out[1] = Math.max(a[1], b[1]);
|
|
8992
|
-
out[2] = Math.max(a[2], b[2]);
|
|
8993
|
-
out[3] = Math.max(a[3], b[3]);
|
|
8994
|
-
return out;
|
|
8995
|
-
}
|
|
8867
|
+
var div = divide;
|
|
8996
8868
|
/**
|
|
8997
|
-
*
|
|
8998
|
-
*
|
|
8999
|
-
* @param {vec4} out the receiving vector
|
|
9000
|
-
* @param {ReadonlyVec4} a vector to round
|
|
9001
|
-
* @returns {vec4} out
|
|
8869
|
+
* Alias for {@link vec3.distance}
|
|
8870
|
+
* @function
|
|
9002
8871
|
*/
|
|
9003
8872
|
|
|
9004
|
-
|
|
9005
|
-
out[0] = Math.round(a[0]);
|
|
9006
|
-
out[1] = Math.round(a[1]);
|
|
9007
|
-
out[2] = Math.round(a[2]);
|
|
9008
|
-
out[3] = Math.round(a[3]);
|
|
9009
|
-
return out;
|
|
9010
|
-
}
|
|
8873
|
+
var dist = distance;
|
|
9011
8874
|
/**
|
|
9012
|
-
*
|
|
9013
|
-
*
|
|
9014
|
-
* @param {vec4} out the receiving vector
|
|
9015
|
-
* @param {ReadonlyVec4} a the vector to scale
|
|
9016
|
-
* @param {Number} b amount to scale the vector by
|
|
9017
|
-
* @returns {vec4} out
|
|
8875
|
+
* Alias for {@link vec3.squaredDistance}
|
|
8876
|
+
* @function
|
|
9018
8877
|
*/
|
|
9019
8878
|
|
|
9020
|
-
|
|
9021
|
-
out[0] = a[0] * b;
|
|
9022
|
-
out[1] = a[1] * b;
|
|
9023
|
-
out[2] = a[2] * b;
|
|
9024
|
-
out[3] = a[3] * b;
|
|
9025
|
-
return out;
|
|
9026
|
-
}
|
|
8879
|
+
var sqrDist = squaredDistance;
|
|
9027
8880
|
/**
|
|
9028
|
-
*
|
|
9029
|
-
*
|
|
9030
|
-
* @param {vec4} out the receiving vector
|
|
9031
|
-
* @param {ReadonlyVec4} a the first operand
|
|
9032
|
-
* @param {ReadonlyVec4} b the second operand
|
|
9033
|
-
* @param {Number} scale the amount to scale b by before adding
|
|
9034
|
-
* @returns {vec4} out
|
|
8881
|
+
* Alias for {@link vec3.length}
|
|
8882
|
+
* @function
|
|
9035
8883
|
*/
|
|
9036
8884
|
|
|
9037
|
-
|
|
9038
|
-
out[0] = a[0] + b[0] * scale;
|
|
9039
|
-
out[1] = a[1] + b[1] * scale;
|
|
9040
|
-
out[2] = a[2] + b[2] * scale;
|
|
9041
|
-
out[3] = a[3] + b[3] * scale;
|
|
9042
|
-
return out;
|
|
9043
|
-
}
|
|
8885
|
+
var len = length;
|
|
9044
8886
|
/**
|
|
9045
|
-
*
|
|
9046
|
-
*
|
|
9047
|
-
* @param {ReadonlyVec4} a the first operand
|
|
9048
|
-
* @param {ReadonlyVec4} b the second operand
|
|
9049
|
-
* @returns {Number} distance between a and b
|
|
8887
|
+
* Alias for {@link vec3.squaredLength}
|
|
8888
|
+
* @function
|
|
9050
8889
|
*/
|
|
9051
8890
|
|
|
9052
|
-
|
|
9053
|
-
var x = b[0] - a[0];
|
|
9054
|
-
var y = b[1] - a[1];
|
|
9055
|
-
var z = b[2] - a[2];
|
|
9056
|
-
var w = b[3] - a[3];
|
|
9057
|
-
return Math.hypot(x, y, z, w);
|
|
9058
|
-
}
|
|
8891
|
+
var sqrLen = squaredLength;
|
|
9059
8892
|
/**
|
|
9060
|
-
*
|
|
8893
|
+
* Perform some operation over an array of vec3s.
|
|
9061
8894
|
*
|
|
9062
|
-
* @param {
|
|
9063
|
-
* @param {
|
|
9064
|
-
* @
|
|
8895
|
+
* @param {Array} a the array of vectors to iterate over
|
|
8896
|
+
* @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
|
|
8897
|
+
* @param {Number} offset Number of elements to skip at the beginning of the array
|
|
8898
|
+
* @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
|
|
8899
|
+
* @param {Function} fn Function to call for each vector in the array
|
|
8900
|
+
* @param {Object} [arg] additional argument to pass to fn
|
|
8901
|
+
* @returns {Array} a
|
|
8902
|
+
* @function
|
|
9065
8903
|
*/
|
|
9066
8904
|
|
|
9067
|
-
function
|
|
9068
|
-
var
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
8905
|
+
var forEach = function () {
|
|
8906
|
+
var vec = create();
|
|
8907
|
+
return function (a, stride, offset, count, fn, arg) {
|
|
8908
|
+
var i, l;
|
|
8909
|
+
|
|
8910
|
+
if (!stride) {
|
|
8911
|
+
stride = 3;
|
|
8912
|
+
}
|
|
8913
|
+
|
|
8914
|
+
if (!offset) {
|
|
8915
|
+
offset = 0;
|
|
8916
|
+
}
|
|
8917
|
+
|
|
8918
|
+
if (count) {
|
|
8919
|
+
l = Math.min(count * stride + offset, a.length);
|
|
8920
|
+
} else {
|
|
8921
|
+
l = a.length;
|
|
8922
|
+
}
|
|
8923
|
+
|
|
8924
|
+
for (i = offset; i < l; i += stride) {
|
|
8925
|
+
vec[0] = a[i];
|
|
8926
|
+
vec[1] = a[i + 1];
|
|
8927
|
+
vec[2] = a[i + 2];
|
|
8928
|
+
fn(vec, vec, arg);
|
|
8929
|
+
a[i] = vec[0];
|
|
8930
|
+
a[i + 1] = vec[1];
|
|
8931
|
+
a[i + 2] = vec[2];
|
|
8932
|
+
}
|
|
8933
|
+
|
|
8934
|
+
return a;
|
|
8935
|
+
};
|
|
8936
|
+
}();
|
|
8937
|
+
|
|
8938
|
+
/***/ }),
|
|
8939
|
+
|
|
8940
|
+
/***/ "../../node_modules/gl-matrix/esm/vec4.js":
|
|
8941
|
+
/*!**********************************************************************!*\
|
|
8942
|
+
!*** /Users/missx/Source/luma.gl/node_modules/gl-matrix/esm/vec4.js ***!
|
|
8943
|
+
\**********************************************************************/
|
|
8944
|
+
/*! exports provided: create, clone, fromValues, copy, set, add, subtract, multiply, divide, ceil, floor, min, max, round, scale, scaleAndAdd, distance, squaredDistance, length, squaredLength, negate, inverse, normalize, dot, cross, lerp, random, transformMat4, transformQuat, zero, str, exactEquals, equals, sub, mul, div, dist, sqrDist, len, sqrLen, forEach */
|
|
8945
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8946
|
+
|
|
8947
|
+
"use strict";
|
|
8948
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8949
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; });
|
|
8950
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; });
|
|
8951
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromValues", function() { return fromValues; });
|
|
8952
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; });
|
|
8953
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
|
|
8954
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; });
|
|
8955
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subtract", function() { return subtract; });
|
|
8956
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiply", function() { return multiply; });
|
|
8957
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divide", function() { return divide; });
|
|
8958
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ceil", function() { return ceil; });
|
|
8959
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "floor", function() { return floor; });
|
|
8960
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
|
|
8961
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
|
|
8962
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "round", function() { return round; });
|
|
8963
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scale", function() { return scale; });
|
|
8964
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scaleAndAdd", function() { return scaleAndAdd; });
|
|
8965
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distance", function() { return distance; });
|
|
8966
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squaredDistance", function() { return squaredDistance; });
|
|
8967
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "length", function() { return length; });
|
|
8968
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squaredLength", function() { return squaredLength; });
|
|
8969
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "negate", function() { return negate; });
|
|
8970
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inverse", function() { return inverse; });
|
|
8971
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return normalize; });
|
|
8972
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dot", function() { return dot; });
|
|
8973
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return cross; });
|
|
8974
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lerp", function() { return lerp; });
|
|
8975
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "random", function() { return random; });
|
|
8976
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformMat4", function() { return transformMat4; });
|
|
8977
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformQuat", function() { return transformQuat; });
|
|
8978
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zero", function() { return zero; });
|
|
8979
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "str", function() { return str; });
|
|
8980
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exactEquals", function() { return exactEquals; });
|
|
8981
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; });
|
|
8982
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return sub; });
|
|
8983
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mul", function() { return mul; });
|
|
8984
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "div", function() { return div; });
|
|
8985
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dist", function() { return dist; });
|
|
8986
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrDist", function() { return sqrDist; });
|
|
8987
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "len", function() { return len; });
|
|
8988
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrLen", function() { return sqrLen; });
|
|
8989
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
|
|
8990
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common.js */ "../../node_modules/gl-matrix/esm/common.js");
|
|
8991
|
+
|
|
9074
8992
|
/**
|
|
9075
|
-
*
|
|
9076
|
-
*
|
|
9077
|
-
* @param {ReadonlyVec4} a vector to calculate length of
|
|
9078
|
-
* @returns {Number} length of a
|
|
8993
|
+
* 4 Dimensional Vector
|
|
8994
|
+
* @module vec4
|
|
9079
8995
|
*/
|
|
9080
8996
|
|
|
9081
|
-
function length(a) {
|
|
9082
|
-
var x = a[0];
|
|
9083
|
-
var y = a[1];
|
|
9084
|
-
var z = a[2];
|
|
9085
|
-
var w = a[3];
|
|
9086
|
-
return Math.hypot(x, y, z, w);
|
|
9087
|
-
}
|
|
9088
8997
|
/**
|
|
9089
|
-
*
|
|
8998
|
+
* Creates a new, empty vec4
|
|
9090
8999
|
*
|
|
9091
|
-
* @
|
|
9092
|
-
* @returns {Number} squared length of a
|
|
9000
|
+
* @returns {vec4} a new 4D vector
|
|
9093
9001
|
*/
|
|
9094
9002
|
|
|
9095
|
-
function
|
|
9096
|
-
var
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9003
|
+
function create() {
|
|
9004
|
+
var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](4);
|
|
9005
|
+
|
|
9006
|
+
if (_common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"] != Float32Array) {
|
|
9007
|
+
out[0] = 0;
|
|
9008
|
+
out[1] = 0;
|
|
9009
|
+
out[2] = 0;
|
|
9010
|
+
out[3] = 0;
|
|
9011
|
+
}
|
|
9012
|
+
|
|
9013
|
+
return out;
|
|
9101
9014
|
}
|
|
9102
9015
|
/**
|
|
9103
|
-
*
|
|
9016
|
+
* Creates a new vec4 initialized with values from an existing vector
|
|
9104
9017
|
*
|
|
9105
|
-
* @param {
|
|
9106
|
-
* @
|
|
9107
|
-
* @returns {vec4} out
|
|
9018
|
+
* @param {ReadonlyVec4} a vector to clone
|
|
9019
|
+
* @returns {vec4} a new 4D vector
|
|
9108
9020
|
*/
|
|
9109
9021
|
|
|
9110
|
-
function
|
|
9111
|
-
out
|
|
9112
|
-
out[
|
|
9113
|
-
out[
|
|
9114
|
-
out[
|
|
9022
|
+
function clone(a) {
|
|
9023
|
+
var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](4);
|
|
9024
|
+
out[0] = a[0];
|
|
9025
|
+
out[1] = a[1];
|
|
9026
|
+
out[2] = a[2];
|
|
9027
|
+
out[3] = a[3];
|
|
9115
9028
|
return out;
|
|
9116
9029
|
}
|
|
9117
9030
|
/**
|
|
9118
|
-
*
|
|
9031
|
+
* Creates a new vec4 initialized with the given values
|
|
9119
9032
|
*
|
|
9120
|
-
* @param {
|
|
9121
|
-
* @param {
|
|
9122
|
-
* @
|
|
9033
|
+
* @param {Number} x X component
|
|
9034
|
+
* @param {Number} y Y component
|
|
9035
|
+
* @param {Number} z Z component
|
|
9036
|
+
* @param {Number} w W component
|
|
9037
|
+
* @returns {vec4} a new 4D vector
|
|
9123
9038
|
*/
|
|
9124
9039
|
|
|
9125
|
-
function
|
|
9126
|
-
out
|
|
9127
|
-
out[
|
|
9128
|
-
out[
|
|
9129
|
-
out[
|
|
9040
|
+
function fromValues(x, y, z, w) {
|
|
9041
|
+
var out = new _common_js__WEBPACK_IMPORTED_MODULE_0__["ARRAY_TYPE"](4);
|
|
9042
|
+
out[0] = x;
|
|
9043
|
+
out[1] = y;
|
|
9044
|
+
out[2] = z;
|
|
9045
|
+
out[3] = w;
|
|
9130
9046
|
return out;
|
|
9131
9047
|
}
|
|
9132
9048
|
/**
|
|
9133
|
-
*
|
|
9049
|
+
* Copy the values from one vec4 to another
|
|
9134
9050
|
*
|
|
9135
9051
|
* @param {vec4} out the receiving vector
|
|
9136
|
-
* @param {ReadonlyVec4} a
|
|
9052
|
+
* @param {ReadonlyVec4} a the source vector
|
|
9137
9053
|
* @returns {vec4} out
|
|
9138
9054
|
*/
|
|
9139
9055
|
|
|
9140
|
-
function
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
var len = x * x + y * y + z * z + w * w;
|
|
9146
|
-
|
|
9147
|
-
if (len > 0) {
|
|
9148
|
-
len = 1 / Math.sqrt(len);
|
|
9149
|
-
}
|
|
9150
|
-
|
|
9151
|
-
out[0] = x * len;
|
|
9152
|
-
out[1] = y * len;
|
|
9153
|
-
out[2] = z * len;
|
|
9154
|
-
out[3] = w * len;
|
|
9056
|
+
function copy(out, a) {
|
|
9057
|
+
out[0] = a[0];
|
|
9058
|
+
out[1] = a[1];
|
|
9059
|
+
out[2] = a[2];
|
|
9060
|
+
out[3] = a[3];
|
|
9155
9061
|
return out;
|
|
9156
9062
|
}
|
|
9157
9063
|
/**
|
|
9158
|
-
*
|
|
9159
|
-
*
|
|
9160
|
-
* @param {ReadonlyVec4} a the first operand
|
|
9161
|
-
* @param {ReadonlyVec4} b the second operand
|
|
9162
|
-
* @returns {Number} dot product of a and b
|
|
9163
|
-
*/
|
|
9164
|
-
|
|
9165
|
-
function dot(a, b) {
|
|
9166
|
-
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
|
|
9167
|
-
}
|
|
9168
|
-
/**
|
|
9169
|
-
* Returns the cross-product of three vectors in a 4-dimensional space
|
|
9064
|
+
* Set the components of a vec4 to the given values
|
|
9170
9065
|
*
|
|
9171
|
-
* @param {
|
|
9172
|
-
* @param {
|
|
9173
|
-
* @param {
|
|
9174
|
-
* @param {
|
|
9175
|
-
* @
|
|
9066
|
+
* @param {vec4} out the receiving vector
|
|
9067
|
+
* @param {Number} x X component
|
|
9068
|
+
* @param {Number} y Y component
|
|
9069
|
+
* @param {Number} z Z component
|
|
9070
|
+
* @param {Number} w W component
|
|
9071
|
+
* @returns {vec4} out
|
|
9176
9072
|
*/
|
|
9177
9073
|
|
|
9178
|
-
function
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
E = v[1] * w[3] - v[3] * w[1],
|
|
9184
|
-
F = v[2] * w[3] - v[3] * w[2];
|
|
9185
|
-
var G = u[0];
|
|
9186
|
-
var H = u[1];
|
|
9187
|
-
var I = u[2];
|
|
9188
|
-
var J = u[3];
|
|
9189
|
-
out[0] = H * F - I * E + J * D;
|
|
9190
|
-
out[1] = -(G * F) + I * C - J * B;
|
|
9191
|
-
out[2] = G * E - H * C + J * A;
|
|
9192
|
-
out[3] = -(G * D) + H * B - I * A;
|
|
9074
|
+
function set(out, x, y, z, w) {
|
|
9075
|
+
out[0] = x;
|
|
9076
|
+
out[1] = y;
|
|
9077
|
+
out[2] = z;
|
|
9078
|
+
out[3] = w;
|
|
9193
9079
|
return out;
|
|
9194
9080
|
}
|
|
9195
9081
|
/**
|
|
9196
|
-
*
|
|
9082
|
+
* Adds two vec4's
|
|
9197
9083
|
*
|
|
9198
9084
|
* @param {vec4} out the receiving vector
|
|
9199
9085
|
* @param {ReadonlyVec4} a the first operand
|
|
9200
9086
|
* @param {ReadonlyVec4} b the second operand
|
|
9201
|
-
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
9202
9087
|
* @returns {vec4} out
|
|
9203
9088
|
*/
|
|
9204
9089
|
|
|
9205
|
-
function
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
out[0] = ax + t * (b[0] - ax);
|
|
9211
|
-
out[1] = ay + t * (b[1] - ay);
|
|
9212
|
-
out[2] = az + t * (b[2] - az);
|
|
9213
|
-
out[3] = aw + t * (b[3] - aw);
|
|
9090
|
+
function add(out, a, b) {
|
|
9091
|
+
out[0] = a[0] + b[0];
|
|
9092
|
+
out[1] = a[1] + b[1];
|
|
9093
|
+
out[2] = a[2] + b[2];
|
|
9094
|
+
out[3] = a[3] + b[3];
|
|
9214
9095
|
return out;
|
|
9215
9096
|
}
|
|
9216
9097
|
/**
|
|
9217
|
-
*
|
|
9098
|
+
* Subtracts vector b from vector a
|
|
9218
9099
|
*
|
|
9219
9100
|
* @param {vec4} out the receiving vector
|
|
9220
|
-
* @param {
|
|
9101
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9102
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9221
9103
|
* @returns {vec4} out
|
|
9222
9104
|
*/
|
|
9223
9105
|
|
|
9224
|
-
function
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
var v1, v2, v3, v4;
|
|
9230
|
-
var s1, s2;
|
|
9231
|
-
|
|
9232
|
-
do {
|
|
9233
|
-
v1 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9234
|
-
v2 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9235
|
-
s1 = v1 * v1 + v2 * v2;
|
|
9236
|
-
} while (s1 >= 1);
|
|
9237
|
-
|
|
9238
|
-
do {
|
|
9239
|
-
v3 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9240
|
-
v4 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9241
|
-
s2 = v3 * v3 + v4 * v4;
|
|
9242
|
-
} while (s2 >= 1);
|
|
9243
|
-
|
|
9244
|
-
var d = Math.sqrt((1 - s1) / s2);
|
|
9245
|
-
out[0] = scale * v1;
|
|
9246
|
-
out[1] = scale * v2;
|
|
9247
|
-
out[2] = scale * v3 * d;
|
|
9248
|
-
out[3] = scale * v4 * d;
|
|
9106
|
+
function subtract(out, a, b) {
|
|
9107
|
+
out[0] = a[0] - b[0];
|
|
9108
|
+
out[1] = a[1] - b[1];
|
|
9109
|
+
out[2] = a[2] - b[2];
|
|
9110
|
+
out[3] = a[3] - b[3];
|
|
9249
9111
|
return out;
|
|
9250
9112
|
}
|
|
9251
9113
|
/**
|
|
9252
|
-
*
|
|
9114
|
+
* Multiplies two vec4's
|
|
9253
9115
|
*
|
|
9254
9116
|
* @param {vec4} out the receiving vector
|
|
9255
|
-
* @param {ReadonlyVec4} a the
|
|
9256
|
-
* @param {
|
|
9117
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9118
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9257
9119
|
* @returns {vec4} out
|
|
9258
9120
|
*/
|
|
9259
9121
|
|
|
9260
|
-
function
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
|
|
9266
|
-
out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
|
|
9267
|
-
out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
|
|
9268
|
-
out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
|
|
9122
|
+
function multiply(out, a, b) {
|
|
9123
|
+
out[0] = a[0] * b[0];
|
|
9124
|
+
out[1] = a[1] * b[1];
|
|
9125
|
+
out[2] = a[2] * b[2];
|
|
9126
|
+
out[3] = a[3] * b[3];
|
|
9269
9127
|
return out;
|
|
9270
9128
|
}
|
|
9271
9129
|
/**
|
|
9272
|
-
*
|
|
9130
|
+
* Divides two vec4's
|
|
9273
9131
|
*
|
|
9274
9132
|
* @param {vec4} out the receiving vector
|
|
9275
|
-
* @param {ReadonlyVec4} a the
|
|
9276
|
-
* @param {
|
|
9133
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9134
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9277
9135
|
* @returns {vec4} out
|
|
9278
9136
|
*/
|
|
9279
9137
|
|
|
9280
|
-
function
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
qy = q[1],
|
|
9286
|
-
qz = q[2],
|
|
9287
|
-
qw = q[3]; // calculate quat * vec
|
|
9288
|
-
|
|
9289
|
-
var ix = qw * x + qy * z - qz * y;
|
|
9290
|
-
var iy = qw * y + qz * x - qx * z;
|
|
9291
|
-
var iz = qw * z + qx * y - qy * x;
|
|
9292
|
-
var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat
|
|
9293
|
-
|
|
9294
|
-
out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
|
|
9295
|
-
out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
|
|
9296
|
-
out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
|
|
9297
|
-
out[3] = a[3];
|
|
9138
|
+
function divide(out, a, b) {
|
|
9139
|
+
out[0] = a[0] / b[0];
|
|
9140
|
+
out[1] = a[1] / b[1];
|
|
9141
|
+
out[2] = a[2] / b[2];
|
|
9142
|
+
out[3] = a[3] / b[3];
|
|
9298
9143
|
return out;
|
|
9299
9144
|
}
|
|
9300
9145
|
/**
|
|
9301
|
-
*
|
|
9146
|
+
* Math.ceil the components of a vec4
|
|
9302
9147
|
*
|
|
9303
9148
|
* @param {vec4} out the receiving vector
|
|
9149
|
+
* @param {ReadonlyVec4} a vector to ceil
|
|
9304
9150
|
* @returns {vec4} out
|
|
9305
9151
|
*/
|
|
9306
9152
|
|
|
9307
|
-
function
|
|
9308
|
-
out[0] =
|
|
9309
|
-
out[1] =
|
|
9310
|
-
out[2] =
|
|
9311
|
-
out[3] =
|
|
9153
|
+
function ceil(out, a) {
|
|
9154
|
+
out[0] = Math.ceil(a[0]);
|
|
9155
|
+
out[1] = Math.ceil(a[1]);
|
|
9156
|
+
out[2] = Math.ceil(a[2]);
|
|
9157
|
+
out[3] = Math.ceil(a[3]);
|
|
9312
9158
|
return out;
|
|
9313
9159
|
}
|
|
9314
9160
|
/**
|
|
9315
|
-
*
|
|
9161
|
+
* Math.floor the components of a vec4
|
|
9316
9162
|
*
|
|
9317
|
-
* @param {
|
|
9318
|
-
* @
|
|
9163
|
+
* @param {vec4} out the receiving vector
|
|
9164
|
+
* @param {ReadonlyVec4} a vector to floor
|
|
9165
|
+
* @returns {vec4} out
|
|
9319
9166
|
*/
|
|
9320
9167
|
|
|
9321
|
-
function
|
|
9322
|
-
|
|
9168
|
+
function floor(out, a) {
|
|
9169
|
+
out[0] = Math.floor(a[0]);
|
|
9170
|
+
out[1] = Math.floor(a[1]);
|
|
9171
|
+
out[2] = Math.floor(a[2]);
|
|
9172
|
+
out[3] = Math.floor(a[3]);
|
|
9173
|
+
return out;
|
|
9323
9174
|
}
|
|
9324
9175
|
/**
|
|
9325
|
-
* Returns
|
|
9176
|
+
* Returns the minimum of two vec4's
|
|
9326
9177
|
*
|
|
9327
|
-
* @param {
|
|
9328
|
-
* @param {ReadonlyVec4}
|
|
9329
|
-
* @
|
|
9178
|
+
* @param {vec4} out the receiving vector
|
|
9179
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9180
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9181
|
+
* @returns {vec4} out
|
|
9330
9182
|
*/
|
|
9331
9183
|
|
|
9332
|
-
function
|
|
9333
|
-
|
|
9184
|
+
function min(out, a, b) {
|
|
9185
|
+
out[0] = Math.min(a[0], b[0]);
|
|
9186
|
+
out[1] = Math.min(a[1], b[1]);
|
|
9187
|
+
out[2] = Math.min(a[2], b[2]);
|
|
9188
|
+
out[3] = Math.min(a[3], b[3]);
|
|
9189
|
+
return out;
|
|
9334
9190
|
}
|
|
9335
9191
|
/**
|
|
9336
|
-
* Returns
|
|
9192
|
+
* Returns the maximum of two vec4's
|
|
9337
9193
|
*
|
|
9338
|
-
* @param {
|
|
9339
|
-
* @param {ReadonlyVec4}
|
|
9340
|
-
* @
|
|
9194
|
+
* @param {vec4} out the receiving vector
|
|
9195
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9196
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9197
|
+
* @returns {vec4} out
|
|
9341
9198
|
*/
|
|
9342
9199
|
|
|
9343
|
-
function
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
b1 = b[1],
|
|
9350
|
-
b2 = b[2],
|
|
9351
|
-
b3 = b[3];
|
|
9352
|
-
return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a3), Math.abs(b3));
|
|
9200
|
+
function max(out, a, b) {
|
|
9201
|
+
out[0] = Math.max(a[0], b[0]);
|
|
9202
|
+
out[1] = Math.max(a[1], b[1]);
|
|
9203
|
+
out[2] = Math.max(a[2], b[2]);
|
|
9204
|
+
out[3] = Math.max(a[3], b[3]);
|
|
9205
|
+
return out;
|
|
9353
9206
|
}
|
|
9354
9207
|
/**
|
|
9355
|
-
*
|
|
9356
|
-
*
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
/**
|
|
9361
|
-
* Alias for {@link vec4.multiply}
|
|
9362
|
-
* @function
|
|
9363
|
-
*/
|
|
9364
|
-
|
|
9365
|
-
var mul = multiply;
|
|
9366
|
-
/**
|
|
9367
|
-
* Alias for {@link vec4.divide}
|
|
9368
|
-
* @function
|
|
9369
|
-
*/
|
|
9370
|
-
|
|
9371
|
-
var div = divide;
|
|
9372
|
-
/**
|
|
9373
|
-
* Alias for {@link vec4.distance}
|
|
9374
|
-
* @function
|
|
9375
|
-
*/
|
|
9376
|
-
|
|
9377
|
-
var dist = distance;
|
|
9378
|
-
/**
|
|
9379
|
-
* Alias for {@link vec4.squaredDistance}
|
|
9380
|
-
* @function
|
|
9208
|
+
* Math.round the components of a vec4
|
|
9209
|
+
*
|
|
9210
|
+
* @param {vec4} out the receiving vector
|
|
9211
|
+
* @param {ReadonlyVec4} a vector to round
|
|
9212
|
+
* @returns {vec4} out
|
|
9381
9213
|
*/
|
|
9382
9214
|
|
|
9383
|
-
|
|
9215
|
+
function round(out, a) {
|
|
9216
|
+
out[0] = Math.round(a[0]);
|
|
9217
|
+
out[1] = Math.round(a[1]);
|
|
9218
|
+
out[2] = Math.round(a[2]);
|
|
9219
|
+
out[3] = Math.round(a[3]);
|
|
9220
|
+
return out;
|
|
9221
|
+
}
|
|
9384
9222
|
/**
|
|
9385
|
-
*
|
|
9386
|
-
*
|
|
9223
|
+
* Scales a vec4 by a scalar number
|
|
9224
|
+
*
|
|
9225
|
+
* @param {vec4} out the receiving vector
|
|
9226
|
+
* @param {ReadonlyVec4} a the vector to scale
|
|
9227
|
+
* @param {Number} b amount to scale the vector by
|
|
9228
|
+
* @returns {vec4} out
|
|
9387
9229
|
*/
|
|
9388
9230
|
|
|
9389
|
-
|
|
9231
|
+
function scale(out, a, b) {
|
|
9232
|
+
out[0] = a[0] * b;
|
|
9233
|
+
out[1] = a[1] * b;
|
|
9234
|
+
out[2] = a[2] * b;
|
|
9235
|
+
out[3] = a[3] * b;
|
|
9236
|
+
return out;
|
|
9237
|
+
}
|
|
9390
9238
|
/**
|
|
9391
|
-
*
|
|
9392
|
-
*
|
|
9239
|
+
* Adds two vec4's after scaling the second operand by a scalar value
|
|
9240
|
+
*
|
|
9241
|
+
* @param {vec4} out the receiving vector
|
|
9242
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9243
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9244
|
+
* @param {Number} scale the amount to scale b by before adding
|
|
9245
|
+
* @returns {vec4} out
|
|
9393
9246
|
*/
|
|
9394
9247
|
|
|
9395
|
-
|
|
9248
|
+
function scaleAndAdd(out, a, b, scale) {
|
|
9249
|
+
out[0] = a[0] + b[0] * scale;
|
|
9250
|
+
out[1] = a[1] + b[1] * scale;
|
|
9251
|
+
out[2] = a[2] + b[2] * scale;
|
|
9252
|
+
out[3] = a[3] + b[3] * scale;
|
|
9253
|
+
return out;
|
|
9254
|
+
}
|
|
9396
9255
|
/**
|
|
9397
|
-
*
|
|
9256
|
+
* Calculates the euclidian distance between two vec4's
|
|
9398
9257
|
*
|
|
9399
|
-
* @param {
|
|
9400
|
-
* @param {
|
|
9401
|
-
* @
|
|
9402
|
-
* @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
|
|
9403
|
-
* @param {Function} fn Function to call for each vector in the array
|
|
9404
|
-
* @param {Object} [arg] additional argument to pass to fn
|
|
9405
|
-
* @returns {Array} a
|
|
9406
|
-
* @function
|
|
9258
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9259
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9260
|
+
* @returns {Number} distance between a and b
|
|
9407
9261
|
*/
|
|
9408
9262
|
|
|
9409
|
-
|
|
9410
|
-
var
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
l = Math.min(count * stride + offset, a.length);
|
|
9424
|
-
} else {
|
|
9425
|
-
l = a.length;
|
|
9426
|
-
}
|
|
9427
|
-
|
|
9428
|
-
for (i = offset; i < l; i += stride) {
|
|
9429
|
-
vec[0] = a[i];
|
|
9430
|
-
vec[1] = a[i + 1];
|
|
9431
|
-
vec[2] = a[i + 2];
|
|
9432
|
-
vec[3] = a[i + 3];
|
|
9433
|
-
fn(vec, vec, arg);
|
|
9434
|
-
a[i] = vec[0];
|
|
9435
|
-
a[i + 1] = vec[1];
|
|
9436
|
-
a[i + 2] = vec[2];
|
|
9437
|
-
a[i + 3] = vec[3];
|
|
9438
|
-
}
|
|
9439
|
-
|
|
9440
|
-
return a;
|
|
9441
|
-
};
|
|
9442
|
-
}();
|
|
9443
|
-
|
|
9444
|
-
/***/ }),
|
|
9445
|
-
|
|
9446
|
-
/***/ "../../node_modules/probe.gl/dist/es5/env/get-browser.js":
|
|
9447
|
-
/*!************************************************************************************!*\
|
|
9448
|
-
!*** /Users/alasarr/dev/luma.gl/node_modules/probe.gl/dist/es5/env/get-browser.js ***!
|
|
9449
|
-
\************************************************************************************/
|
|
9450
|
-
/*! no static exports found */
|
|
9451
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9452
|
-
|
|
9453
|
-
"use strict";
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
|
9457
|
-
|
|
9458
|
-
Object.defineProperty(exports, "__esModule", {
|
|
9459
|
-
value: true
|
|
9460
|
-
});
|
|
9461
|
-
exports.isMobile = isMobile;
|
|
9462
|
-
exports.default = getBrowser;
|
|
9463
|
-
|
|
9464
|
-
var _globals = __webpack_require__(/*! ./globals */ "../../node_modules/probe.gl/dist/es5/env/globals.js");
|
|
9465
|
-
|
|
9466
|
-
var _isBrowser = _interopRequireDefault(__webpack_require__(/*! ./is-browser */ "../../node_modules/probe.gl/dist/es5/env/is-browser.js"));
|
|
9467
|
-
|
|
9468
|
-
var _isElectron = _interopRequireDefault(__webpack_require__(/*! ./is-electron */ "../../node_modules/probe.gl/dist/es5/env/is-electron.js"));
|
|
9469
|
-
|
|
9470
|
-
function isMobile() {
|
|
9471
|
-
return typeof _globals.window.orientation !== 'undefined';
|
|
9472
|
-
}
|
|
9473
|
-
|
|
9474
|
-
function getBrowser(mockUserAgent) {
|
|
9475
|
-
if (!mockUserAgent && !(0, _isBrowser.default)()) {
|
|
9476
|
-
return 'Node';
|
|
9477
|
-
}
|
|
9478
|
-
|
|
9479
|
-
if ((0, _isElectron.default)(mockUserAgent)) {
|
|
9480
|
-
return 'Electron';
|
|
9481
|
-
}
|
|
9482
|
-
|
|
9483
|
-
var navigator_ = typeof navigator !== 'undefined' ? navigator : {};
|
|
9484
|
-
var userAgent = mockUserAgent || navigator_.userAgent || '';
|
|
9485
|
-
|
|
9486
|
-
if (userAgent.indexOf('Edge') > -1) {
|
|
9487
|
-
return 'Edge';
|
|
9488
|
-
}
|
|
9489
|
-
|
|
9490
|
-
var isMSIE = userAgent.indexOf('MSIE ') !== -1;
|
|
9491
|
-
var isTrident = userAgent.indexOf('Trident/') !== -1;
|
|
9492
|
-
|
|
9493
|
-
if (isMSIE || isTrident) {
|
|
9494
|
-
return 'IE';
|
|
9495
|
-
}
|
|
9496
|
-
|
|
9497
|
-
if (_globals.window.chrome) {
|
|
9498
|
-
return 'Chrome';
|
|
9499
|
-
}
|
|
9500
|
-
|
|
9501
|
-
if (_globals.window.safari) {
|
|
9502
|
-
return 'Safari';
|
|
9503
|
-
}
|
|
9504
|
-
|
|
9505
|
-
if (_globals.window.mozInnerScreenX) {
|
|
9506
|
-
return 'Firefox';
|
|
9507
|
-
}
|
|
9508
|
-
|
|
9509
|
-
return 'Unknown';
|
|
9510
|
-
}
|
|
9511
|
-
//# sourceMappingURL=get-browser.js.map
|
|
9512
|
-
|
|
9513
|
-
/***/ }),
|
|
9514
|
-
|
|
9515
|
-
/***/ "../../node_modules/probe.gl/dist/es5/env/globals.js":
|
|
9516
|
-
/*!********************************************************************************!*\
|
|
9517
|
-
!*** /Users/alasarr/dev/luma.gl/node_modules/probe.gl/dist/es5/env/globals.js ***!
|
|
9518
|
-
\********************************************************************************/
|
|
9519
|
-
/*! no static exports found */
|
|
9520
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9521
|
-
|
|
9522
|
-
"use strict";
|
|
9523
|
-
/* WEBPACK VAR INJECTION */(function(global, process) {
|
|
9524
|
-
|
|
9525
|
-
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
|
|
9526
|
-
|
|
9527
|
-
Object.defineProperty(exports, "__esModule", {
|
|
9528
|
-
value: true
|
|
9529
|
-
});
|
|
9530
|
-
exports.console = exports.process = exports.document = exports.global = exports.window = exports.self = void 0;
|
|
9263
|
+
function distance(a, b) {
|
|
9264
|
+
var x = b[0] - a[0];
|
|
9265
|
+
var y = b[1] - a[1];
|
|
9266
|
+
var z = b[2] - a[2];
|
|
9267
|
+
var w = b[3] - a[3];
|
|
9268
|
+
return Math.hypot(x, y, z, w);
|
|
9269
|
+
}
|
|
9270
|
+
/**
|
|
9271
|
+
* Calculates the squared euclidian distance between two vec4's
|
|
9272
|
+
*
|
|
9273
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9274
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9275
|
+
* @returns {Number} squared distance between a and b
|
|
9276
|
+
*/
|
|
9531
9277
|
|
|
9532
|
-
|
|
9278
|
+
function squaredDistance(a, b) {
|
|
9279
|
+
var x = b[0] - a[0];
|
|
9280
|
+
var y = b[1] - a[1];
|
|
9281
|
+
var z = b[2] - a[2];
|
|
9282
|
+
var w = b[3] - a[3];
|
|
9283
|
+
return x * x + y * y + z * z + w * w;
|
|
9284
|
+
}
|
|
9285
|
+
/**
|
|
9286
|
+
* Calculates the length of a vec4
|
|
9287
|
+
*
|
|
9288
|
+
* @param {ReadonlyVec4} a vector to calculate length of
|
|
9289
|
+
* @returns {Number} length of a
|
|
9290
|
+
*/
|
|
9533
9291
|
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
}
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
var document_ = globals.document || {};
|
|
9548
|
-
exports.document = document_;
|
|
9549
|
-
var process_ = globals.process || {};
|
|
9550
|
-
exports.process = process_;
|
|
9551
|
-
var console_ = console;
|
|
9552
|
-
exports.console = console_;
|
|
9553
|
-
//# sourceMappingURL=globals.js.map
|
|
9554
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../../../process/browser.js */ "../../node_modules/process/browser.js")))
|
|
9292
|
+
function length(a) {
|
|
9293
|
+
var x = a[0];
|
|
9294
|
+
var y = a[1];
|
|
9295
|
+
var z = a[2];
|
|
9296
|
+
var w = a[3];
|
|
9297
|
+
return Math.hypot(x, y, z, w);
|
|
9298
|
+
}
|
|
9299
|
+
/**
|
|
9300
|
+
* Calculates the squared length of a vec4
|
|
9301
|
+
*
|
|
9302
|
+
* @param {ReadonlyVec4} a vector to calculate squared length of
|
|
9303
|
+
* @returns {Number} squared length of a
|
|
9304
|
+
*/
|
|
9555
9305
|
|
|
9556
|
-
|
|
9306
|
+
function squaredLength(a) {
|
|
9307
|
+
var x = a[0];
|
|
9308
|
+
var y = a[1];
|
|
9309
|
+
var z = a[2];
|
|
9310
|
+
var w = a[3];
|
|
9311
|
+
return x * x + y * y + z * z + w * w;
|
|
9312
|
+
}
|
|
9313
|
+
/**
|
|
9314
|
+
* Negates the components of a vec4
|
|
9315
|
+
*
|
|
9316
|
+
* @param {vec4} out the receiving vector
|
|
9317
|
+
* @param {ReadonlyVec4} a vector to negate
|
|
9318
|
+
* @returns {vec4} out
|
|
9319
|
+
*/
|
|
9557
9320
|
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9321
|
+
function negate(out, a) {
|
|
9322
|
+
out[0] = -a[0];
|
|
9323
|
+
out[1] = -a[1];
|
|
9324
|
+
out[2] = -a[2];
|
|
9325
|
+
out[3] = -a[3];
|
|
9326
|
+
return out;
|
|
9327
|
+
}
|
|
9328
|
+
/**
|
|
9329
|
+
* Returns the inverse of the components of a vec4
|
|
9330
|
+
*
|
|
9331
|
+
* @param {vec4} out the receiving vector
|
|
9332
|
+
* @param {ReadonlyVec4} a vector to invert
|
|
9333
|
+
* @returns {vec4} out
|
|
9334
|
+
*/
|
|
9564
9335
|
|
|
9565
|
-
|
|
9336
|
+
function inverse(out, a) {
|
|
9337
|
+
out[0] = 1.0 / a[0];
|
|
9338
|
+
out[1] = 1.0 / a[1];
|
|
9339
|
+
out[2] = 1.0 / a[2];
|
|
9340
|
+
out[3] = 1.0 / a[3];
|
|
9341
|
+
return out;
|
|
9342
|
+
}
|
|
9343
|
+
/**
|
|
9344
|
+
* Normalize a vec4
|
|
9345
|
+
*
|
|
9346
|
+
* @param {vec4} out the receiving vector
|
|
9347
|
+
* @param {ReadonlyVec4} a vector to normalize
|
|
9348
|
+
* @returns {vec4} out
|
|
9349
|
+
*/
|
|
9566
9350
|
|
|
9351
|
+
function normalize(out, a) {
|
|
9352
|
+
var x = a[0];
|
|
9353
|
+
var y = a[1];
|
|
9354
|
+
var z = a[2];
|
|
9355
|
+
var w = a[3];
|
|
9356
|
+
var len = x * x + y * y + z * z + w * w;
|
|
9567
9357
|
|
|
9568
|
-
|
|
9358
|
+
if (len > 0) {
|
|
9359
|
+
len = 1 / Math.sqrt(len);
|
|
9360
|
+
}
|
|
9569
9361
|
|
|
9570
|
-
|
|
9362
|
+
out[0] = x * len;
|
|
9363
|
+
out[1] = y * len;
|
|
9364
|
+
out[2] = z * len;
|
|
9365
|
+
out[3] = w * len;
|
|
9366
|
+
return out;
|
|
9367
|
+
}
|
|
9368
|
+
/**
|
|
9369
|
+
* Calculates the dot product of two vec4's
|
|
9370
|
+
*
|
|
9371
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9372
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9373
|
+
* @returns {Number} dot product of a and b
|
|
9374
|
+
*/
|
|
9571
9375
|
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
}
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
}
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
return _globals.window;
|
|
9585
|
-
}
|
|
9586
|
-
});
|
|
9587
|
-
Object.defineProperty(exports, "global", {
|
|
9588
|
-
enumerable: true,
|
|
9589
|
-
get: function get() {
|
|
9590
|
-
return _globals.global;
|
|
9591
|
-
}
|
|
9592
|
-
});
|
|
9593
|
-
Object.defineProperty(exports, "document", {
|
|
9594
|
-
enumerable: true,
|
|
9595
|
-
get: function get() {
|
|
9596
|
-
return _globals.document;
|
|
9597
|
-
}
|
|
9598
|
-
});
|
|
9599
|
-
Object.defineProperty(exports, "process", {
|
|
9600
|
-
enumerable: true,
|
|
9601
|
-
get: function get() {
|
|
9602
|
-
return _globals.process;
|
|
9603
|
-
}
|
|
9604
|
-
});
|
|
9605
|
-
Object.defineProperty(exports, "console", {
|
|
9606
|
-
enumerable: true,
|
|
9607
|
-
get: function get() {
|
|
9608
|
-
return _globals.console;
|
|
9609
|
-
}
|
|
9610
|
-
});
|
|
9611
|
-
Object.defineProperty(exports, "isBrowser", {
|
|
9612
|
-
enumerable: true,
|
|
9613
|
-
get: function get() {
|
|
9614
|
-
return _isBrowser.default;
|
|
9615
|
-
}
|
|
9616
|
-
});
|
|
9617
|
-
Object.defineProperty(exports, "isBrowserMainThread", {
|
|
9618
|
-
enumerable: true,
|
|
9619
|
-
get: function get() {
|
|
9620
|
-
return _isBrowser.isBrowserMainThread;
|
|
9621
|
-
}
|
|
9622
|
-
});
|
|
9623
|
-
Object.defineProperty(exports, "getBrowser", {
|
|
9624
|
-
enumerable: true,
|
|
9625
|
-
get: function get() {
|
|
9626
|
-
return _getBrowser.default;
|
|
9627
|
-
}
|
|
9628
|
-
});
|
|
9629
|
-
Object.defineProperty(exports, "isMobile", {
|
|
9630
|
-
enumerable: true,
|
|
9631
|
-
get: function get() {
|
|
9632
|
-
return _getBrowser.isMobile;
|
|
9633
|
-
}
|
|
9634
|
-
});
|
|
9635
|
-
Object.defineProperty(exports, "isElectron", {
|
|
9636
|
-
enumerable: true,
|
|
9637
|
-
get: function get() {
|
|
9638
|
-
return _isElectron.default;
|
|
9639
|
-
}
|
|
9640
|
-
});
|
|
9376
|
+
function dot(a, b) {
|
|
9377
|
+
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
|
|
9378
|
+
}
|
|
9379
|
+
/**
|
|
9380
|
+
* Returns the cross-product of three vectors in a 4-dimensional space
|
|
9381
|
+
*
|
|
9382
|
+
* @param {ReadonlyVec4} result the receiving vector
|
|
9383
|
+
* @param {ReadonlyVec4} U the first vector
|
|
9384
|
+
* @param {ReadonlyVec4} V the second vector
|
|
9385
|
+
* @param {ReadonlyVec4} W the third vector
|
|
9386
|
+
* @returns {vec4} result
|
|
9387
|
+
*/
|
|
9641
9388
|
|
|
9642
|
-
|
|
9389
|
+
function cross(out, u, v, w) {
|
|
9390
|
+
var A = v[0] * w[1] - v[1] * w[0],
|
|
9391
|
+
B = v[0] * w[2] - v[2] * w[0],
|
|
9392
|
+
C = v[0] * w[3] - v[3] * w[0],
|
|
9393
|
+
D = v[1] * w[2] - v[2] * w[1],
|
|
9394
|
+
E = v[1] * w[3] - v[3] * w[1],
|
|
9395
|
+
F = v[2] * w[3] - v[3] * w[2];
|
|
9396
|
+
var G = u[0];
|
|
9397
|
+
var H = u[1];
|
|
9398
|
+
var I = u[2];
|
|
9399
|
+
var J = u[3];
|
|
9400
|
+
out[0] = H * F - I * E + J * D;
|
|
9401
|
+
out[1] = -(G * F) + I * C - J * B;
|
|
9402
|
+
out[2] = G * E - H * C + J * A;
|
|
9403
|
+
out[3] = -(G * D) + H * B - I * A;
|
|
9404
|
+
return out;
|
|
9405
|
+
}
|
|
9406
|
+
/**
|
|
9407
|
+
* Performs a linear interpolation between two vec4's
|
|
9408
|
+
*
|
|
9409
|
+
* @param {vec4} out the receiving vector
|
|
9410
|
+
* @param {ReadonlyVec4} a the first operand
|
|
9411
|
+
* @param {ReadonlyVec4} b the second operand
|
|
9412
|
+
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
9413
|
+
* @returns {vec4} out
|
|
9414
|
+
*/
|
|
9643
9415
|
|
|
9644
|
-
|
|
9416
|
+
function lerp(out, a, b, t) {
|
|
9417
|
+
var ax = a[0];
|
|
9418
|
+
var ay = a[1];
|
|
9419
|
+
var az = a[2];
|
|
9420
|
+
var aw = a[3];
|
|
9421
|
+
out[0] = ax + t * (b[0] - ax);
|
|
9422
|
+
out[1] = ay + t * (b[1] - ay);
|
|
9423
|
+
out[2] = az + t * (b[2] - az);
|
|
9424
|
+
out[3] = aw + t * (b[3] - aw);
|
|
9425
|
+
return out;
|
|
9426
|
+
}
|
|
9427
|
+
/**
|
|
9428
|
+
* Generates a random vector with the given scale
|
|
9429
|
+
*
|
|
9430
|
+
* @param {vec4} out the receiving vector
|
|
9431
|
+
* @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
|
|
9432
|
+
* @returns {vec4} out
|
|
9433
|
+
*/
|
|
9645
9434
|
|
|
9646
|
-
|
|
9435
|
+
function random(out, scale) {
|
|
9436
|
+
scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a
|
|
9437
|
+
// Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.
|
|
9438
|
+
// http://projecteuclid.org/euclid.aoms/1177692644;
|
|
9647
9439
|
|
|
9648
|
-
var
|
|
9440
|
+
var v1, v2, v3, v4;
|
|
9441
|
+
var s1, s2;
|
|
9649
9442
|
|
|
9650
|
-
|
|
9443
|
+
do {
|
|
9444
|
+
v1 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9445
|
+
v2 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9446
|
+
s1 = v1 * v1 + v2 * v2;
|
|
9447
|
+
} while (s1 >= 1);
|
|
9651
9448
|
|
|
9652
|
-
|
|
9653
|
-
|
|
9449
|
+
do {
|
|
9450
|
+
v3 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9451
|
+
v4 = _common_js__WEBPACK_IMPORTED_MODULE_0__["RANDOM"]() * 2 - 1;
|
|
9452
|
+
s2 = v3 * v3 + v4 * v4;
|
|
9453
|
+
} while (s2 >= 1);
|
|
9654
9454
|
|
|
9655
|
-
|
|
9455
|
+
var d = Math.sqrt((1 - s1) / s2);
|
|
9456
|
+
out[0] = scale * v1;
|
|
9457
|
+
out[1] = scale * v2;
|
|
9458
|
+
out[2] = scale * v3 * d;
|
|
9459
|
+
out[3] = scale * v4 * d;
|
|
9460
|
+
return out;
|
|
9461
|
+
}
|
|
9462
|
+
/**
|
|
9463
|
+
* Transforms the vec4 with a mat4.
|
|
9464
|
+
*
|
|
9465
|
+
* @param {vec4} out the receiving vector
|
|
9466
|
+
* @param {ReadonlyVec4} a the vector to transform
|
|
9467
|
+
* @param {ReadonlyMat4} m matrix to transform with
|
|
9468
|
+
* @returns {vec4} out
|
|
9469
|
+
*/
|
|
9656
9470
|
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9471
|
+
function transformMat4(out, a, m) {
|
|
9472
|
+
var x = a[0],
|
|
9473
|
+
y = a[1],
|
|
9474
|
+
z = a[2],
|
|
9475
|
+
w = a[3];
|
|
9476
|
+
out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
|
|
9477
|
+
out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
|
|
9478
|
+
out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
|
|
9479
|
+
out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
|
|
9480
|
+
return out;
|
|
9481
|
+
}
|
|
9482
|
+
/**
|
|
9483
|
+
* Transforms the vec4 with a quat
|
|
9484
|
+
*
|
|
9485
|
+
* @param {vec4} out the receiving vector
|
|
9486
|
+
* @param {ReadonlyVec4} a the vector to transform
|
|
9487
|
+
* @param {ReadonlyQuat} q quaternion to transform with
|
|
9488
|
+
* @returns {vec4} out
|
|
9489
|
+
*/
|
|
9663
9490
|
|
|
9664
|
-
|
|
9665
|
-
|
|
9491
|
+
function transformQuat(out, a, q) {
|
|
9492
|
+
var x = a[0],
|
|
9493
|
+
y = a[1],
|
|
9494
|
+
z = a[2];
|
|
9495
|
+
var qx = q[0],
|
|
9496
|
+
qy = q[1],
|
|
9497
|
+
qz = q[2],
|
|
9498
|
+
qw = q[3]; // calculate quat * vec
|
|
9666
9499
|
|
|
9667
|
-
var
|
|
9500
|
+
var ix = qw * x + qy * z - qz * y;
|
|
9501
|
+
var iy = qw * y + qz * x - qx * z;
|
|
9502
|
+
var iz = qw * z + qx * y - qy * x;
|
|
9503
|
+
var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat
|
|
9668
9504
|
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9505
|
+
out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
|
|
9506
|
+
out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
|
|
9507
|
+
out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
|
|
9508
|
+
out[3] = a[3];
|
|
9509
|
+
return out;
|
|
9510
|
+
}
|
|
9511
|
+
/**
|
|
9512
|
+
* Set the components of a vec4 to zero
|
|
9513
|
+
*
|
|
9514
|
+
* @param {vec4} out the receiving vector
|
|
9515
|
+
* @returns {vec4} out
|
|
9516
|
+
*/
|
|
9674
9517
|
|
|
9675
|
-
|
|
9518
|
+
function zero(out) {
|
|
9519
|
+
out[0] = 0.0;
|
|
9520
|
+
out[1] = 0.0;
|
|
9521
|
+
out[2] = 0.0;
|
|
9522
|
+
out[3] = 0.0;
|
|
9523
|
+
return out;
|
|
9524
|
+
}
|
|
9525
|
+
/**
|
|
9526
|
+
* Returns a string representation of a vector
|
|
9527
|
+
*
|
|
9528
|
+
* @param {ReadonlyVec4} a vector to represent as a string
|
|
9529
|
+
* @returns {String} string representation of the vector
|
|
9530
|
+
*/
|
|
9676
9531
|
|
|
9677
|
-
|
|
9532
|
+
function str(a) {
|
|
9533
|
+
return "vec4(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")";
|
|
9534
|
+
}
|
|
9535
|
+
/**
|
|
9536
|
+
* Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
|
|
9537
|
+
*
|
|
9538
|
+
* @param {ReadonlyVec4} a The first vector.
|
|
9539
|
+
* @param {ReadonlyVec4} b The second vector.
|
|
9540
|
+
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
9541
|
+
*/
|
|
9678
9542
|
|
|
9679
|
-
function
|
|
9680
|
-
|
|
9681
|
-
return !isNode || (0, _isElectron.default)();
|
|
9543
|
+
function exactEquals(a, b) {
|
|
9544
|
+
return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
|
|
9682
9545
|
}
|
|
9546
|
+
/**
|
|
9547
|
+
* Returns whether or not the vectors have approximately the same elements in the same position.
|
|
9548
|
+
*
|
|
9549
|
+
* @param {ReadonlyVec4} a The first vector.
|
|
9550
|
+
* @param {ReadonlyVec4} b The second vector.
|
|
9551
|
+
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
9552
|
+
*/
|
|
9683
9553
|
|
|
9684
|
-
function
|
|
9685
|
-
|
|
9554
|
+
function equals(a, b) {
|
|
9555
|
+
var a0 = a[0],
|
|
9556
|
+
a1 = a[1],
|
|
9557
|
+
a2 = a[2],
|
|
9558
|
+
a3 = a[3];
|
|
9559
|
+
var b0 = b[0],
|
|
9560
|
+
b1 = b[1],
|
|
9561
|
+
b2 = b[2],
|
|
9562
|
+
b3 = b[3];
|
|
9563
|
+
return Math.abs(a0 - b0) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= _common_js__WEBPACK_IMPORTED_MODULE_0__["EPSILON"] * Math.max(1.0, Math.abs(a3), Math.abs(b3));
|
|
9686
9564
|
}
|
|
9687
|
-
|
|
9688
|
-
|
|
9565
|
+
/**
|
|
9566
|
+
* Alias for {@link vec4.subtract}
|
|
9567
|
+
* @function
|
|
9568
|
+
*/
|
|
9689
9569
|
|
|
9690
|
-
|
|
9570
|
+
var sub = subtract;
|
|
9571
|
+
/**
|
|
9572
|
+
* Alias for {@link vec4.multiply}
|
|
9573
|
+
* @function
|
|
9574
|
+
*/
|
|
9691
9575
|
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9576
|
+
var mul = multiply;
|
|
9577
|
+
/**
|
|
9578
|
+
* Alias for {@link vec4.divide}
|
|
9579
|
+
* @function
|
|
9580
|
+
*/
|
|
9698
9581
|
|
|
9699
|
-
|
|
9700
|
-
|
|
9582
|
+
var div = divide;
|
|
9583
|
+
/**
|
|
9584
|
+
* Alias for {@link vec4.distance}
|
|
9585
|
+
* @function
|
|
9586
|
+
*/
|
|
9701
9587
|
|
|
9702
|
-
var
|
|
9588
|
+
var dist = distance;
|
|
9589
|
+
/**
|
|
9590
|
+
* Alias for {@link vec4.squaredDistance}
|
|
9591
|
+
* @function
|
|
9592
|
+
*/
|
|
9703
9593
|
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
}
|
|
9707
|
-
|
|
9594
|
+
var sqrDist = squaredDistance;
|
|
9595
|
+
/**
|
|
9596
|
+
* Alias for {@link vec4.length}
|
|
9597
|
+
* @function
|
|
9598
|
+
*/
|
|
9708
9599
|
|
|
9709
|
-
var
|
|
9600
|
+
var len = length;
|
|
9601
|
+
/**
|
|
9602
|
+
* Alias for {@link vec4.squaredLength}
|
|
9603
|
+
* @function
|
|
9604
|
+
*/
|
|
9710
9605
|
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9606
|
+
var sqrLen = squaredLength;
|
|
9607
|
+
/**
|
|
9608
|
+
* Perform some operation over an array of vec4s.
|
|
9609
|
+
*
|
|
9610
|
+
* @param {Array} a the array of vectors to iterate over
|
|
9611
|
+
* @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
|
|
9612
|
+
* @param {Number} offset Number of elements to skip at the beginning of the array
|
|
9613
|
+
* @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
|
|
9614
|
+
* @param {Function} fn Function to call for each vector in the array
|
|
9615
|
+
* @param {Object} [arg] additional argument to pass to fn
|
|
9616
|
+
* @returns {Array} a
|
|
9617
|
+
* @function
|
|
9618
|
+
*/
|
|
9715
9619
|
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9620
|
+
var forEach = function () {
|
|
9621
|
+
var vec = create();
|
|
9622
|
+
return function (a, stride, offset, count, fn, arg) {
|
|
9623
|
+
var i, l;
|
|
9719
9624
|
|
|
9720
|
-
|
|
9721
|
-
|
|
9625
|
+
if (!stride) {
|
|
9626
|
+
stride = 4;
|
|
9627
|
+
}
|
|
9722
9628
|
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9629
|
+
if (!offset) {
|
|
9630
|
+
offset = 0;
|
|
9631
|
+
}
|
|
9726
9632
|
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9633
|
+
if (count) {
|
|
9634
|
+
l = Math.min(count * stride + offset, a.length);
|
|
9635
|
+
} else {
|
|
9636
|
+
l = a.length;
|
|
9637
|
+
}
|
|
9638
|
+
|
|
9639
|
+
for (i = offset; i < l; i += stride) {
|
|
9640
|
+
vec[0] = a[i];
|
|
9641
|
+
vec[1] = a[i + 1];
|
|
9642
|
+
vec[2] = a[i + 2];
|
|
9643
|
+
vec[3] = a[i + 3];
|
|
9644
|
+
fn(vec, vec, arg);
|
|
9645
|
+
a[i] = vec[0];
|
|
9646
|
+
a[i + 1] = vec[1];
|
|
9647
|
+
a[i + 2] = vec[2];
|
|
9648
|
+
a[i + 3] = vec[3];
|
|
9649
|
+
}
|
|
9650
|
+
|
|
9651
|
+
return a;
|
|
9652
|
+
};
|
|
9653
|
+
}();
|
|
9731
9654
|
|
|
9732
9655
|
/***/ }),
|
|
9733
9656
|
|
|
9734
9657
|
/***/ "../../node_modules/probe.gl/dist/esm/env/get-browser.js":
|
|
9735
|
-
|
|
9736
|
-
!*** /Users/
|
|
9737
|
-
|
|
9658
|
+
/*!*************************************************************************************!*\
|
|
9659
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/env/get-browser.js ***!
|
|
9660
|
+
\*************************************************************************************/
|
|
9738
9661
|
/*! exports provided: isMobile, default */
|
|
9739
9662
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9740
9663
|
|
|
@@ -9793,9 +9716,9 @@ function getBrowser(mockUserAgent) {
|
|
|
9793
9716
|
/***/ }),
|
|
9794
9717
|
|
|
9795
9718
|
/***/ "../../node_modules/probe.gl/dist/esm/env/globals.js":
|
|
9796
|
-
|
|
9797
|
-
!*** /Users/
|
|
9798
|
-
|
|
9719
|
+
/*!*********************************************************************************!*\
|
|
9720
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/env/globals.js ***!
|
|
9721
|
+
\*********************************************************************************/
|
|
9799
9722
|
/*! exports provided: self, window, global, document, process, console */
|
|
9800
9723
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9801
9724
|
|
|
@@ -9827,9 +9750,9 @@ const console_ = console;
|
|
|
9827
9750
|
/***/ }),
|
|
9828
9751
|
|
|
9829
9752
|
/***/ "../../node_modules/probe.gl/dist/esm/env/is-browser.js":
|
|
9830
|
-
|
|
9831
|
-
!*** /Users/
|
|
9832
|
-
|
|
9753
|
+
/*!************************************************************************************!*\
|
|
9754
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/env/is-browser.js ***!
|
|
9755
|
+
\************************************************************************************/
|
|
9833
9756
|
/*! exports provided: default, isBrowserMainThread */
|
|
9834
9757
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9835
9758
|
|
|
@@ -9852,9 +9775,9 @@ function isBrowserMainThread() {
|
|
|
9852
9775
|
/***/ }),
|
|
9853
9776
|
|
|
9854
9777
|
/***/ "../../node_modules/probe.gl/dist/esm/env/is-electron.js":
|
|
9855
|
-
|
|
9856
|
-
!*** /Users/
|
|
9857
|
-
|
|
9778
|
+
/*!*************************************************************************************!*\
|
|
9779
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/env/is-electron.js ***!
|
|
9780
|
+
\*************************************************************************************/
|
|
9858
9781
|
/*! exports provided: default */
|
|
9859
9782
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9860
9783
|
|
|
@@ -9885,9 +9808,9 @@ function isElectron(mockUserAgent) {
|
|
|
9885
9808
|
/***/ }),
|
|
9886
9809
|
|
|
9887
9810
|
/***/ "../../node_modules/probe.gl/dist/esm/index.js":
|
|
9888
|
-
|
|
9889
|
-
!*** /Users/
|
|
9890
|
-
|
|
9811
|
+
/*!***************************************************************************!*\
|
|
9812
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/index.js ***!
|
|
9813
|
+
\***************************************************************************/
|
|
9891
9814
|
/*! exports provided: VERSION, self, window, global, document, process, console, isBrowser, isBrowserMainThread, getBrowser, isMobile, isElectron, assert, Log, COLOR, default, addColor, leftPad, rightPad, autobind, LocalStorage, getHiResTimestamp, Stats, Stat */
|
|
9892
9815
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9893
9816
|
|
|
@@ -9977,9 +9900,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9977
9900
|
/***/ }),
|
|
9978
9901
|
|
|
9979
9902
|
/***/ "../../node_modules/probe.gl/dist/esm/init.js":
|
|
9980
|
-
|
|
9981
|
-
!*** /Users/
|
|
9982
|
-
|
|
9903
|
+
/*!**************************************************************************!*\
|
|
9904
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/init.js ***!
|
|
9905
|
+
\**************************************************************************/
|
|
9983
9906
|
/*! no exports provided */
|
|
9984
9907
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9985
9908
|
|
|
@@ -9993,9 +9916,9 @@ _utils_globals__WEBPACK_IMPORTED_MODULE_0__["global"].probe = {};
|
|
|
9993
9916
|
/***/ }),
|
|
9994
9917
|
|
|
9995
9918
|
/***/ "../../node_modules/probe.gl/dist/esm/lib/log.js":
|
|
9996
|
-
|
|
9997
|
-
!*** /Users/
|
|
9998
|
-
|
|
9919
|
+
/*!*****************************************************************************!*\
|
|
9920
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/lib/log.js ***!
|
|
9921
|
+
\*****************************************************************************/
|
|
9999
9922
|
/*! exports provided: default, normalizeArguments */
|
|
10000
9923
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10001
9924
|
|
|
@@ -10428,9 +10351,9 @@ function logImageInBrowser({
|
|
|
10428
10351
|
/***/ }),
|
|
10429
10352
|
|
|
10430
10353
|
/***/ "../../node_modules/probe.gl/dist/esm/utils/assert.js":
|
|
10431
|
-
|
|
10432
|
-
!*** /Users/
|
|
10433
|
-
|
|
10354
|
+
/*!**********************************************************************************!*\
|
|
10355
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/utils/assert.js ***!
|
|
10356
|
+
\**********************************************************************************/
|
|
10434
10357
|
/*! exports provided: default */
|
|
10435
10358
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10436
10359
|
|
|
@@ -10447,9 +10370,9 @@ function assert(condition, message) {
|
|
|
10447
10370
|
/***/ }),
|
|
10448
10371
|
|
|
10449
10372
|
/***/ "../../node_modules/probe.gl/dist/esm/utils/autobind.js":
|
|
10450
|
-
|
|
10451
|
-
!*** /Users/
|
|
10452
|
-
|
|
10373
|
+
/*!************************************************************************************!*\
|
|
10374
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/utils/autobind.js ***!
|
|
10375
|
+
\************************************************************************************/
|
|
10453
10376
|
/*! exports provided: autobind */
|
|
10454
10377
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10455
10378
|
|
|
@@ -10473,9 +10396,9 @@ function autobind(obj, predefined = ['constructor']) {
|
|
|
10473
10396
|
/***/ }),
|
|
10474
10397
|
|
|
10475
10398
|
/***/ "../../node_modules/probe.gl/dist/esm/utils/color.js":
|
|
10476
|
-
|
|
10477
|
-
!*** /Users/
|
|
10478
|
-
|
|
10399
|
+
/*!*********************************************************************************!*\
|
|
10400
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/utils/color.js ***!
|
|
10401
|
+
\*********************************************************************************/
|
|
10479
10402
|
/*! exports provided: COLOR, addColor */
|
|
10480
10403
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10481
10404
|
|
|
@@ -10528,9 +10451,9 @@ function addColor(string, color, background) {
|
|
|
10528
10451
|
/***/ }),
|
|
10529
10452
|
|
|
10530
10453
|
/***/ "../../node_modules/probe.gl/dist/esm/utils/formatters.js":
|
|
10531
|
-
|
|
10532
|
-
!*** /Users/
|
|
10533
|
-
|
|
10454
|
+
/*!**************************************************************************************!*\
|
|
10455
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/utils/formatters.js ***!
|
|
10456
|
+
\**************************************************************************************/
|
|
10534
10457
|
/*! exports provided: formatTime, leftPad, rightPad, formatValue, formatImage */
|
|
10535
10458
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10536
10459
|
|
|
@@ -10631,9 +10554,9 @@ function formatImage(image, message, scale, maxWidth = 600) {
|
|
|
10631
10554
|
/***/ }),
|
|
10632
10555
|
|
|
10633
10556
|
/***/ "../../node_modules/probe.gl/dist/esm/utils/globals.js":
|
|
10634
|
-
|
|
10635
|
-
!*** /Users/
|
|
10636
|
-
|
|
10557
|
+
/*!***********************************************************************************!*\
|
|
10558
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/utils/globals.js ***!
|
|
10559
|
+
\***********************************************************************************/
|
|
10637
10560
|
/*! exports provided: self, window, global, document, process, console, VERSION, isBrowser */
|
|
10638
10561
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10639
10562
|
|
|
@@ -10657,16 +10580,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10657
10580
|
|
|
10658
10581
|
|
|
10659
10582
|
|
|
10660
|
-
const VERSION = true ? "8.5.
|
|
10583
|
+
const VERSION = true ? "8.5.12" : undefined;
|
|
10661
10584
|
const isBrowser = Object(_env_is_browser__WEBPACK_IMPORTED_MODULE_0__["default"])();
|
|
10662
10585
|
//# sourceMappingURL=globals.js.map
|
|
10663
10586
|
|
|
10664
10587
|
/***/ }),
|
|
10665
10588
|
|
|
10666
10589
|
/***/ "../../node_modules/probe.gl/dist/esm/utils/hi-res-timestamp.js":
|
|
10667
|
-
|
|
10668
|
-
!*** /Users/
|
|
10669
|
-
|
|
10590
|
+
/*!********************************************************************************************!*\
|
|
10591
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/utils/hi-res-timestamp.js ***!
|
|
10592
|
+
\********************************************************************************************/
|
|
10670
10593
|
/*! exports provided: default */
|
|
10671
10594
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10672
10595
|
|
|
@@ -10694,9 +10617,9 @@ function getHiResTimestamp() {
|
|
|
10694
10617
|
/***/ }),
|
|
10695
10618
|
|
|
10696
10619
|
/***/ "../../node_modules/probe.gl/dist/esm/utils/local-storage.js":
|
|
10697
|
-
|
|
10698
|
-
!*** /Users/
|
|
10699
|
-
|
|
10620
|
+
/*!*****************************************************************************************!*\
|
|
10621
|
+
!*** /Users/missx/Source/luma.gl/node_modules/probe.gl/dist/esm/utils/local-storage.js ***!
|
|
10622
|
+
\*****************************************************************************************/
|
|
10700
10623
|
/*! exports provided: default */
|
|
10701
10624
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10702
10625
|
|
|
@@ -10760,26 +10683,12 @@ class LocalStorage {
|
|
|
10760
10683
|
}
|
|
10761
10684
|
//# sourceMappingURL=local-storage.js.map
|
|
10762
10685
|
|
|
10763
|
-
/***/ }),
|
|
10764
|
-
|
|
10765
|
-
/***/ "../../node_modules/probe.gl/env.js":
|
|
10766
|
-
/*!***************************************************************!*\
|
|
10767
|
-
!*** /Users/alasarr/dev/luma.gl/node_modules/probe.gl/env.js ***!
|
|
10768
|
-
\***************************************************************/
|
|
10769
|
-
/*! no static exports found */
|
|
10770
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
10771
|
-
|
|
10772
|
-
// This file enables: import 'probe.gl/bench'.
|
|
10773
|
-
// Note: Must be published using package.json "files" field
|
|
10774
|
-
module.exports = __webpack_require__(/*! ./dist/es5/env */ "../../node_modules/probe.gl/dist/es5/env/index.js");
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
10686
|
/***/ }),
|
|
10778
10687
|
|
|
10779
10688
|
/***/ "../../node_modules/process/browser.js":
|
|
10780
|
-
|
|
10781
|
-
!*** /Users/
|
|
10782
|
-
|
|
10689
|
+
/*!*******************************************************************!*\
|
|
10690
|
+
!*** /Users/missx/Source/luma.gl/node_modules/process/browser.js ***!
|
|
10691
|
+
\*******************************************************************/
|
|
10783
10692
|
/*! no static exports found */
|
|
10784
10693
|
/***/ (function(module, exports) {
|
|
10785
10694
|
|
|
@@ -11865,8 +11774,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11865
11774
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContextDebugInfo", function() { return getContextDebugInfo; });
|
|
11866
11775
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resizeGLContext", function() { return resizeGLContext; });
|
|
11867
11776
|
/* harmony import */ var _luma_gl_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/constants */ "../constants/src/index.js");
|
|
11868
|
-
/* harmony import */ var
|
|
11869
|
-
/* harmony import */ var probe_gl_env__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(probe_gl_env__WEBPACK_IMPORTED_MODULE_1__);
|
|
11777
|
+
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
11870
11778
|
/* harmony import */ var _state_tracker_track_context_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../state-tracker/track-context-state */ "../gltools/src/state-tracker/track-context-state.js");
|
|
11871
11779
|
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/log */ "../gltools/src/utils/log.js");
|
|
11872
11780
|
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/assert */ "../gltools/src/utils/assert.js");
|
|
@@ -11886,7 +11794,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11886
11794
|
|
|
11887
11795
|
|
|
11888
11796
|
|
|
11889
|
-
const isBrowser = Object(
|
|
11797
|
+
const isBrowser = Object(_probe_gl_env__WEBPACK_IMPORTED_MODULE_1__["isBrowser"])();
|
|
11890
11798
|
const isPage = isBrowser && typeof document !== 'undefined';
|
|
11891
11799
|
|
|
11892
11800
|
const CONTEXT_DEFAULTS = {
|
|
@@ -11985,11 +11893,11 @@ function instrumentGLContext(gl, options = {}) {
|
|
|
11985
11893
|
// Add debug instrumentation to the context
|
|
11986
11894
|
if (isBrowser && debug) {
|
|
11987
11895
|
// @ts-ignore
|
|
11988
|
-
if (!
|
|
11896
|
+
if (!globalThis.makeDebugContext) {
|
|
11989
11897
|
_utils_log__WEBPACK_IMPORTED_MODULE_3__["log"].warn('WebGL debug mode not activated. import "@luma.gl/debug" to enable.')();
|
|
11990
11898
|
} else {
|
|
11991
11899
|
// @ts-ignore
|
|
11992
|
-
gl =
|
|
11900
|
+
gl = globalThis.makeDebugContext(gl, options);
|
|
11993
11901
|
// Debug forces log level to at least 1
|
|
11994
11902
|
_utils_log__WEBPACK_IMPORTED_MODULE_3__["log"].level = Math.max(_utils_log__WEBPACK_IMPORTED_MODULE_3__["log"].level, 1);
|
|
11995
11903
|
}
|
|
@@ -12395,7 +12303,7 @@ function getParameterPolyfill(gl, originalGetParameter, pname) {
|
|
|
12395
12303
|
|
|
12396
12304
|
"use strict";
|
|
12397
12305
|
__webpack_require__.r(__webpack_exports__);
|
|
12398
|
-
/*
|
|
12306
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfillContext", function() { return polyfillContext; });
|
|
12399
12307
|
/* harmony import */ var _polyfill_vertex_array_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill-vertex-array-object */ "../gltools/src/polyfill/polyfill-vertex-array-object.js");
|
|
12400
12308
|
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/assert */ "../gltools/src/utils/assert.js");
|
|
12401
12309
|
/* harmony import */ var _polyfill_table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polyfill-table */ "../gltools/src/polyfill/polyfill-table.js");
|
|
@@ -12437,9 +12345,8 @@ function polyfillContext(gl) {
|
|
|
12437
12345
|
}
|
|
12438
12346
|
|
|
12439
12347
|
// TODO - is this still required?
|
|
12440
|
-
const global_ = typeof global !== 'undefined' ? global : window;
|
|
12441
12348
|
// @ts-ignore
|
|
12442
|
-
|
|
12349
|
+
globalThis.polyfillContext = polyfillContext;
|
|
12443
12350
|
|
|
12444
12351
|
function initializeExtensions(gl) {
|
|
12445
12352
|
gl.luma.extensions = {};
|
|
@@ -12504,7 +12411,6 @@ function polyfillExtension(gl, {extension, target, target2}) {
|
|
|
12504
12411
|
}
|
|
12505
12412
|
}
|
|
12506
12413
|
|
|
12507
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
|
|
12508
12414
|
|
|
12509
12415
|
/***/ }),
|
|
12510
12416
|
|
|
@@ -12699,8 +12605,6 @@ const WEBGL2_CONTEXT_OVERRIDES = {
|
|
|
12699
12605
|
"use strict";
|
|
12700
12606
|
__webpack_require__.r(__webpack_exports__);
|
|
12701
12607
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfillVertexArrayObject", function() { return polyfillVertexArrayObject; });
|
|
12702
|
-
/* harmony import */ var probe_gl_env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! probe.gl/env */ "../../node_modules/probe.gl/env.js");
|
|
12703
|
-
/* harmony import */ var probe_gl_env__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(probe_gl_env__WEBPACK_IMPORTED_MODULE_0__);
|
|
12704
12608
|
/*
|
|
12705
12609
|
** Copyright (c) 2015 The Khronos Group Inc.
|
|
12706
12610
|
**
|
|
@@ -12729,19 +12633,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12729
12633
|
|
|
12730
12634
|
// @ts-nocheck external code
|
|
12731
12635
|
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
12636
|
const glErrorShadow = {};
|
|
12735
12637
|
|
|
12736
12638
|
function error(msg) {
|
|
12737
|
-
if (
|
|
12738
|
-
|
|
12639
|
+
if (globalThis.console && globalThis.console.error) {
|
|
12640
|
+
globalThis.console.error(msg);
|
|
12739
12641
|
}
|
|
12740
12642
|
}
|
|
12741
12643
|
|
|
12742
12644
|
function log(msg) {
|
|
12743
|
-
if (
|
|
12744
|
-
|
|
12645
|
+
if (globalThis.console && globalThis.console.log) {
|
|
12646
|
+
globalThis.console.log(msg);
|
|
12745
12647
|
}
|
|
12746
12648
|
}
|
|
12747
12649
|
|
|
@@ -13075,7 +12977,7 @@ function polyfillVertexArrayObject(gl) {
|
|
|
13075
12977
|
|
|
13076
12978
|
"use strict";
|
|
13077
12979
|
__webpack_require__.r(__webpack_exports__);
|
|
13078
|
-
/*
|
|
12980
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trackContextState", function() { return trackContextState; });
|
|
13079
12981
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pushContextState", function() { return pushContextState; });
|
|
13080
12982
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "popContextState", function() { return popContextState; });
|
|
13081
12983
|
/* harmony import */ var _webgl_parameter_tables__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./webgl-parameter-tables */ "../gltools/src/state-tracker/webgl-parameter-tables.js");
|
|
@@ -13250,9 +13152,8 @@ function trackContextState(gl, options = {}) {
|
|
|
13250
13152
|
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_2__["assert"])(copyState !== undefined);
|
|
13251
13153
|
// @ts-ignore
|
|
13252
13154
|
if (!gl.state) {
|
|
13253
|
-
const global_ = typeof global !== 'undefined' ? global : window;
|
|
13254
13155
|
// @ts-ignore
|
|
13255
|
-
const {polyfillContext} =
|
|
13156
|
+
const {polyfillContext} = globalThis;
|
|
13256
13157
|
if (polyfillContext) {
|
|
13257
13158
|
polyfillContext(gl);
|
|
13258
13159
|
}
|
|
@@ -13304,7 +13205,6 @@ function popContextState(gl) {
|
|
|
13304
13205
|
gl.state.pop();
|
|
13305
13206
|
}
|
|
13306
13207
|
|
|
13307
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
|
|
13308
13208
|
|
|
13309
13209
|
/***/ }),
|
|
13310
13210
|
|
|
@@ -20431,6 +20331,10 @@ const PROP_CHECKS_SET_PROPS = {
|
|
|
20431
20331
|
};
|
|
20432
20332
|
|
|
20433
20333
|
class Buffer extends _resource__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
20334
|
+
// eslint-disable-next-line accessor-pairs
|
|
20335
|
+
get [Symbol.toStringTag]() {
|
|
20336
|
+
return 'Buffer';
|
|
20337
|
+
}
|
|
20434
20338
|
constructor(gl, props = {}) {
|
|
20435
20339
|
super(gl, props);
|
|
20436
20340
|
|
|
@@ -21353,6 +21257,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21353
21257
|
const ERR_MULTIPLE_RENDERTARGETS = 'Multiple render targets not supported';
|
|
21354
21258
|
|
|
21355
21259
|
class Framebuffer extends _resource__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
21260
|
+
// eslint-disable-next-line accessor-pairs
|
|
21261
|
+
get [Symbol.toStringTag]() {
|
|
21262
|
+
return 'Framebuffer';
|
|
21263
|
+
}
|
|
21356
21264
|
static isSupported(gl, options = {}) {
|
|
21357
21265
|
const {
|
|
21358
21266
|
colorBufferFloat, // Whether floating point textures can be rendered and read
|
|
@@ -22248,6 +22156,10 @@ const V6_DEPRECATED_METHODS = [
|
|
|
22248
22156
|
];
|
|
22249
22157
|
|
|
22250
22158
|
class Program extends _resource__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
22159
|
+
// eslint-disable-next-line accessor-pairs
|
|
22160
|
+
get [Symbol.toStringTag]() {
|
|
22161
|
+
return 'Program';
|
|
22162
|
+
}
|
|
22251
22163
|
constructor(gl, props = {}) {
|
|
22252
22164
|
super(gl, props);
|
|
22253
22165
|
|
|
@@ -22639,6 +22551,10 @@ const GL_ANY_SAMPLES_PASSED = 0x8c2f; // Occlusion query (if drawing passed dept
|
|
|
22639
22551
|
const GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8d6a; // Occlusion query less accurate/faster version
|
|
22640
22552
|
|
|
22641
22553
|
class Query extends _resource__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
22554
|
+
// eslint-disable-next-line accessor-pairs
|
|
22555
|
+
get [Symbol.toStringTag]() {
|
|
22556
|
+
return 'Query';
|
|
22557
|
+
}
|
|
22642
22558
|
// Returns true if Query is supported by the WebGL implementation
|
|
22643
22559
|
// Can also check whether timestamp queries are available.
|
|
22644
22560
|
static isSupported(gl, opts = []) {
|
|
@@ -22904,6 +22820,10 @@ function isFormatSupported(gl, format, formats) {
|
|
|
22904
22820
|
}
|
|
22905
22821
|
|
|
22906
22822
|
class Renderbuffer extends _resource__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
22823
|
+
// eslint-disable-next-line accessor-pairs
|
|
22824
|
+
get [Symbol.toStringTag]() {
|
|
22825
|
+
return 'Renderbuffer';
|
|
22826
|
+
}
|
|
22907
22827
|
static isSupported(gl, {format} = {format: null}) {
|
|
22908
22828
|
return !format || isFormatSupported(gl, format, _renderbuffer_formats__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
|
22909
22829
|
}
|
|
@@ -23024,6 +22944,10 @@ const ERR_RESOURCE_METHOD_UNDEFINED = 'Resource subclass must define virtual met
|
|
|
23024
22944
|
// }
|
|
23025
22945
|
|
|
23026
22946
|
class Resource {
|
|
22947
|
+
// eslint-disable-next-line accessor-pairs
|
|
22948
|
+
get [Symbol.toStringTag]() {
|
|
22949
|
+
return 'Resource';
|
|
22950
|
+
}
|
|
23027
22951
|
constructor(gl, opts = {}) {
|
|
23028
22952
|
Object(_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__["assertWebGLContext"])(gl);
|
|
23029
22953
|
|
|
@@ -23032,7 +22956,7 @@ class Resource {
|
|
|
23032
22956
|
// @ts-ignore
|
|
23033
22957
|
this.gl2 = gl;
|
|
23034
22958
|
// this.ext = polyfillContext(gl);
|
|
23035
|
-
this.id = id || Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["uid"])(this.
|
|
22959
|
+
this.id = id || Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["uid"])(this[Symbol.toStringTag]);
|
|
23036
22960
|
this.userData = userData;
|
|
23037
22961
|
this._bound = false;
|
|
23038
22962
|
|
|
@@ -23055,7 +22979,7 @@ class Resource {
|
|
|
23055
22979
|
}
|
|
23056
22980
|
|
|
23057
22981
|
toString() {
|
|
23058
|
-
return `${this.constructor.name}(${this.id})`;
|
|
22982
|
+
return `${this[Symbol.toStringTag] || this.constructor.name}(${this.id})`;
|
|
23059
22983
|
}
|
|
23060
22984
|
|
|
23061
22985
|
get handle() {
|
|
@@ -23286,7 +23210,7 @@ class Resource {
|
|
|
23286
23210
|
}
|
|
23287
23211
|
|
|
23288
23212
|
_addStats() {
|
|
23289
|
-
const name = this.
|
|
23213
|
+
const name = this[Symbol.toStringTag];
|
|
23290
23214
|
const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Resource Counts');
|
|
23291
23215
|
|
|
23292
23216
|
stats.get('Resources Created').incrementCount();
|
|
@@ -23295,13 +23219,13 @@ class Resource {
|
|
|
23295
23219
|
}
|
|
23296
23220
|
|
|
23297
23221
|
_removeStats() {
|
|
23298
|
-
const name = this.
|
|
23222
|
+
const name = this[Symbol.toStringTag];
|
|
23299
23223
|
const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Resource Counts');
|
|
23300
23224
|
|
|
23301
23225
|
stats.get(`${name}s Active`).decrementCount();
|
|
23302
23226
|
}
|
|
23303
23227
|
|
|
23304
|
-
_trackAllocatedMemory(bytes, name = this.
|
|
23228
|
+
_trackAllocatedMemory(bytes, name = this[Symbol.toStringTag]) {
|
|
23305
23229
|
const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Memory Usage');
|
|
23306
23230
|
|
|
23307
23231
|
stats.get('GPU Memory').addCount(bytes);
|
|
@@ -23309,7 +23233,7 @@ class Resource {
|
|
|
23309
23233
|
this.byteLength = bytes;
|
|
23310
23234
|
}
|
|
23311
23235
|
|
|
23312
|
-
_trackDeallocatedMemory(name = this.
|
|
23236
|
+
_trackDeallocatedMemory(name = this[Symbol.toStringTag]) {
|
|
23313
23237
|
const stats = _init__WEBPACK_IMPORTED_MODULE_1__["lumaStats"].get('Memory Usage');
|
|
23314
23238
|
|
|
23315
23239
|
stats.get('GPU Memory').subtractCount(this.byteLength);
|
|
@@ -23350,6 +23274,11 @@ const ERR_SOURCE = 'Shader: GLSL source code must be a JavaScript string';
|
|
|
23350
23274
|
|
|
23351
23275
|
// For now this is an internal class
|
|
23352
23276
|
class Shader extends _resource__WEBPACK_IMPORTED_MODULE_5__["default"] {
|
|
23277
|
+
// eslint-disable-next-line accessor-pairs
|
|
23278
|
+
get [Symbol.toStringTag]() {
|
|
23279
|
+
return 'Shader';
|
|
23280
|
+
}
|
|
23281
|
+
|
|
23353
23282
|
static getTypeName(shaderType) {
|
|
23354
23283
|
switch (shaderType) {
|
|
23355
23284
|
case _luma_gl_constants__WEBPACK_IMPORTED_MODULE_0__["default"].VERTEX_SHADER:
|
|
@@ -23457,6 +23386,11 @@ class Shader extends _resource__WEBPACK_IMPORTED_MODULE_5__["default"] {
|
|
|
23457
23386
|
}
|
|
23458
23387
|
|
|
23459
23388
|
class VertexShader extends Shader {
|
|
23389
|
+
// eslint-disable-next-line accessor-pairs
|
|
23390
|
+
get [Symbol.toStringTag]() {
|
|
23391
|
+
return 'VertexShader';
|
|
23392
|
+
}
|
|
23393
|
+
|
|
23460
23394
|
constructor(gl, props) {
|
|
23461
23395
|
// Signature: new VertexShader(gl, source)
|
|
23462
23396
|
if (typeof props === 'string') {
|
|
@@ -23472,6 +23406,10 @@ class VertexShader extends Shader {
|
|
|
23472
23406
|
}
|
|
23473
23407
|
|
|
23474
23408
|
class FragmentShader extends Shader {
|
|
23409
|
+
// eslint-disable-next-line accessor-pairs
|
|
23410
|
+
get [Symbol.toStringTag]() {
|
|
23411
|
+
return 'FragmentShader';
|
|
23412
|
+
}
|
|
23475
23413
|
constructor(gl, props) {
|
|
23476
23414
|
// Signature: new FragmentShader(gl, source)
|
|
23477
23415
|
if (typeof props === 'string') {
|
|
@@ -23510,6 +23448,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23510
23448
|
|
|
23511
23449
|
|
|
23512
23450
|
class Texture2D extends _texture__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
23451
|
+
// eslint-disable-next-line accessor-pairs
|
|
23452
|
+
get [Symbol.toStringTag]() {
|
|
23453
|
+
return 'Texture2D';
|
|
23454
|
+
}
|
|
23455
|
+
|
|
23513
23456
|
static isSupported(gl, opts) {
|
|
23514
23457
|
return _texture__WEBPACK_IMPORTED_MODULE_2__["default"].isSupported(gl, opts);
|
|
23515
23458
|
}
|
|
@@ -23560,6 +23503,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23560
23503
|
|
|
23561
23504
|
|
|
23562
23505
|
class Texture3D extends _texture__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
23506
|
+
// eslint-disable-next-line accessor-pairs
|
|
23507
|
+
get [Symbol.toStringTag]() {
|
|
23508
|
+
return 'Texture3D';
|
|
23509
|
+
}
|
|
23510
|
+
|
|
23563
23511
|
static isSupported(gl) {
|
|
23564
23512
|
return Object(_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__["isWebGL2"])(gl);
|
|
23565
23513
|
}
|
|
@@ -23677,6 +23625,11 @@ const FACES = [
|
|
|
23677
23625
|
];
|
|
23678
23626
|
|
|
23679
23627
|
class TextureCube extends _texture__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
23628
|
+
// eslint-disable-next-line accessor-pairs
|
|
23629
|
+
get [Symbol.toStringTag]() {
|
|
23630
|
+
return 'TextureCube';
|
|
23631
|
+
}
|
|
23632
|
+
|
|
23680
23633
|
constructor(gl, props = {}) {
|
|
23681
23634
|
Object(_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__["assertWebGLContext"])(gl);
|
|
23682
23635
|
|
|
@@ -24006,14 +23959,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24006
23959
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Texture; });
|
|
24007
23960
|
/* harmony import */ var _luma_gl_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/constants */ "../constants/src/index.js");
|
|
24008
23961
|
/* harmony import */ var _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @luma.gl/gltools */ "../gltools/src/index.js");
|
|
24009
|
-
/* harmony import */ var
|
|
24010
|
-
/* harmony import */ var
|
|
24011
|
-
/* harmony import */ var
|
|
24012
|
-
/* harmony import */ var
|
|
24013
|
-
/* harmony import */ var
|
|
24014
|
-
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/assert */ "../webgl/src/utils/assert.js");
|
|
24015
|
-
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/utils */ "../webgl/src/utils/utils.js");
|
|
24016
|
-
|
|
23962
|
+
/* harmony import */ var _resource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resource */ "../webgl/src/classes/resource.js");
|
|
23963
|
+
/* harmony import */ var _buffer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./buffer */ "../webgl/src/classes/buffer.js");
|
|
23964
|
+
/* harmony import */ var _texture_formats__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./texture-formats */ "../webgl/src/classes/texture-formats.js");
|
|
23965
|
+
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/assert */ "../webgl/src/utils/assert.js");
|
|
23966
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/utils */ "../webgl/src/utils/utils.js");
|
|
24017
23967
|
|
|
24018
23968
|
|
|
24019
23969
|
|
|
@@ -24028,15 +23978,19 @@ const NPOT_MIN_FILTERS = [_luma_gl_constants__WEBPACK_IMPORTED_MODULE_0__["defau
|
|
|
24028
23978
|
|
|
24029
23979
|
// Polyfill
|
|
24030
23980
|
// Note (Tarek): Do we really need to support this API?
|
|
24031
|
-
const WebGLBuffer =
|
|
23981
|
+
const WebGLBuffer = globalThis.WebGLBuffer || function WebGLBuffer() {};
|
|
24032
23982
|
|
|
24033
|
-
class Texture extends
|
|
23983
|
+
class Texture extends _resource__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
23984
|
+
// eslint-disable-next-line accessor-pairs
|
|
23985
|
+
get [Symbol.toStringTag]() {
|
|
23986
|
+
return 'Texture';
|
|
23987
|
+
}
|
|
24034
23988
|
static isSupported(gl, opts = {}) {
|
|
24035
23989
|
const {format, linearFiltering} = opts;
|
|
24036
23990
|
let supported = true;
|
|
24037
23991
|
if (format) {
|
|
24038
|
-
supported = supported && Object(
|
|
24039
|
-
supported = supported && (!linearFiltering || Object(
|
|
23992
|
+
supported = supported && Object(_texture_formats__WEBPACK_IMPORTED_MODULE_4__["isFormatSupported"])(gl, format);
|
|
23993
|
+
supported = supported && (!linearFiltering || Object(_texture_formats__WEBPACK_IMPORTED_MODULE_4__["isLinearFilteringSupported"])(gl, format));
|
|
24040
23994
|
}
|
|
24041
23995
|
return supported;
|
|
24042
23996
|
}
|
|
@@ -24053,7 +24007,7 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24053
24007
|
// (while run-time).
|
|
24054
24008
|
constructor(gl, props) {
|
|
24055
24009
|
const {
|
|
24056
|
-
id = Object(
|
|
24010
|
+
id = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["uid"])('texture'),
|
|
24057
24011
|
handle,
|
|
24058
24012
|
target
|
|
24059
24013
|
// , magFilter, minFilter, wrapS, wrapT
|
|
@@ -24319,6 +24273,8 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24319
24273
|
|
|
24320
24274
|
let gl2;
|
|
24321
24275
|
|
|
24276
|
+
let compressedTextureSize = 0;
|
|
24277
|
+
|
|
24322
24278
|
Object(_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__["withParameters"])(this.gl, parameters, () => {
|
|
24323
24279
|
switch (dataType) {
|
|
24324
24280
|
case 'null':
|
|
@@ -24367,20 +24323,22 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24367
24323
|
border,
|
|
24368
24324
|
levelData.data
|
|
24369
24325
|
);
|
|
24326
|
+
compressedTextureSize += levelData.levelSize;
|
|
24370
24327
|
}
|
|
24371
|
-
|
|
24372
24328
|
break;
|
|
24373
24329
|
default:
|
|
24374
|
-
Object(
|
|
24330
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_5__["assert"])(false, 'Unknown image data type');
|
|
24375
24331
|
}
|
|
24376
24332
|
});
|
|
24377
24333
|
|
|
24378
|
-
if (
|
|
24334
|
+
if (dataType === 'compressed') {
|
|
24335
|
+
this._trackAllocatedMemory(compressedTextureSize, 'Texture');
|
|
24336
|
+
} else if (data && data.byteLength) {
|
|
24379
24337
|
this._trackAllocatedMemory(data.byteLength, 'Texture');
|
|
24380
24338
|
} else {
|
|
24381
24339
|
// NOTE(Tarek): Default to RGBA bytes
|
|
24382
|
-
const channels =
|
|
24383
|
-
const channelSize =
|
|
24340
|
+
const channels = _texture_formats__WEBPACK_IMPORTED_MODULE_4__["DATA_FORMAT_CHANNELS"][this.dataFormat] || 4;
|
|
24341
|
+
const channelSize = _texture_formats__WEBPACK_IMPORTED_MODULE_4__["TYPE_SIZES"][this.type] || 1;
|
|
24384
24342
|
|
|
24385
24343
|
this._trackAllocatedMemory(this.width * this.height * channels * channelSize, 'Texture');
|
|
24386
24344
|
}
|
|
@@ -24446,7 +24404,7 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24446
24404
|
height
|
|
24447
24405
|
}));
|
|
24448
24406
|
|
|
24449
|
-
Object(
|
|
24407
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_5__["assert"])(this.depth === 0, 'texSubImage not supported for 3D textures');
|
|
24450
24408
|
|
|
24451
24409
|
// pixels variable is for API compatibility purpose
|
|
24452
24410
|
if (!data) {
|
|
@@ -24462,7 +24420,7 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24462
24420
|
}
|
|
24463
24421
|
|
|
24464
24422
|
// Support buffers
|
|
24465
|
-
if (data instanceof
|
|
24423
|
+
if (data instanceof _buffer__WEBPACK_IMPORTED_MODULE_3__["default"]) {
|
|
24466
24424
|
data = data.handle;
|
|
24467
24425
|
}
|
|
24468
24426
|
|
|
@@ -24564,7 +24522,7 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24564
24522
|
if (ArrayBuffer.isView(data)) {
|
|
24565
24523
|
return {data, dataType: 'typed-array'};
|
|
24566
24524
|
}
|
|
24567
|
-
if (data instanceof
|
|
24525
|
+
if (data instanceof _buffer__WEBPACK_IMPORTED_MODULE_3__["default"]) {
|
|
24568
24526
|
return {data: data.handle, dataType: 'buffer'};
|
|
24569
24527
|
}
|
|
24570
24528
|
if (data instanceof WebGLBuffer) {
|
|
@@ -24656,7 +24614,7 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24656
24614
|
let {width, height, dataFormat, type, compressed} = opts;
|
|
24657
24615
|
|
|
24658
24616
|
// Deduce format and type from format
|
|
24659
|
-
const textureFormat =
|
|
24617
|
+
const textureFormat = _texture_formats__WEBPACK_IMPORTED_MODULE_4__["TEXTURE_FORMATS"][format];
|
|
24660
24618
|
dataFormat = dataFormat || (textureFormat && textureFormat.dataFormat);
|
|
24661
24619
|
type = type || (textureFormat && textureFormat.types[0]);
|
|
24662
24620
|
|
|
@@ -24688,12 +24646,12 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24688
24646
|
size = {width, height};
|
|
24689
24647
|
}
|
|
24690
24648
|
|
|
24691
|
-
Object(
|
|
24692
|
-
Object(
|
|
24649
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_5__["assert"])(size, 'Could not deduced texture size');
|
|
24650
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_5__["assert"])(
|
|
24693
24651
|
width === undefined || size.width === width,
|
|
24694
24652
|
'Deduced texture width does not match supplied width'
|
|
24695
24653
|
);
|
|
24696
|
-
Object(
|
|
24654
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_5__["assert"])(
|
|
24697
24655
|
height === undefined || size.height === height,
|
|
24698
24656
|
'Deduced texture height does not match supplied height'
|
|
24699
24657
|
);
|
|
@@ -24743,7 +24701,7 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24743
24701
|
|
|
24744
24702
|
case _luma_gl_constants__WEBPACK_IMPORTED_MODULE_0__["default"].TEXTURE_WIDTH:
|
|
24745
24703
|
case _luma_gl_constants__WEBPACK_IMPORTED_MODULE_0__["default"].TEXTURE_HEIGHT:
|
|
24746
|
-
Object(
|
|
24704
|
+
Object(_utils_assert__WEBPACK_IMPORTED_MODULE_5__["assert"])(false);
|
|
24747
24705
|
break;
|
|
24748
24706
|
|
|
24749
24707
|
default:
|
|
@@ -24764,7 +24722,7 @@ class Texture extends _resource__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
24764
24722
|
if (!this.width || !this.height) {
|
|
24765
24723
|
return false;
|
|
24766
24724
|
}
|
|
24767
|
-
return !Object(
|
|
24725
|
+
return !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["isPowerOfTwo"])(this.width) || !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["isPowerOfTwo"])(this.height);
|
|
24768
24726
|
}
|
|
24769
24727
|
|
|
24770
24728
|
// Update default settings which are not supported by NPOT textures.
|
|
@@ -24835,6 +24793,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24835
24793
|
// See https://github.com/KhronosGroup/WebGL/issues/2346
|
|
24836
24794
|
|
|
24837
24795
|
class TransformFeedback extends _resource__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
24796
|
+
// eslint-disable-next-line accessor-pairs
|
|
24797
|
+
get [Symbol.toStringTag]() {
|
|
24798
|
+
return 'TransformFeedback';
|
|
24799
|
+
}
|
|
24838
24800
|
static isSupported(gl) {
|
|
24839
24801
|
return Object(_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_1__["isWebGL2"])(gl);
|
|
24840
24802
|
}
|
|
@@ -25535,6 +25497,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25535
25497
|
const ERR_ELEMENTS = 'elements must be GL.ELEMENT_ARRAY_BUFFER';
|
|
25536
25498
|
|
|
25537
25499
|
class VertexArrayObject extends _resource__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
25500
|
+
// eslint-disable-next-line accessor-pairs
|
|
25501
|
+
get [Symbol.toStringTag]() {
|
|
25502
|
+
return 'VertexArrayObject';
|
|
25503
|
+
}
|
|
25538
25504
|
static isSupported(gl, options = {}) {
|
|
25539
25505
|
// Attribute 0 can not be disable on most desktop OpenGL based browsers
|
|
25540
25506
|
// and on iOS Safari browser.
|
|
@@ -27558,8 +27524,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27558
27524
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lumaStats", function() { return lumaStats; });
|
|
27559
27525
|
/* harmony import */ var _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/gltools */ "../gltools/src/index.js");
|
|
27560
27526
|
/* harmony import */ var probe_gl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! probe.gl */ "../../node_modules/probe.gl/dist/esm/index.js");
|
|
27561
|
-
/* harmony import */ var
|
|
27562
|
-
/* harmony import */ var probe_gl_env__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(probe_gl_env__WEBPACK_IMPORTED_MODULE_2__);
|
|
27527
|
+
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
27563
27528
|
|
|
27564
27529
|
|
|
27565
27530
|
|
|
@@ -27567,7 +27532,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27567
27532
|
// Version detection using babel plugin
|
|
27568
27533
|
/* global __VERSION__ */
|
|
27569
27534
|
// @ts-ignore
|
|
27570
|
-
const VERSION = true ? "8.5.
|
|
27535
|
+
const VERSION = true ? "8.5.12" : undefined;
|
|
27571
27536
|
|
|
27572
27537
|
const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
|
|
27573
27538
|
// Assign luma.log.level in console to control logging: \
|
|
@@ -27590,16 +27555,16 @@ class StatsManager {
|
|
|
27590
27555
|
|
|
27591
27556
|
const lumaStats = new StatsManager();
|
|
27592
27557
|
|
|
27593
|
-
if (
|
|
27594
|
-
throw new Error(`luma.gl - multiple VERSIONs detected: ${
|
|
27558
|
+
if (globalThis.luma && globalThis.luma.VERSION !== VERSION) {
|
|
27559
|
+
throw new Error(`luma.gl - multiple VERSIONs detected: ${globalThis.luma.VERSION} vs ${VERSION}`);
|
|
27595
27560
|
}
|
|
27596
27561
|
|
|
27597
|
-
if (!
|
|
27598
|
-
if (Object(
|
|
27562
|
+
if (!globalThis.luma) {
|
|
27563
|
+
if (Object(_probe_gl_env__WEBPACK_IMPORTED_MODULE_2__["isBrowser"])()) {
|
|
27599
27564
|
_luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__["log"].log(1, `luma.gl ${VERSION} - ${STARTUP_MESSAGE}`)();
|
|
27600
27565
|
}
|
|
27601
27566
|
|
|
27602
|
-
|
|
27567
|
+
globalThis.luma = globalThis.luma || {
|
|
27603
27568
|
VERSION,
|
|
27604
27569
|
version: VERSION,
|
|
27605
27570
|
log: _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__["log"],
|
|
@@ -27621,7 +27586,7 @@ if (!probe_gl_env__WEBPACK_IMPORTED_MODULE_2__["global"].luma) {
|
|
|
27621
27586
|
}
|
|
27622
27587
|
|
|
27623
27588
|
|
|
27624
|
-
/* harmony default export */ __webpack_exports__["default"] = (
|
|
27589
|
+
/* harmony default export */ __webpack_exports__["default"] = (globalThis.luma);
|
|
27625
27590
|
|
|
27626
27591
|
|
|
27627
27592
|
/***/ }),
|
|
@@ -28758,15 +28723,13 @@ class Timeline {
|
|
|
28758
28723
|
/*! no static exports found */
|
|
28759
28724
|
/***/ (function(module, exports, __webpack_require__) {
|
|
28760
28725
|
|
|
28761
|
-
|
|
28726
|
+
const moduleExports = __webpack_require__(/*! ./index */ "./src/index.js");
|
|
28762
28727
|
|
|
28763
|
-
const _global = typeof window === 'undefined' ? global : window;
|
|
28764
28728
|
// @ts-ignore
|
|
28765
|
-
|
|
28729
|
+
globalThis.luma = globalThis.luma || {};
|
|
28766
28730
|
// @ts-ignore
|
|
28767
|
-
module.exports = Object.assign(
|
|
28731
|
+
module.exports = Object.assign(globalThis.luma, moduleExports);
|
|
28768
28732
|
|
|
28769
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
|
|
28770
28733
|
|
|
28771
28734
|
/***/ }),
|
|
28772
28735
|
|
|
@@ -29788,15 +29751,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29788
29751
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AnimationLoop; });
|
|
29789
29752
|
/* harmony import */ var _luma_gl_gltools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luma.gl/gltools */ "../gltools/src/index.js");
|
|
29790
29753
|
/* harmony import */ var _luma_gl_webgl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @luma.gl/webgl */ "../webgl/src/index.js");
|
|
29791
|
-
/* harmony import */ var
|
|
29792
|
-
/* harmony import */ var probe_gl_env__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(probe_gl_env__WEBPACK_IMPORTED_MODULE_2__);
|
|
29754
|
+
/* harmony import */ var _probe_gl_env__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @probe.gl/env */ "../../node_modules/@probe.gl/env/dist/esm/index.js");
|
|
29793
29755
|
|
|
29794
29756
|
|
|
29795
29757
|
|
|
29796
29758
|
|
|
29797
29759
|
|
|
29798
29760
|
|
|
29799
|
-
const isPage = Object(
|
|
29761
|
+
const isPage = Object(_probe_gl_env__WEBPACK_IMPORTED_MODULE_2__["isBrowser"])() && typeof document !== 'undefined';
|
|
29800
29762
|
|
|
29801
29763
|
let statIdCounter = 0;
|
|
29802
29764
|
|