639631c944746a22705af5b06ad78787377e285532c1d604a7b1e16904fbc59b.json 5.8 KB

1
  1. {"ast":null,"code":"import { RegisterClass } from \"../Misc/typeStore.js\";\n/**\n * @experimental\n * Class that represents an integer value.\n */\nexport class FlowGraphInteger {\n constructor(value) {\n this.value = this._toInt(value);\n }\n /**\n * Converts a float to an integer.\n * @param n the float to convert\n * @returns the result of n | 0 - converting it to a int\n */\n _toInt(n) {\n return n | 0;\n }\n /**\n * Adds two integers together.\n * @param other the other integer to add\n * @returns a FlowGraphInteger with the result of the addition\n */\n add(other) {\n return new FlowGraphInteger(this.value + other.value);\n }\n /**\n * Subtracts two integers.\n * @param other the other integer to subtract\n * @returns a FlowGraphInteger with the result of the subtraction\n */\n subtract(other) {\n return new FlowGraphInteger(this.value - other.value);\n }\n /**\n * Multiplies two integers.\n * @param other the other integer to multiply\n * @returns a FlowGraphInteger with the result of the multiplication\n */\n multiply(other) {\n return new FlowGraphInteger(Math.imul(this.value, other.value));\n }\n /**\n * Divides two integers.\n * @param other the other integer to divide\n * @returns a FlowGraphInteger with the result of the division\n */\n divide(other) {\n return new FlowGraphInteger(this.value / other.value);\n }\n /**\n * The class name of this type.\n * @returns\n */\n getClassName() {\n return FlowGraphInteger.ClassName;\n }\n /**\n * Compares two integers for equality.\n * @param other the other integer to compare\n * @returns\n */\n equals(other) {\n return this.value === other.value;\n }\n /**\n * Parses a FlowGraphInteger from a serialization object.\n * @param serializationObject\n * @returns\n */\n static Parse(serializationObject) {\n return new FlowGraphInteger(serializationObject.value);\n }\n}\nFlowGraphInteger.ClassName = \"FlowGraphInteger\";\nRegisterClass(\"FlowGraphInteger\", FlowGraphInteger);","map":{"version":3,"names":["RegisterClass","FlowGraphInteger","constructor","value","_toInt","n","add","other","subtract","multiply","Math","imul","divide","getClassName","ClassName","equals","Parse","serializationObject"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/flowGraphInteger.js"],"sourcesContent":["import { RegisterClass } from \"../Misc/typeStore.js\";\n/**\n * @experimental\n * Class that represents an integer value.\n */\nexport class FlowGraphInteger {\n constructor(value) {\n this.value = this._toInt(value);\n }\n /**\n * Converts a float to an integer.\n * @param n the float to convert\n * @returns the result of n | 0 - converting it to a int\n */\n _toInt(n) {\n return n | 0;\n }\n /**\n * Adds two integers together.\n * @param other the other integer to add\n * @returns a FlowGraphInteger with the result of the addition\n */\n add(other) {\n return new FlowGraphInteger(this.value + other.value);\n }\n /**\n * Subtracts two integers.\n * @param other the other integer to subtract\n * @returns a FlowGraphInteger with the result of the subtraction\n */\n subtract(other) {\n return new FlowGraphInteger(this.value - other.value);\n }\n /**\n * Multiplies two integers.\n * @param other the other integer to multiply\n * @returns a FlowGraphInteger with the result of the multiplication\n */\n multiply(other) {\n return new FlowGraphInteger(Math.imul(this.value, other.value));\n }\n /**\n * Divides two integers.\n * @param other the other integer to divide\n * @returns a FlowGraphInteger with the result of the division\n */\n divide(other) {\n return new FlowGraphInteger(this.value / other.value);\n }\n /**\n * The class name of this type.\n * @returns\n */\n getClassName() {\n return FlowGraphInteger.ClassName;\n }\n /**\n * Compares two integers for equality.\n * @param other the other integer to compare\n * @returns\n */\n equals(other) {\n return this.value === other.value;\n }\n /**\n * Parses a FlowGraphInteger from a serialization object.\n * @param serializationObject\n * @returns\n */\n static Parse(serializationObject) {\n return new FlowGraphInteger(serializationObject.value);\n }\n}\nFlowGraphInteger.ClassName = \"FlowGraphInteger\";\nRegisterClass(\"FlowGraphInteger\", FlowGraphInteger);\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,sBAAsB;AACpD;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAAC;EAC1BC,WAAWA,CAACC,KAAK,EAAE;IACf,IAAI,CAACA,KAAK,GAAG,IAAI,CAACC,MAAM,CAACD,KAAK,CAAC;EACnC;EACA;AACJ;AACA;AACA;AACA;EACIC,MAAMA,CAACC,CAAC,EAAE;IACN,OAAOA,CAAC,GAAG,CAAC;EAChB;EACA;AACJ;AACA;AACA;AACA;EACIC,GAAGA,CAACC,KAAK,EAAE;IACP,OAAO,IAAIN,gBAAgB,CAAC,IAAI,CAACE,KAAK,GAAGI,KAAK,CAACJ,KAAK,CAAC;EACzD;EACA;AACJ;AACA;AACA;AACA;EACIK,QAAQA,CAACD,KAAK,EAAE;IACZ,OAAO,IAAIN,gBAAgB,CAAC,IAAI,CAACE,KAAK,GAAGI,KAAK,CAACJ,KAAK,CAAC;EACzD;EACA;AACJ;AACA;AACA;AACA;EACIM,QAAQA,CAACF,KAAK,EAAE;IACZ,OAAO,IAAIN,gBAAgB,CAACS,IAAI,CAACC,IAAI,CAAC,IAAI,CAACR,KAAK,EAAEI,KAAK,CAACJ,KAAK,CAAC,CAAC;EACnE;EACA;AACJ;AACA;AACA;AACA;EACIS,MAAMA,CAACL,KAAK,EAAE;IACV,OAAO,IAAIN,gBAAgB,CAAC,IAAI,CAACE,KAAK,GAAGI,KAAK,CAACJ,KAAK,CAAC;EACzD;EACA;AACJ;AACA;AACA;EACIU,YAAYA,CAAA,EAAG;IACX,OAAOZ,gBAAgB,CAACa,SAAS;EACrC;EACA;AACJ;AACA;AACA;AACA;EACIC,MAAMA,CAACR,KAAK,EAAE;IACV,OAAO,IAAI,CAACJ,KAAK,KAAKI,KAAK,CAACJ,KAAK;EACrC;EACA;AACJ;AACA;AACA;AACA;EACI,OAAOa,KAAKA,CAACC,mBAAmB,EAAE;IAC9B,OAAO,IAAIhB,gBAAgB,CAACgB,mBAAmB,CAACd,KAAK,CAAC;EAC1D;AACJ;AACAF,gBAAgB,CAACa,SAAS,GAAG,kBAAkB;AAC/Cd,aAAa,CAAC,kBAAkB,EAAEC,gBAAgB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}