Object.defineProperty(exports,"__esModule",{value:!0}),exports.CGAdd=void 0;let ScriptNodeAPI_1=require("../Utils/ScriptNodeAPI");class CGAdd extends ScriptNodeAPI_1.BaseNode{constructor(){super()}getOutput(t){var e=this.valueType;if(!e)return null;var i=this.outputs[t];if("Int"===e||"Double"===e){let e=0;for(let t=0;t<this.inputs.length;++t){var r=this.inputs[t]();if(null==r)return null;e+=r}return e}if("Vector2f"===e){let e=0,r=0;for(let t=0;t<this.inputs.length;++t){var u=this.inputs[t]();if(null==u)return null;e+=u.x,r+=u.y}this.outputs[t]=ScriptNodeAPI_1.GraphUtils.getUpdatedValue("Vector2f",i,e,r)}else if("Vector3f"===e){let e=0,r=0,u=0;for(let t=0;t<this.inputs.length;++t){var l=this.inputs[t]();if(null==l)return null;e+=l.x,r+=l.y,u+=l.z}this.outputs[t]=ScriptNodeAPI_1.GraphUtils.getUpdatedValue("Vector3f",i,e,r,u)}else{if("Vector4f"!==e)return null;{let e=0,r=0,u=0,l=0;for(let t=0;t<this.inputs.length;++t){var s=this.inputs[t]();if(null==s)return null;e+=s.x,r+=s.y,u+=s.z,l+=s.w}this.outputs[t]=ScriptNodeAPI_1.GraphUtils.getUpdatedValue("Vector4f",i,e,r,u,l)}}return this.outputs[t]}}exports.CGAdd=CGAdd;