TORONTO — The mindset that propelled DeMar DeRozan to a 34-point effort may not have been much of a mystery to his Toronto Raptors teammates, who see it regularly. But it was to DeRozan.

“I don’t know,” he said when asked how it felt to equal his second-highest offensive output of the year on Wednesday night. “When it’s going you really don’t pay attention to it until after the fact and realize everything was feeling good.”

Jonas Valanciunas added his eighth double-double of the season with 19 points and 12 rebounds as the Raptors won their season-high sixth straight game, 115-109 over the Boston Celtics.

Everything seemed to be “feeling good” for DeRozan in the third quarter, when he had 18 points to regain the lead for the Raptors. DeRozan has 64 points in his last two games.

“We’ll learn from it definitely in as far as how we can make things harder for DeMar and I’m pretty sure the coaches will figure some things out that we can throw at him maybe the next time we play him,” said Boston’s Avery Bradley, who had 19 points.

Isaiah Thomas added his fifth double-double of the season with 21 points and 10 assists, and Kelly Olynyk had 18 points off the bench in the loss.

“We never adjusted to what they were doing and all of those guys got real comfortable,” said Jae Crowder, who had 17 points for the Celtics, who fell 5 games back of the Atlantic Divison-leading Raptors.

Kyle Lowry and Terrence Ross hit big back-to-back 3-pointers down the stretch to put Toronto up by four with 2:16 to play.

“They made every shot at the end of the game and we were trying to exchange baskets with them and I find whenever we do that we are usually not successful,” Bradley said.

After shooting 65.2 percent from the floor in the first quarter to take an eight-point lead, Toronto took its foot off the gas in the second to allow Boston back into it and required DeRozan’s heroics and 40 total points in the third to regain the advantage.

“We have lost our defensive mojo a little bit,” Raptors Coach Dwane Casey said. “Defending the three … that has been a concern for the past two or three games now.”

Despite hitting 11 of 19 from beyond the arc in the first three quarters, Boston shot just 1 of 7 in the fourth.

But Boston Coach Brad Stevens looked at his teams’ defense as the key to the game.

“I think the story of tonight is the first and third quarters, 75 points, you can’t win that way against a good team,” he said.