avoid duplication (#12297)
avoid duplication (#12297)

* avoid duplication

* address comments
BabylonJS/Babylon.js,sebavan/Babylon.js,BabylonJS/Babylon.js,BabylonJS/Babylon.js,RaananW/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,RaananW/Babylon.js,sebavan/Babylon.js