LAS VEGAS — RJ Barrett showed a new wrinkle in his repertoire Wednesday and perhaps a way the Knicks may use the 6-foot-7 swingman in his rookie year.

While his perimeter shot was still shaky, the 19-year-old lottery pick out of Duke excelled when given post-up opportunities in his fourth summer league game, taking advantage of his size and strength.

Barrett, in his second straight respectable outing, logged 21 points. He shot just 6-of-17 — 2-for-8 from the 3-point line. He also had 10 rebounds and three assists in 29 minutes as the Knicks posted their first victory, blowing out the 0-4 Lakers 117-96.

“I drew a play up for him to get him down in the box — he’s very physical, big and long,’’ Knicks summer-league coach Jud Buechler said.

“He’ll have an advantage in size on guys guarding him. We did it once, and he scored. And if you don’t stop it, I go right back to it.’’

The growth of the No. 3 pick is a massive key if the Knicks are going to resurrect themselves from six years of misery. Barrett’s 3-point shot still looks broken — he is a horrifying 5-of-25 in the four games.

The Knicks’ regular summer schedule is over, and they will finish with a consolation game Friday or Saturday. Barrett said management will decide if he plays.

“Today‘s game, that‘s what it was,’’ Barrett said of his low-block chances. “I had a mismatch down there. If I have mismatch, I can really play on the block down there a little bit.’’

Barrett, who has rebounded the ball well all tournament, started off 0-for-4 before starting to make some noise. His first basket came when he spun around his defender for an easy dunk.

The former Duke swingman scored on three low-post moves as the Knicks found a way to get him going without him relying strictly on his drive or 3-point shot.

“He’s playing better each game,’’ Buechler said. “He had a great game last game, was solid again tonight. He’s 19 years old, and they have a lot of things to work on. He’s got to work on his finishes. He’s got a nice right hand, but he seems to bring it back to his left hand in traffic. But we’re going to clean all that stuff up.’’

Barrett and second-round pick Ignas Brazdeikis (16 points, four rebounds, three assists) have a lot to think about after the summer league.

Do they represent their countries in the World Cup in August? Or do they choose to rest, relax and work out with Knicks coaches?

In Brazdeikis’ case, the Michigan second-round pick has been contemplating suiting up for his native Lithuania, according to an industry source. Like Barrett, Brazdeikis grew up in Canada.

Barrett was asked where he stands on playing for his country. As much as he has New York blood, he is Canadian first and was part of the country’s 18- and 17-and-under national teams.

“I haven’t thought about it much,’’ Barrett said. “I’m trying to get through the summer league first [before making a decision].’’

Team Canada, according to the source, hopes he plays. That Rowan Barrett, RJ’s father, had been a key player for Team Canada in years past could weigh in favor of him playing in the event held in China beginning in late August. Rowan Barrett was teammates with Steve Nash on Team Canada.

A collection of the NBA players who may compete for Team Canada include Cory Joseph, Jamal Murray, Tristan Thompson, Dwight Powell, Dillon Brooks, Nik Stauskas, Kelly Olynyk, Shai Gilgeous-Alexander and Andrew Wiggins.

Team Canada’s training camp begins Aug. 3, with an exhibition game versus Nigeria Aug. 7 in Toronto.

“In the past, rarely have first-year NBA players been able to participate,’’ the industry source said. “I hope that with Rowan being responsible this summer, the trend ends. Both guys [Barrett and Brazdeikis] would be accepted by the vets.’’

Barrett has had mixed results at summer league but came on stronger after an atrocious first two games.

At least he has shown more stamina than Duke buddy Zion Williamson, the No. 1 pick by the Pelicans. He lasted nine minutes in his only summer league appearance and then was shut down with knee/back pain after looking out of shape.

“He needs to take care of himself,’’ Barrett said. “I hate to see him not being able to play. I hope he has a speedy recovery.’’