Skip to content

Commit

Permalink
fixed bug with width
Browse files Browse the repository at this point in the history
  • Loading branch information
ChasarooniZ committed Mar 26, 2024
1 parent e820d53 commit 2072b55
Showing 1 changed file with 57 additions and 57 deletions.
114 changes: 57 additions & 57 deletions scripts/helpers/animation/crit-animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,63 +163,63 @@ export function personaCrit(token, users, imgData) {
const screenWidth = window.screen.availWidth;
const screenHeight = window.screen.availHeight;
const polygonPoints = [
[-0.1 * width, 0.55 * height],
[0.02 * width, 0.52 * height],
[0.09 * width, 0.51 * height],
[0.15 * width, 0.44 * height],
[0.23 * width, 0.4 * height],
[0.32 * width, 0.38 * height],
[0.34 * width, 0.36 * height],
[0.35 * width, 0.35 * height],
[0.41 * width, 0.28 * height],
[0.43 * width, 0.3 * height],
[0.5 * width, 0.26 * height],
[0.53 * width, 0.27 * height],
[0.58 * width, 0.26 * height],
[0.59 * width, 0.26 * height],
[0.62 * width, 0.24 * height],
[0.65 * width, 0.25 * height],
[0.71 * width, 0.23 * height],
[0.78 * width, 0.15 * height],
[0.85 * width, 0.14 * height],
[0.89 * width, 0.14 * height],
[0.95 * width, 0.11 * height],
[0.97 * width, 0.12 * height],
[1.1 * width, 0.09 * height],
[1.1 * width, 0.55 * height],
[0.97 * width, 0.53 * height],
[0.96 * width, 0.55 * height],
[0.92 * width, 0.55 * height],
[0.8 * width, 0.56 * height],
[0.72 * width, 0.57 * height],
[0.69 * width, 0.58 * height],
[0.64 * width, 0.63 * height],
[0.62 * width, 0.63 * height],
[0.61 * width, 0.65 * height],
[0.59 * width, 0.63 * height],
[0.57 * width, 0.62 * height],
[0.55 * width, 0.64 * height],
[0.53 * width, 0.65 * height],
[0.49 * width, 0.63 * height],
[0.43 * width, 0.63 * height],
[0.39 * width, 0.64 * height],
[0.37 * width, 0.65 * height],
[0.36 * width, 0.65 * height],
[0.34 * width, 0.68 * height],
[0.32 * width, 0.67 * height],
[0.29 * width, 0.72 * height],
[0.27 * width, 0.71 * height],
[0.27 * width, 0.73 * height],
[0.24 * width, 0.72 * height],
[0.22 * width, 0.73 * height],
[0.2 * width, 0.7 * height],
[0.16 * width, 0.73 * height],
[0.14 * width, 0.71 * height],
[0.13 * width, 0.72 * height],
[0.1 * width, 0.71 * height],
[0.05 * width, 0.72 * height],
[0.06 * width, 0.7 * height],
[-0.1 * width, 0.73 * height],
[-0.1 * screenWidth, 0.55 * screenHeight],
[0.02 * screenWidth, 0.52 * screenHeight],
[0.09 * screenWidth, 0.51 * screenHeight],
[0.15 * screenWidth, 0.44 * screenHeight],
[0.23 * screenWidth, 0.4 * screenHeight],
[0.32 * screenWidth, 0.38 * screenHeight],
[0.34 * screenWidth, 0.36 * screenHeight],
[0.35 * screenWidth, 0.35 * screenHeight],
[0.41 * screenWidth, 0.28 * screenHeight],
[0.43 * screenWidth, 0.3 * screenHeight],
[0.5 * screenWidth, 0.26 * screenHeight],
[0.53 * screenWidth, 0.27 * screenHeight],
[0.58 * screenWidth, 0.26 * screenHeight],
[0.59 * screenWidth, 0.26 * screenHeight],
[0.62 * screenWidth, 0.24 * screenHeight],
[0.65 * screenWidth, 0.25 * screenHeight],
[0.71 * screenWidth, 0.23 * screenHeight],
[0.78 * screenWidth, 0.15 * screenHeight],
[0.85 * screenWidth, 0.14 * screenHeight],
[0.89 * screenWidth, 0.14 * screenHeight],
[0.95 * screenWidth, 0.11 * screenHeight],
[0.97 * screenWidth, 0.12 * screenHeight],
[1.1 * screenWidth, 0.09 * screenHeight],
[1.1 * screenWidth, 0.55 * screenHeight],
[0.97 * screenWidth, 0.53 * screenHeight],
[0.96 * screenWidth, 0.55 * screenHeight],
[0.92 * screenWidth, 0.55 * screenHeight],
[0.8 * screenWidth, 0.56 * screenHeight],
[0.72 * screenWidth, 0.57 * screenHeight],
[0.69 * screenWidth, 0.58 * screenHeight],
[0.64 * screenWidth, 0.63 * screenHeight],
[0.62 * screenWidth, 0.63 * screenHeight],
[0.61 * screenWidth, 0.65 * screenHeight],
[0.59 * screenWidth, 0.63 * screenHeight],
[0.57 * screenWidth, 0.62 * screenHeight],
[0.55 * screenWidth, 0.64 * screenHeight],
[0.53 * screenWidth, 0.65 * screenHeight],
[0.49 * screenWidth, 0.63 * screenHeight],
[0.43 * screenWidth, 0.63 * screenHeight],
[0.39 * screenWidth, 0.64 * screenHeight],
[0.37 * screenWidth, 0.65 * screenHeight],
[0.36 * screenWidth, 0.65 * screenHeight],
[0.34 * screenWidth, 0.68 * screenHeight],
[0.32 * screenWidth, 0.67 * screenHeight],
[0.29 * screenWidth, 0.72 * screenHeight],
[0.27 * screenWidth, 0.71 * screenHeight],
[0.27 * screenWidth, 0.73 * screenHeight],
[0.24 * screenWidth, 0.72 * screenHeight],
[0.22 * screenWidth, 0.73 * screenHeight],
[0.2 * screenWidth, 0.7 * screenHeight],
[0.16 * screenWidth, 0.73 * screenHeight],
[0.14 * screenWidth, 0.71 * screenHeight],
[0.13 * screenWidth, 0.72 * screenHeight],
[0.1 * screenWidth, 0.71 * screenHeight],
[0.05 * screenWidth, 0.72 * screenHeight],
[0.06 * screenWidth, 0.7 * screenHeight],
[-0.1 * screenWidth, 0.73 * screenHeight],
];
const centeredPoints = polygonPoints.map(([x, y]) => [x - screenWidth / 2, y - screenHeight / 2]);
const imageUrl = token.data.flags?.["pf2e-rpg-numbers"]?.personaImg || imgData.img;
Expand Down

0 comments on commit 2072b55

Please sign in to comment.