a6eeaa0a8cea483ce041de28e7168b2d80ff799da63b304847a9eeb110f768fd.json 4.5 KB

1
  1. {"ast":null,"code":"import { NodeMaterialBlock } from \"../nodeMaterialBlock.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * Block used to compute the determinant of a matrix\n */\nexport class MatrixDeterminantBlock extends NodeMaterialBlock {\n /**\n * Creates a new MatrixDeterminantBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n this.registerInput(\"input\", NodeMaterialBlockConnectionPointTypes.Matrix);\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.Float);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"MatrixDeterminantBlock\";\n }\n /**\n * Gets the input matrix\n */\n get input() {\n return this._inputs[0];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const output = this.output;\n const input = this.input;\n state.compilationString += state._declareOutput(output) + ` = determinant(${input.associatedVariableName});\\n`;\n return this;\n }\n}\nRegisterClass(\"BABYLON.MatrixDeterminantBlock\", MatrixDeterminantBlock);","map":{"version":3,"names":["NodeMaterialBlock","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","RegisterClass","MatrixDeterminantBlock","constructor","name","Neutral","registerInput","Matrix","registerOutput","Float","getClassName","input","_inputs","output","_outputs","_buildBlock","state","compilationString","_declareOutput","associatedVariableName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/matrixDeterminantBlock.js"],"sourcesContent":["import { NodeMaterialBlock } from \"../nodeMaterialBlock.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * Block used to compute the determinant of a matrix\n */\nexport class MatrixDeterminantBlock extends NodeMaterialBlock {\n /**\n * Creates a new MatrixDeterminantBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n this.registerInput(\"input\", NodeMaterialBlockConnectionPointTypes.Matrix);\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.Float);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"MatrixDeterminantBlock\";\n }\n /**\n * Gets the input matrix\n */\n get input() {\n return this._inputs[0];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const output = this.output;\n const input = this.input;\n state.compilationString += state._declareOutput(output) + ` = determinant(${input.associatedVariableName});\\n`;\n return this;\n }\n}\nRegisterClass(\"BABYLON.MatrixDeterminantBlock\", MatrixDeterminantBlock);\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,qCAAqC,QAAQ,mDAAmD;AACzG,SAASC,wBAAwB,QAAQ,sCAAsC;AAC/E,SAASC,aAAa,QAAQ,4BAA4B;AAC1D;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASJ,iBAAiB,CAAC;EAC1D;AACJ;AACA;AACA;EACIK,WAAWA,CAACC,IAAI,EAAE;IACd,KAAK,CAACA,IAAI,EAAEJ,wBAAwB,CAACK,OAAO,CAAC;IAC7C,IAAI,CAACC,aAAa,CAAC,OAAO,EAAEP,qCAAqC,CAACQ,MAAM,CAAC;IACzE,IAAI,CAACC,cAAc,CAAC,QAAQ,EAAET,qCAAqC,CAACU,KAAK,CAAC;EAC9E;EACA;AACJ;AACA;AACA;EACIC,YAAYA,CAAA,EAAG;IACX,OAAO,wBAAwB;EACnC;EACA;AACJ;AACA;EACI,IAAIC,KAAKA,CAAA,EAAG;IACR,OAAO,IAAI,CAACC,OAAO,CAAC,CAAC,CAAC;EAC1B;EACA;AACJ;AACA;EACI,IAAIC,MAAMA,CAAA,EAAG;IACT,OAAO,IAAI,CAACC,QAAQ,CAAC,CAAC,CAAC;EAC3B;EACAC,WAAWA,CAACC,KAAK,EAAE;IACf,KAAK,CAACD,WAAW,CAACC,KAAK,CAAC;IACxB,MAAMH,MAAM,GAAG,IAAI,CAACA,MAAM;IAC1B,MAAMF,KAAK,GAAG,IAAI,CAACA,KAAK;IACxBK,KAAK,CAACC,iBAAiB,IAAID,KAAK,CAACE,cAAc,CAACL,MAAM,CAAC,GAAG,kBAAkBF,KAAK,CAACQ,sBAAsB,MAAM;IAC9G,OAAO,IAAI;EACf;AACJ;AACAlB,aAAa,CAAC,gCAAgC,EAAEC,sBAAsB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}