LAS VEGAS — The Knicks brain trust of Steve Mills, Scott Perry and David Fizdale were enjoying a laugh on the sidelines of a practice court at UNLV Wednesday, watching summer league practice.

They were a 3 ½-hour drive from Los Angeles, where in an alternate universe they would have been meeting with Kawhi Leonard.

As it played out, when Kevin Durant turned up his nose at the Knicks, the club realized any chance of nabbing Leonard without KD was a long shot.

According to a source, Leonard agreed to meet with the Knicks, but not until Wednesday after finishing with the Clippers and Lakers.

That plan was scratched by Knicks’ brass over logistics.

The Knicks had spent almost all of their $70 million cap space in the first 20 hours of free agency, knowing if they waited until the Leonard meeting Wednesday, the players they did sign could be off the market. It was too big a risk, knowing they likely would finish fourth behind the Raptors, Lakers and Clippers.

As it stood, Leonard reportedly flew back from LA to Toronto on Wednesday for the final meeting. The Knicks only can hope Leonard re-signs for one year with Toronto and becomes a free agent again in 2020. Five of the six free agents the Knicks signed are on one-year guarantees. Only Julius Randle got multiple years.

As of Wednesday, the Knicks still held $4 million of cap space and then a $4.8 room exception. They had only one spot left, though, on their 15-man roster. Lance Thomas is the favorite, as The Post reported, to fill the final spot. Vince Carter has also been mentioned. The Knicks could sign two players and cut one after a training camp battle.

According to a source, the Knicks still plan to exercise the $1.5 million team option by the July 15 deadline on 2017 draft pick Damyean Dotson despite signing shooting guards Reggie Bullock and Wayne Ellington and point guard Elfrid Payton.