@urso/core 0.2.8 → 0.3.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.
@@ -27,125 +27,129 @@ object-assign
27
27
  */
28
28
 
29
29
  /*!
30
- * @pixi/constants - v5.3.11
31
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
30
+ * @pixi-spine/loader-base - v3.0.13
31
+ * Compiled Mon, 13 Sep 2021 16:46:34 UTC
32
+ *
33
+ * @pixi-spine/loader-base is licensed under the MIT License.
34
+ * http://www.opensource.org/licenses/mit-license
35
+ *
36
+ * Copyright 2019-2020, Ivan Igorevich Popelyshev <ivan.popelyshev@gmail.com>, All Rights Reserved
37
+ */
38
+
39
+ /*!
40
+ * @pixi-spine/runtime-3.8 - v3.0.13
41
+ * Compiled Mon, 13 Sep 2021 16:46:34 UTC
42
+ *
43
+ * @pixi-spine/runtime-3.8 is licensed under the MIT License.
44
+ * http://www.opensource.org/licenses/mit-license
45
+ *
46
+ * Copyright 2019-2020, Ivan Igorevich Popelyshev <ivan.popelyshev@gmail.com>, All Rights Reserved
47
+ */
48
+
49
+ /*!
50
+ * @pixi/constants - v6.2.0
51
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
32
52
  *
33
53
  * @pixi/constants is licensed under the MIT License.
34
54
  * http://www.opensource.org/licenses/mit-license
35
55
  */
36
56
 
37
57
  /*!
38
- * @pixi/core - v5.3.11
39
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
58
+ * @pixi/core - v6.2.0
59
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
40
60
  *
41
61
  * @pixi/core is licensed under the MIT License.
42
62
  * http://www.opensource.org/licenses/mit-license
43
63
  */
44
64
 
45
65
  /*!
46
- * @pixi/display - v5.3.11
47
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
66
+ * @pixi/display - v6.2.0
67
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
48
68
  *
49
69
  * @pixi/display is licensed under the MIT License.
50
70
  * http://www.opensource.org/licenses/mit-license
51
71
  */
52
72
 
53
73
  /*!
54
- * @pixi/extract - v5.3.11
55
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
74
+ * @pixi/extract - v6.2.0
75
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
56
76
  *
57
77
  * @pixi/extract is licensed under the MIT License.
58
78
  * http://www.opensource.org/licenses/mit-license
59
79
  */
60
80
 
61
81
  /*!
62
- * @pixi/filter-displacement - v5.3.11
63
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
82
+ * @pixi/filter-displacement - v6.2.0
83
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
64
84
  *
65
85
  * @pixi/filter-displacement is licensed under the MIT License.
66
86
  * http://www.opensource.org/licenses/mit-license
67
87
  */
68
88
 
69
89
  /*!
70
- * @pixi/loaders - v5.3.11
71
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
90
+ * @pixi/loaders - v6.2.0
91
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
72
92
  *
73
93
  * @pixi/loaders is licensed under the MIT License.
74
94
  * http://www.opensource.org/licenses/mit-license
75
95
  */
76
96
 
77
97
  /*!
78
- * @pixi/math - v5.3.11
79
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
98
+ * @pixi/math - v6.2.0
99
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
80
100
  *
81
101
  * @pixi/math is licensed under the MIT License.
82
102
  * http://www.opensource.org/licenses/mit-license
83
103
  */
84
104
 
85
105
  /*!
86
- * @pixi/mesh-extras - v5.3.11
87
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
88
- *
89
- * @pixi/mesh-extras is licensed under the MIT License.
90
- * http://www.opensource.org/licenses/mit-license
91
- */
92
-
93
- /*!
94
- * @pixi/mixin-get-child-by-name - v5.3.11
95
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
106
+ * @pixi/mixin-get-child-by-name - v6.2.0
107
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
96
108
  *
97
109
  * @pixi/mixin-get-child-by-name is licensed under the MIT License.
98
110
  * http://www.opensource.org/licenses/mit-license
99
111
  */
100
112
 
101
113
  /*!
102
- * @pixi/mixin-get-global-position - v5.3.11
103
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
114
+ * @pixi/mixin-get-global-position - v6.2.0
115
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
104
116
  *
105
117
  * @pixi/mixin-get-global-position is licensed under the MIT License.
106
118
  * http://www.opensource.org/licenses/mit-license
107
119
  */
108
120
 
109
121
  /*!
110
- * @pixi/polyfill - v5.3.11
111
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
122
+ * @pixi/polyfill - v6.2.0
123
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
112
124
  *
113
125
  * @pixi/polyfill is licensed under the MIT License.
114
126
  * http://www.opensource.org/licenses/mit-license
115
127
  */
116
128
 
117
129
  /*!
118
- * @pixi/prepare - v5.3.11
119
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
130
+ * @pixi/prepare - v6.2.0
131
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
120
132
  *
121
133
  * @pixi/prepare is licensed under the MIT License.
122
134
  * http://www.opensource.org/licenses/mit-license
123
135
  */
124
136
 
125
137
  /*!
126
- * @pixi/runner - v5.3.11
127
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
138
+ * @pixi/runner - v6.2.0
139
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
128
140
  *
129
141
  * @pixi/runner is licensed under the MIT License.
130
142
  * http://www.opensource.org/licenses/mit-license
131
143
  */
132
144
 
133
145
  /*!
134
- * @pixi/ticker - v5.3.11
135
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
146
+ * @pixi/ticker - v6.2.0
147
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
136
148
  *
137
149
  * @pixi/ticker is licensed under the MIT License.
138
150
  * http://www.opensource.org/licenses/mit-license
139
151
  */
140
152
 
141
- /*!
142
- * @pixi/utils - v5.3.11
143
- * Compiled Mon, 01 Nov 2021 16:10:12 UTC
144
- *
145
- * @pixi/utils is licensed under the MIT License.
146
- * http://www.opensource.org/licenses/mit-license
147
- */
148
-
149
153
  /*!
150
154
  * GSAP 3.8.0
151
155
  * https://greensock.com
@@ -164,6 +168,16 @@ object-assign
164
168
  * http://www.opensource.org/licenses/mit-license
165
169
  */
166
170
 
171
+ /*!
172
+ * pixi-spine - v3.0.13
173
+ * Compiled Mon, 13 Sep 2021 16:46:43 UTC
174
+ *
175
+ * pixi-spine is licensed under the MIT License.
176
+ * http://www.opensource.org/licenses/mit-license
177
+ *
178
+ * Copyright 2019-2020, Ivan Igorevich Popelyshev <ivan.popelyshev@gmail.com>, All Rights Reserved
179
+ */
180
+
167
181
  /*!
168
182
  * pixi-viewport - v4.34.3
169
183
  * Compiled Wed, 01 Dec 2021 19:28:04 UTC
@@ -175,14 +189,28 @@ object-assign
175
189
  */
176
190
 
177
191
  /*!
178
- * resource-loader - v3.0.1
179
- * https://github.com/pixijs/pixi-sound
180
- * Compiled Tue, 02 Jul 2019 14:06:18 UTC
192
+ * pixi.js - v6.2.0
193
+ * Compiled Mon, 01 Nov 2021 16:52:10 UTC
181
194
  *
182
- * resource-loader is licensed under the MIT license.
195
+ * pixi.js is licensed under the MIT License.
183
196
  * http://www.opensource.org/licenses/mit-license
184
197
  */
185
198
 
199
+ /*! *****************************************************************************
200
+ Copyright (c) Microsoft Corporation.
201
+
202
+ Permission to use, copy, modify, and/or distribute this software for any
203
+ purpose with or without fee is hereby granted.
204
+
205
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
206
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
207
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
208
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
209
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
210
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
211
+ PERFORMANCE OF THIS SOFTWARE.
212
+ ***************************************************************************** */
213
+
186
214
  /*! *****************************************************************************
187
215
  Copyright (c) Microsoft Corporation. All rights reserved.
188
216
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.2.8",
3
+ "version": "0.3.3",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -27,12 +27,11 @@
27
27
  "howler": "^2.2.1",
28
28
  "pixi-particles": "^4.3.0",
29
29
  "pixi-projection": "0.3.15",
30
- "pixi-spine": "^2.1.11",
31
- "pixi.js": "^5.1.3",
32
- "pixi5-dragonbones": "5.7.0-2",
33
30
  "pixi-scrollbox": "^2.3.1",
31
+ "pixi-spine": "^3.0.13",
32
+ "pixi-text-input": "^1.0.6",
34
33
  "pixi-viewport": "^4.34.0",
35
- "pixi-text-input": "^1.0.6"
34
+ "pixi.js": "^6.2.0"
36
35
  },
37
36
  "devDependencies": {
38
37
  "@babel/core": "^7.12.10",
@@ -6,12 +6,10 @@ import { DropShadowFilter } from '@pixi/filter-drop-shadow';
6
6
  PIXI.filters['DropShadowFilter'] = DropShadowFilter;
7
7
 
8
8
 
9
- require("pixi-spine");
9
+ window.PIXI.spine = require("pixi-spine");
10
10
  require("pixi-projection");
11
11
  require("pixi-text-input");
12
12
 
13
- Urso.DragonBones = require("pixi5-dragonbones");
14
-
15
13
  import { gsap } from 'gsap';
16
14
  window.gsap = gsap;
17
15
 
@@ -3,7 +3,6 @@ Urso.Core.Modules.Assets.Models = {
3
3
  Atlas: require('./atlas.js'),
4
4
  BitmapFont: require('./bitmapFont.js'),
5
5
  Container: require('./container.js'),
6
- DragonBones: require('./dragonBones.js'),
7
6
  Image: require('./image.js'),
8
7
  Json: require('./json.js'),
9
8
  Sound: require('./sound.js'),
@@ -189,9 +189,6 @@ class ModulesAssetsService {
189
189
  case Urso.types.assets.CONTAINER:
190
190
  model = this.getInstance('Models.Container', asset)
191
191
  break;
192
- case Urso.types.assets.DRAGONBONES:
193
- model = this.getInstance('Models.DragonBones', asset)
194
- break;
195
192
  case Urso.types.assets.ATLAS:
196
193
  model = this.getInstance('Models.Atlas', asset)
197
194
  break;
@@ -221,7 +218,7 @@ class ModulesAssetsService {
221
218
  //set loadingGroup
222
219
  model.loadingGroup = loadingGroup || model.loadingGroup || this.getInstance('Config').loadingGroups.initial;
223
220
 
224
- //check if container or dragonbones
221
+ //check if container
225
222
  if (model.contents) {
226
223
  for (let content of model.contents) {
227
224
  this._addAsset(content, model.loadingGroup);
@@ -89,9 +89,6 @@ class ModulesObjectsCreate {
89
89
  case Urso.types.objects.BITMAPTEXT:
90
90
  model = this.getInstance('Models.BitmapText', object);
91
91
  break;
92
- case Urso.types.objects.DRAGONBONES:
93
- model = this.getInstance('Models.DragonBones', object);
94
- break;
95
92
  case Urso.types.objects.HITAREA:
96
93
  model = this.getInstance('Models.HitArea', object);
97
94
  break;
@@ -6,7 +6,6 @@ Urso.Core.Modules.Objects.Models = {
6
6
  Collection: require('./collection.js'),
7
7
  Component: require('./component.js'),
8
8
  Container: require('./container.js'),
9
- DragonBones: require('./dragonBones.js'),
10
9
  Emitter: require('./emitter.js'),
11
10
  Graphics: require('./graphics.js'),
12
11
  Group: require('./group.js'),
@@ -22,7 +22,7 @@ class ModulesObjectsModelsCheckbox extends UrsoCoreModulesObjectsModelsToggle {
22
22
  this.contents = [];
23
23
 
24
24
  this.action = Urso.helper.recursiveGet('action', params, () => {
25
- this.emit(Urso.events.MODULES_OBJECTS_CHECKBOX_PRESS, { name: this.name, status: this._toggleStatus })
25
+ this.emit(Urso.events.MODULES_OBJECTS_CHECKBOX_PRESS, { name: this.name, status: this._toggleStatus, class: this.class })
26
26
  });
27
27
 
28
28
  this.lable = Urso.helper.recursiveGet('lable', params, false);
@@ -188,7 +188,7 @@ class ModulesObjectsModelsSlider extends Urso.Core.Modules.Objects.BaseModel {
188
188
  this.currentValueText.text = value;
189
189
 
190
190
  this._setFillMask();
191
- this.emit(Urso.events.MODULES_OBJECTS_SLIDER_SET_NEW_VALUE, { name: this.name, value: value });
191
+ this.emit(Urso.events.MODULES_OBJECTS_SLIDER_SET_NEW_VALUE, { name: this.name, value: value, class: this.class });
192
192
  }
193
193
 
194
194
  _subscribeOnce() {
@@ -18,7 +18,7 @@ class ModulesObjectsModelsToggle extends UrsoCoreModulesObjectsModelsButton {
18
18
  super.setupParams(params);
19
19
 
20
20
  this.action = Urso.helper.recursiveGet('action', params, () => {
21
- this.emit(Urso.events.MODULES_OBJECTS_TOGGLE_PRESS, { name: this.name, status: this._toggleStatus })
21
+ this.emit(Urso.events.MODULES_OBJECTS_TOGGLE_PRESS, { name: this.name, status: this._toggleStatus, class: this.class })
22
22
  });
23
23
 
24
24
  this.buttonFrames = {
@@ -17,6 +17,8 @@ class ModulesObserverConfig {
17
17
  MODULES_SOUND_MANAGER_UPDATE_CFG: 'modules.soundManager.updateCfg',
18
18
  MODULES_SOUND_MANAGER_SET_GLOBAL_VOLUME: 'modules.soundManager.setGlobalVolume',
19
19
  MODULES_STATES_MANAGER_STATE_CHANGE: 'modules.statesManager.stateChange',
20
+ MODULES_STATES_MANAGER_ACTION_START: 'modules.statesManager.actionStart',
21
+ MODULES_STATES_MANAGER_ACTION_FINISH: 'modules.statesManager.actionFinish',
20
22
  MODULES_SCENES_ORIENTATION_CHANGE: 'modules.scenes.orientation.change',
21
23
  MODULES_SCENES_NEW_RESOLUTION: 'modules.scenes.newResolution',
22
24
  MODULES_SCENES_NEW_SCENE_INIT: 'modules.scenes.newSceneInit',
@@ -18,6 +18,8 @@ class ModulesStatesManagerAction {
18
18
  run(onFinishCallback) {
19
19
  log(`%c action run ---> ${this.name}`, 'color: blue');
20
20
 
21
+ this.emit(Urso.events.MODULES_STATES_MANAGER_ACTION_START, this.name);
22
+
21
23
  this.finished = false;
22
24
  this._onFinishCallback = onFinishCallback;
23
25
 
@@ -47,6 +49,9 @@ class ModulesStatesManagerAction {
47
49
 
48
50
  this._terminating = false;
49
51
  this.finished = true;
52
+
53
+ this.emit(Urso.events.MODULES_STATES_MANAGER_ACTION_FINISH, this.name);
54
+
50
55
  log(`%c action finish <--- ${this.name}`, 'color: blue');
51
56
  this._onFinishCallback();
52
57
  }
@@ -27,6 +27,16 @@ class ModulesStatesManagerController {
27
27
 
28
28
  _iteratorConstructor() {
29
29
  let nextIndex = 0;
30
+
31
+
32
+ const getNextStateByOrder = () => {
33
+ let statesArray = Object.keys(this._configStates);
34
+
35
+ if (nextIndex === statesArray.length)
36
+ nextIndex = 0;
37
+
38
+ return statesArray[nextIndex++];
39
+ }
30
40
 
31
41
  return {
32
42
  next: (() => {
@@ -36,7 +46,7 @@ class ModulesStatesManagerController {
36
46
  if (this._currentState) {
37
47
  const currentState = this._configStates[this._currentState];
38
48
 
39
- if (this.checkStateGuard(this._currentState) && currentState.nextState) { //nextState: ["PICK_GAME2", "PICK_GAME1", "IDLE"]
49
+ if (currentState.nextState) { //nextState: ["PICK_GAME2", "PICK_GAME1", "IDLE"]
40
50
  for (const stateKey of currentState.nextState) {
41
51
  if (this.checkStateGuard(stateKey)) {
42
52
  nextIndex = statesArray.indexOf(stateKey) + 1;
@@ -52,11 +62,14 @@ class ModulesStatesManagerController {
52
62
  }
53
63
  }
54
64
 
55
- //regular round logic
56
- if (nextIndex === statesArray.length)
57
- nextIndex = 0;
65
+ //go next state by order
66
+ let stateName;
58
67
 
59
- return statesArray[nextIndex++];
68
+ do {
69
+ stateName = getNextStateByOrder();
70
+ } while (!this.checkStateGuard(stateName));
71
+
72
+ return stateName;
60
73
  }).bind(this)
61
74
  }
62
75
  }
@@ -71,10 +84,6 @@ class ModulesStatesManagerController {
71
84
  let config = this._configStates[this._currentState];
72
85
  let classInstance = this.getInstance('Helper').getActionByConfig(config);
73
86
 
74
- //state guard
75
- if (!this.checkStateGuard(this._currentState))
76
- return this._nextState();
77
-
78
87
  //actions instances guard
79
88
  if (!classInstance.guard())
80
89
  return this._nextState();
@@ -9,9 +9,8 @@ class ModulesTemplateTypes {
9
9
  SPINE: 5,
10
10
  BITMAPFONT: 6,
11
11
  SOUND: 7,
12
- DRAGONBONES: 8,
13
- FONT: 9,
14
- AUDIOSPRITE: 10
12
+ FONT: 8,
13
+ AUDIOSPRITE: 9
15
14
  },
16
15
 
17
16
  objects: {
@@ -31,13 +30,12 @@ class ModulesTemplateTypes {
31
30
  COMPONENT: 14,
32
31
  GROUP: 15,
33
32
  IMAGES_ANIMATION: 16,
34
- DRAGONBONES: 17,
35
- ATLASIMAGE: 18,
36
- SLIDER: 19,
37
- TOGGLE: 20,
38
- CHECKBOX: 21,
39
- SCROLLBOX: 22,
40
- TEXTINPUT: 23
33
+ ATLASIMAGE: 17,
34
+ SLIDER: 18,
35
+ TOGGLE: 19,
36
+ CHECKBOX: 20,
37
+ SCROLLBOX: 21,
38
+ TEXTINPUT: 22
41
39
  }
42
40
  }
43
41
  }
@@ -1,27 +0,0 @@
1
- class ModulesAssetsModelsDragonBones extends Urso.Core.Modules.Assets.BaseModel {
2
- constructor(params) {
3
- super(params);
4
-
5
- this.type = Urso.types.assets.DRAGONBONES;
6
-
7
- //for manual filenames setup
8
- this.contents = Urso.helper.recursiveGet('contents', params, [
9
- { type: Urso.types.assets.JSON, key: `${this.key}_skeletonJson`, path: this.skeletonJson },
10
- { type: Urso.types.assets.JSON, key: `${this.key}_textureJson`, path: this.textureJson },
11
- { type: Urso.types.assets.IMAGE, key: `${this.key}_textureImage`, path: this.textureImage }
12
- ]);
13
-
14
- this.path = false;
15
- this.key = false;
16
- }
17
-
18
- setupParams(params) {
19
- super.setupParams(params);
20
-
21
- this.skeletonJson = Urso.helper.recursiveGet('skeletonJson', params, false);
22
- this.textureJson = Urso.helper.recursiveGet('textureJson', params, false);
23
- this.textureImage = Urso.helper.recursiveGet('textureImage', params, false);
24
- }
25
- }
26
-
27
- module.exports = ModulesAssetsModelsDragonBones;