A proposed micro-unit apartment building on hardscrabble Sixth Street won city approvals Thursday, despite the fact that it will cast shadows on one of the neighborhood’s few recreation centers.

In a joint meeting, the Planning Commission and the Recreation and Park Commission unanimously approved 343 Sixth St., a 102-unit, nine-story structure that is one of four projects proposed or under construction on the street.

The project required the approval of the Rec and Park Commission because the city’s sunlight ordinance prohibits additional shadows on Gene Friend Recreation Center, which is already over its “cumulative shadow limit.”

But members of both commissions said the additional shadows — about a half hour in the morning in the fall and spring — were outweighed by the benefits of the new housing. In addition, the shadows would exist between 8 and 9 a.m., before the recreation center opens.

The units will be market-rate studios, ranging from 300 to 400 square feet. The building will be next door to a 104-unit project at 363 Sixth St., which was approved a year ago but has not broken ground. A block to the south is 988 Harrison, on the corner of Sixth, which will add 100 units. A block to the north, at 200 Sixth St., Mercy Housing is building 67 affordable units.

The 373 new units will increase foot traffic and density on Sixth Street, which is now lined with residential hotels and nonprofits.

The vote comes as the city is working on a redesign of the Gene Friend center. The plan is still being developed, but it will probably include building a new recreation building closer to the corner of Sixth and Folsom, which could include a swimming pool. The Gene Friend center now consists of a basketball court, a single-story rec center, a grassy square and a playground.

Land use attorney Sue Hestor said before the approval that the project should not be approved until the Recreation and Park Department figures out exactly how the Gene Friend center is going to be reconfigured.

“There should be zero tolerance for new shadows on Gene Friend,” Hestor said. “These are luxury mini-units. Tech housing is taking over the South of Market.”

But the project won the backing of multiple neighborhood nonprofits, including the Howard Street youth organization United Playaz. Rudy Corpuz, who heads up United Playaz, said the developer did a good job of reaching out to residents.

“I don’t think that these are developers that want to build something, make some money and get on,” he said. “These people are about building bridges, not walls.”

J.K. Dineen is a San Francisco Chronicle staff writer. Email: jdineen@sfchronicle.com Twitter: @sfjkdineen