There was a two-season stretch during which JaVale McGee scored a total of 141 points. He was a target of jokes, wildly misunderstood by many in the NBA, almost an afterthought of sorts whose career seemed to be closer to flaming out than taking off.

And in those darkest days, McGee kept asking himself the same question.

“Is it over?”

The answer now is obvious: No, it wasn’t over. Fast forward, and it may just be getting started.

He’s living the life that few in the NBA get to experience. He’s teamed up with the best players of this generation — Kevin Durant, Stephen Curry, LeBron James. He’s won two championships, part of Golden State’s back-to-back titles over the last two seasons. And now he’s the starting center for the Los Angeles Lakers, getting a chance to play big minutes and put up numbers for the first time in nearly a decade.

In his 11th season, McGee has basically gotten a basketball rebirth.

“I played against him in the last two NBA Finals and I wanted him on this team because I know what he brings,” said James, who lobbied the Lakers to get McGee. “It’s his energy, his energy level, his ability at the rim and his ability to protect the rim. If you don’t have that on your team, you’re not going to have much, man. You need to have people with a high IQ, which he’s got. That’s why I wanted JaVale to be part of this.”

McGee’s numbers are so much better this season than what they’ve been. But he cringes at the notion that he’s gotten better.

What the Lakers have given him is a better chance. That’s the difference. And he’s certainly one of the reasons why they’re off to a 10-7 start, winners in six of their last seven games.

McGee’s per-36-minutes averages over his career have been remarkably similar: Never lower than 13.1 points in a full season, the majority of the time between 15 and 18 points per 36 minutes of play. But the numbers are spiking this year because he’s actually getting minutes — the Lakers are starting him and playing him about 25 minutes per night, and he’s responding with averages of 13.4 points, 6.6 rebounds and 2.6 blocks per game.

He’s showing everyone else what James saw in the NBA Finals the past two years.

“He could have said get anybody,” McGee said. “It’s just a reassuring feeling, a confidence-builder I guess, knowing that you’re going into a situation wanted as an option, like you’re really wanted. That’s pretty dope.”

Away from the court, McGee is a very diverse person — and very private. He doesn’t think much of social media, preferring to keep his inner circle very small and very close.

He makes music on his computer and is serious about that as a vocation. He’s devoted to philanthropy, having built some wells to bring clean water to parts of Uganda. And the irony there is that McGee is a native of Flint, Michigan, a place that has been dealing with a clean-water crisis since 2014 — but his efforts in Uganda are coincidental, since he started that quest before the Flint situation became known.

“It’s all such a humbling experience,” McGee said.

The game has sufficiently humbled McGee at times as well.

In those 2013-14 and 2014-15 seasons, when McGee was barely playing because of ongoing issues related to a stress fracture in his left leg, he wondered if his career was coming to a premature end. His physical game was failing, his mental game was in trouble as well, and basketball stopped seeming fun.

“Of course, I had all those feelings, all those thoughts,” McGee said. “But what overshadowed all that was me just not being willing to prepare for the worst. I’m just going to keep preparing for the best. So I just kept working like I wasn’t hurting, and it ended up being dealing with pain and the pain going away and then realizing the pain isn’t even there anymore.”

His game has taken off since.

The funny thing about McGee is that he came into the NBA with the skills that big men now are supposed to have — stretch defenses, make shots from the perimeter, have some guard-esque skills. That’s the player he was at Nevada before getting picked by Washington at the No. 18 spot of the 2008 NBA Draft.

But when he entered the NBA, the mandate basically was for a 7-footer like himself to rebound and set screens. In today’s NBA, his versatility is almost required for a big. The Lakers rave about all the things fans notice and a lot of more about what might not be so noticable — like his footwork, his speed down the floor, his hands and his cutting.

“He’s been great,” Lakers coach Luke Walton said. “He’s been professional. He’s taking care of himself. He’s vocal in the locker rooms and the huddles, he’s been producing for us, obviously his shot-blocking has been a big part of us having some success on defense. We’re very pleased with JaVale.”

Due respect to Walton, he’ll never be McGee’s favorite coach.

His mom has that title on lock.

Pamela McGee won two NCAA titles as a player at USC and an Olympic gold medal at the 1984 Los Angeles Games, was the No. 2 pick in the 1997 WNBA Draft and is in the Women’s Basketball Hall of Fame.

“I used to be Pamela McGee,” she said. “Now I’m JaVale McGee’s mama.”

While many lost faith in her oldest child, she never did. The two titles with the Warriors probably meant as much to Pamela McGee as they did to her son. And now she’s back in familiar surroundings — Los Angeles, where she played, sitting near the floor to watch Magic Johnson and Kareem Abdul-Jabbar. She has flashbacks when James and her kid team up to do something spectacular, like those “Showtime” Lakers did.

“There’s an African proverb that says the teacher will become the student and the student will become the teacher,” she said. “I think we’re there. I was a very strict mother, but now, it doesn’t come from my mouth, it comes from my heart. I’m just extremely proud. Not too many mothers get this opportunity.”

There are goals that McGee still has to accomplish in his career.

He wants to be an All-Star. He wants to average a double-double. He wants to win a blocked-shot title. He’s turning 31 in January, is in great condition and knows he could play several more seasons. And as this season goes along, McGee knows part of his job will be sharing wisdom he’s collected in his two championship runs with those younger Lakers who don’t know what the postseason is about yet.

“We’re having a blast,” McGee said. “And when we start figuring it out, you’re going to see a team that’s having so much fun.”