Skip to content

Commit

Permalink
Screenspace changes (#102)
Browse files Browse the repository at this point in the history
* Updated Requirement to Sequencer 3.3.8

* Chnaged to use new ScreenSpace animation
  • Loading branch information
ChasarooniZ authored Oct 20, 2024
1 parent 29f78c9 commit 0ea6bea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"type": "module",
"manifest": "https://github.com/fantasycalendar/FoundryVTT-Sequencer/releases/latest/download/manifest.json",
"compatibility": {
"minimum": "3.2.0",
"verified": "3.2.17"
"minimum": "3.3.8",
"verified": "3.3.8"
}
}
],
Expand Down
8 changes: 3 additions & 5 deletions scripts/helpers/animation/crit/fireEmblemCrit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import { getSetting } from "../../misc.js";
*/

export async function fireEmblemCrit(token, users, imgData, config) {
const screenWidth = window.screen.availWidth;
const scaleFactor = 0.35;
const distance = scaleFactor * screenWidth;
const windowHeight = screen.height / 10;
const padding = windowHeight / 10;
const rectangleHeight = windowHeight + padding * 2;
Expand Down Expand Up @@ -68,8 +65,9 @@ export async function fireEmblemCrit(token, users, imgData, config) {
.syncGroup(`fe-crit-${token.uuid}`)
.file(imageUrl)
.animateProperty("sprite", "position.x", {
from: -distance * 1.5 / (scaleFactorHalf),
to: distance * 2,
from: -2.5,
to: 4,
screenSpace: true,
duration: duration,
ease: "easeInBack",
})
Expand Down

0 comments on commit 0ea6bea

Please sign in to comment.