Philippe Enice had been isolated at home for two weeks when he saw it: a thousand colorful, plastic balls in a pile in his living room. The 2-year-old’s whines became squeals as he dove into the pool-size ball pit in his family’s apartment.

“It’s been hard to keep him busy, with school being canceled,” said the toddler’s mother, Ana Santin, 38. “He’s 2, and he wants to run around and do activities. But they last two minutes and then he is bored. We were thinking, what should we do with him?”

The ball pit does the trick, for now.

Parents around the world are facing the same question: How do you keep young children busy, safe and happy in a time of quarantine? In Brazil, one answer has come from the country’s $3 billion party industry.

Children’s parties in Brazil are elaborate affairs. In the past two decades, cities have sprouted party houses boasting indoor roller coasters, red carpets and Ferris wheels. But the industry found itself paralyzed this spring when the novel coronavirus sabotaged weddings, birthday parties and celebrations.

With ball pits, bounce houses and trampolines gathering dust in warehouses, some party houses reasoned, why not bring the party to the children? Now, parents are cramming the outsize play equipment into their city apartments.

Doris Galindo, 39, shoved the dining room table in her Sao Paulo apartment aside to make room for a 6½ -foot trampoline. Her 5-year-old, Benjamin, who had seen trampolines at birthday parties before, was thrilled. She rented a ball pit to entertain her 2-year-old, Gabriel. The toys have been useful for helping the family stick to the government recommendations to stay at home until the pandemic abates, she said.

“It’s the lack of physical activity that is really hard,” she said. “This is something for them to do to burn some energy. Otherwise, we would have to go out, to be honest.”

She’ll extend the rentals for a month if the quarantine continues.

Covid-19, the disease caused by the novel coronavirus, has killed more than 11,000 people in Brazil, the largest death toll in Latin America. More than 200 million are quarantined. As schools closed and nannies were sent home, the country’s elite — with the luxury of disposable income — looked for ways to keep their children entertained. Trampoline rentals start at $70 per month, out of reach for most Brazilians who get by on less than $300 a month. But for the country’s upper class, who have the money and, typically, the space, it’s a bargain.

For party companies, home rentals could mean the difference between holding on to employees for a bit longer or laying them off.

Thiago Messias Ramos, 38, has been renting party equipment for 20 years. His company, Magic Fest, survived the global recession of 2008 and more recent economic downturns. But nothing could have prepared him for the day this spring when all his clients called and canceled events through April.

The financial impact was immediate.

“Our work revolves around dreams, around celebrations,” he said. “In other crises, we would see parents making parties smaller, but they wouldn’t cancel a party altogether. I’ve never seen anything like this.”

Ramos began thinking of ways to stay in business. On the day when his clients canceled their orders, he ran to the supermarket and bought whatever alcohol, wipes and masks he could find. Then he started advertising sterilized toys on Instagram for rent at 20 percent of the usual rate.

Trampolines are by far his most popular item. He received 10 orders for rentals within the first two weeks after he began offering home installation. “Parents are looking for toys that help kids burn energy,” he said.

Exercise might help kids cope with the increased stress and anxiety of life under quarantine.

Researchers at the University of Cambridge in 2013 found that children under quarantine during health-related disasters scored four times higher in post-traumatic stress surveys than those who were not quarantined.

Parents also suffer. The same researchers found that 28 percent of quarantined parents reported sufficient symptoms to be diagnosed with trauma-related mental health disorders, compared with 6 percent of parents who were not quarantined.

For those in densely populated urban centers, exercise options for children can be limited. But if they can’t go out, at least they can go up.

Joice Mayer’s 3-year-old son, Rafael, had nowhere to play after his school closed and his apartment building shut down common areas. Mayer, 38, a physical therapist who runs a home health-care company, was concerned when she saw him pacing from his room to the balcony all day. She rented a trampoline to keep him busy while she works.

“He doesn’t get tired of it,” she said. “All morning, afternoon and evening, he jumps.”