@onerjs/core 8.51.7 → 8.51.8

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.
@@ -194,6 +194,13 @@ export class AbstractEngine {
194
194
  _rebuildRenderTargetWrappers() {
195
195
  const currentState = this._renderTargetWrapperCache.slice(); // Do a copy because the rebuild will add proxies
196
196
  for (const renderTargetWrapper of currentState) {
197
+ // Wrapped textures (source === External) are host-owned; their format is opaque to Babylon, so we can't
198
+ // rebuild them. The host re-supplies a fresh handle via updateWrappedWebGLTexture /
199
+ // updateWrappedNativeTexture / updateWrappedWebGPUTexture from its onContextRestoredObservable handler.
200
+ // Scan all attachments for the multi-RT case (rtWrapper.texture only returns _textures[0]).
201
+ if (renderTargetWrapper.textures?.some((t) => t.source === 15 /* InternalTextureSource.External */)) {
202
+ continue;
203
+ }
197
204
  renderTargetWrapper._rebuild();
198
205
  }
199
206
  }
@@ -815,13 +822,13 @@ export class AbstractEngine {
815
822
  */
816
823
  // Not mixed with Version for tooling purpose.
817
824
  static get NpmPackage() {
818
- return "babylonjs@9.8.0";
825
+ return "babylonjs@9.9.1";
819
826
  }
820
827
  /**
821
828
  * Returns the current version of the framework
822
829
  */
823
830
  static get Version() {
824
- return "9.8.0";
831
+ return "9.9.1";
825
832
  }
826
833
  /**
827
834
  * Gets the HTML canvas attached with the current webGL context
@@ -1139,8 +1146,6 @@ export class AbstractEngine {
1139
1146
  // Detect if we are running on a faulty buggy desktop OS.
1140
1147
  this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
1141
1148
  }
1142
- // Save this off for use in resize().
1143
- this.adaptToDeviceRatio = adaptToDeviceRatio ?? false;
1144
1149
  options.antialias = antialias ?? options.antialias;
1145
1150
  options.deterministicLockstep = options.deterministicLockstep ?? false;
1146
1151
  options.lockstepMaxSteps = options.lockstepMaxSteps ?? 4;
@@ -1156,6 +1161,8 @@ export class AbstractEngine {
1156
1161
  const limitDeviceRatio = options.limitDeviceRatio || devicePixelRatio;
1157
1162
  // Viewport
1158
1163
  adaptToDeviceRatio = adaptToDeviceRatio || options.adaptToDeviceRatio || false;
1164
+ // Save this off for use in resize().
1165
+ this.adaptToDeviceRatio = adaptToDeviceRatio;
1159
1166
  this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, devicePixelRatio) : 1.0;
1160
1167
  this._lastDevicePixelRatio = devicePixelRatio;
1161
1168
  this._creationOptions = options;