A NEW ERA: Joe Johnson, driving to the basket against the Celtics last night, and the Nets need a new attitude to match their new home in Brooklyn, writes The Post’s George Willis. Photo: Anthony J. Causi

Before the Nets took the floor to play the Celtics last night at the Barclays Center, Avery Johnson admitted he was “curious” to see how his team would fare against the perennial power in the Atlantic Division. He called it a potential “break-through” game, the kind of game where a franchise can start to build a winning reputation.

“Teams need different break-through moments during the course of a season,” Johnson said. “It’s all about consistency. We need some breakthroughs. Sure we’ve had some recent wins. Obviously when you play teams like Miami, Boston or Lakers, those teams have been in the playoffs and some have won championships.”

If the Nets can beat the bad teams and hold their own against the good teams this could be an interesting inaugural season. That is why Johnson and anyone else who cares about the Nets had to be grinning from ear to ear after a 102-97 victory over the Celtics.

Boston played without point guard Rajon Rondo, who sat with a sprained right ankle. But that doesn’t discount “the breakthrough” the Nets achieved last night. Brook Lopez (24 points) was dominant early, while Joe Johnson (19 points) and Deron Williams (24 points) carried the Nets late as they won their fourth straight game.

Afterward, Avery Johnson stopped short of labeling the win a franchise-defining moment. Ever the coach, he already was pointing to an upcoming three-game road trip on the West Coast.

“I think it’s going to be significant if we go out on the road and have a good road trip,” Johnson said. “But I thought it was good. It’s one of the biggest games we’ve had in our two-plus years being here and especially being here in the Barclays Center.”

There’s a lot of basketball to be played this season, and who knows how the Nets will navigate it. But last night was most certainly a break-through game for several reasons.

For starters, most of the 17,732 in the building were cheering for the Nets. That wasn’t the case in New Jersey when the arrival of tops teams such as the Celtics, Heat, Lakers and Knicks drew more people cheering for the opponents than the Nets. There were a noticeable amount of Celtics fans in the building last night, but their cheers were drowned out by Nets fans.

“It’s just great to see our fans in the game,” Johnson said.

It was also a breakthrough game because the Nets didn’t fold to a good team. They lost a comfortable lead in the third quarter by being out-scored 20-2 during one stretch. It turned the game into a dogfight where the Nets ultimately prevailed, because of clutch free-throw shooting by Joe Johnson and Williams. They showed attitude and defiance, just like the community they now represent.

“We stayed together, we got stops and kept strong,” Lopez said.

As much as Avery Johnson is working on the Nets on-court execution, he also is working on their attitude. During a team-gathering Wednesday night, he told his players they have to “think they can win before they can win.”

Lopez said he understood the message.

“It’s a matter of being confident in ourselves and us as a team,” he said. “It’s about holding each other accountable and following the team ideals.”

This was the kind of win that can help create an identity for the Brooklyn Nets. They aren’t going to turn into the “Bad Boys” overnight. But it starts with games like this, matched against a title contender with a long history of success.

The Celtics tried to flex their muscles and their tradition and tried to break the Nets like they always had in New Jersey. But this time the Nets showed some Brooklyn bravado.