J.r. Smith, with his Knicks status blowing in the wind, caused a commotion among fans yesterday when he tweeted, “It was fun while it lasted…”

Did the sharpshooting free-agent guard preemptively announce his departure from the team less than 24 hours after the Knicks drafted Tim Hardaway Jr., a similar player? Only Smith knows for sure, though he tweeted again soon after denying that the initial comment had anything to do with basketball.

“What y’all talking bout?” Smith wrote. “I’m talking bout the talk the cab driver an I just had!”

Hmm.

The Knicks, who have “early Bird rights” on Smith, only can offer him as much as $5.4 million per year. Teams under the cap — such as the Bucks, a rumored landing spot — can offer him more.

Smith, 27, had a great regular season, averaging 18.1 points per game, but struggled mightily in the playoffs, averaging just 14.3 per contest on 33 percent shooting. Pop star Rihanna, once a reported love interest, called him out on Instagram for partying too hard, which she said in his sluggish play.