@needle-tools/engine 3.2.2-alpha → 3.2.3-alpha

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [3.2.3-alpha] - 2023-04-20
8
+ - Fix: VideoPlayer AudioOutput.None should mute video
9
+ - Fix: SpriteRenderer applies layer from current object (e.g. for IgnoreRaycast)
10
+
7
11
  ## [3.2.2-alpha] - 2023-04-19
8
12
  - Fix: issue where the environment lighting would be falsely disabled
9
13
  - Change: minor improvements to initial state of the SceneSwitcher
@@ -21274,6 +21274,8 @@ class SO extends EventTarget {
21274
21274
  }
21275
21275
  isKeyDown(g) {
21276
21276
  var e;
21277
+ if (!this.context.application.isVisible || !this.context.application.hasFocus)
21278
+ return !1;
21277
21279
  const I = this.getCodeForCommonKeyName(g);
21278
21280
  if (I !== null) {
21279
21281
  for (const t of I)
@@ -21281,10 +21283,12 @@ class SO extends EventTarget {
21281
21283
  return !0;
21282
21284
  return !1;
21283
21285
  }
21284
- return this.context.application.isVisible && this.context.application.hasFocus && ((e = this.keysPressed[g]) == null ? void 0 : e.startFrame) === this.context.time.frameCount && this.keysPressed[g].pressed;
21286
+ return ((e = this.keysPressed[g]) == null ? void 0 : e.startFrame) === this.context.time.frameCount && this.keysPressed[g].pressed;
21285
21287
  }
21286
21288
  isKeyUp(g) {
21287
21289
  var e;
21290
+ if (!this.context.application.isVisible || !this.context.application.hasFocus)
21291
+ return !1;
21288
21292
  const I = this.getCodeForCommonKeyName(g);
21289
21293
  if (I !== null) {
21290
21294
  for (const t of I)
@@ -21292,10 +21296,12 @@ class SO extends EventTarget {
21292
21296
  return !0;
21293
21297
  return !1;
21294
21298
  }
21295
- return this.context.application.isVisible && this.context.application.hasFocus && ((e = this.keysPressed[g]) == null ? void 0 : e.frame) === this.context.time.frameCount && !this.keysPressed[g].pressed;
21299
+ return ((e = this.keysPressed[g]) == null ? void 0 : e.frame) === this.context.time.frameCount && !this.keysPressed[g].pressed;
21296
21300
  }
21297
21301
  isKeyPressed(g) {
21298
21302
  var e;
21303
+ if (!this.context.application.isVisible || !this.context.application.hasFocus)
21304
+ return !1;
21299
21305
  const I = this.getCodeForCommonKeyName(g);
21300
21306
  if (I !== null) {
21301
21307
  for (const t of I)
@@ -21303,7 +21309,7 @@ class SO extends EventTarget {
21303
21309
  return !0;
21304
21310
  return !1;
21305
21311
  }
21306
- return this.context.application.isVisible && this.context.application.hasFocus && ((e = this.keysPressed[g]) == null ? void 0 : e.pressed);
21312
+ return (e = this.keysPressed[g]) == null ? void 0 : e.pressed;
21307
21313
  }
21308
21314
  // utility helper for mapping common names to actual codes; e.g. "Shift" -> "ShiftLeft" and "ShiftRight" or "a" -> "KeyA"
21309
21315
  getCodeForCommonKeyName(g) {
@@ -70406,7 +70412,7 @@ class ri extends TA {
70406
70412
  if (!this._videoElement)
70407
70413
  return;
70408
70414
  this._videoElement.loop = this._isLooping, this._videoElement.currentTime = this.currentTime, this._videoElement.playbackRate = this._playbackSpeed, this._videoElement.playsInline = !0;
70409
- let g = !this._receivedInput && this.audioOutputMode !== 0;
70415
+ let g = !this._receivedInput || this.audioOutputMode === 0;
70410
70416
  !g && this._muted && (g = !0), this._videoElement.muted = g, this.playOnAwake && (this._videoElement.autoplay = !0);
70411
70417
  }
70412
70418
  updateVideoElementStyles() {
@@ -72115,7 +72121,7 @@ class FQ extends TA {
72115
72121
  }
72116
72122
  this.sharedMaterial = C, this._currentSprite = new GA(Zr.getOrCreateGeometry(g), C);
72117
72123
  }
72118
- this._currentSprite.parent !== this.gameObject && (this.drawMode === 2 && this._currentSprite.scale.set(this.size.x, this.size.y, 1), this.gameObject && this.gameObject.add(this._currentSprite)), (t = this._spriteSheet) == null || t.update();
72124
+ this._currentSprite.parent !== this.gameObject && (this.drawMode === 2 && this._currentSprite.scale.set(this.size.x, this.size.y, 1), this.gameObject && this.gameObject.add(this._currentSprite)), this._currentSprite && this._currentSprite.layers.set(this.layer), (t = this._spriteSheet) == null || t.update();
72119
72125
  }
72120
72126
  }
72121
72127
  Rt([