1 |
- {"ast":null,"code":"/**\n * Enum defining the type of properties that can be edited in the property pages in the node editor\n */\nexport var PropertyTypeForEdition;\n(function (PropertyTypeForEdition) {\n /** property is a boolean */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Boolean\"] = 0] = \"Boolean\";\n /** property is a float */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Float\"] = 1] = \"Float\";\n /** property is a int */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Int\"] = 2] = \"Int\";\n /** property is a Vector2 */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Vector2\"] = 3] = \"Vector2\";\n /** property is a list of values */\n PropertyTypeForEdition[PropertyTypeForEdition[\"List\"] = 4] = \"List\";\n /** property is a Color4 */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Color4\"] = 5] = \"Color4\";\n /** property (int) should be edited as a combo box with a list of sampling modes */\n PropertyTypeForEdition[PropertyTypeForEdition[\"SamplingMode\"] = 6] = \"SamplingMode\";\n /** property (int) should be edited as a combo box with a list of texture formats */\n PropertyTypeForEdition[PropertyTypeForEdition[\"TextureFormat\"] = 7] = \"TextureFormat\";\n /** property (int) should be edited as a combo box with a list of texture types */\n PropertyTypeForEdition[PropertyTypeForEdition[\"TextureType\"] = 8] = \"TextureType\";\n})(PropertyTypeForEdition || (PropertyTypeForEdition = {}));\n/**\n * Decorator that flags a property in a node block as being editable\n * @param displayName the display name of the property\n * @param propertyType the type of the property\n * @param groupName the group name of the property\n * @param options the options of the property\n * @returns the decorator\n */\nexport function editableInPropertyPage(displayName, propertyType = 0 /* PropertyTypeForEdition.Boolean */, groupName = \"PROPERTIES\", options) {\n return (target, propertyKey) => {\n let propStore = target._propStore;\n if (!propStore) {\n propStore = [];\n target._propStore = propStore;\n }\n propStore.push({\n propertyName: propertyKey,\n displayName: displayName,\n type: propertyType,\n groupName: groupName,\n options: options !== null && options !== void 0 ? options : {},\n className: target.constructor.name\n });\n };\n}","map":{"version":3,"names":["PropertyTypeForEdition","editableInPropertyPage","displayName","propertyType","groupName","options","target","propertyKey","propStore","_propStore","push","propertyName","type","className","constructor","name"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Decorators/nodeDecorator.js"],"sourcesContent":["/**\n * Enum defining the type of properties that can be edited in the property pages in the node editor\n */\nexport var PropertyTypeForEdition;\n(function (PropertyTypeForEdition) {\n /** property is a boolean */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Boolean\"] = 0] = \"Boolean\";\n /** property is a float */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Float\"] = 1] = \"Float\";\n /** property is a int */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Int\"] = 2] = \"Int\";\n /** property is a Vector2 */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Vector2\"] = 3] = \"Vector2\";\n /** property is a list of values */\n PropertyTypeForEdition[PropertyTypeForEdition[\"List\"] = 4] = \"List\";\n /** property is a Color4 */\n PropertyTypeForEdition[PropertyTypeForEdition[\"Color4\"] = 5] = \"Color4\";\n /** property (int) should be edited as a combo box with a list of sampling modes */\n PropertyTypeForEdition[PropertyTypeForEdition[\"SamplingMode\"] = 6] = \"SamplingMode\";\n /** property (int) should be edited as a combo box with a list of texture formats */\n PropertyTypeForEdition[PropertyTypeForEdition[\"TextureFormat\"] = 7] = \"TextureFormat\";\n /** property (int) should be edited as a combo box with a list of texture types */\n PropertyTypeForEdition[PropertyTypeForEdition[\"TextureType\"] = 8] = \"TextureType\";\n})(PropertyTypeForEdition || (PropertyTypeForEdition = {}));\n/**\n * Decorator that flags a property in a node block as being editable\n * @param displayName the display name of the property\n * @param propertyType the type of the property\n * @param groupName the group name of the property\n * @param options the options of the property\n * @returns the decorator\n */\nexport function editableInPropertyPage(displayName, propertyType = 0 /* PropertyTypeForEdition.Boolean */, groupName = \"PROPERTIES\", options) {\n return (target, propertyKey) => {\n let propStore = target._propStore;\n if (!propStore) {\n propStore = [];\n target._propStore = propStore;\n }\n propStore.push({\n propertyName: propertyKey,\n displayName: displayName,\n type: propertyType,\n groupName: groupName,\n options: options ?? {},\n className: target.constructor.name,\n });\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,IAAIA,sBAAsB;AACjC,CAAC,UAAUA,sBAAsB,EAAE;EAC/B;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;EACzE;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;EACrE;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK;EACjE;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;EACzE;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM;EACnE;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ;EACvE;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc;EACnF;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe;EACrF;EACAA,sBAAsB,CAACA,sBAAsB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa;AACrF,CAAC,EAAEA,sBAAsB,KAAKA,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAACC,WAAW,EAAEC,YAAY,GAAG,CAAC,CAAC,sCAAsCC,SAAS,GAAG,YAAY,EAAEC,OAAO,EAAE;EAC1I,OAAO,CAACC,MAAM,EAAEC,WAAW,KAAK;IAC5B,IAAIC,SAAS,GAAGF,MAAM,CAACG,UAAU;IACjC,I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