@3dsource/angular-unreal-module 0.0.106 → 0.0.107

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.
@@ -10,7 +10,7 @@ import { concatLatestFrom } from '@ngrx/operators';
10
10
  import { DialogRef, DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
11
11
  import { HttpClient } from '@angular/common/http';
12
12
  import { ScrollStrategyOptions } from '@angular/cdk/overlay';
13
- import { MetaBoxCommand } from '@3dsource/types-unreal';
13
+ import { MetaBoxCommand, EPayloadVersion } from '@3dsource/types-unreal';
14
14
  import { DomSanitizer } from '@angular/platform-browser';
15
15
  import { NgOptimizedImage, AsyncPipe, JsonPipe } from '@angular/common';
16
16
  import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
@@ -6189,7 +6189,7 @@ class UnrealSceneComponent {
6189
6189
  }
6190
6190
  const pixelRatio = this.pixelRatio;
6191
6191
  if (this.unrealConfig.optimizedResize) {
6192
- //New Approach
6192
+ // New Approach
6193
6193
  return getResizeValuesUniversal({
6194
6194
  pixelRatio,
6195
6195
  containerWidth,
@@ -6205,11 +6205,12 @@ class UnrealSceneComponent {
6205
6205
  });
6206
6206
  }
6207
6207
  getResizeStudioValues() {
6208
+ const videoElement = this.videoElement()?.nativeElement;
6208
6209
  if (this.unrealConfig.optimizedResize) {
6209
6210
  return getResizeStudioValues({
6210
6211
  pixelRatio: this.pixelRatio,
6211
- containerWidth: this.videoElement()?.nativeElement.offsetWidth || 2,
6212
- containerHeight: this.videoElement()?.nativeElement.offsetHeight || 2,
6212
+ containerWidth: videoElement?.offsetWidth || 2,
6213
+ containerHeight: videoElement?.offsetHeight || 2,
6213
6214
  studioWidth: this.width,
6214
6215
  studioHeight: this.height,
6215
6216
  maxResolution: this.maxResolution,
@@ -6217,8 +6218,8 @@ class UnrealSceneComponent {
6217
6218
  }
6218
6219
  return getResizeStudioValuesOld({
6219
6220
  pixelRatio: this.pixelRatio,
6220
- containerWidth: this.videoElement()?.nativeElement.offsetWidth || 2,
6221
- containerHeight: this.videoElement()?.nativeElement.offsetHeight || 2,
6221
+ containerWidth: videoElement?.offsetWidth || 2,
6222
+ containerHeight: videoElement?.offsetHeight || 2,
6222
6223
  studioWidth: this.width,
6223
6224
  studioHeight: this.height,
6224
6225
  maxResolution: this.maxResolution,
@@ -6227,7 +6228,12 @@ class UnrealSceneComponent {
6227
6228
  sendResize(size) {
6228
6229
  this.commandsSender.sendCommandToUnreal({
6229
6230
  command: MetaBoxCommand.FChangeResolutionCommand,
6230
- payload: { resolution: { x: size.w, y: size.h } },
6231
+ payload: {
6232
+ resolution: { x: size.w, y: size.h },
6233
+ payloadVersion: this.isStudio()
6234
+ ? EPayloadVersion.disableFovRecalculation
6235
+ : undefined,
6236
+ },
6231
6237
  });
6232
6238
  }
6233
6239
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UnrealSceneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }