@urso/core 0.7.1 → 0.7.3
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/build/js/index.js +1 -1
- package/build/js/index.js.LICENSE.txt +222 -38
- package/package.json +2 -2
- package/src/js/lib/objectPool.js +7 -3
- package/src/js/modules/objects/models/dragContainer.js +13 -34
- package/src/js/modules/objects/models/spine.js +25 -2
- package/src/js/modules/objects/propertyAdapter.js +3 -2
|
@@ -27,8 +27,8 @@ object-assign
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
/*!
|
|
30
|
-
* @pixi-spine/loader-base - v3.0
|
|
31
|
-
* Compiled
|
|
30
|
+
* @pixi-spine/loader-base - v3.1.0
|
|
31
|
+
* Compiled Wed, 03 Aug 2022 16:58:28 UTC
|
|
32
32
|
*
|
|
33
33
|
* @pixi-spine/loader-base is licensed under the MIT License.
|
|
34
34
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -37,8 +37,8 @@ object-assign
|
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
39
|
/*!
|
|
40
|
-
* @pixi-spine/runtime-3.8 - v3.0
|
|
41
|
-
* Compiled
|
|
40
|
+
* @pixi-spine/runtime-3.8 - v3.1.0
|
|
41
|
+
* Compiled Wed, 03 Aug 2022 16:58:28 UTC
|
|
42
42
|
*
|
|
43
43
|
* @pixi-spine/runtime-3.8 is licensed under the MIT License.
|
|
44
44
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -47,114 +47,298 @@ object-assign
|
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
/*!
|
|
50
|
-
* @pixi/
|
|
51
|
-
* Compiled
|
|
50
|
+
* @pixi/accessibility - v6.5.8
|
|
51
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
52
|
+
*
|
|
53
|
+
* @pixi/accessibility is licensed under the MIT License.
|
|
54
|
+
* http://www.opensource.org/licenses/mit-license
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/*!
|
|
58
|
+
* @pixi/app - v6.5.8
|
|
59
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
60
|
+
*
|
|
61
|
+
* @pixi/app is licensed under the MIT License.
|
|
62
|
+
* http://www.opensource.org/licenses/mit-license
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/*!
|
|
66
|
+
* @pixi/compressed-textures - v6.5.8
|
|
67
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
68
|
+
*
|
|
69
|
+
* @pixi/compressed-textures is licensed under the MIT License.
|
|
70
|
+
* http://www.opensource.org/licenses/mit-license
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/*!
|
|
74
|
+
* @pixi/constants - v6.5.8
|
|
75
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
52
76
|
*
|
|
53
77
|
* @pixi/constants is licensed under the MIT License.
|
|
54
78
|
* http://www.opensource.org/licenses/mit-license
|
|
55
79
|
*/
|
|
56
80
|
|
|
57
81
|
/*!
|
|
58
|
-
* @pixi/core - v6.
|
|
59
|
-
* Compiled
|
|
82
|
+
* @pixi/core - v6.5.8
|
|
83
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
60
84
|
*
|
|
61
85
|
* @pixi/core is licensed under the MIT License.
|
|
62
86
|
* http://www.opensource.org/licenses/mit-license
|
|
63
87
|
*/
|
|
64
88
|
|
|
65
89
|
/*!
|
|
66
|
-
* @pixi/display - v6.
|
|
67
|
-
* Compiled
|
|
90
|
+
* @pixi/display - v6.5.8
|
|
91
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
68
92
|
*
|
|
69
93
|
* @pixi/display is licensed under the MIT License.
|
|
70
94
|
* http://www.opensource.org/licenses/mit-license
|
|
71
95
|
*/
|
|
72
96
|
|
|
73
97
|
/*!
|
|
74
|
-
* @pixi/
|
|
75
|
-
* Compiled
|
|
98
|
+
* @pixi/extensions - v6.5.8
|
|
99
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
100
|
+
*
|
|
101
|
+
* @pixi/extensions is licensed under the MIT License.
|
|
102
|
+
* http://www.opensource.org/licenses/mit-license
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/*!
|
|
106
|
+
* @pixi/extract - v6.5.8
|
|
107
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
76
108
|
*
|
|
77
109
|
* @pixi/extract is licensed under the MIT License.
|
|
78
110
|
* http://www.opensource.org/licenses/mit-license
|
|
79
111
|
*/
|
|
80
112
|
|
|
81
113
|
/*!
|
|
82
|
-
* @pixi/filter-
|
|
83
|
-
* Compiled
|
|
114
|
+
* @pixi/filter-alpha - v6.5.8
|
|
115
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
116
|
+
*
|
|
117
|
+
* @pixi/filter-alpha is licensed under the MIT License.
|
|
118
|
+
* http://www.opensource.org/licenses/mit-license
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
/*!
|
|
122
|
+
* @pixi/filter-blur - v6.5.8
|
|
123
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
124
|
+
*
|
|
125
|
+
* @pixi/filter-blur is licensed under the MIT License.
|
|
126
|
+
* http://www.opensource.org/licenses/mit-license
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/*!
|
|
130
|
+
* @pixi/filter-color-matrix - v6.5.8
|
|
131
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
132
|
+
*
|
|
133
|
+
* @pixi/filter-color-matrix is licensed under the MIT License.
|
|
134
|
+
* http://www.opensource.org/licenses/mit-license
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/*!
|
|
138
|
+
* @pixi/filter-displacement - v6.5.8
|
|
139
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
84
140
|
*
|
|
85
141
|
* @pixi/filter-displacement is licensed under the MIT License.
|
|
86
142
|
* http://www.opensource.org/licenses/mit-license
|
|
87
143
|
*/
|
|
88
144
|
|
|
89
145
|
/*!
|
|
90
|
-
* @pixi/
|
|
91
|
-
* Compiled
|
|
146
|
+
* @pixi/filter-fxaa - v6.5.8
|
|
147
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
148
|
+
*
|
|
149
|
+
* @pixi/filter-fxaa is licensed under the MIT License.
|
|
150
|
+
* http://www.opensource.org/licenses/mit-license
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
/*!
|
|
154
|
+
* @pixi/filter-noise - v6.5.8
|
|
155
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
156
|
+
*
|
|
157
|
+
* @pixi/filter-noise is licensed under the MIT License.
|
|
158
|
+
* http://www.opensource.org/licenses/mit-license
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
/*!
|
|
162
|
+
* @pixi/graphics - v6.5.8
|
|
163
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
164
|
+
*
|
|
165
|
+
* @pixi/graphics is licensed under the MIT License.
|
|
166
|
+
* http://www.opensource.org/licenses/mit-license
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/*!
|
|
170
|
+
* @pixi/interaction - v6.5.8
|
|
171
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
172
|
+
*
|
|
173
|
+
* @pixi/interaction is licensed under the MIT License.
|
|
174
|
+
* http://www.opensource.org/licenses/mit-license
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
/*!
|
|
178
|
+
* @pixi/loaders - v6.5.8
|
|
179
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
92
180
|
*
|
|
93
181
|
* @pixi/loaders is licensed under the MIT License.
|
|
94
182
|
* http://www.opensource.org/licenses/mit-license
|
|
95
183
|
*/
|
|
96
184
|
|
|
97
185
|
/*!
|
|
98
|
-
* @pixi/math - v6.
|
|
99
|
-
* Compiled
|
|
186
|
+
* @pixi/math - v6.5.8
|
|
187
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
100
188
|
*
|
|
101
189
|
* @pixi/math is licensed under the MIT License.
|
|
102
190
|
* http://www.opensource.org/licenses/mit-license
|
|
103
191
|
*/
|
|
104
192
|
|
|
105
193
|
/*!
|
|
106
|
-
* @pixi/
|
|
107
|
-
* Compiled
|
|
194
|
+
* @pixi/mesh - v6.5.8
|
|
195
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
196
|
+
*
|
|
197
|
+
* @pixi/mesh is licensed under the MIT License.
|
|
198
|
+
* http://www.opensource.org/licenses/mit-license
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
/*!
|
|
202
|
+
* @pixi/mesh-extras - v6.5.8
|
|
203
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
204
|
+
*
|
|
205
|
+
* @pixi/mesh-extras is licensed under the MIT License.
|
|
206
|
+
* http://www.opensource.org/licenses/mit-license
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
/*!
|
|
210
|
+
* @pixi/mixin-cache-as-bitmap - v6.5.8
|
|
211
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
212
|
+
*
|
|
213
|
+
* @pixi/mixin-cache-as-bitmap is licensed under the MIT License.
|
|
214
|
+
* http://www.opensource.org/licenses/mit-license
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/*!
|
|
218
|
+
* @pixi/mixin-get-child-by-name - v6.5.8
|
|
219
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
108
220
|
*
|
|
109
221
|
* @pixi/mixin-get-child-by-name is licensed under the MIT License.
|
|
110
222
|
* http://www.opensource.org/licenses/mit-license
|
|
111
223
|
*/
|
|
112
224
|
|
|
113
225
|
/*!
|
|
114
|
-
* @pixi/mixin-get-global-position - v6.
|
|
115
|
-
* Compiled
|
|
226
|
+
* @pixi/mixin-get-global-position - v6.5.8
|
|
227
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
116
228
|
*
|
|
117
229
|
* @pixi/mixin-get-global-position is licensed under the MIT License.
|
|
118
230
|
* http://www.opensource.org/licenses/mit-license
|
|
119
231
|
*/
|
|
120
232
|
|
|
121
233
|
/*!
|
|
122
|
-
* @pixi/
|
|
123
|
-
* Compiled
|
|
234
|
+
* @pixi/particle-container - v6.5.8
|
|
235
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
236
|
+
*
|
|
237
|
+
* @pixi/particle-container is licensed under the MIT License.
|
|
238
|
+
* http://www.opensource.org/licenses/mit-license
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
/*!
|
|
242
|
+
* @pixi/polyfill - v6.5.8
|
|
243
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
124
244
|
*
|
|
125
245
|
* @pixi/polyfill is licensed under the MIT License.
|
|
126
246
|
* http://www.opensource.org/licenses/mit-license
|
|
127
247
|
*/
|
|
128
248
|
|
|
129
249
|
/*!
|
|
130
|
-
* @pixi/prepare - v6.
|
|
131
|
-
* Compiled
|
|
250
|
+
* @pixi/prepare - v6.5.8
|
|
251
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
132
252
|
*
|
|
133
253
|
* @pixi/prepare is licensed under the MIT License.
|
|
134
254
|
* http://www.opensource.org/licenses/mit-license
|
|
135
255
|
*/
|
|
136
256
|
|
|
137
257
|
/*!
|
|
138
|
-
* @pixi/runner - v6.
|
|
139
|
-
* Compiled
|
|
258
|
+
* @pixi/runner - v6.5.8
|
|
259
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
140
260
|
*
|
|
141
261
|
* @pixi/runner is licensed under the MIT License.
|
|
142
262
|
* http://www.opensource.org/licenses/mit-license
|
|
143
263
|
*/
|
|
144
264
|
|
|
145
265
|
/*!
|
|
146
|
-
* @pixi/
|
|
147
|
-
* Compiled
|
|
266
|
+
* @pixi/settings - v6.5.8
|
|
267
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
268
|
+
*
|
|
269
|
+
* @pixi/settings is licensed under the MIT License.
|
|
270
|
+
* http://www.opensource.org/licenses/mit-license
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
/*!
|
|
274
|
+
* @pixi/sprite - v6.5.8
|
|
275
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
276
|
+
*
|
|
277
|
+
* @pixi/sprite is licensed under the MIT License.
|
|
278
|
+
* http://www.opensource.org/licenses/mit-license
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
/*!
|
|
282
|
+
* @pixi/sprite-animated - v6.5.8
|
|
283
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
284
|
+
*
|
|
285
|
+
* @pixi/sprite-animated is licensed under the MIT License.
|
|
286
|
+
* http://www.opensource.org/licenses/mit-license
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
/*!
|
|
290
|
+
* @pixi/sprite-tiling - v6.5.8
|
|
291
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
292
|
+
*
|
|
293
|
+
* @pixi/sprite-tiling is licensed under the MIT License.
|
|
294
|
+
* http://www.opensource.org/licenses/mit-license
|
|
295
|
+
*/
|
|
296
|
+
|
|
297
|
+
/*!
|
|
298
|
+
* @pixi/spritesheet - v6.5.8
|
|
299
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
300
|
+
*
|
|
301
|
+
* @pixi/spritesheet is licensed under the MIT License.
|
|
302
|
+
* http://www.opensource.org/licenses/mit-license
|
|
303
|
+
*/
|
|
304
|
+
|
|
305
|
+
/*!
|
|
306
|
+
* @pixi/text - v6.5.8
|
|
307
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
308
|
+
*
|
|
309
|
+
* @pixi/text is licensed under the MIT License.
|
|
310
|
+
* http://www.opensource.org/licenses/mit-license
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
/*!
|
|
314
|
+
* @pixi/text-bitmap - v6.5.8
|
|
315
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
316
|
+
*
|
|
317
|
+
* @pixi/text-bitmap is licensed under the MIT License.
|
|
318
|
+
* http://www.opensource.org/licenses/mit-license
|
|
319
|
+
*/
|
|
320
|
+
|
|
321
|
+
/*!
|
|
322
|
+
* @pixi/ticker - v6.5.8
|
|
323
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
148
324
|
*
|
|
149
325
|
* @pixi/ticker is licensed under the MIT License.
|
|
150
326
|
* http://www.opensource.org/licenses/mit-license
|
|
151
327
|
*/
|
|
152
328
|
|
|
153
329
|
/*!
|
|
154
|
-
*
|
|
330
|
+
* @pixi/utils - v6.5.8
|
|
331
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
332
|
+
*
|
|
333
|
+
* @pixi/utils is licensed under the MIT License.
|
|
334
|
+
* http://www.opensource.org/licenses/mit-license
|
|
335
|
+
*/
|
|
336
|
+
|
|
337
|
+
/*!
|
|
338
|
+
* GSAP 3.11.3
|
|
155
339
|
* https://greensock.com
|
|
156
340
|
*
|
|
157
|
-
* @license Copyright 2008-
|
|
341
|
+
* @license Copyright 2008-2022, GreenSock. All rights reserved.
|
|
158
342
|
* Subject to the terms at https://greensock.com/standard-license or for
|
|
159
343
|
* Club GreenSock members, the agreement issued with that membership.
|
|
160
344
|
* @author: Jack Doyle, jack@greensock.com
|
|
@@ -169,8 +353,8 @@ object-assign
|
|
|
169
353
|
*/
|
|
170
354
|
|
|
171
355
|
/*!
|
|
172
|
-
* pixi-spine - v3.0
|
|
173
|
-
* Compiled
|
|
356
|
+
* pixi-spine - v3.1.0
|
|
357
|
+
* Compiled Wed, 03 Aug 2022 17:00:10 UTC
|
|
174
358
|
*
|
|
175
359
|
* pixi-spine is licensed under the MIT License.
|
|
176
360
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -179,8 +363,8 @@ object-assign
|
|
|
179
363
|
*/
|
|
180
364
|
|
|
181
365
|
/*!
|
|
182
|
-
* pixi-viewport - v4.
|
|
183
|
-
* Compiled
|
|
366
|
+
* pixi-viewport - v4.37.0
|
|
367
|
+
* Compiled Sun, 23 Oct 2022 14:02:15 UTC
|
|
184
368
|
*
|
|
185
369
|
* pixi-viewport is licensed under the MIT License.
|
|
186
370
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -189,8 +373,8 @@ object-assign
|
|
|
189
373
|
*/
|
|
190
374
|
|
|
191
375
|
/*!
|
|
192
|
-
* pixi.js - v6.
|
|
193
|
-
* Compiled
|
|
376
|
+
* pixi.js - v6.5.8
|
|
377
|
+
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
|
|
194
378
|
*
|
|
195
379
|
* pixi.js is licensed under the MIT License.
|
|
196
380
|
* http://www.opensource.org/licenses/mit-license
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@urso/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "HTML5 game engine",
|
|
5
5
|
"main": "build/js/index.js",
|
|
6
6
|
"author": "Megbrimef",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"pixi-particles": "^4.3.0",
|
|
30
30
|
"pixi-projection": "0.3.15",
|
|
31
31
|
"pixi-scrollbox": "^2.3.1",
|
|
32
|
-
"pixi-spine": "^3.
|
|
32
|
+
"pixi-spine": "^3.1.2",
|
|
33
33
|
"pixi-text-input": "^1.0.6",
|
|
34
34
|
"pixi-viewport": "^4.34.0",
|
|
35
35
|
"pixi.js": "^6.2.0"
|
package/src/js/lib/objectPool.js
CHANGED
|
@@ -16,22 +16,25 @@ class ObjectPoolMember {
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @param {Function} constructorFunction - function to constract element
|
|
19
|
-
* @param {Function}
|
|
19
|
+
* @param {Function} resetFunction - function to reset element when put back to pool
|
|
20
20
|
* @param {Number} [initialSize] - initial pool size. Use only if you not using keys when constract
|
|
21
21
|
* @param {Number} [maxSize] - max pool size. Old elements will be removed from pool
|
|
22
|
+
* @param {Function} removeFunction - function to remove element from pool. Happens, when max size is reached
|
|
22
23
|
*/
|
|
23
24
|
class LibObjectPool {
|
|
24
25
|
|
|
25
26
|
_pool = {};
|
|
26
|
-
resetFunction = () => { };
|
|
27
27
|
constructorFunction = () => { };
|
|
28
|
+
resetFunction = () => { };
|
|
29
|
+
removeFunction = () => { };
|
|
28
30
|
_maxSize = 0;
|
|
29
31
|
|
|
30
32
|
_lastBranchKeys = {};
|
|
31
33
|
_putTimeCache = {};
|
|
32
34
|
|
|
33
|
-
constructor(constructorFunction, resetFunction = (obj) => obj, initialSize = 0, maxSize = 0) {
|
|
35
|
+
constructor(constructorFunction, resetFunction = (obj) => obj, initialSize = 0, maxSize = 0, removeFunction = (obj) => obj) {
|
|
34
36
|
this.resetFunction = resetFunction;
|
|
37
|
+
this.removeFunction = removeFunction;
|
|
35
38
|
this.constructorFunction = constructorFunction;
|
|
36
39
|
this._maxSize = maxSize;
|
|
37
40
|
|
|
@@ -112,6 +115,7 @@ class LibObjectPool {
|
|
|
112
115
|
delete this._pool[element.key][element.branchKey];
|
|
113
116
|
|
|
114
117
|
//reset element
|
|
118
|
+
this.removeFunction(element.data);
|
|
115
119
|
element.free = false;
|
|
116
120
|
element.putCacheTimeKey = 0;
|
|
117
121
|
element.key = null;
|
|
@@ -125,7 +125,7 @@ class ModulesObjectsModelsDragContainer extends ModulesObjectsModelsContainer {
|
|
|
125
125
|
.filter((container) => container._baseObject.worldVisible)
|
|
126
126
|
.filter((container) => !container._needBlock)
|
|
127
127
|
.filter((container) => {
|
|
128
|
-
|
|
128
|
+
const height = container.getAbsoluteSize().height;
|
|
129
129
|
return container.height - height < 0;
|
|
130
130
|
})
|
|
131
131
|
.sort((firstContainer, secondContainer) => secondContainer.dragIndex - firstContainer.dragIndex);
|
|
@@ -184,30 +184,17 @@ class ModulesObjectsModelsDragContainer extends ModulesObjectsModelsContainer {
|
|
|
184
184
|
* @returns { Array }
|
|
185
185
|
*/
|
|
186
186
|
_getObjectPoints(container) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return [
|
|
193
|
-
{ x, y },
|
|
194
|
-
{ x: x + width * scaleX, y },
|
|
195
|
-
{ x: x + width * scaleX, y: y + height * scaleY },
|
|
196
|
-
{ x, y: y + height * scaleY }
|
|
197
|
-
];
|
|
198
|
-
|
|
199
|
-
} else {
|
|
200
|
-
const { x, y } = container._mask.toGlobal(new PIXI.Point(0, 0));
|
|
201
|
-
const { width, height } = container._mask;
|
|
202
|
-
const { scaleX, scaleY } = this._getScaleAndPositionRecursive(this);
|
|
203
|
-
return [
|
|
204
|
-
{ x, y },
|
|
205
|
-
{ x: x + width * scaleX, y },
|
|
206
|
-
{ x: x + width * scaleX, y: y + height * scaleY },
|
|
207
|
-
{ x, y: y + height * scaleY }
|
|
208
|
-
];
|
|
209
|
-
}
|
|
187
|
+
const { x, y } = container._mask.toGlobal(new PIXI.Point(0, 0));
|
|
188
|
+
|
|
189
|
+
const { width, height } = container._mask;
|
|
190
|
+
const { scaleX, scaleY } = this._getScaleAndPositionRecursive(this);
|
|
210
191
|
|
|
192
|
+
return [
|
|
193
|
+
{ x, y },
|
|
194
|
+
{ x: x + width * scaleX, y },
|
|
195
|
+
{ x: x + width * scaleX, y: y + height * scaleY },
|
|
196
|
+
{ x, y: y + height * scaleY }
|
|
197
|
+
];
|
|
211
198
|
}
|
|
212
199
|
|
|
213
200
|
/**
|
|
@@ -495,19 +482,13 @@ class ModulesObjectsModelsDragContainer extends ModulesObjectsModelsContainer {
|
|
|
495
482
|
* Drags container on pointer move.
|
|
496
483
|
* @param { Object } event
|
|
497
484
|
*/
|
|
498
|
-
|
|
485
|
+
_onPointerMove(event) {
|
|
499
486
|
let { data: { global: { x, y } } } = event;
|
|
500
487
|
|
|
501
|
-
if (Urso.device.desktop) {
|
|
502
|
-
x = Urso.scenes.getMouseCoords().x;
|
|
503
|
-
y = Urso.scenes.getMouseCoords().y;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
488
|
if (!this._startPosition) {
|
|
507
489
|
this._startPosition = { x, y };
|
|
508
490
|
}
|
|
509
491
|
|
|
510
|
-
|
|
511
492
|
if (!this._isActive({ x, y })) {
|
|
512
493
|
this._moveInProgress = false;
|
|
513
494
|
return;
|
|
@@ -633,6 +614,7 @@ class ModulesObjectsModelsDragContainer extends ModulesObjectsModelsContainer {
|
|
|
633
614
|
this._moveStartedY = event.changedTouches[0].offsetY || event.changedTouches[0].clientY;
|
|
634
615
|
this._documentPointerStart(event);
|
|
635
616
|
break;
|
|
617
|
+
case 'mousemove':
|
|
636
618
|
case 'touchmove':
|
|
637
619
|
this._documentPointerMove(event);
|
|
638
620
|
break;
|
|
@@ -643,9 +625,6 @@ class ModulesObjectsModelsDragContainer extends ModulesObjectsModelsContainer {
|
|
|
643
625
|
case 'wheel':
|
|
644
626
|
this._documentWheelScroll(event);
|
|
645
627
|
break;
|
|
646
|
-
case 'pointermove':
|
|
647
|
-
this._onPointerMove(event);
|
|
648
|
-
break;
|
|
649
628
|
default:
|
|
650
629
|
break;
|
|
651
630
|
}
|
|
@@ -23,6 +23,7 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
params.animation = this.animation; //we redefine original property here
|
|
26
|
+
this.contents = Urso.helper.recursiveGet('contents', params, []);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -35,6 +36,25 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
35
36
|
this._baseObject.state.setAnimation(track, animationName, loopFlag);
|
|
36
37
|
}
|
|
37
38
|
|
|
39
|
+
/**
|
|
40
|
+
* set up the mixes between animations
|
|
41
|
+
* @param {String} from - animation name
|
|
42
|
+
* @param {String} to - animation name
|
|
43
|
+
* @param {Number} duration - time in seconds
|
|
44
|
+
* @example setMix("walk", "jump", 0.2)
|
|
45
|
+
*/
|
|
46
|
+
setMix(from, to, duration) {
|
|
47
|
+
this._baseObject.stateData.setMix(from, to, duration);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Clears all listeners and resubscribes to spine events
|
|
52
|
+
*/
|
|
53
|
+
clearListeners() {
|
|
54
|
+
this._baseObject.state.clearListeners();
|
|
55
|
+
this._baseObject.state.addListener({ event: this._eventHandler.bind(this) });
|
|
56
|
+
}
|
|
57
|
+
|
|
38
58
|
/**
|
|
39
59
|
* set skin by name
|
|
40
60
|
* @param {String} skinName
|
|
@@ -226,6 +246,9 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
226
246
|
if (!spineAsset)
|
|
227
247
|
Urso.logger.error('ModulesObjectsModelsSpine assets error: no spine object ' + this.assetKey);
|
|
228
248
|
|
|
249
|
+
if (!spineAsset.spineData)
|
|
250
|
+
Urso.logger.error('ModulesObjectsModelsSpine assets error: no spine correct object (no spineData) for key ' + this.assetKey);
|
|
251
|
+
|
|
229
252
|
this._baseObject = new PIXI.spine.Spine(spineAsset.spineData);
|
|
230
253
|
//this._baseObject.state.timeScale = this.animation.timeScale;
|
|
231
254
|
Object.defineProperty(this._baseObject.state, 'timeScale', { get: this.getTimeScale.bind(this) });
|
|
@@ -256,7 +279,7 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
256
279
|
if (replaceSlotContents)
|
|
257
280
|
currentSlot.removeChildren(); //todo check if its proxy and reset parent
|
|
258
281
|
|
|
259
|
-
object
|
|
282
|
+
this.addChild(object); //todo make removeChild for addedToSlotObjects
|
|
260
283
|
currentSlot.addChild(object._baseObject);
|
|
261
284
|
Urso.objects.refreshStyles();
|
|
262
285
|
} else {
|
|
@@ -273,4 +296,4 @@ class ModulesObjectsModelsSpine extends Urso.Core.Modules.Objects.BaseModel {
|
|
|
273
296
|
}
|
|
274
297
|
}
|
|
275
298
|
|
|
276
|
-
module.exports = ModulesObjectsModelsSpine;
|
|
299
|
+
module.exports = ModulesObjectsModelsSpine;
|
|
@@ -46,6 +46,7 @@ class PropertyAdapter {
|
|
|
46
46
|
Urso.types.objects.GROUP,
|
|
47
47
|
Urso.types.objects.SCROLLBOX,
|
|
48
48
|
Urso.types.objects.SLIDER,
|
|
49
|
+
Urso.types.objects.SPINE,
|
|
49
50
|
Urso.types.objects.WORLD
|
|
50
51
|
];
|
|
51
52
|
|
|
@@ -203,7 +204,7 @@ class PropertyAdapter {
|
|
|
203
204
|
if (typeof object.anchorX !== 'number' || object.anchorX < 0 || object.anchorX > 1)
|
|
204
205
|
Urso.logger.error('AnchorX value is not valid!', object);
|
|
205
206
|
|
|
206
|
-
if (this._canBeParent(object)) { //parent types
|
|
207
|
+
if (this._canBeParent(object) && !this._typesWithoutAnchor.includes(object.type)) { //parent types
|
|
207
208
|
if (object.anchorX === 0)
|
|
208
209
|
return 0;
|
|
209
210
|
|
|
@@ -231,7 +232,7 @@ class PropertyAdapter {
|
|
|
231
232
|
if (typeof object.anchorY !== 'number' || object.anchorY < 0 || object.anchorY > 1)
|
|
232
233
|
Urso.logger.error('AnchorY value is not valid!', object);
|
|
233
234
|
|
|
234
|
-
if (this._canBeParent(object)) { //parent types
|
|
235
|
+
if (this._canBeParent(object) && !this._typesWithoutAnchor.includes(object.type)) { //parent types
|
|
235
236
|
if (object.anchorY === 0)
|
|
236
237
|
return 0;
|
|
237
238
|
|