Currently there is no way to get called when end of frame. In C++ addCustomEventListener to listen Director::EVENT_AFTER_DRAW would do. but that is not available in Lua currently.