A 14-year-old schoolboy was attacked by machete-wielding youths “almost instantaneously” after they spotted him on a London bus, a court has heard.