@luceosports/play-rendering 1.12.4 → 1.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luceosports/play-rendering",
3
- "version": "1.12.4",
3
+ "version": "1.12.5",
4
4
  "description": "",
5
5
  "main": "dist/play-rendering.js",
6
6
  "scripts": {
@@ -101,11 +101,13 @@ class PlayerLayer extends BaseLayer {
101
101
  const { x, y } = player.location;
102
102
  const { alpha } = player.color;
103
103
 
104
+ const fontSizeLength = 3 - player.textLabel.length * 0.5;
104
105
  const fontSizeMultiplier = this.options.legacyPrintStyle ? 1.3 : 1;
105
- const fontSize = (player.textLabel.length > 1 ? 2.0 : 2.5) * fontSizeMultiplier * this.playerScale;
106
+ const fontSize = fontSizeLength * fontSizeMultiplier * this.playerScale;
106
107
 
108
+ const textVOffsetLength = 1 - player.textLabel.length * 0.15;
107
109
  const textVOffsetMultiplier = this.options.legacyPrintStyle ? 1.4 : 1;
108
- const textVerticalOffset = (player.textLabel.length > 1 ? 0.7 : 0.85) * textVOffsetMultiplier * this.playerScale;
110
+ const textVerticalOffset = textVOffsetLength * textVOffsetMultiplier * this.playerScale;
109
111
 
110
112
  if (!alpha) return;
111
113