{"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 create a Vector2/3/4 out of individual inputs (one for each component)\n */\nexport class VectorMergerBlock extends NodeMaterialBlock {\n /**\n * Create a new VectorMergerBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n /**\n * Gets or sets the swizzle for x (meaning which component to affect to the output.x)\n */\n this.xSwizzle = \"x\";\n /**\n * Gets or sets the swizzle for y (meaning which component to affect to the output.y)\n */\n this.ySwizzle = \"y\";\n /**\n * Gets or sets the swizzle for z (meaning which component to affect to the output.z)\n */\n this.zSwizzle = \"z\";\n /**\n * Gets or sets the swizzle for w (meaning which component to affect to the output.w)\n */\n this.wSwizzle = \"w\";\n this.registerInput(\"xyzw \", NodeMaterialBlockConnectionPointTypes.Vector4, true);\n this.registerInput(\"xyz \", NodeMaterialBlockConnectionPointTypes.Vector3, true);\n this.registerInput(\"xy \", NodeMaterialBlockConnectionPointTypes.Vector2, true);\n this.registerInput(\"zw \", NodeMaterialBlockConnectionPointTypes.Vector2, true);\n this.registerInput(\"x\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"y\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"z\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"w\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerOutput(\"xyzw\", NodeMaterialBlockConnectionPointTypes.Vector4);\n this.registerOutput(\"xyz\", NodeMaterialBlockConnectionPointTypes.Vector3);\n this.registerOutput(\"xy\", NodeMaterialBlockConnectionPointTypes.Vector2);\n this.registerOutput(\"zw\", NodeMaterialBlockConnectionPointTypes.Vector2);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"VectorMergerBlock\";\n }\n /**\n * Gets the xyzw component (input)\n */\n get xyzwIn() {\n return this._inputs[0];\n }\n /**\n * Gets the xyz component (input)\n */\n get xyzIn() {\n return this._inputs[1];\n }\n /**\n * Gets the xy component (input)\n */\n get xyIn() {\n return this._inputs[2];\n }\n /**\n * Gets the zw component (input)\n */\n get zwIn() {\n return this._inputs[3];\n }\n /**\n * Gets the x component (input)\n */\n get x() {\n return this._inputs[4];\n }\n /**\n * Gets the y component (input)\n */\n get y() {\n return this._inputs[5];\n }\n /**\n * Gets the z component (input)\n */\n get z() {\n return this._inputs[6];\n }\n /**\n * Gets the w component (input)\n */\n get w() {\n return this._inputs[7];\n }\n /**\n * Gets the xyzw component (output)\n */\n get xyzw() {\n return this._outputs[0];\n }\n /**\n * Gets the xyz component (output)\n */\n get xyzOut() {\n return this._outputs[1];\n }\n /**\n * Gets the xy component (output)\n */\n get xyOut() {\n return this._outputs[2];\n }\n /**\n * Gets the zw component (output)\n */\n get zwOut() {\n return this._outputs[3];\n }\n /**\n * Gets the xy component (output)\n * @deprecated Please use xyOut instead.\n */\n get xy() {\n return this.xyOut;\n }\n /**\n * Gets the xyz component (output)\n * @deprecated Please use xyzOut instead.\n */\n get xyz() {\n return this.xyzOut;\n }\n _inputRename(name) {\n if (name === \"xyzw \") {\n return \"xyzwIn\";\n }\n if (name === \"xyz \") {\n return \"xyzIn\";\n }\n if (name === \"xy \") {\n return \"xyIn\";\n }\n if (name === \"zw \") {\n return \"zwIn\";\n }\n return name;\n }\n _buildSwizzle(len) {\n const swizzle = this.xSwizzle + this.ySwizzle + this.zSwizzle + this.wSwizzle;\n return \".\" + swizzle.substring(0, len);\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const xInput = this.x;\n const yInput = this.y;\n const zInput = this.z;\n const wInput = this.w;\n const xyInput = this.xyIn;\n const zwInput = this.zwIn;\n const xyzInput = this.xyzIn;\n const xyzwInput = this.xyzwIn;\n const v4Output = this._outputs[0];\n const v3Output = this._outputs[1];\n const v2Output = this._outputs[2];\n const v2CompOutput = this._outputs[3];\n const vec4 = state._getShaderType(NodeMaterialBlockConnectionPointTypes.Vector4);\n const vec3 = state._getShaderType(NodeMaterialBlockConnectionPointTypes.Vector3);\n const vec2 = state._getShaderType(NodeMaterialBlockConnectionPointTypes.Vector2);\n if (xyzwInput.isConnected) {\n if (v4Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v4Output) + ` = ${xyzwInput.associatedVariableName}${this._buildSwizzle(4)};\\n`;\n }\n if (v3Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v3Output) + ` = ${xyzwInput.associatedVariableName}${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v2Output) + ` = ${xyzwInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n } else if (xyzInput.isConnected) {\n if (v4Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v4Output) + ` = ${vec4}(${xyzInput.associatedVariableName}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(4)};\\n`;\n }\n if (v3Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v3Output) + ` = ${xyzInput.associatedVariableName}${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v2Output) + ` = ${xyzInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n } else if (xyInput.isConnected) {\n if (v4Output.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString += state._declareOutput(v4Output) + ` = ${vec4}(${xyInput.associatedVariableName}, ${zwInput.associatedVariableName})${this._buildSwizzle(4)};\\n`;\n } else {\n state.compilationString += state._declareOutput(v4Output) + ` = ${vec4}(${xyInput.associatedVariableName}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(4)};\\n`;\n }\n }\n if (v3Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v3Output) + ` = ${vec3}(${xyInput.associatedVariableName}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"})${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v2Output) + ` = ${xyInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n if (v2CompOutput.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString += state._declareOutput(v2CompOutput) + ` = ${zwInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n } else {\n state.compilationString += state._declareOutput(v2CompOutput) + ` = ${vec2}(${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(2)};\\n`;\n }\n }\n } else {\n if (v4Output.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString += state._declareOutput(v4Output) + ` = ${vec4}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"}, ${zwInput.associatedVariableName})${this._buildSwizzle(4)};\\n`;\n } else {\n state.compilationString += state._declareOutput(v4Output) + ` = ${vec4}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(4)};\\n`;\n }\n }\n if (v3Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v3Output) + ` = ${vec3}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"})${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v2Output) + ` = ${vec2}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"})${this._buildSwizzle(2)};\\n`;\n }\n if (v2CompOutput.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString += state._declareOutput(v2CompOutput) + ` = ${zwInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n } else {\n state.compilationString += state._declareOutput(v2CompOutput) + ` = ${vec2}(${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(2)};\\n`;\n }\n }\n }\n return this;\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.xSwizzle = this.xSwizzle;\n serializationObject.ySwizzle = this.ySwizzle;\n serializationObject.zSwizzle = this.zSwizzle;\n serializationObject.wSwizzle = this.wSwizzle;\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n var _serializationObject$, _serializationObject$2, _serializationObject$3, _serializationObject$4;\n super._deserialize(serializationObject, scene, rootUrl);\n this.xSwizzle = (_serializationObject$ = serializationObject.xSwizzle) !== null && _serializationObject$ !== void 0 ? _serializationObject$ : \"x\";\n this.ySwizzle = (_serializationObject$2 = serializationObject.ySwizzle) !== null && _serializationObject$2 !== void 0 ? _serializationObject$2 : \"y\";\n this.zSwizzle = (_serializationObject$3 = serializationObject.zSwizzle) !== null && _serializationObject$3 !== void 0 ? _serializationObject$3 : \"z\";\n this.wSwizzle = (_serializationObject$4 = serializationObject.wSwizzle) !== null && _serializationObject$4 !== void 0 ? _serializationObject$4 : \"w\";\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n codeString += `${this._codeVariableName}.xSwizzle = \"${this.xSwizzle}\";\\n`;\n codeString += `${this._codeVariableName}.ySwizzle = \"${this.ySwizzle}\";\\n`;\n codeString += `${this._codeVariableName}.zSwizzle = \"${this.zSwizzle}\";\\n`;\n codeString += `${this._codeVariableName}.wSwizzle = \"${this.wSwizzle}\";\\n`;\n return codeString;\n }\n}\nRegisterClass(\"BABYLON.VectorMergerBlock\", VectorMergerBlock);","map":{"version":3,"names":["NodeMaterialBlock","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","RegisterClass","VectorMergerBlock","constructor","name","Neutral","xSwizzle","ySwizzle","zSwizzle","wSwizzle","registerInput","Vector4","Vector3","Vector2","Float","registerOutput","getClassName","xyzwIn","_inputs","xyzIn","xyIn","zwIn","x","y","z","w","xyzw","_outputs","xyzOut","xyOut","zwOut","xy","xyz","_inputRename","_buildSwizzle","len","swizzle","substring","_buildBlock","state","xInput","yInput","zInput","wInput","xyInput","zwInput","xyzInput","xyzwInput","v4Output","v3Output","v2Output","v2CompOutput","vec4","_getShaderType","vec3","vec2","isConnected","hasEndpoints","compilationString","_declareOutput","associatedVariableName","_writeVariable","serialize","serializationObject","_deserialize","scene","rootUrl","_serializationObject$","_serializationObject$2","_serializationObject$3","_serializationObject$4","_dumpPropertiesCode","codeString","_codeVariableName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/vectorMergerBlock.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 create a Vector2/3/4 out of individual inputs (one for each component)\n */\nexport class VectorMergerBlock extends NodeMaterialBlock {\n /**\n * Create a new VectorMergerBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n /**\n * Gets or sets the swizzle for x (meaning which component to affect to the output.x)\n */\n this.xSwizzle = \"x\";\n /**\n * Gets or sets the swizzle for y (meaning which component to affect to the output.y)\n */\n this.ySwizzle = \"y\";\n /**\n * Gets or sets the swizzle for z (meaning which component to affect to the output.z)\n */\n this.zSwizzle = \"z\";\n /**\n * Gets or sets the swizzle for w (meaning which component to affect to the output.w)\n */\n this.wSwizzle = \"w\";\n this.registerInput(\"xyzw \", NodeMaterialBlockConnectionPointTypes.Vector4, true);\n this.registerInput(\"xyz \", NodeMaterialBlockConnectionPointTypes.Vector3, true);\n this.registerInput(\"xy \", NodeMaterialBlockConnectionPointTypes.Vector2, true);\n this.registerInput(\"zw \", NodeMaterialBlockConnectionPointTypes.Vector2, true);\n this.registerInput(\"x\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"y\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"z\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"w\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerOutput(\"xyzw\", NodeMaterialBlockConnectionPointTypes.Vector4);\n this.registerOutput(\"xyz\", NodeMaterialBlockConnectionPointTypes.Vector3);\n this.registerOutput(\"xy\", NodeMaterialBlockConnectionPointTypes.Vector2);\n this.registerOutput(\"zw\", NodeMaterialBlockConnectionPointTypes.Vector2);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"VectorMergerBlock\";\n }\n /**\n * Gets the xyzw component (input)\n */\n get xyzwIn() {\n return this._inputs[0];\n }\n /**\n * Gets the xyz component (input)\n */\n get xyzIn() {\n return this._inputs[1];\n }\n /**\n * Gets the xy component (input)\n */\n get xyIn() {\n return this._inputs[2];\n }\n /**\n * Gets the zw component (input)\n */\n get zwIn() {\n return this._inputs[3];\n }\n /**\n * Gets the x component (input)\n */\n get x() {\n return this._inputs[4];\n }\n /**\n * Gets the y component (input)\n */\n get y() {\n return this._inputs[5];\n }\n /**\n * Gets the z component (input)\n */\n get z() {\n return this._inputs[6];\n }\n /**\n * Gets the w component (input)\n */\n get w() {\n return this._inputs[7];\n }\n /**\n * Gets the xyzw component (output)\n */\n get xyzw() {\n return this._outputs[0];\n }\n /**\n * Gets the xyz component (output)\n */\n get xyzOut() {\n return this._outputs[1];\n }\n /**\n * Gets the xy component (output)\n */\n get xyOut() {\n return this._outputs[2];\n }\n /**\n * Gets the zw component (output)\n */\n get zwOut() {\n return this._outputs[3];\n }\n /**\n * Gets the xy component (output)\n * @deprecated Please use xyOut instead.\n */\n get xy() {\n return this.xyOut;\n }\n /**\n * Gets the xyz component (output)\n * @deprecated Please use xyzOut instead.\n */\n get xyz() {\n return this.xyzOut;\n }\n _inputRename(name) {\n if (name === \"xyzw \") {\n return \"xyzwIn\";\n }\n if (name === \"xyz \") {\n return \"xyzIn\";\n }\n if (name === \"xy \") {\n return \"xyIn\";\n }\n if (name === \"zw \") {\n return \"zwIn\";\n }\n return name;\n }\n _buildSwizzle(len) {\n const swizzle = this.xSwizzle + this.ySwizzle + this.zSwizzle + this.wSwizzle;\n return \".\" + swizzle.substring(0, len);\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const xInput = this.x;\n const yInput = this.y;\n const zInput = this.z;\n const wInput = this.w;\n const xyInput = this.xyIn;\n const zwInput = this.zwIn;\n const xyzInput = this.xyzIn;\n const xyzwInput = this.xyzwIn;\n const v4Output = this._outputs[0];\n const v3Output = this._outputs[1];\n const v2Output = this._outputs[2];\n const v2CompOutput = this._outputs[3];\n const vec4 = state._getShaderType(NodeMaterialBlockConnectionPointTypes.Vector4);\n const vec3 = state._getShaderType(NodeMaterialBlockConnectionPointTypes.Vector3);\n const vec2 = state._getShaderType(NodeMaterialBlockConnectionPointTypes.Vector2);\n if (xyzwInput.isConnected) {\n if (v4Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v4Output) + ` = ${xyzwInput.associatedVariableName}${this._buildSwizzle(4)};\\n`;\n }\n if (v3Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v3Output) + ` = ${xyzwInput.associatedVariableName}${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v2Output) + ` = ${xyzwInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n }\n else if (xyzInput.isConnected) {\n if (v4Output.hasEndpoints) {\n state.compilationString +=\n state._declareOutput(v4Output) +\n ` = ${vec4}(${xyzInput.associatedVariableName}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(4)};\\n`;\n }\n if (v3Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v3Output) + ` = ${xyzInput.associatedVariableName}${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v2Output) + ` = ${xyzInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n }\n else if (xyInput.isConnected) {\n if (v4Output.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString +=\n state._declareOutput(v4Output) + ` = ${vec4}(${xyInput.associatedVariableName}, ${zwInput.associatedVariableName})${this._buildSwizzle(4)};\\n`;\n }\n else {\n state.compilationString +=\n state._declareOutput(v4Output) +\n ` = ${vec4}(${xyInput.associatedVariableName}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(4)};\\n`;\n }\n }\n if (v3Output.hasEndpoints) {\n state.compilationString +=\n state._declareOutput(v3Output) +\n ` = ${vec3}(${xyInput.associatedVariableName}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"})${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString += state._declareOutput(v2Output) + ` = ${xyInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n if (v2CompOutput.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString += state._declareOutput(v2CompOutput) + ` = ${zwInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n else {\n state.compilationString +=\n state._declareOutput(v2CompOutput) +\n ` = ${vec2}(${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(2)};\\n`;\n }\n }\n }\n else {\n if (v4Output.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString +=\n state._declareOutput(v4Output) +\n ` = ${vec4}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"}, ${zwInput.associatedVariableName})${this._buildSwizzle(4)};\\n`;\n }\n else {\n state.compilationString +=\n state._declareOutput(v4Output) +\n ` = ${vec4}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(4)};\\n`;\n }\n }\n if (v3Output.hasEndpoints) {\n state.compilationString +=\n state._declareOutput(v3Output) +\n ` = ${vec3}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"}, ${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"})${this._buildSwizzle(3)};\\n`;\n }\n if (v2Output.hasEndpoints) {\n state.compilationString +=\n state._declareOutput(v2Output) +\n ` = ${vec2}(${xInput.isConnected ? this._writeVariable(xInput) : \"0.0\"}, ${yInput.isConnected ? this._writeVariable(yInput) : \"0.0\"})${this._buildSwizzle(2)};\\n`;\n }\n if (v2CompOutput.hasEndpoints) {\n if (zwInput.isConnected) {\n state.compilationString += state._declareOutput(v2CompOutput) + ` = ${zwInput.associatedVariableName}${this._buildSwizzle(2)};\\n`;\n }\n else {\n state.compilationString +=\n state._declareOutput(v2CompOutput) +\n ` = ${vec2}(${zInput.isConnected ? this._writeVariable(zInput) : \"0.0\"}, ${wInput.isConnected ? this._writeVariable(wInput) : \"0.0\"})${this._buildSwizzle(2)};\\n`;\n }\n }\n }\n return this;\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.xSwizzle = this.xSwizzle;\n serializationObject.ySwizzle = this.ySwizzle;\n serializationObject.zSwizzle = this.zSwizzle;\n serializationObject.wSwizzle = this.wSwizzle;\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n super._deserialize(serializationObject, scene, rootUrl);\n this.xSwizzle = serializationObject.xSwizzle ?? \"x\";\n this.ySwizzle = serializationObject.ySwizzle ?? \"y\";\n this.zSwizzle = serializationObject.zSwizzle ?? \"z\";\n this.wSwizzle = serializationObject.wSwizzle ?? \"w\";\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n codeString += `${this._codeVariableName}.xSwizzle = \"${this.xSwizzle}\";\\n`;\n codeString += `${this._codeVariableName}.ySwizzle = \"${this.ySwizzle}\";\\n`;\n codeString += `${this._codeVariableName}.zSwizzle = \"${this.zSwizzle}\";\\n`;\n codeString += `${this._codeVariableName}.wSwizzle = \"${this.wSwizzle}\";\\n`;\n return codeString;\n }\n}\nRegisterClass(\"BABYLON.VectorMergerBlock\", VectorMergerBlock);\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,iBAAiB,SAASJ,iBAAiB,CAAC;EACrD;AACJ;AACA;AACA;EACIK,WAAWA,CAACC,IAAI,EAAE;IACd,KAAK,CAACA,IAAI,EAAEJ,wBAAwB,CAACK,OAAO,CAAC;IAC7C;AACR;AACA;IACQ,IAAI,CAACC,QAAQ,GAAG,GAAG;IACnB;AACR;AACA;IACQ,IAAI,CAACC,QAAQ,GAAG,GAAG;IACnB;AACR;AACA;IACQ,IAAI,CAACC,QAAQ,GAAG,GAAG;IACnB;AACR;AACA;IACQ,IAAI,CAACC,QAAQ,GAAG,GAAG;IACnB,IAAI,CAACC,aA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