@luceosports/play-rendering 1.9.36 → 1.9.37

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.9.36",
3
+ "version": "1.9.37",
4
4
  "description": "",
5
5
  "main": "dist/play-rendering.js",
6
6
  "scripts": {
@@ -205,17 +205,17 @@ class InternalLineLayer extends InternalBaseLayer {
205
205
  if (this.line.playerPositionOrigin) {
206
206
  const positionOrigin = this.line.playerPositionOrigin;
207
207
  const lineSequence = this.line.playerLineSequence;
208
- const player = this.playData.players.find(p => p.position === positionOrigin);
209
- if (!player) return;
210
- // console.log('player: ', player);
211
208
 
212
209
  if (lineSequence === 0) {
213
- // For simple lines without sequence we use player.location for startMaskSettings
214
- let radius = player.possession ? 1.5 : 1.0;
215
- if (this.line.type === 'HANDOFF' && !player.possession) {
216
- radius = 0.7;
210
+ const player = this.playData.players.find(p => p.position === positionOrigin);
211
+ if (player) {
212
+ // For simple lines without sequence we use player.location for startMaskSettings
213
+ let radius = player.possession ? 1.5 : 1.0;
214
+ if (this.line.type === 'HANDOFF' && !player.possession) {
215
+ radius = 0.7;
216
+ }
217
+ this.startMaskSettings = { centerPoint: player.location, radius: radius };
217
218
  }
218
- this.startMaskSettings = { centerPoint: player.location, radius: radius };
219
219
  } else if (positionOrigin) {
220
220
  // Find prev line in line sequence for player
221
221
  // and get last cp of last line part
@@ -1,11 +1,11 @@
1
- // require all modules on the path and with the pattern defined
2
- const req = require.context('./layers/', true, /.js$/);
3
-
4
- const modules = {};
5
-
6
- req.keys().forEach(key => {
7
- const mname = key.replace('./', '').replace('.js', '');
8
- modules[mname] = req(key);
9
- });
10
-
11
- module.exports = modules;
1
+ // require all modules on the path and with the pattern defined
2
+ const req = require.context('./layers/', true, /.js$/);
3
+
4
+ const modules = {};
5
+
6
+ req.keys().forEach(key => {
7
+ const mname = key.replace('./', '').replace('.js', '');
8
+ modules[mname] = req(key);
9
+ });
10
+
11
+ module.exports = modules;