@vunk/plus 1.11.0 → 1.11.2

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.
@@ -1,268 +0,0 @@
1
- const blendModeIds = {
2
- normal: 0,
3
- add: 1,
4
- multiply: 2,
5
- screen: 3,
6
- overlay: 4,
7
- erase: 5,
8
- "normal-npm": 6,
9
- "add-npm": 7,
10
- "screen-npm": 8,
11
- min: 9,
12
- max: 10
13
- };
14
- const BLEND = 0;
15
- const OFFSET = 1;
16
- const CULLING = 2;
17
- const DEPTH_TEST = 3;
18
- const WINDING = 4;
19
- const DEPTH_MASK = 5;
20
- const _State = class _State {
21
- constructor() {
22
- this.data = 0;
23
- this.blendMode = "normal";
24
- this.polygonOffset = 0;
25
- this.blend = true;
26
- this.depthMask = true;
27
- }
28
- /**
29
- * Activates blending of the computed fragment color values.
30
- * @default true
31
- */
32
- get blend() {
33
- return !!(this.data & 1 << BLEND);
34
- }
35
- set blend(value) {
36
- if (!!(this.data & 1 << BLEND) !== value) {
37
- this.data ^= 1 << BLEND;
38
- }
39
- }
40
- /**
41
- * Activates adding an offset to depth values of polygon's fragments
42
- * @default false
43
- */
44
- get offsets() {
45
- return !!(this.data & 1 << OFFSET);
46
- }
47
- set offsets(value) {
48
- if (!!(this.data & 1 << OFFSET) !== value) {
49
- this.data ^= 1 << OFFSET;
50
- }
51
- }
52
- /** The culling settings for this state none - No culling back - Back face culling front - Front face culling */
53
- set cullMode(value) {
54
- if (value === "none") {
55
- this.culling = false;
56
- return;
57
- }
58
- this.culling = true;
59
- this.clockwiseFrontFace = value === "front";
60
- }
61
- get cullMode() {
62
- if (!this.culling) {
63
- return "none";
64
- }
65
- return this.clockwiseFrontFace ? "front" : "back";
66
- }
67
- /**
68
- * Activates culling of polygons.
69
- * @default false
70
- */
71
- get culling() {
72
- return !!(this.data & 1 << CULLING);
73
- }
74
- set culling(value) {
75
- if (!!(this.data & 1 << CULLING) !== value) {
76
- this.data ^= 1 << CULLING;
77
- }
78
- }
79
- /**
80
- * Activates depth comparisons and updates to the depth buffer.
81
- * @default false
82
- */
83
- get depthTest() {
84
- return !!(this.data & 1 << DEPTH_TEST);
85
- }
86
- set depthTest(value) {
87
- if (!!(this.data & 1 << DEPTH_TEST) !== value) {
88
- this.data ^= 1 << DEPTH_TEST;
89
- }
90
- }
91
- /**
92
- * Enables or disables writing to the depth buffer.
93
- * @default true
94
- */
95
- get depthMask() {
96
- return !!(this.data & 1 << DEPTH_MASK);
97
- }
98
- set depthMask(value) {
99
- if (!!(this.data & 1 << DEPTH_MASK) !== value) {
100
- this.data ^= 1 << DEPTH_MASK;
101
- }
102
- }
103
- /**
104
- * Specifies whether or not front or back-facing polygons can be culled.
105
- * @default false
106
- */
107
- get clockwiseFrontFace() {
108
- return !!(this.data & 1 << WINDING);
109
- }
110
- set clockwiseFrontFace(value) {
111
- if (!!(this.data & 1 << WINDING) !== value) {
112
- this.data ^= 1 << WINDING;
113
- }
114
- }
115
- /**
116
- * The blend mode to be applied when this state is set. Apply a value of `normal` to reset the blend mode.
117
- * Setting this mode to anything other than NO_BLEND will automatically switch blending on.
118
- * @default 'normal'
119
- */
120
- get blendMode() {
121
- return this._blendMode;
122
- }
123
- set blendMode(value) {
124
- this.blend = value !== "none";
125
- this._blendMode = value;
126
- this._blendModeId = blendModeIds[value] || 0;
127
- }
128
- /**
129
- * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill.
130
- * @default 0
131
- */
132
- get polygonOffset() {
133
- return this._polygonOffset;
134
- }
135
- set polygonOffset(value) {
136
- this.offsets = !!value;
137
- this._polygonOffset = value;
138
- }
139
- toString() {
140
- return `[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`;
141
- }
142
- /**
143
- * A quickly getting an instance of a State that is configured for 2d rendering.
144
- * @returns a new State with values set for 2d rendering
145
- */
146
- static for2d() {
147
- const state = new _State();
148
- state.depthTest = false;
149
- state.blend = true;
150
- return state;
151
- }
152
- };
153
- _State.default2d = _State.for2d();
154
- let State = _State;
155
-
156
- const localUniformBit = {
157
- name: "local-uniform-bit",
158
- vertex: {
159
- header: (
160
- /* wgsl */
161
- `
162
-
163
- struct LocalUniforms {
164
- uTransformMatrix:mat3x3<f32>,
165
- uColor:vec4<f32>,
166
- uRound:f32,
167
- }
168
-
169
- @group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
170
- `
171
- ),
172
- main: (
173
- /* wgsl */
174
- `
175
- vColor *= localUniforms.uColor;
176
- modelMatrix *= localUniforms.uTransformMatrix;
177
- `
178
- ),
179
- end: (
180
- /* wgsl */
181
- `
182
- if(localUniforms.uRound == 1)
183
- {
184
- vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
185
- }
186
- `
187
- )
188
- }
189
- };
190
- const localUniformBitGroup2 = {
191
- ...localUniformBit,
192
- vertex: {
193
- ...localUniformBit.vertex,
194
- // replace the group!
195
- header: localUniformBit.vertex.header.replace("group(1)", "group(2)")
196
- }
197
- };
198
- const localUniformBitGl = {
199
- name: "local-uniform-bit",
200
- vertex: {
201
- header: (
202
- /* glsl */
203
- `
204
-
205
- uniform mat3 uTransformMatrix;
206
- uniform vec4 uColor;
207
- uniform float uRound;
208
- `
209
- ),
210
- main: (
211
- /* glsl */
212
- `
213
- vColor *= uColor;
214
- modelMatrix = uTransformMatrix;
215
- `
216
- ),
217
- end: (
218
- /* glsl */
219
- `
220
- if(uRound == 1.)
221
- {
222
- gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
223
- }
224
- `
225
- )
226
- }
227
- };
228
-
229
- class BatchableSprite {
230
- constructor() {
231
- this.batcherName = "default";
232
- this.topology = "triangle-list";
233
- // batch specific..
234
- this.attributeSize = 4;
235
- this.indexSize = 6;
236
- this.packAsQuad = true;
237
- this.roundPixels = 0;
238
- this._attributeStart = 0;
239
- // location in the buffer
240
- this._batcher = null;
241
- this._batch = null;
242
- }
243
- get blendMode() {
244
- return this.renderable.groupBlendMode;
245
- }
246
- get color() {
247
- return this.renderable.groupColorAlpha;
248
- }
249
- reset() {
250
- this.renderable = null;
251
- this.texture = null;
252
- this._batcher = null;
253
- this._batch = null;
254
- this.bounds = null;
255
- }
256
- destroy() {
257
- }
258
- }
259
-
260
- function color32BitToUniform(abgr, out, offset) {
261
- const alpha = (abgr >> 24 & 255) / 255;
262
- out[offset++] = (abgr & 255) / 255 * alpha;
263
- out[offset++] = (abgr >> 8 & 255) / 255 * alpha;
264
- out[offset++] = (abgr >> 16 & 255) / 255 * alpha;
265
- out[offset++] = alpha;
266
- }
267
-
268
- export { BatchableSprite as B, State as S, localUniformBit as a, localUniformBitGl as b, color32BitToUniform as c, localUniformBitGroup2 as l };
@@ -1,78 +0,0 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';
2
-
3
- /*! Element Plus Icons Vue v2.3.1 */
4
-
5
- var arrow_down_bold_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
6
- name: "ArrowDownBold",
7
- __name: "arrow-down-bold",
8
- setup(__props) {
9
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
10
- xmlns: "http://www.w3.org/2000/svg",
11
- viewBox: "0 0 1024 1024"
12
- }, [
13
- createElementVNode("path", {
14
- fill: "currentColor",
15
- d: "M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496z"
16
- })
17
- ]));
18
- }
19
- });
20
-
21
- // src/components/arrow-down-bold.vue
22
- var arrow_down_bold_default = arrow_down_bold_vue_vue_type_script_setup_true_lang_default;
23
- var arrow_left_bold_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
24
- name: "ArrowLeftBold",
25
- __name: "arrow-left-bold",
26
- setup(__props) {
27
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
28
- xmlns: "http://www.w3.org/2000/svg",
29
- viewBox: "0 0 1024 1024"
30
- }, [
31
- createElementVNode("path", {
32
- fill: "currentColor",
33
- d: "M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"
34
- })
35
- ]));
36
- }
37
- });
38
-
39
- // src/components/arrow-left-bold.vue
40
- var arrow_left_bold_default = arrow_left_bold_vue_vue_type_script_setup_true_lang_default;
41
- var arrow_right_bold_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
42
- name: "ArrowRightBold",
43
- __name: "arrow-right-bold",
44
- setup(__props) {
45
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
46
- xmlns: "http://www.w3.org/2000/svg",
47
- viewBox: "0 0 1024 1024"
48
- }, [
49
- createElementVNode("path", {
50
- fill: "currentColor",
51
- d: "M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"
52
- })
53
- ]));
54
- }
55
- });
56
-
57
- // src/components/arrow-right-bold.vue
58
- var arrow_right_bold_default = arrow_right_bold_vue_vue_type_script_setup_true_lang_default;
59
- var arrow_up_bold_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
60
- name: "ArrowUpBold",
61
- __name: "arrow-up-bold",
62
- setup(__props) {
63
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
64
- xmlns: "http://www.w3.org/2000/svg",
65
- viewBox: "0 0 1024 1024"
66
- }, [
67
- createElementVNode("path", {
68
- fill: "currentColor",
69
- d: "M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496z"
70
- })
71
- ]));
72
- }
73
- });
74
-
75
- // src/components/arrow-up-bold.vue
76
- var arrow_up_bold_default = arrow_up_bold_vue_vue_type_script_setup_true_lang_default;
77
-
78
- export { arrow_down_bold_default as a, arrow_left_bold_default as b, arrow_right_bold_default as c, arrow_up_bold_default as d };