@luceosports/play-rendering 1.11.0 → 1.11.1

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.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "",
5
5
  "main": "dist/play-rendering.js",
6
6
  "scripts": {
@@ -4,6 +4,8 @@ class FovShapeLayer extends InternalShapeLayer {
4
4
  drawShapeLogic() {
5
5
  const { shapeControlPoints: triangle } = this.shape;
6
6
 
7
+ this.ctx.rotate(Math.PI); // 180
8
+
7
9
  this.ctx.beginPath();
8
10
 
9
11
  this.ctx.moveTo(triangle[0].x, triangle[0].y);
@@ -1,16 +1,15 @@
1
- const { cos, sin } = require('mathjs');
2
1
  const Shape = require('../Shape');
3
2
 
4
3
  class FovShape extends Shape {
5
4
  get outerCircleRadius() {
6
- return 4;
5
+ return 8;
7
6
  }
8
7
 
9
8
  get shapeControlPoints() {
10
9
  return [
11
10
  { x: 0, y: -this.outerCircleRadius },
12
- { x: -this.outerCircleRadius * cos(240), y: this.outerCircleRadius * sin(240) },
13
- { x: this.outerCircleRadius * cos(240), y: this.outerCircleRadius * sin(240) }
11
+ { x: (-this.outerCircleRadius * Math.cos(220)) / 2, y: this.outerCircleRadius * Math.sin(240) },
12
+ { x: (this.outerCircleRadius * Math.cos(220)) / 2, y: this.outerCircleRadius * Math.sin(240) }
14
13
  ];
15
14
  }
16
15
 
@@ -1,4 +1,3 @@
1
- const { cos, sin } = require('mathjs');
2
1
  const Shape = require('../Shape');
3
2
 
4
3
  class TriangleShape extends Shape {
@@ -9,8 +8,8 @@ class TriangleShape extends Shape {
9
8
  get shapeControlPoints() {
10
9
  return [
11
10
  { x: 0, y: -this.outerCircleRadius },
12
- { x: this.outerCircleRadius * cos(210), y: this.outerCircleRadius * sin(210) },
13
- { x: -this.outerCircleRadius * cos(210), y: this.outerCircleRadius * sin(210) }
11
+ { x: this.outerCircleRadius * Math.cos(210), y: this.outerCircleRadius * Math.sin(210) },
12
+ { x: -this.outerCircleRadius * Math.cos(210), y: this.outerCircleRadius * Math.sin(210) }
14
13
  ];
15
14
  }
16
15