The transformation began in spring training with dribs and drabs of information, served up by anxious coaches in bite-sized pieces.

For Mets slugger Yoenis Cespedes, the more detailed, the better. He asked for more, intrigued by the possibilities. What if he could be more patient at the plate? Would it make him even more dangerous as a hitter? Why not try something new?

“Day in and day out, it was different pieces of information,” hitting coach Kevin Long said, tracing the genesis of what may be a career-altering change.

It is too soon to know for sure if it has been nothing more than a mirage, a fleeting awakening. But as the season enters its third month, Cespedes has made himself into the league’s most dangerous hitter, simply by infusing his swing with discipline.

Cespedes, 30, leads baseball with 15 home runs. He leads the National League in RBIs (36) and slugging (.660).

As the Mets weighed pursuing Cespedes at last year’s trade deadline, dissenters within the organization pointed at his .316 on-base percentage in his first three years in the big leagues. They concluded that the benefits of his power were negated by his free-swinging ways.

But this year, Cespedes has reached base at a .378 clip. If he were to maintain that pace, it would be the best figure of his career.

‘I didn’t like that’

Progress required building a relationship over time, a luxury that Long and assistant hitting coach Pat Roessler didn’t have last season, when Cespedes was viewed as a rental.

But when he re-signed with the Mets, the time had come for real progress, though history showed that such well-intentioned missions haven’t always gone smoothly.

“When I was in Oakland, they tried to change my swing,” Cespedes said through a translator. “And I didn’t like that.”

The Mets, however, didn’t seek a swing change. They sought to refine an approach.

In Long, the Mets had hired a coach skilled in dealing with established players, as he did for years with the Yankees.

Soon Long and Roessler were espousing the virtues of cutting down on chasing pitches. They emphasized the importance of being more selective. Over time, Cespedes bought in.

He no longer flails at the high heater, which had long been an Achilles’ heel. Last year, he needed 94 games to draw 17 walks. This year, he’s reached that figure in 42.

“With Kevin, I ask him what he’s seeing, what he thinks,” Cespedes said during a break from indoor batting practice. “He just gives his advice. It’s for me to take or not to take if I don’t agree with it. If I decide to take it, we come here and we work on it.”

‘He’s a rhythm and pattern guy’

With Cespedes, results determine all. Last season, Curtis Granderson recalls Cespedes golfing before a game and then hitting a home run. He golfed the next three days until a hot streak subsided and he put away the clubs. He also ditched on-field batting practice to ward off another cold streak, just as he did recently.

“He’s a rhythm and pattern guy,” Granderson said. “If he does something one day and gets the results that he wants, he’s going to follow that same rhythm, routine and pattern the next day until it gets broken and then switch it to something else.”

Cespedes has been given no reason to deviate from the new approach. The timing also may prove fortuitous. Because he can opt out of his deal in the offseason and become a free agent, the timing of his transition could bring him a megadeal. But that’s a concern for later.

For now, the Mets have benefited from his MVP-caliber season.

Cespedes is meticulous in his work. He wants to know which pitches he’s driving, which ones he’s missing, which zones he favors, which zones he should avoid.

The details matter. Long and Cespedes have cut up home plate into seven zones, roughly the width of a baseball. A “one ball” marks the inside corner; a “seven ball” denotes the outside. Cespedes often wants to know what he’s hitting on every ball, one through seven.

Every day brings another piece of the puzzle.

“It’s small little bits over time,” Long said. “It’s not a finished product by any means. It’s trending the right way, but we’re not there yet.”