New ball javascript controller.