moving repeated code into a lambda
moving repeated code into a lambda

RaananW/Babylon.js,BabylonJS/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,BabylonJS/Babylon.js,sebavan/Babylon.js,BabylonJS/Babylon.js