@babylonjs/inspector 5.0.0-beta.5 → 5.0.0-beta.6

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.
@@ -45499,10 +45499,11 @@ var TextureLineComponent = /** @class */ (function (_super) {
45499
45499
  this.updatePreview();
45500
45500
  };
45501
45501
  TextureLineComponent.prototype.updatePreview = function () {
45502
+ var _a;
45502
45503
  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
45503
- var previewCanvas, texture, size, ratio, width, height, data, context, imageData, castData, e_1;
45504
- return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
45505
- switch (_a.label) {
45504
+ var previewCanvas, texture, size, ratio, width, height, engine, data, context, imageData, castData, e_1;
45505
+ return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_b) {
45506
+ switch (_b.label) {
45506
45507
  case 0:
45507
45508
  previewCanvas = this.canvasRef.current;
45508
45509
  texture = this.props.texture;
@@ -45510,12 +45511,18 @@ var TextureLineComponent = /** @class */ (function (_super) {
45510
45511
  ratio = size.width / size.height;
45511
45512
  width = this.props.width;
45512
45513
  height = (width / ratio) | 1;
45513
- _a.label = 1;
45514
+ engine = (_a = this.props.texture.getScene()) === null || _a === void 0 ? void 0 : _a.getEngine();
45515
+ if (engine && height > engine.getCaps().maxTextureSize) {
45516
+ // the texture.width/texture.height ratio is too small, so use the real width/height dimensions of the texture instead of the canvas width/computed height
45517
+ width = this.props.texture.getSize().width;
45518
+ height = this.props.texture.getSize().height;
45519
+ }
45520
+ _b.label = 1;
45514
45521
  case 1:
45515
- _a.trys.push([1, 3, , 4]);
45522
+ _b.trys.push([1, 3, , 4]);
45516
45523
  return [4 /*yield*/, _textureHelper__WEBPACK_IMPORTED_MODULE_3__["TextureHelper"].GetTextureDataAsync(texture, width, height, this.state.face, this.state.channels, this.props.globalState)];
45517
45524
  case 2:
45518
- data = _a.sent();
45525
+ data = _b.sent();
45519
45526
  previewCanvas.width = width;
45520
45527
  previewCanvas.height = height;
45521
45528
  context = previewCanvas.getContext("2d");
@@ -45528,7 +45535,7 @@ var TextureLineComponent = /** @class */ (function (_super) {
45528
45535
  previewCanvas.style.height = height + "px";
45529
45536
  return [3 /*break*/, 4];
45530
45537
  case 3:
45531
- e_1 = _a.sent();
45538
+ e_1 = _b.sent();
45532
45539
  previewCanvas.width = width;
45533
45540
  previewCanvas.height = height;
45534
45541
  previewCanvas.style.height = height + "px";
@@ -59643,7 +59650,11 @@ var ToolsTabComponent = /** @class */ (function (_super) {
59643
59650
  filesInputAnimation.loadFiles(event);
59644
59651
  };
59645
59652
  ToolsTabComponent.prototype.shouldExport = function (node) {
59646
- // No skybox
59653
+ // Exclude disabled
59654
+ if (!node.isEnabled()) {
59655
+ return false;
59656
+ }
59657
+ // Exclude skybox
59647
59658
  if (node instanceof _babylonjs_core_Misc_videoRecorder__WEBPACK_IMPORTED_MODULE_5__["Mesh"]) {
59648
59659
  if (node.material) {
59649
59660
  var material = node.material;