So I cant call add_track_ball_controls method since It will take the system into infinite loop, since we are using requestAnimationFrame here, Hence I am checking only whether It is defined in the object.
Please Suggest something what I can do to check here.