This was improvised. The building was meant to explode and come down in one go and the crew had one take to get it right. When the explosions malfunctioned, Ledger reacted in character, and Nolan urged his crew to keep filming. By pure chance, it resulted in one of the greatest moments in the movie, and a moment that perfectly showcased Joker’s anarchic nature and Ledger’s sheer talent.