@urso/core 0.5.11 → 0.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -85,6 +85,7 @@ PIXI.Text.prototype.drawLetterSpacing = function (text, x, y, isStroke) {
85
85
  PIXI.Container.prototype.renderAdvanced = function (renderer) {
86
86
  var filters = this.filters;
87
87
  var mask = this._mask;
88
+ let excludedFromMaskChildsIndexes = [];
88
89
  // push filter first as we need to ensure the stencil buffer is correct for any masking
89
90
  if (filters) {
90
91
 
@@ -125,11 +126,7 @@ PIXI.Container.prototype.renderAdvanced = function (renderer) {
125
126
  if (!this.children[i].ignoreParentMask || !mask) {
126
127
  this.children[i].render(renderer);
127
128
  } else if (mask) {
128
- renderer.batch.flush();
129
- renderer.mask.pop(this);
130
- this.children[i].render(renderer);
131
- renderer.batch.flush();
132
- renderer.mask.push(this, this._mask);
129
+ excludedFromMaskChildsIndexes.push(i);
133
130
  }
134
131
  }
135
132
  }
@@ -142,6 +139,11 @@ PIXI.Container.prototype.renderAdvanced = function (renderer) {
142
139
  renderer.mask.pop(this);
143
140
  }
144
141
 
142
+ if(excludedFromMaskChildsIndexes.length > 0) {
143
+ excludedFromMaskChildsIndexes.forEach(index => this.children[index].render(renderer));
144
+ renderer.batch.flush();
145
+ }
146
+
145
147
  if (filters && this._enabledFilters && this._enabledFilters.length) {
146
148
  renderer.filter.pop();
147
149
  }
@@ -622,7 +622,7 @@ class ModulesObjectsModelsDragContainer extends ModulesObjectsModelsContainer {
622
622
  switch (event.type) {
623
623
  case 'mousedown':
624
624
  this._moveStartedY = event.offsetY;
625
- this._documentPointerStart(e);
625
+ this._documentPointerStart(event);
626
626
  break;
627
627
  case 'touchstart':
628
628
  this._offsetStartY = event.changedTouches[0].offsetY;
@@ -90,7 +90,7 @@ class ModulesObjectsModelsEmitterFx extends Urso.Core.Modules.Objects.BaseModel
90
90
 
91
91
  _customDestroy() {
92
92
  this.removeListener(Urso.events.MODULES_SCENES_UPDATE, this.update);
93
- this._emitter.stop(false);
93
+ this._emitter && this._emitter.stop(false);
94
94
  this._bundle = null;
95
95
  this._emitter = null;
96
96
  }
@@ -26,6 +26,7 @@ class ModulesObserverConfig {
26
26
  MODULES_OBJECTS_TEXTINPUT_INPUT: 'modules.objects.textinput.input',
27
27
  MODULES_OBJECTS_CHECKBOX_PRESS: 'modules.objects.checkbox.press',
28
28
  MODULES_LOGIC_SOUNDS_DO: 'modules.soundManager.do',
29
+ MODULES_SOUND_MANAGER_CONTEXT_UNLOCKED: 'modules.soundManager.contextUnlocked',
29
30
  MODULES_SOUND_MANAGER_UPDATE_CFG: 'modules.soundManager.updateCfg',
30
31
  MODULES_SOUND_MANAGER_SET_GLOBAL_VOLUME: 'modules.soundManager.setGlobalVolume',
31
32
  MODULES_STATES_MANAGER_STATE_CHANGE: 'modules.statesManager.stateChange',
@@ -52,6 +52,7 @@ class SoundSprite {
52
52
  this._player.on('unlock', () => setTimeout(() => {
53
53
  this._isAudioUnlocked = true;
54
54
  this._onUnlock();
55
+ this.emit(Urso.events.MODULES_SOUND_MANAGER_CONTEXT_UNLOCKED);
55
56
  }, 1000));
56
57
 
57
58
  this._player.on('end', id => {