Update cpp and lua template to support  cocos3d lib