@babylonjs/node-editor 5.57.1 → 6.1.0

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.
@@ -53519,6 +53519,7 @@ __webpack_require__.r(__webpack_exports__);
53519
53519
 
53520
53520
 
53521
53521
 
53522
+
53522
53523
 
53523
53524
 
53524
53525
  class BlockTools {
@@ -53659,6 +53660,8 @@ class BlockTools {
53659
53660
  return new core_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__.GradientBlock("Gradient");
53660
53661
  case "FrontFacingBlock":
53661
53662
  return new core_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__.FrontFacingBlock("Front facing");
53663
+ case "MeshAttributeExistsBlock":
53664
+ return new core_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlock("Attribute exists");
53662
53665
  case "CosBlock": {
53663
53666
  const cosBlock = new core_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__.TrigonometryBlock("Cos");
53664
53667
  cosBlock.operation = core_Materials_Node_Blocks_Fragment_discardBlock__WEBPACK_IMPORTED_MODULE_0__.TrigonometryBlockOperations.Cos;
@@ -54420,6 +54423,7 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
54420
54423
  "WorldNormalBlock",
54421
54424
  "WorldTangentBlock",
54422
54425
  "FrontFacingBlock",
54426
+ "MeshAttributeExistsBlock",
54423
54427
  ],
54424
54428
  Noises: ["RandomNumberBlock", "SimplexPerlin3DBlock", "WorleyNoise3DBlock", "CloudBlock", "VoronoiNoiseBlock"],
54425
54429
  Output_Nodes: ["VertexOutputBlock", "FragmentOutputBlock", "DiscardBlock", "ClipPlanesBlock", "FragDepthBlock"],
@@ -54683,6 +54687,7 @@ NodeListComponent._Tooltips = {
54683
54687
  BiPlanarBlock: "A node for reading a texture with biplanar mapping",
54684
54688
  MatrixDeterminantBlock: "Compute the determinant of a matrix",
54685
54689
  MatrixTransposeBlock: "Compute the transpose of a matrix",
54690
+ MeshAttributeExistsBlock: "Falls back to secondary input if specified attribute doesn't exists on the rendered mesh",
54686
54691
  };
54687
54692
 
54688
54693
 
@@ -57411,6 +57416,77 @@ class InputDisplayManager {
57411
57416
  }
57412
57417
 
57413
57418
 
57419
+ /***/ }),
57420
+
57421
+ /***/ "../../../tools/nodeEditor/dist/graphSystem/display/meshAttributeExistsDisplayManager.js":
57422
+ /*!***********************************************************************************************!*\
57423
+ !*** ../../../tools/nodeEditor/dist/graphSystem/display/meshAttributeExistsDisplayManager.js ***!
57424
+ \***********************************************************************************************/
57425
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
57426
+
57427
+ "use strict";
57428
+ __webpack_require__.r(__webpack_exports__);
57429
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
57430
+ /* harmony export */ "MeshAttributeExistsDisplayManager": () => (/* binding */ MeshAttributeExistsDisplayManager)
57431
+ /* harmony export */ });
57432
+ /* harmony import */ var core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Materials/Node/Blocks/meshAttributeExistsBlock */ "core/Misc/dataStorage");
57433
+ /* harmony import */ var core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__);
57434
+
57435
+ /**
57436
+ *
57437
+ */
57438
+ class MeshAttributeExistsDisplayManager {
57439
+ getHeaderClass(nodeData) {
57440
+ return "";
57441
+ }
57442
+ shouldDisplayPortLabels() {
57443
+ return true;
57444
+ }
57445
+ getHeaderText(nodeData) {
57446
+ const block = nodeData.data;
57447
+ let name = block.name;
57448
+ let attributeName;
57449
+ switch (block.attributeType) {
57450
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.VertexColor:
57451
+ attributeName = "Color";
57452
+ break;
57453
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.Normal:
57454
+ attributeName = "Normal";
57455
+ break;
57456
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.Tangent:
57457
+ attributeName = "Tangent";
57458
+ break;
57459
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.UV1:
57460
+ attributeName = "UV";
57461
+ break;
57462
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.UV2:
57463
+ attributeName = "UV2";
57464
+ break;
57465
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.UV3:
57466
+ attributeName = "UV3";
57467
+ break;
57468
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.UV4:
57469
+ attributeName = "UV4";
57470
+ break;
57471
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.UV5:
57472
+ attributeName = "UV5";
57473
+ break;
57474
+ case core_Materials_Node_Blocks_meshAttributeExistsBlock__WEBPACK_IMPORTED_MODULE_0__.MeshAttributeExistsBlockTypes.UV6:
57475
+ attributeName = "UV6";
57476
+ break;
57477
+ }
57478
+ if (attributeName) {
57479
+ name += ` (${attributeName})`;
57480
+ }
57481
+ return name;
57482
+ }
57483
+ getBackgroundColor(nodeData) {
57484
+ return "";
57485
+ }
57486
+ updatePreviewContent() { }
57487
+ }
57488
+
57489
+
57414
57490
  /***/ }),
57415
57491
 
57416
57492
  /***/ "../../../tools/nodeEditor/dist/graphSystem/display/outputDisplayManager.js":
@@ -59359,6 +59435,8 @@ __webpack_require__.r(__webpack_exports__);
59359
59435
  /* harmony import */ var _display_imageSourceDisplayManager__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./display/imageSourceDisplayManager */ "../../../tools/nodeEditor/dist/graphSystem/display/imageSourceDisplayManager.js");
59360
59436
  /* harmony import */ var _display_elbowDisplayManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./display/elbowDisplayManager */ "../../../tools/nodeEditor/dist/graphSystem/display/elbowDisplayManager.js");
59361
59437
  /* harmony import */ var shared_ui_components_nodeGraphSystem_displayLedger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/displayLedger */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/displayLedger.js");
59438
+ /* harmony import */ var _display_meshAttributeExistsDisplayManager__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./display/meshAttributeExistsDisplayManager */ "../../../tools/nodeEditor/dist/graphSystem/display/meshAttributeExistsDisplayManager.js");
59439
+
59362
59440
 
59363
59441
 
59364
59442
 
@@ -59397,6 +59475,7 @@ const RegisterToDisplayManagers = () => {
59397
59475
  shared_ui_components_nodeGraphSystem_displayLedger__WEBPACK_IMPORTED_MODULE_12__.DisplayLedger.RegisteredControls.SubSurfaceBlock = _display_pbrDisplayManager__WEBPACK_IMPORTED_MODULE_8__.PBRDisplayManager;
59398
59476
  shared_ui_components_nodeGraphSystem_displayLedger__WEBPACK_IMPORTED_MODULE_12__.DisplayLedger.RegisteredControls.ImageSourceBlock = _display_imageSourceDisplayManager__WEBPACK_IMPORTED_MODULE_10__.ImageSourceDisplayManager;
59399
59477
  shared_ui_components_nodeGraphSystem_displayLedger__WEBPACK_IMPORTED_MODULE_12__.DisplayLedger.RegisteredControls.ElbowBlock = _display_elbowDisplayManager__WEBPACK_IMPORTED_MODULE_11__.ElbowDisplayManager;
59478
+ shared_ui_components_nodeGraphSystem_displayLedger__WEBPACK_IMPORTED_MODULE_12__.DisplayLedger.RegisteredControls.MeshAttributeExistsBlock = _display_meshAttributeExistsDisplayManager__WEBPACK_IMPORTED_MODULE_13__.MeshAttributeExistsDisplayManager;
59400
59479
  };
59401
59480
 
59402
59481