wonder-image 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DOCS.md +12 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/babel.config.json +3 -0
- package/demo/backend/body-end.php +10 -0
- package/demo/backend/head.php +93 -0
- package/demo/frontend/body-end.php +19 -0
- package/demo/frontend/head.php +244 -0
- package/demo/wonder-image.php +41 -0
- package/dist/0d01fa889dc2b0202b98.png +0 -0
- package/dist/203d1199e7aef04c0a34.gif +0 -0
- package/dist/26d6ed3fa1c815e4c78f.png +0 -0
- package/dist/39795c0b4513de014cf8.woff +0 -0
- package/dist/40b30ca122107c2852be.png +0 -0
- package/dist/4a7b4107b62ef059ba65.png +0 -0
- package/dist/4dce7f71b08755f19759.png +0 -0
- package/dist/60af14fddca897f348bb.png +0 -0
- package/dist/67172a36bcdeaca8592a.png +0 -0
- package/dist/a85c6dc53638f894de38.png +0 -0
- package/dist/b7bcc075b395c14ce8c2.woff2 +0 -0
- package/dist/backend/body-end.js +3 -0
- package/dist/backend/body-end.js.LICENSE.txt +44 -0
- package/dist/backend/body-end.js.map +1 -0
- package/dist/backend/head.css +2 -0
- package/dist/backend/head.css.map +1 -0
- package/dist/backend/head.js +3 -0
- package/dist/backend/head.js.LICENSE.txt +46 -0
- package/dist/backend/head.js.map +1 -0
- package/dist/backend/lib.js +2 -0
- package/dist/backend/lib.js.LICENSE.txt +1 -0
- package/dist/frontend/body-end.js +3 -0
- package/dist/frontend/body-end.js.LICENSE.txt +46 -0
- package/dist/frontend/body-end.js.map +1 -0
- package/dist/frontend/head.css +2 -0
- package/dist/frontend/head.css.map +1 -0
- package/dist/frontend/head.js +3 -0
- package/dist/frontend/head.js.LICENSE.txt +46 -0
- package/dist/frontend/head.js.map +1 -0
- package/dist/frontend/lib.css +2 -0
- package/dist/frontend/lib.css.map +1 -0
- package/dist/frontend/lib.js +3 -0
- package/dist/frontend/lib.js.LICENSE.txt +151 -0
- package/dist/frontend/lib.js.map +1 -0
- package/dist/lib/autonumeric/autonumeric.js +3 -0
- package/dist/lib/autonumeric/autonumeric.js.LICENSE.txt +47 -0
- package/dist/lib/autonumeric/autonumeric.js.map +1 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.css +2 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.css.map +1 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.js +3 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.js.LICENSE.txt +42 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.js.map +1 -0
- package/dist/lib/bootstrap/bootstrap-icons.css +2 -0
- package/dist/lib/bootstrap/bootstrap-icons.css.map +1 -0
- package/dist/lib/bootstrap/bootstrap-icons.js +3 -0
- package/dist/lib/bootstrap/bootstrap-icons.js.LICENSE.txt +13 -0
- package/dist/lib/bootstrap/bootstrap-icons.js.map +1 -0
- package/dist/lib/bootstrap/bootstrap.css +2 -0
- package/dist/lib/bootstrap/bootstrap.css.map +1 -0
- package/dist/lib/bootstrap/bootstrap.js +3 -0
- package/dist/lib/bootstrap/bootstrap.js.LICENSE.txt +44 -0
- package/dist/lib/bootstrap/bootstrap.js.map +1 -0
- package/dist/lib/chartjs/chart.js +3 -0
- package/dist/lib/chartjs/chart.js.LICENSE.txt +1467 -0
- package/dist/lib/chartjs/chart.js.map +1 -0
- package/dist/lib/datatables/datatables.css +2 -0
- package/dist/lib/datatables/datatables.css.map +1 -0
- package/dist/lib/datatables/datatables.js +3 -0
- package/dist/lib/datatables/datatables.js.LICENSE.txt +8988 -0
- package/dist/lib/datatables/datatables.js.map +1 -0
- package/dist/lib/editorjs/editor.js +3 -0
- package/dist/lib/editorjs/editor.js.LICENSE.txt +5812 -0
- package/dist/lib/editorjs/editor.js.map +1 -0
- package/dist/lib/fancyapps/fancyapps.css +2 -0
- package/dist/lib/fancyapps/fancyapps.css.map +1 -0
- package/dist/lib/fancyapps/fancyapps.js +3 -0
- package/dist/lib/fancyapps/fancyapps.js.LICENSE.txt +19 -0
- package/dist/lib/fancyapps/fancyapps.js.map +1 -0
- package/dist/lib/filepond/filepond.css +2 -0
- package/dist/lib/filepond/filepond.css.map +1 -0
- package/dist/lib/filepond/filepond.js +3 -0
- package/dist/lib/filepond/filepond.js.LICENSE.txt +2797 -0
- package/dist/lib/filepond/filepond.js.map +1 -0
- package/dist/lib/fullcalendar/fullcalendar.js +3 -0
- package/dist/lib/fullcalendar/fullcalendar.js.LICENSE.txt +3787 -0
- package/dist/lib/fullcalendar/fullcalendar.js.map +1 -0
- package/dist/lib/jquery/jquery-plugin.css +2 -0
- package/dist/lib/jquery/jquery-plugin.css.map +1 -0
- package/dist/lib/jquery/jquery-plugin.js +3 -0
- package/dist/lib/jquery/jquery-plugin.js.LICENSE.txt +60 -0
- package/dist/lib/jquery/jquery-plugin.js.map +1 -0
- package/dist/lib/jquery/jquery.js +3 -0
- package/dist/lib/jquery/jquery.js.LICENSE.txt +3240 -0
- package/dist/lib/jquery/jquery.js.map +1 -0
- package/dist/lib/jstree/jstree.css +2 -0
- package/dist/lib/jstree/jstree.css.map +1 -0
- package/dist/lib/jstree/jstree.js +3 -0
- package/dist/lib/jstree/jstree.js.LICENSE.txt +42 -0
- package/dist/lib/jstree/jstree.js.map +1 -0
- package/dist/lib/moment/moment.js +3 -0
- package/dist/lib/moment/moment.js.LICENSE.txt +772 -0
- package/dist/lib/moment/moment.js.map +1 -0
- package/dist/lib/quilljs/quill.css +2 -0
- package/dist/lib/quilljs/quill.css.map +1 -0
- package/dist/lib/quilljs/quill.js +3 -0
- package/dist/lib/quilljs/quill.js.LICENSE.txt +3038 -0
- package/dist/lib/quilljs/quill.js.map +1 -0
- package/dist/lib/swiperjs/swiper-plugin.css +2 -0
- package/dist/lib/swiperjs/swiper-plugin.css.map +1 -0
- package/dist/lib/swiperjs/swiper-plugin.js +3 -0
- package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +1113 -0
- package/dist/lib/swiperjs/swiper-plugin.js.map +1 -0
- package/dist/lib/swiperjs/swiper.css +2 -0
- package/dist/lib/swiperjs/swiper.css.map +1 -0
- package/dist/lib/swiperjs/swiper.js +3 -0
- package/dist/lib/swiperjs/swiper.js.LICENSE.txt +651 -0
- package/dist/lib/swiperjs/swiper.js.map +1 -0
- package/dist/lib/videojs/video.css +2 -0
- package/dist/lib/videojs/video.css.map +1 -0
- package/dist/lib/videojs/video.js +3 -0
- package/dist/lib/videojs/video.js.LICENSE.txt +23391 -0
- package/dist/lib/videojs/video.js.map +1 -0
- package/package.json +95 -0
- package/src/build/backend/css/header.css +252 -0
- package/src/build/backend/css/input.css +295 -0
- package/src/build/backend/css/list.css +57 -0
- package/src/build/backend/css/order.css +99 -0
- package/src/build/backend/js/ajax.js +96 -0
- package/src/build/backend/js/alert.js +78 -0
- package/src/build/backend/js/bootstrap.js +52 -0
- package/src/build/backend/js/form/editor.js +293 -0
- package/src/build/backend/js/form/file.js +142 -0
- package/src/build/backend/js/form/filepond.js +11 -0
- package/src/build/backend/js/form/input.js +313 -0
- package/src/build/backend/js/form/inputRow.js +164 -0
- package/src/build/backend/js/form/send.js +14 -0
- package/src/build/backend/js/form/set.js +314 -0
- package/src/build/backend/js/jquery.js +15 -0
- package/src/build/backend/js/list.js +19 -0
- package/src/build/backend/js/modal.js +31 -0
- package/src/build/backend/js/pageSetUp.js +125 -0
- package/src/build/backend/js/utility.js +38 -0
- package/src/build/frontend/css/class/dimension.css +3376 -0
- package/src/build/frontend/css/class/function.css +316 -0
- package/src/build/frontend/css/class/grid.css +240 -0
- package/src/build/frontend/css/class/margin.css +823 -0
- package/src/build/frontend/css/class/padding.css +760 -0
- package/src/build/frontend/css/class/position.css +351 -0
- package/src/build/frontend/css/class/resize.css +24 -0
- package/src/build/frontend/css/class/section.css +41 -0
- package/src/build/frontend/css/class/text.css +244 -0
- package/src/build/frontend/css/components/alert.css +42 -0
- package/src/build/frontend/css/components/button.css +107 -0
- package/src/build/frontend/css/components/dropdown.css +118 -0
- package/src/build/frontend/css/components/form/address.css +26 -0
- package/src/build/frontend/css/components/form/checkbox.css +65 -0
- package/src/build/frontend/css/components/form/date.css +133 -0
- package/src/build/frontend/css/components/form/input.css +176 -0
- package/src/build/frontend/css/components/form/select.css +69 -0
- package/src/build/frontend/css/components/header/hamburger/hamburger-1.css +56 -0
- package/src/build/frontend/css/components/header/hamburger/hamburger.css +58 -0
- package/src/build/frontend/css/components/header/header.css +57 -0
- package/src/build/frontend/css/components/header/mobile-nav.css +79 -0
- package/src/build/frontend/css/components/modal.css +76 -0
- package/src/build/frontend/css/components/spinner.css +37 -0
- package/src/build/frontend/css/generator/dimension.php +93 -0
- package/src/build/frontend/css/generator/margin.php +48 -0
- package/src/build/frontend/css/generator/padding.php +48 -0
- package/src/build/frontend/css/lib.css +3 -0
- package/src/build/frontend/css/main.css +37 -0
- package/src/build/frontend/js/alert.js +64 -0
- package/src/build/frontend/js/aos.js +9 -0
- package/src/build/frontend/js/dropdown.js +73 -0
- package/src/build/frontend/js/form/input.js +211 -0
- package/src/build/frontend/js/form/list.js +155 -0
- package/src/build/frontend/js/form/select.js +108 -0
- package/src/build/frontend/js/form/send.js +137 -0
- package/src/build/frontend/js/header.js +12 -0
- package/src/build/frontend/js/modal.js +26 -0
- package/src/build/frontend/js/pageSetUp.js +35 -0
- package/src/build/frontend/js/scroll.js +70 -0
- package/src/build/frontend/js/utility.js +21 -0
- package/src/build/global/js/canvas.js +82 -0
- package/src/build/global/js/fetch.js +47 -0
- package/src/build/global/js/form/autonumeric.js +136 -0
- package/src/build/global/js/form/phone.js +19 -0
- package/src/build/global/js/utility.js +88 -0
- package/src/build/global/js/video.js +7 -0
- package/src/build/lib/editorjs/gallery.js +39 -0
- package/src/build/lib/editorjs/hyperlink.js +170 -0
- package/src/build/lib/editorjs/video.js +61 -0
- package/src/build/lib/swiperjs/effect-carousel.css +24 -0
- package/src/build/lib/swiperjs/effect-carousel.esm.js +102 -0
- package/src/build/lib/swiperjs/effect-shutters.css +33 -0
- package/src/build/lib/swiperjs/effect-shutters.esm.js +114 -0
- package/src/build/lib/swiperjs/effect-slicer.css +39 -0
- package/src/build/lib/swiperjs/effect-slicer.esm.js +198 -0
- package/src/build/lib/swiperjs/swiper-gl.css +44 -0
- package/src/build/lib/swiperjs/swiper-gl.esm.js +6063 -0
- package/src/export/backend/body-end.js +4 -0
- package/src/export/backend/head.js +25 -0
- package/src/export/backend/lib.js +0 -0
- package/src/export/frontend/body-end.js +9 -0
- package/src/export/frontend/head.js +42 -0
- package/src/export/frontend/lib.js +17 -0
- package/src/export/lib/autonumeric/autonumeric.js +3 -0
- package/src/export/lib/bootstrap/bootstrap-datepicker.js +4 -0
- package/src/export/lib/bootstrap/bootstrap-icons.js +2 -0
- package/src/export/lib/bootstrap/bootstrap.js +3 -0
- package/src/export/lib/chartjs/chart.js +4 -0
- package/src/export/lib/datatables/datatables.js +6 -0
- package/src/export/lib/editorjs/editor.js +48 -0
- package/src/export/lib/fancyapps/fancyapps.js +7 -0
- package/src/export/lib/filepond/filepond.js +51 -0
- package/src/export/lib/fullcalendar/fullcalendar.js +29 -0
- package/src/export/lib/jquery/jquery-plugin.js +14 -0
- package/src/export/lib/jquery/jquery.js +4 -0
- package/src/export/lib/jstree/jstree.js +2 -0
- package/src/export/lib/moment/moment.js +12 -0
- package/src/export/lib/quilljs/quill.js +4 -0
- package/src/export/lib/swiperjs/swiper-plugin.js +20 -0
- package/src/export/lib/swiperjs/swiper.js +4 -0
- package/src/export/lib/videojs/video.js +3 -0
- package/webpack.config.js +79 -0
|
@@ -0,0 +1,1113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A fast javascript implementation of simplex noise by Jonas Wagner
|
|
3
|
+
|
|
4
|
+
Based on a speed-improved simplex noise algorithm for 2D, 3D and 4D in Java.
|
|
5
|
+
Which is based on example code by Stefan Gustavson (stegu@itn.liu.se).
|
|
6
|
+
With Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).
|
|
7
|
+
Better rank ordering method by Stefan Gustavson in 2012.
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2022 Jonas Wagner
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/* glsl */
|
|
31
|
+
|
|
32
|
+
/* webpack/runtime/make namespace object */
|
|
33
|
+
|
|
34
|
+
/*#__PURE__*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Adds two vec3's
|
|
38
|
+
*
|
|
39
|
+
* @param {vec3} out the receiving vector
|
|
40
|
+
* @param {vec3} a the first operand
|
|
41
|
+
* @param {vec3} b the second operand
|
|
42
|
+
* @returns {vec3} out
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Builds a random permutation table.
|
|
47
|
+
* This is exported only for (internal) testing purposes.
|
|
48
|
+
* Do not rely on this export.
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Calculates a 3x3 matrix from the given quaternion
|
|
54
|
+
*
|
|
55
|
+
* @param {mat3} out mat3 receiving operation result
|
|
56
|
+
* @param {quat} q Quaternion to create matrix from
|
|
57
|
+
*
|
|
58
|
+
* @returns {mat3} out
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
|
|
63
|
+
*
|
|
64
|
+
* @param {mat3} out mat3 receiving operation result
|
|
65
|
+
* @param {mat4} a Mat4 to derive the normal matrix from
|
|
66
|
+
*
|
|
67
|
+
* @returns {mat3} out
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Calculates a 4x4 matrix from the given quaternion
|
|
72
|
+
*
|
|
73
|
+
* @param {mat4} out mat4 receiving operation result
|
|
74
|
+
* @param {quat} q Quaternion to create matrix from
|
|
75
|
+
*
|
|
76
|
+
* @returns {mat4} out
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Calculates the conjugate of a quat
|
|
81
|
+
* If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
|
|
82
|
+
*
|
|
83
|
+
* @param {quat} out the receiving quaternion
|
|
84
|
+
* @param {quat} a quat to calculate conjugate of
|
|
85
|
+
* @returns {quat} out
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Calculates the determinant of a mat4
|
|
90
|
+
*
|
|
91
|
+
* @param {mat4} a the source matrix
|
|
92
|
+
* @returns {Number} determinant of a
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Calculates the dot product of two vec3's
|
|
97
|
+
*
|
|
98
|
+
* @param {vec3} a the first operand
|
|
99
|
+
* @param {vec3} b the second operand
|
|
100
|
+
* @returns {Number} dot product of a and b
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Calculates the dot product of two vec4's
|
|
105
|
+
*
|
|
106
|
+
* @param {vec4} a the first operand
|
|
107
|
+
* @param {vec4} b the second operand
|
|
108
|
+
* @returns {Number} dot product of a and b
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Calculates the euclidian distance between two vec3's
|
|
113
|
+
*
|
|
114
|
+
* @param {vec3} a the first operand
|
|
115
|
+
* @param {vec3} b the second operand
|
|
116
|
+
* @returns {Number} distance between a and b
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Calculates the inverse of a quat
|
|
121
|
+
*
|
|
122
|
+
* @param {quat} out the receiving quaternion
|
|
123
|
+
* @param {quat} a quat to calculate inverse of
|
|
124
|
+
* @returns {quat} out
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Calculates the length of a vec3
|
|
129
|
+
*
|
|
130
|
+
* @param {vec3} a vector to calculate length of
|
|
131
|
+
* @returns {Number} length of a
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Calculates the squared euclidian distance between two vec3's
|
|
136
|
+
*
|
|
137
|
+
* @param {vec3} a the first operand
|
|
138
|
+
* @param {vec3} b the second operand
|
|
139
|
+
* @returns {Number} squared distance between a and b
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Calculates the squared length of a vec3
|
|
144
|
+
*
|
|
145
|
+
* @param {vec3} a vector to calculate squared length of
|
|
146
|
+
* @returns {Number} squared length of a
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Computes the cross product of two vec3's
|
|
151
|
+
*
|
|
152
|
+
* @param {vec3} out the receiving vector
|
|
153
|
+
* @param {vec3} a the first operand
|
|
154
|
+
* @param {vec3} b the second operand
|
|
155
|
+
* @returns {vec3} out
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Copies the upper-left 3x3 values into the given mat3.
|
|
160
|
+
*
|
|
161
|
+
* @param {mat3} out the receiving 3x3 matrix
|
|
162
|
+
* @param {mat4} a the source 4x4 matrix
|
|
163
|
+
* @returns {mat3} out
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Copy the values from one mat3 to another
|
|
168
|
+
*
|
|
169
|
+
* @param {mat3} out the receiving matrix
|
|
170
|
+
* @param {mat3} a the source matrix
|
|
171
|
+
* @returns {mat3} out
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Copy the values from one mat4 to another
|
|
176
|
+
*
|
|
177
|
+
* @param {mat4} out the receiving matrix
|
|
178
|
+
* @param {mat4} a the source matrix
|
|
179
|
+
* @returns {mat4} out
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Copy the values from one quat to another
|
|
184
|
+
*
|
|
185
|
+
* @param {quat} out the receiving quaternion
|
|
186
|
+
* @param {quat} a the source quaternion
|
|
187
|
+
* @returns {quat} out
|
|
188
|
+
* @function
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Copy the values from one vec3 to another
|
|
193
|
+
*
|
|
194
|
+
* @param {vec3} out the receiving vector
|
|
195
|
+
* @param {vec3} a the source vector
|
|
196
|
+
* @returns {vec3} out
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Copy the values from one vec4 to another
|
|
201
|
+
*
|
|
202
|
+
* @param {vec4} out the receiving vector
|
|
203
|
+
* @param {vec4} a the source vector
|
|
204
|
+
* @returns {vec4} out
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Creates a 2D noise function
|
|
209
|
+
* @param random the random function that will be used to build the permutation table
|
|
210
|
+
* @returns {NoiseFunction2D}
|
|
211
|
+
*/
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Creates a matrix from a quaternion rotation, vector translation and vector scale
|
|
215
|
+
* This is equivalent to (but much faster than):
|
|
216
|
+
*
|
|
217
|
+
* mat4.identity(dest);
|
|
218
|
+
* mat4.translate(dest, vec);
|
|
219
|
+
* let quatMat = mat4.create();
|
|
220
|
+
* quat4.toMat4(quat, quatMat);
|
|
221
|
+
* mat4.multiply(dest, quatMat);
|
|
222
|
+
* mat4.scale(dest, scale)
|
|
223
|
+
*
|
|
224
|
+
* @param {mat4} out mat4 receiving operation result
|
|
225
|
+
* @param {quat4} q Rotation quaternion
|
|
226
|
+
* @param {vec3} v Translation vector
|
|
227
|
+
* @param {vec3} s Scaling vector
|
|
228
|
+
* @returns {mat4} out
|
|
229
|
+
*/
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Creates a quaternion from the given 3x3 rotation matrix.
|
|
233
|
+
*
|
|
234
|
+
* NOTE: The resultant quaternion is not normalized, so you should be sure
|
|
235
|
+
* to renormalize the quaternion yourself where necessary.
|
|
236
|
+
*
|
|
237
|
+
* @param {quat} out the receiving quaternion
|
|
238
|
+
* @param {mat3} m rotation matrix
|
|
239
|
+
* @returns {quat} out
|
|
240
|
+
* @function
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Creates a quaternion from the given euler angle x, y, z.
|
|
245
|
+
*
|
|
246
|
+
* @param {quat} out the receiving quaternion
|
|
247
|
+
* @param {vec3} euler Angles to rotate around each axis in degrees.
|
|
248
|
+
* @param {String} order detailing order of operations. Default 'XYZ'.
|
|
249
|
+
* @returns {quat} out
|
|
250
|
+
* @function
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Divides two vec3's
|
|
255
|
+
*
|
|
256
|
+
* @param {vec3} out the receiving vector
|
|
257
|
+
* @param {vec3} a the first operand
|
|
258
|
+
* @param {vec3} b the second operand
|
|
259
|
+
* @returns {vec3} out
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Generates a matrix that makes something look at something else.
|
|
264
|
+
*
|
|
265
|
+
* @param {mat4} out mat4 frustum matrix will be written into
|
|
266
|
+
* @param {vec3} eye Position of the viewer
|
|
267
|
+
* @param {vec3} target Point the viewer is looking at
|
|
268
|
+
* @param {vec3} up vec3 pointing up
|
|
269
|
+
* @returns {mat4} out
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Generates a orthogonal projection matrix with the given bounds
|
|
274
|
+
*
|
|
275
|
+
* @param {mat4} out mat4 frustum matrix will be written into
|
|
276
|
+
* @param {number} left Left bound of the frustum
|
|
277
|
+
* @param {number} right Right bound of the frustum
|
|
278
|
+
* @param {number} bottom Bottom bound of the frustum
|
|
279
|
+
* @param {number} top Top bound of the frustum
|
|
280
|
+
* @param {number} near Near bound of the frustum
|
|
281
|
+
* @param {number} far Far bound of the frustum
|
|
282
|
+
* @returns {mat4} out
|
|
283
|
+
*/
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Generates a perspective projection matrix with the given bounds
|
|
287
|
+
*
|
|
288
|
+
* @param {mat4} out mat4 frustum matrix will be written into
|
|
289
|
+
* @param {number} fovy Vertical field of view in radians
|
|
290
|
+
* @param {number} aspect Aspect ratio. typically viewport width/height
|
|
291
|
+
* @param {number} near Near bound of the frustum
|
|
292
|
+
* @param {number} far Far bound of the frustum
|
|
293
|
+
* @returns {mat4} out
|
|
294
|
+
*/
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Get the angle between two 3D vectors
|
|
298
|
+
* @param {vec3} a The first operand
|
|
299
|
+
* @param {vec3} b The second operand
|
|
300
|
+
* @returns {Number} The angle in radians
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Inverts a mat3
|
|
305
|
+
*
|
|
306
|
+
* @param {mat3} out the receiving matrix
|
|
307
|
+
* @param {mat3} a the source matrix
|
|
308
|
+
* @returns {mat3} out
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Inverts a mat4
|
|
313
|
+
*
|
|
314
|
+
* @param {mat4} out the receiving matrix
|
|
315
|
+
* @param {mat4} a the source matrix
|
|
316
|
+
* @returns {mat4} out
|
|
317
|
+
*/
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Multiplies two mat3's
|
|
321
|
+
*
|
|
322
|
+
* @param {mat3} out the receiving matrix
|
|
323
|
+
* @param {mat3} a the first operand
|
|
324
|
+
* @param {mat3} b the second operand
|
|
325
|
+
* @returns {mat3} out
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Multiplies two mat4s
|
|
330
|
+
*
|
|
331
|
+
* @param {mat4} out the receiving matrix
|
|
332
|
+
* @param {mat4} a the first operand
|
|
333
|
+
* @param {mat4} b the second operand
|
|
334
|
+
* @returns {mat4} out
|
|
335
|
+
*/
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Multiplies two quats
|
|
339
|
+
*
|
|
340
|
+
* @param {quat} out the receiving quaternion
|
|
341
|
+
* @param {quat} a the first operand
|
|
342
|
+
* @param {quat} b the second operand
|
|
343
|
+
* @returns {quat} out
|
|
344
|
+
*/
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Multiplies two vec3's
|
|
348
|
+
*
|
|
349
|
+
* @param {vec3} out the receiving vector
|
|
350
|
+
* @param {vec3} a the first operand
|
|
351
|
+
* @param {vec3} b the second operand
|
|
352
|
+
* @returns {vec3} out
|
|
353
|
+
*/
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Negates the components of a vec3
|
|
357
|
+
*
|
|
358
|
+
* @param {vec3} out the receiving vector
|
|
359
|
+
* @param {vec3} a vector to negate
|
|
360
|
+
* @returns {vec3} out
|
|
361
|
+
*/
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Normalize a vec3
|
|
365
|
+
*
|
|
366
|
+
* @param {vec3} out the receiving vector
|
|
367
|
+
* @param {vec3} a vector to normalize
|
|
368
|
+
* @returns {vec3} out
|
|
369
|
+
*/
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Normalize a vec4
|
|
373
|
+
*
|
|
374
|
+
* @param {vec4} out the receiving vector
|
|
375
|
+
* @param {vec4} a vector to normalize
|
|
376
|
+
* @returns {vec4} out
|
|
377
|
+
*/
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Performs a linear interpolation between two vec3's
|
|
381
|
+
*
|
|
382
|
+
* @param {vec3} out the receiving vector
|
|
383
|
+
* @param {vec3} a the first operand
|
|
384
|
+
* @param {vec3} b the second operand
|
|
385
|
+
* @param {Number} t interpolation amount between the two inputs
|
|
386
|
+
* @returns {vec3} out
|
|
387
|
+
*/
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Performs a spherical linear interpolation between two quat
|
|
391
|
+
*
|
|
392
|
+
* @param {quat} out the receiving quaternion
|
|
393
|
+
* @param {quat} a the first operand
|
|
394
|
+
* @param {quat} b the second operand
|
|
395
|
+
* @param {Number} t interpolation amount between the two inputs
|
|
396
|
+
* @returns {quat} out
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Returns a quaternion representing the rotational component
|
|
401
|
+
* of a transformation matrix. If a matrix is built with
|
|
402
|
+
* fromRotationTranslation, the returned quaternion will be the
|
|
403
|
+
* same as the quaternion originally supplied.
|
|
404
|
+
* @param {quat} out Quaternion to receive the rotation component
|
|
405
|
+
* @param {mat4} mat Matrix to be decomposed (input)
|
|
406
|
+
* @return {quat} out
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Returns the inverse of the components of a vec3
|
|
411
|
+
*
|
|
412
|
+
* @param {vec3} out the receiving vector
|
|
413
|
+
* @param {vec3} a vector to invert
|
|
414
|
+
* @returns {vec3} out
|
|
415
|
+
*/
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Returns the scaling factor component of a transformation
|
|
419
|
+
* matrix. If a matrix is built with fromRotationTranslationScale
|
|
420
|
+
* with a normalized Quaternion paramter, the returned vector will be
|
|
421
|
+
* the same as the scaling vector
|
|
422
|
+
* originally supplied.
|
|
423
|
+
* @param {vec3} out Vector to receive scaling factor component
|
|
424
|
+
* @param {mat4} mat Matrix to be decomposed (input)
|
|
425
|
+
* @return {vec3} out
|
|
426
|
+
*/
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Returns the translation vector component of a transformation
|
|
430
|
+
* matrix. If a matrix is built with fromRotationTranslation,
|
|
431
|
+
* the returned vector will be the same as the translation vector
|
|
432
|
+
* originally supplied.
|
|
433
|
+
* @param {vec3} out Vector to receive translation component
|
|
434
|
+
* @param {mat4} mat Matrix to be decomposed (input)
|
|
435
|
+
* @return {vec3} out
|
|
436
|
+
*/
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
|
|
440
|
+
*
|
|
441
|
+
* @param {vec3} a The first vector.
|
|
442
|
+
* @param {vec3} b The second vector.
|
|
443
|
+
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
444
|
+
*/
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Rotates a mat3 by the given angle
|
|
448
|
+
*
|
|
449
|
+
* @param {mat3} out the receiving matrix
|
|
450
|
+
* @param {mat3} a the matrix to rotate
|
|
451
|
+
* @param {Number} rad the angle to rotate the matrix by
|
|
452
|
+
* @returns {mat3} out
|
|
453
|
+
*/
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Rotates a mat4 by the given angle around the given axis
|
|
457
|
+
*
|
|
458
|
+
* @param {mat4} out the receiving matrix
|
|
459
|
+
* @param {mat4} a the matrix to rotate
|
|
460
|
+
* @param {Number} rad the angle to rotate the matrix by
|
|
461
|
+
* @param {vec3} axis the axis to rotate around
|
|
462
|
+
* @returns {mat4} out
|
|
463
|
+
*/
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Rotates a quaternion by the given angle about the X axis
|
|
467
|
+
*
|
|
468
|
+
* @param {quat} out quat receiving operation result
|
|
469
|
+
* @param {quat} a quat to rotate
|
|
470
|
+
* @param {number} rad angle (in radians) to rotate
|
|
471
|
+
* @returns {quat} out
|
|
472
|
+
*/
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Rotates a quaternion by the given angle about the Y axis
|
|
476
|
+
*
|
|
477
|
+
* @param {quat} out quat receiving operation result
|
|
478
|
+
* @param {quat} a quat to rotate
|
|
479
|
+
* @param {number} rad angle (in radians) to rotate
|
|
480
|
+
* @returns {quat} out
|
|
481
|
+
*/
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Rotates a quaternion by the given angle about the Z axis
|
|
485
|
+
*
|
|
486
|
+
* @param {quat} out quat receiving operation result
|
|
487
|
+
* @param {quat} a quat to rotate
|
|
488
|
+
* @param {number} rad angle (in radians) to rotate
|
|
489
|
+
* @returns {quat} out
|
|
490
|
+
*/
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Same as above but doesn't apply translation.
|
|
494
|
+
* Useful for rays.
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Scales a vec3 by a scalar number
|
|
499
|
+
*
|
|
500
|
+
* @param {vec3} out the receiving vector
|
|
501
|
+
* @param {vec3} a the vector to scale
|
|
502
|
+
* @param {Number} b amount to scale the vector by
|
|
503
|
+
* @returns {vec3} out
|
|
504
|
+
*/
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Scales a vec4 by a scalar number
|
|
508
|
+
*
|
|
509
|
+
* @param {vec4} out the receiving vector
|
|
510
|
+
* @param {vec4} a the vector to scale
|
|
511
|
+
* @param {Number} b amount to scale the vector by
|
|
512
|
+
* @returns {vec4} out
|
|
513
|
+
*/
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Scales the mat3 by the dimensions in the given vec2
|
|
517
|
+
*
|
|
518
|
+
* @param {mat3} out the receiving matrix
|
|
519
|
+
* @param {mat3} a the matrix to rotate
|
|
520
|
+
* @param {vec2} v the vec2 to scale the matrix by
|
|
521
|
+
* @returns {mat3} out
|
|
522
|
+
**/
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Scales the mat4 by the dimensions in the given vec3 not using vectorization
|
|
526
|
+
*
|
|
527
|
+
* @param {mat4} out the receiving matrix
|
|
528
|
+
* @param {mat4} a the matrix to scale
|
|
529
|
+
* @param {vec3} v the vec3 to scale the matrix by
|
|
530
|
+
* @returns {mat4} out
|
|
531
|
+
**/
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Set a mat3 to the identity matrix
|
|
535
|
+
*
|
|
536
|
+
* @param {mat3} out the receiving matrix
|
|
537
|
+
* @returns {mat3} out
|
|
538
|
+
*/
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Set a mat4 to the identity matrix
|
|
542
|
+
*
|
|
543
|
+
* @param {mat4} out the receiving matrix
|
|
544
|
+
* @returns {mat4} out
|
|
545
|
+
*/
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Set a quat to the identity quaternion
|
|
549
|
+
*
|
|
550
|
+
* @param {quat} out the receiving quaternion
|
|
551
|
+
* @returns {quat} out
|
|
552
|
+
*/
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Set the components of a mat3 to the given values
|
|
556
|
+
*
|
|
557
|
+
* @param {mat3} out the receiving matrix
|
|
558
|
+
* @returns {mat3} out
|
|
559
|
+
*/
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Set the components of a mat4 to the given values
|
|
563
|
+
*
|
|
564
|
+
* @param {mat4} out the receiving matrix
|
|
565
|
+
* @returns {mat4} out
|
|
566
|
+
*/
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Set the components of a quat to the given values
|
|
570
|
+
*
|
|
571
|
+
* @param {quat} out the receiving quaternion
|
|
572
|
+
* @param {Number} x X component
|
|
573
|
+
* @param {Number} y Y component
|
|
574
|
+
* @param {Number} z Z component
|
|
575
|
+
* @param {Number} w W component
|
|
576
|
+
* @returns {quat} out
|
|
577
|
+
* @function
|
|
578
|
+
*/
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Set the components of a vec3 to the given values
|
|
582
|
+
*
|
|
583
|
+
* @param {vec3} out the receiving vector
|
|
584
|
+
* @param {Number} x X component
|
|
585
|
+
* @param {Number} y Y component
|
|
586
|
+
* @param {Number} z Z component
|
|
587
|
+
* @returns {vec3} out
|
|
588
|
+
*/
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Set the components of a vec4 to the given values
|
|
592
|
+
*
|
|
593
|
+
* @param {vec4} out the receiving vector
|
|
594
|
+
* @param {Number} x X component
|
|
595
|
+
* @param {Number} y Y component
|
|
596
|
+
* @param {Number} z Z component
|
|
597
|
+
* @param {Number} w W component
|
|
598
|
+
* @returns {vec4} out
|
|
599
|
+
*/
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Sets a quat from the given angle and rotation axis,
|
|
603
|
+
* then returns it.
|
|
604
|
+
*
|
|
605
|
+
* @param {quat} out the receiving quaternion
|
|
606
|
+
* @param {vec3} axis the axis around which to rotate
|
|
607
|
+
* @param {Number} rad the angle in radians
|
|
608
|
+
* @returns {quat} out
|
|
609
|
+
**/
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Subtracts vector b from vector a
|
|
613
|
+
*
|
|
614
|
+
* @param {vec3} out the receiving vector
|
|
615
|
+
* @param {vec3} a the first operand
|
|
616
|
+
* @param {vec3} b the second operand
|
|
617
|
+
* @returns {vec3} out
|
|
618
|
+
*/
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Transforms the vec3 with a mat3.
|
|
622
|
+
*
|
|
623
|
+
* @param {vec3} out the receiving vector
|
|
624
|
+
* @param {vec3} a the vector to transform
|
|
625
|
+
* @param {mat3} m the 3x3 matrix to transform with
|
|
626
|
+
* @returns {vec3} out
|
|
627
|
+
*/
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Transforms the vec3 with a mat4.
|
|
631
|
+
* 4th vector component is implicitly '1'
|
|
632
|
+
*
|
|
633
|
+
* @param {vec3} out the receiving vector
|
|
634
|
+
* @param {vec3} a the vector to transform
|
|
635
|
+
* @param {mat4} m matrix to transform with
|
|
636
|
+
* @returns {vec3} out
|
|
637
|
+
*/
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Transforms the vec3 with a quat
|
|
641
|
+
*
|
|
642
|
+
* @param {vec3} out the receiving vector
|
|
643
|
+
* @param {vec3} a the vector to transform
|
|
644
|
+
* @param {quat} q quaternion to transform with
|
|
645
|
+
* @returns {vec3} out
|
|
646
|
+
*/
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Translate a mat3 by the given vector
|
|
650
|
+
*
|
|
651
|
+
* @param {mat3} out the receiving matrix
|
|
652
|
+
* @param {mat3} a the matrix to translate
|
|
653
|
+
* @param {vec2} v vector to translate by
|
|
654
|
+
* @returns {mat3} out
|
|
655
|
+
*/
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Translate a mat4 by the given vector
|
|
659
|
+
*
|
|
660
|
+
* @param {mat4} out the receiving matrix
|
|
661
|
+
* @param {mat4} a the matrix to translate
|
|
662
|
+
* @param {vec3} v vector to translate by
|
|
663
|
+
* @returns {mat4} out
|
|
664
|
+
*/
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* UI Initiative Carousel Slider
|
|
668
|
+
*
|
|
669
|
+
* Infinite 3D carousel slider
|
|
670
|
+
*
|
|
671
|
+
* https://uiinitiative.com
|
|
672
|
+
*
|
|
673
|
+
* Copyright 2023 UI Initiative
|
|
674
|
+
*
|
|
675
|
+
* Released under the UI Initiative Regular License
|
|
676
|
+
*
|
|
677
|
+
* December 27, 2023
|
|
678
|
+
*/
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* UI Initiative Shutters Slider
|
|
682
|
+
*
|
|
683
|
+
* Infinite 3D carousel slider
|
|
684
|
+
*
|
|
685
|
+
* https://uiinitiative.com
|
|
686
|
+
*
|
|
687
|
+
* Copyright 2023 UI Initiative
|
|
688
|
+
*
|
|
689
|
+
* Released under the UI Initiative Regular License
|
|
690
|
+
*
|
|
691
|
+
* October 25, 2023
|
|
692
|
+
*/
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* UI Initiative Slicer Slider
|
|
696
|
+
*
|
|
697
|
+
* Images slicer slider
|
|
698
|
+
*
|
|
699
|
+
* https://uiinitiative.com
|
|
700
|
+
*
|
|
701
|
+
* Copyright 2023 UI Initiative
|
|
702
|
+
*
|
|
703
|
+
* Released under the UI Initiative Regular License
|
|
704
|
+
*
|
|
705
|
+
* October 25, 2023
|
|
706
|
+
*
|
|
707
|
+
*/
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* UI Initiative Swiper GL
|
|
711
|
+
*
|
|
712
|
+
* Stunning WebGL image transitions
|
|
713
|
+
*
|
|
714
|
+
* https://uiinitiative.com
|
|
715
|
+
*
|
|
716
|
+
* Copyright 2024 UI Initiative
|
|
717
|
+
*
|
|
718
|
+
* Released under the UI Initiative Regular License
|
|
719
|
+
*
|
|
720
|
+
* April 25, 2024
|
|
721
|
+
*/
|
|
722
|
+
|
|
723
|
+
/************************************************************************/
|
|
724
|
+
|
|
725
|
+
/******/
|
|
726
|
+
|
|
727
|
+
//
|
|
728
|
+
|
|
729
|
+
// http://jsperf.com/quaternion-slerp-implementations
|
|
730
|
+
|
|
731
|
+
// ... so we can do a linear interpolation
|
|
732
|
+
|
|
733
|
+
// "from" and "to" quaternions are very close
|
|
734
|
+
|
|
735
|
+
// +x
|
|
736
|
+
|
|
737
|
+
// +y
|
|
738
|
+
|
|
739
|
+
// +z (far)
|
|
740
|
+
|
|
741
|
+
// -x
|
|
742
|
+
|
|
743
|
+
// -y
|
|
744
|
+
|
|
745
|
+
// -z (near)
|
|
746
|
+
|
|
747
|
+
// 1/(4w)
|
|
748
|
+
|
|
749
|
+
// 2w
|
|
750
|
+
|
|
751
|
+
// A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and
|
|
752
|
+
|
|
753
|
+
// Add contributions from each corner to get the final noise value.
|
|
754
|
+
|
|
755
|
+
// Add empty matrix uniforms to program if unset
|
|
756
|
+
|
|
757
|
+
// Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
|
|
758
|
+
|
|
759
|
+
// Alias for state store to avoid redundant calls for global state
|
|
760
|
+
|
|
761
|
+
// Already bound to active texture unit
|
|
762
|
+
|
|
763
|
+
// Attach renderer to gl so that all classes have access to internal state functions
|
|
764
|
+
|
|
765
|
+
// Attempt WebGL2 unless forced to 1, if not supported fallback to WebGL1
|
|
766
|
+
|
|
767
|
+
// Avoid gl call if program already in use
|
|
768
|
+
|
|
769
|
+
// Avoid redundant uniform commands
|
|
770
|
+
|
|
771
|
+
// BOOL
|
|
772
|
+
|
|
773
|
+
// BOOL_VEC2
|
|
774
|
+
|
|
775
|
+
// BOOL_VEC3
|
|
776
|
+
|
|
777
|
+
// BOOL_VEC4
|
|
778
|
+
|
|
779
|
+
// Bind indices if geometry indexed
|
|
780
|
+
|
|
781
|
+
// CONCATENATED MODULE: ./src/build/lib/swiperjs/effect-carousel.esm.js
|
|
782
|
+
|
|
783
|
+
// CONCATENATED MODULE: ./src/build/lib/swiperjs/effect-shutters.esm.js
|
|
784
|
+
|
|
785
|
+
// CONCATENATED MODULE: ./src/build/lib/swiperjs/effect-slicer.esm.js
|
|
786
|
+
|
|
787
|
+
// CONCATENATED MODULE: ./src/build/lib/swiperjs/swiper-gl.esm.js
|
|
788
|
+
|
|
789
|
+
// CONCATENATED MODULE: ./src/export/lib/swiperjs/swiper-plugin.js
|
|
790
|
+
|
|
791
|
+
// Calculate the contribution from the three corners
|
|
792
|
+
|
|
793
|
+
// Calculate the determinant
|
|
794
|
+
|
|
795
|
+
// Callback for when data is pushed to GPU
|
|
796
|
+
|
|
797
|
+
// Can't use 'length' as Array.prototype uses it
|
|
798
|
+
|
|
799
|
+
// Check if any attributes need updating
|
|
800
|
+
|
|
801
|
+
// Check if texture needs to be updated
|
|
802
|
+
|
|
803
|
+
// Compressed texture
|
|
804
|
+
|
|
805
|
+
// Construct the elements of the rotation matrix
|
|
806
|
+
|
|
807
|
+
// Create method aliases using extension (WebGL1) or native if available (WebGL2)
|
|
808
|
+
|
|
809
|
+
// Data texture
|
|
810
|
+
|
|
811
|
+
// Determine which simplex we are in.
|
|
812
|
+
|
|
813
|
+
// ESM COMPAT FLAG
|
|
814
|
+
|
|
815
|
+
// Ensure depth buffer writing is enabled so it can be cleared
|
|
816
|
+
|
|
817
|
+
// FLOAT
|
|
818
|
+
|
|
819
|
+
// FLOAT_MAT2
|
|
820
|
+
|
|
821
|
+
// FLOAT_MAT3
|
|
822
|
+
|
|
823
|
+
// FLOAT_MAT4
|
|
824
|
+
|
|
825
|
+
// FLOAT_VEC2
|
|
826
|
+
|
|
827
|
+
// FLOAT_VEC3
|
|
828
|
+
|
|
829
|
+
// FLOAT_VEC4
|
|
830
|
+
|
|
831
|
+
// For WebGL1, if not a power of 2, turn off mips, set wrapping to clamp to edge and minFilter to linear
|
|
832
|
+
|
|
833
|
+
// For cube maps
|
|
834
|
+
|
|
835
|
+
// For firefox, need to set back to 0 if non-instanced drawn after instanced. Else won't render
|
|
836
|
+
|
|
837
|
+
// For instanced attributes, divisor needs to be set.
|
|
838
|
+
|
|
839
|
+
// For matrix attributes, buffer needs to be defined per column
|
|
840
|
+
|
|
841
|
+
// For structs, get the specific property instead of the entire object
|
|
842
|
+
|
|
843
|
+
// For texture arrays, set uniform as an array of texture units instead of just one
|
|
844
|
+
|
|
845
|
+
// For the 2D case, the simplex shape is an equilateral triangle.
|
|
846
|
+
|
|
847
|
+
// Get active attribute locations
|
|
848
|
+
|
|
849
|
+
// Get active uniform locations
|
|
850
|
+
|
|
851
|
+
// Get visible
|
|
852
|
+
|
|
853
|
+
// Hairy factor for 2D
|
|
854
|
+
|
|
855
|
+
// INT
|
|
856
|
+
|
|
857
|
+
// INT_VEC2
|
|
858
|
+
|
|
859
|
+
// INT_VEC3
|
|
860
|
+
|
|
861
|
+
// INT_VEC4
|
|
862
|
+
|
|
863
|
+
// If geometry missing a required shader attribute
|
|
864
|
+
|
|
865
|
+
// If no position attribute, treat as frustumCulled false
|
|
866
|
+
|
|
867
|
+
// If the source and destination differ, copy the unchanged last row
|
|
868
|
+
|
|
869
|
+
// Ignore special built-in inputs. eg gl_VertexID, gl_InstanceID
|
|
870
|
+
|
|
871
|
+
// Initialise extra format types
|
|
872
|
+
|
|
873
|
+
// Link all attributes to program using gl.vertexAttribPointer
|
|
874
|
+
|
|
875
|
+
// Make sure that texture is bound to its texture unit
|
|
876
|
+
|
|
877
|
+
// Noise contributions from the three corners
|
|
878
|
+
|
|
879
|
+
// Not automatic - devs to use these methods manually
|
|
880
|
+
|
|
881
|
+
// Offsets for middle corner in (x,y) unskewed coords
|
|
882
|
+
|
|
883
|
+
// Offsets for second (middle) corner of simplex in (i,j) coords
|
|
884
|
+
|
|
885
|
+
// Only calculate z-depth if renderOrder unset and depthTest is true
|
|
886
|
+
|
|
887
|
+
// Override sorting to force an order
|
|
888
|
+
|
|
889
|
+
// Perform rotation-specific matrix multiplication
|
|
890
|
+
|
|
891
|
+
// Project 3D coordinate to 2D point
|
|
892
|
+
|
|
893
|
+
// Push data to buffer
|
|
894
|
+
|
|
895
|
+
// Quaternion math
|
|
896
|
+
|
|
897
|
+
// Regular texture
|
|
898
|
+
|
|
899
|
+
// Remove shader once linked
|
|
900
|
+
|
|
901
|
+
// Return null if extension not supported
|
|
902
|
+
|
|
903
|
+
// Return true in callback to stop traversing children
|
|
904
|
+
|
|
905
|
+
// SAMPLER_2D
|
|
906
|
+
|
|
907
|
+
// SAMPLER_CUBE
|
|
908
|
+
|
|
909
|
+
// Set only the active uniforms found in the shader
|
|
910
|
+
|
|
911
|
+
// Set options
|
|
912
|
+
|
|
913
|
+
// Set the matrix uniforms
|
|
914
|
+
|
|
915
|
+
// Skew the input space to determine which simplex cell we're in
|
|
916
|
+
|
|
917
|
+
// Split into the 3 render groups
|
|
918
|
+
|
|
919
|
+
// State store to avoid redundant calls for per-texture state
|
|
920
|
+
|
|
921
|
+
// Store device parameters
|
|
922
|
+
|
|
923
|
+
// Store one VAO per program attribute locations order
|
|
924
|
+
|
|
925
|
+
// Store program state
|
|
926
|
+
|
|
927
|
+
// Swiper JS Plugin
|
|
928
|
+
|
|
929
|
+
// TODO: Handle context loss https://www.khronos.org/webgl/wiki/HandlingContextLost
|
|
930
|
+
|
|
931
|
+
// TODO: Would be faster to return [0,0,0,0] immediately if dot == 0
|
|
932
|
+
|
|
933
|
+
// TODO: check size of position (eg triangle with Vec2)
|
|
934
|
+
|
|
935
|
+
// TODO: currently unused, remove?
|
|
936
|
+
|
|
937
|
+
// TODO: delete texture
|
|
938
|
+
|
|
939
|
+
// TODO: need? encoding = linearEncoding
|
|
940
|
+
|
|
941
|
+
// TODO: sampler Cube
|
|
942
|
+
|
|
943
|
+
// TODO: support non-compressed mipmaps uploads
|
|
944
|
+
|
|
945
|
+
// TODO: upload empty texture if null ? maybe not
|
|
946
|
+
|
|
947
|
+
// TODO: upload identity matrix if null ?
|
|
948
|
+
|
|
949
|
+
// TODO: use texSubImage2D for updates (video or when loaded)
|
|
950
|
+
|
|
951
|
+
// The require scope
|
|
952
|
+
|
|
953
|
+
// The result is scaled to return values in the interval [-1,1].
|
|
954
|
+
|
|
955
|
+
// Uint32Array
|
|
956
|
+
|
|
957
|
+
// Unbind current VAO so that new buffers don't get added to active mesh
|
|
958
|
+
|
|
959
|
+
// Unproject 2D point to 3D coordinate
|
|
960
|
+
|
|
961
|
+
// Update cached array values
|
|
962
|
+
|
|
963
|
+
// Update camera separately, in case not in scene graph
|
|
964
|
+
|
|
965
|
+
// Update geometry counts. If indexed, ignore regular attributes
|
|
966
|
+
|
|
967
|
+
// Upload empty pixel for each side while no image to avoid errors while image or video loading
|
|
968
|
+
|
|
969
|
+
// Upload empty pixel if no image to avoid errors while image or video loading
|
|
970
|
+
|
|
971
|
+
// Use orthographic if left/right set, else default to perspective camera
|
|
972
|
+
|
|
973
|
+
// Use position buffer, or min/max if available
|
|
974
|
+
|
|
975
|
+
// Used to skip frustum culling
|
|
976
|
+
|
|
977
|
+
// [ https://uiinitiative.com/catalog/carousel-slider ]
|
|
978
|
+
|
|
979
|
+
// [ https://uiinitiative.com/catalog/shaders-slider ]
|
|
980
|
+
|
|
981
|
+
// [ https://uiinitiative.com/catalog/shutters-slider ]
|
|
982
|
+
|
|
983
|
+
// [ https://uiinitiative.com/catalog/slicer-slider ]
|
|
984
|
+
|
|
985
|
+
// a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where
|
|
986
|
+
|
|
987
|
+
// adjust signs (if necessary)
|
|
988
|
+
|
|
989
|
+
// article "Quaternion Calculus and Fast Animation".
|
|
990
|
+
|
|
991
|
+
// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
|
|
992
|
+
|
|
993
|
+
// attribute params
|
|
994
|
+
|
|
995
|
+
// benchmarks:
|
|
996
|
+
|
|
997
|
+
// benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed
|
|
998
|
+
|
|
999
|
+
// bind supplied render target and update viewport
|
|
1000
|
+
|
|
1001
|
+
// c = (3-sqrt(3))/6
|
|
1002
|
+
|
|
1003
|
+
// cache of typed arrays used to flatten uniform arrays
|
|
1004
|
+
|
|
1005
|
+
// calc cosine
|
|
1006
|
+
|
|
1007
|
+
// calculate coefficients
|
|
1008
|
+
|
|
1009
|
+
// calculate final values
|
|
1010
|
+
|
|
1011
|
+
// clone array to store as cache
|
|
1012
|
+
|
|
1013
|
+
// compile fragment shader and log errors
|
|
1014
|
+
|
|
1015
|
+
// compile program and log errors
|
|
1016
|
+
|
|
1017
|
+
// compile vertex shader and log errors
|
|
1018
|
+
|
|
1019
|
+
// create the buffers
|
|
1020
|
+
|
|
1021
|
+
// define __esModule on exports
|
|
1022
|
+
|
|
1023
|
+
// depthTest false
|
|
1024
|
+
|
|
1025
|
+
// determine if faces need to be flipped - when mesh scaled negatively
|
|
1026
|
+
|
|
1027
|
+
// eslint-disable-next-line
|
|
1028
|
+
|
|
1029
|
+
// eye and target are in the same position
|
|
1030
|
+
|
|
1031
|
+
// fetch extension once only
|
|
1032
|
+
|
|
1033
|
+
// first triangle
|
|
1034
|
+
|
|
1035
|
+
// get supplied uniform
|
|
1036
|
+
|
|
1037
|
+
// gl state stores to avoid redundant calls on methods used internally
|
|
1038
|
+
|
|
1039
|
+
// gl.clearColor( r, g, b, a );
|
|
1040
|
+
|
|
1041
|
+
// gl.clearStencil( stencil );
|
|
1042
|
+
|
|
1043
|
+
// gl.colorMask( colorMask, colorMask, colorMask, colorMask );
|
|
1044
|
+
|
|
1045
|
+
// gl.stencilFunc( stencilFunc, stencilRef, stencilMask );
|
|
1046
|
+
|
|
1047
|
+
// gl.stencilMask( stencilMask );
|
|
1048
|
+
|
|
1049
|
+
// gl.stencilOp( stencilFail, stencilZFail, stencilZPass );
|
|
1050
|
+
|
|
1051
|
+
// if (attr.min) return [...attr.min, ...attr.max];
|
|
1052
|
+
|
|
1053
|
+
// if webgl2 function supported, return func bound to gl context
|
|
1054
|
+
|
|
1055
|
+
// if(!isFinite(x) || !isFinite(y)) return 0;
|
|
1056
|
+
|
|
1057
|
+
// image intentionally left null for RenderTarget
|
|
1058
|
+
|
|
1059
|
+
// initialise size values
|
|
1060
|
+
|
|
1061
|
+
// make sure no render target bound so draws to canvas
|
|
1062
|
+
|
|
1063
|
+
// mat2
|
|
1064
|
+
|
|
1065
|
+
// mat3
|
|
1066
|
+
|
|
1067
|
+
// mat4
|
|
1068
|
+
|
|
1069
|
+
// n0 = t0 * t0 * (grad2[gi0] * x0 + grad2[gi0 + 1] * y0); // (x,y) of grad3 used for 2D gradient
|
|
1070
|
+
|
|
1071
|
+
// n1 = t1 * t1 * (grad2[gi1] * x1 + grad2[gi1 + 1] * y1);
|
|
1072
|
+
|
|
1073
|
+
// n2 = t2 * t2 * (grad2[gi2] * x2 + grad2[gi2 + 1] * y2);
|
|
1074
|
+
|
|
1075
|
+
// precalculating this yields a little ~3% performance improvement.
|
|
1076
|
+
|
|
1077
|
+
// return extension if no function requested
|
|
1078
|
+
|
|
1079
|
+
// second triangle
|
|
1080
|
+
|
|
1081
|
+
// set active texture unit to perform texture functions
|
|
1082
|
+
|
|
1083
|
+
// set default blendFunc if transparent flagged
|
|
1084
|
+
|
|
1085
|
+
// side: DoubleSide,
|
|
1086
|
+
|
|
1087
|
+
// sign =1
|
|
1088
|
+
|
|
1089
|
+
// split uniforms' names to separate array and struct declarations
|
|
1090
|
+
|
|
1091
|
+
// standard case (slerp)
|
|
1092
|
+
|
|
1093
|
+
// store requested extensions
|
|
1094
|
+
|
|
1095
|
+
// up and z are parallel
|
|
1096
|
+
|
|
1097
|
+
// update z-depth
|
|
1098
|
+
|
|
1099
|
+
// updates all scene graph matrices
|
|
1100
|
+
|
|
1101
|
+
// upper triangle, YX order: (0,0)->(0,1)->(1,1)
|
|
1102
|
+
|
|
1103
|
+
// used for RenderTargets or Data Textures
|
|
1104
|
+
|
|
1105
|
+
// used for sorting
|
|
1106
|
+
|
|
1107
|
+
// webpackBootstrap
|
|
1108
|
+
|
|
1109
|
+
// |w| <= 1/2
|
|
1110
|
+
|
|
1111
|
+
// |w| > 1/2, may as well choose w > 1/2
|
|
1112
|
+
|
|
1113
|
+
//TODO: evaluate use of glm_invsqrt here?
|