In these examples from the Collection of examples from discourse.threejs.org you can see a similar object with uv calculation.
RoundEdgedBoxFlat
RoundedRectangle
see Round-edged box flat
RoundedRectangle
Links to discourse also in example source code.