abfc8353a05fa015c2fab5290d11d580bd4b81b2910f34e1dba489659aa62635.json 8.5 KB

1
  1. {"ast":null,"code":"/**\n * Enum used to define the mode for an animation group mask\n */\nexport var AnimationGroupMaskMode;\n(function (AnimationGroupMaskMode) {\n /**\n * The mask defines the animatable target names that should be included\n */\n AnimationGroupMaskMode[AnimationGroupMaskMode[\"Include\"] = 0] = \"Include\";\n /**\n * The mask defines the animatable target names in a \"exclude\" mode: all animatable targets will be animated except the ones defined in the mask\n */\n AnimationGroupMaskMode[AnimationGroupMaskMode[\"Exclude\"] = 1] = \"Exclude\";\n})(AnimationGroupMaskMode || (AnimationGroupMaskMode = {}));\n/**\n * Defines a mask used to filter animation targets.\n * If you apply a mask to an animation group (see the AnimationGroup.mask property), only the animations whose target names match the mask will play.\n * Note that a target is defined by its name (string). This means that the same mask can be used for several animation groups, provided that their targets are named in the same way.\n */\nexport class AnimationGroupMask {\n /**\n * Creates a new mask\n * @param names The list of target names to add to the mask (optional)\n * @param mode Defines the mode for the mask (default: AnimationGroupMaskMode.Include)\n */\n constructor(names,\n /**\n * [0] Defines the mode for the mask\n */\n mode = 0 /* AnimationGroupMaskMode.Include */) {\n this.mode = mode;\n /**\n * Gets or sets a boolean indicating if the mask is disabled (default is false)\n */\n this.disabled = false;\n this._targetNames = new Set();\n if (names) {\n this.addTargetName(names);\n }\n }\n /**\n * Adds one or several target names to the mask\n * @param name The name(s) to add to the mask\n */\n addTargetName(name) {\n if (Array.isArray(name)) {\n for (const n of name) {\n this._targetNames.add(n);\n }\n return;\n }\n this._targetNames.add(name);\n }\n /**\n * Removes one or several target names from the mask\n * @param name The name(s) to remove from the mask\n */\n removeTargetName(name) {\n if (Array.isArray(name)) {\n for (const n of name) {\n this._targetNames.delete(n);\n }\n return;\n }\n this._targetNames.delete(name);\n }\n /**\n * Checks if the mask includes a target name.\n * This method is intended to know if a given target name is included in the mask, not if the name is actually retained by the mask (see retainsTarget() instead).\n * @param name The name to check with the mask\n * @returns True if the mask includes the name, false otherwise\n */\n hasTarget(name) {\n return this._targetNames.has(name);\n }\n /**\n * Checks if the mask retains a target name.\n * Note that in the \"Exclude\" mode, this will return false if the mask includes the name, and true otherwise!\n * This method is intended to know if a given target name is retained by the mask, not if the name is in the list of target names.\n * @param name The name to check with the mask\n * @returns True if the mask retains the name, false otherwise\n */\n retainsTarget(name) {\n return this._targetNames.has(name) === (this.mode === 0 /* AnimationGroupMaskMode.Include */);\n }\n}","map":{"version":3,"names":["AnimationGroupMaskMode","AnimationGroupMask","constructor","names","mode","disabled","_targetNames","Set","addTargetName","name","Array","isArray","n","add","removeTargetName","delete","hasTarget","has","retainsTarget"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Animations/animationGroupMask.js"],"sourcesContent":["/**\n * Enum used to define the mode for an animation group mask\n */\nexport var AnimationGroupMaskMode;\n(function (AnimationGroupMaskMode) {\n /**\n * The mask defines the animatable target names that should be included\n */\n AnimationGroupMaskMode[AnimationGroupMaskMode[\"Include\"] = 0] = \"Include\";\n /**\n * The mask defines the animatable target names in a \"exclude\" mode: all animatable targets will be animated except the ones defined in the mask\n */\n AnimationGroupMaskMode[AnimationGroupMaskMode[\"Exclude\"] = 1] = \"Exclude\";\n})(AnimationGroupMaskMode || (AnimationGroupMaskMode = {}));\n/**\n * Defines a mask used to filter animation targets.\n * If you apply a mask to an animation group (see the AnimationGroup.mask property), only the animations whose target names match the mask will play.\n * Note that a target is defined by its name (string). This means that the same mask can be used for several animation groups, provided that their targets are named in the same way.\n */\nexport class AnimationGroupMask {\n /**\n * Creates a new mask\n * @param names The list of target names to add to the mask (optional)\n * @param mode Defines the mode for the mask (default: AnimationGroupMaskMode.Include)\n */\n constructor(names, \n /**\n * [0] Defines the mode for the mask\n */\n mode = 0 /* AnimationGroupMaskMode.Include */) {\n this.mode = mode;\n /**\n * Gets or sets a boolean indicating if the mask is disabled (default is false)\n */\n this.disabled = false;\n this._targetNames = new Set();\n if (names) {\n this.addTargetName(names);\n }\n }\n /**\n * Adds one or several target names to the mask\n * @param name The name(s) to add to the mask\n */\n addTargetName(name) {\n if (Array.isArray(name)) {\n for (const n of name) {\n this._targetNames.add(n);\n }\n return;\n }\n this._targetNames.add(name);\n }\n /**\n * Removes one or several target names from the mask\n * @param name The name(s) to remove from the mask\n */\n removeTargetName(name) {\n if (Array.isArray(name)) {\n for (const n of name) {\n this._targetNames.delete(n);\n }\n return;\n }\n this._targetNames.delete(name);\n }\n /**\n * Checks if the mask includes a target name.\n * This method is intended to know if a given target name is included in the mask, not if the name is actually retained by the mask (see retainsTarget() instead).\n * @param name The name to check with the mask\n * @returns True if the mask includes the name, false otherwise\n */\n hasTarget(name) {\n return this._targetNames.has(name);\n }\n /**\n * Checks if the mask retains a target name.\n * Note that in the \"Exclude\" mode, this will return false if the mask includes the name, and true otherwise!\n * This method is intended to know if a given target name is retained by the mask, not if the name is in the list of target names.\n * @param name The name to check with the mask\n * @returns True if the mask retains the name, false otherwise\n */\n retainsTarget(name) {\n return this._targetNames.has(name) === (this.mode === 0 /* AnimationGroupMaskMode.Include */);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,IAAIA,sBAAsB;AACjC,CAAC,UAAUA,sBAAsB,EAAE;EAC/B;AACJ;AACA;EACIA,sBAAsB,CAACA,sBAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;EACzE;AACJ;AACA;EACIA,sBAAsB,CAACA,sBAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;AAC7E,CAAC,EAAEA,sBAAsB,KAAKA,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,CAAC;EAC5B;AACJ;AACA;AACA;AACA;EACIC,WAAWA,CAACC,KAAK;EACjB;AACJ;AACA;EACIC,IAAI,GAAG,CAAC,CAAC,sCAAsC;IAC3C,IAAI,CAACA,IAAI,GAAGA,IAAI;IAChB;AACR;AACA;IACQ,IAAI,CAACC,QAAQ,GAAG,KAAK;IACrB,IAAI,CAACC,YAAY,GAAG,IAAIC,GAAG,CAAC,CAAC;IAC7B,IAAIJ,KAAK,EAAE;MACP,IAAI,CAACK,aAAa,CAACL,KAAK,CAAC;IAC7B;EACJ;EACA;AACJ;AACA;AACA;EACIK,aAAaA,CAACC,IAAI,EAAE;IAChB,IAAIC,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,EAAE;MACrB,KAAK,MAAMG,CAAC,IAAIH,IAAI,EAAE;QAClB,IAAI,CAACH,YAAY,CAACO,GAAG,CAACD,CAAC,CAAC;MAC5B;MACA;IACJ;IACA,IAAI,CAACN,YAAY,CAACO,GAAG,CAACJ,IAAI,CAAC;EAC/B;EACA;AACJ;AACA;AACA;EACIK,gBAAgBA,CAACL,IAAI,EAAE;IACnB,IAAIC,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,EAAE;MACrB,KAAK,MAAMG,CAAC,IAAIH,IAAI,EAAE;QAClB,IAAI,CAACH,YAAY,CAACS,MAAM,CAACH,CAAC,CAAC;MAC/B;MACA;IACJ;IACA,IAAI,CAACN,YAAY,CAACS,MAAM,CAACN,IAAI,CAAC;EAClC;EACA;AACJ;AACA;AACA;AACA;AACA;EACIO,SAASA,CAACP,IAAI,EAAE;IACZ,OAAO,IAAI,CAACH,YAAY,CAACW,GAAG,CAACR,IAAI,CAAC;EACtC;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;EACIS,aAAaA,CAACT,IAAI,EAAE;IAChB,OAAO,IAAI,CAACH,YAAY,CAACW,GAAG,CAACR,IAAI,CAAC,MAAM,IAAI,CAACL,IAAI,KAAK,CAAC,CAAC,qCAAqC;EACjG;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}