@luceosports/play-rendering 2.5.1 → 2.5.4

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.
@@ -1,39 +1,39 @@
1
- import { loadImage } from './helpers/common';
2
- import elfHatData from './assets/hats/elf.svg';
3
- import santaHatData from './assets/hats/santa.svg';
4
- import leprechaunHatData from './assets/hats/leprechaun.svg';
5
- import winterHatData from './assets/hats/winter.svg';
6
- import witchHatData from './assets/hats/witch.svg';
7
- import cowboyHatData from './assets/hats/cowboy.svg';
8
- import vikingHatData from './assets/hats/viking.svg';
9
- import hairHatData from './assets/hats/hair.svg';
10
- import beardHatData from './assets/hats/beard.svg';
11
- import { ImageConfigItem } from './models/PlayModel';
12
-
13
- export default async function(): Promise<readonly ImageConfigItem[]> {
14
- const elfHat = await loadImage(elfHatData);
15
- const santaHat = await loadImage(santaHatData);
16
- const leprechaunHat = await loadImage(leprechaunHatData);
17
- const winterHat = await loadImage(winterHatData);
18
- const witchHat = await loadImage(witchHatData);
19
- const cowboyHat = await loadImage(cowboyHatData);
20
- const vikingHat = await loadImage(vikingHatData);
21
- const hairHat = await loadImage(hairHatData);
22
- const beardHat = await loadImage(beardHatData);
23
- return Object.freeze([
24
- { key: 'elf', image: elfHat, dX: -0.05, dY: -0.35 },
25
- { key: 'elf_reverse', image: elfHat, dX: -0.05, dY: -0.35, reverse: true },
26
- { key: 'santa', image: santaHat, dX: -0.15, dY: -0.55 },
27
- { key: 'santa_reverse', image: santaHat, dX: -0.15, dY: -0.55, reverse: true },
28
- { key: 'leprechaun', image: leprechaunHat, dX: 0, dY: -0.33 },
29
- { key: 'leprechaun_reverse', image: leprechaunHat, dX: 0, dY: -0.33, reverse: true },
30
- { key: 'winter', image: winterHat, dX: -0.1, dY: -0.33 },
31
- { key: 'winter_reverse', image: winterHat, dX: -0.1, dY: -0.33, reverse: true },
32
- { key: 'witch', image: witchHat, dX: 0, dY: -0.3 },
33
- { key: 'witch_reverse', image: witchHat, dX: 0, dY: -0.3, reverse: true },
34
- { key: 'cowboy', image: cowboyHat, dX: 0, dY: -0.46 },
35
- { key: 'viking', image: vikingHat, dX: 0.011, dY: -0.4 },
36
- { key: 'hair', image: hairHat, dX: -0.007, dY: -0.53 },
37
- { key: 'beard', image: beardHat, dX: 0, dY: -1.6 }
38
- ]);
39
- }
1
+ import { loadImage } from './helpers/common';
2
+ import elfHatData from './assets/hats/elf.svg';
3
+ import santaHatData from './assets/hats/santa.svg';
4
+ import leprechaunHatData from './assets/hats/leprechaun.svg';
5
+ import winterHatData from './assets/hats/winter.svg';
6
+ import witchHatData from './assets/hats/witch.svg';
7
+ import cowboyHatData from './assets/hats/cowboy.svg';
8
+ import vikingHatData from './assets/hats/viking.svg';
9
+ import hairHatData from './assets/hats/hair.svg';
10
+ import beardHatData from './assets/hats/beard.svg';
11
+ import { ImageConfigItem } from './models/PlayModel';
12
+
13
+ export default async function (): Promise<readonly ImageConfigItem[]> {
14
+ const elfHat = await loadImage(elfHatData);
15
+ const santaHat = await loadImage(santaHatData);
16
+ const leprechaunHat = await loadImage(leprechaunHatData);
17
+ const winterHat = await loadImage(winterHatData);
18
+ const witchHat = await loadImage(witchHatData);
19
+ const cowboyHat = await loadImage(cowboyHatData);
20
+ const vikingHat = await loadImage(vikingHatData);
21
+ const hairHat = await loadImage(hairHatData);
22
+ const beardHat = await loadImage(beardHatData);
23
+ return Object.freeze([
24
+ { key: 'elf', image: elfHat, dX: -0.05, dY: -0.35 },
25
+ { key: 'elf_reverse', image: elfHat, dX: -0.05, dY: -0.35, reverse: true },
26
+ { key: 'santa', image: santaHat, dX: -0.15, dY: -0.55 },
27
+ { key: 'santa_reverse', image: santaHat, dX: -0.15, dY: -0.55, reverse: true },
28
+ { key: 'leprechaun', image: leprechaunHat, dX: 0, dY: -0.33 },
29
+ { key: 'leprechaun_reverse', image: leprechaunHat, dX: 0, dY: -0.33, reverse: true },
30
+ { key: 'winter', image: winterHat, dX: -0.1, dY: -0.33 },
31
+ { key: 'winter_reverse', image: winterHat, dX: -0.1, dY: -0.33, reverse: true },
32
+ { key: 'witch', image: witchHat, dX: 0, dY: -0.3 },
33
+ { key: 'witch_reverse', image: witchHat, dX: 0, dY: -0.3, reverse: true },
34
+ { key: 'cowboy', image: cowboyHat, dX: 0, dY: -0.46 },
35
+ { key: 'viking', image: vikingHat, dX: 0.011, dY: -0.4 },
36
+ { key: 'hair', image: hairHat, dX: -0.007, dY: -0.53 },
37
+ { key: 'beard', image: beardHat, dX: 0, dY: -1.6 }
38
+ ]);
39
+ }
@@ -2,7 +2,7 @@ import { loadImage } from './helpers/common';
2
2
  import coneImageData from './assets/shapes/cone.svg';
3
3
  import { ImageConfigItem } from './models/PlayModel';
4
4
 
5
- export default async function(): Promise<readonly ImageConfigItem[]> {
5
+ export default async function (): Promise<readonly ImageConfigItem[]> {
6
6
  const coneShape = await loadImage(coneImageData);
7
7
  return Object.freeze([{ key: 'cone', image: coneShape, dX: -0.05, dY: -0.35 }]);
8
8
  }
@@ -1,10 +1,12 @@
1
- export type PlayerPosition = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11';
1
+ export type PlayerPosition = `${number}`;
2
2
 
3
- export type DefenderPosition = 'x1' | 'x2' | 'x3' | 'x4' | 'x5' | 'x6' | 'x7' | 'x8' | 'x9' | 'x10' | 'x11';
3
+ export type DefenderPosition = `x${number}`;
4
+
5
+ export type ExtraPosition = `+${number}`;
4
6
 
5
7
  export type CoachPosition = 'C';
6
8
 
7
- export type Position = PlayerPosition | DefenderPosition | CoachPosition;
9
+ export type Position = PlayerPosition | DefenderPosition | ExtraPosition | CoachPosition;
8
10
 
9
11
  export type LineType = 'PASS' | 'CUT' | 'SCREEN' | 'DRIBBLE' | 'HANDOFF' | 'SHOT';
10
12