Skip to content

Commit

Permalink
Fix defualt offset
Browse files Browse the repository at this point in the history
  • Loading branch information
ChasarooniZ committed Apr 3, 2024
1 parent 1638acc commit 4172679
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ function createRulesLawyerEffect(vidFile, data, sfxFile) {
const delay = getSetting("delay") * 1000;
const scale = videoScale * getSetting("scale") * getSetting("player.scale");
const imgOffset = {
x: scale * videoWidth * getImageOffset(position).x * 0.74,
y: scale * videoHeight * getImageOffset(position).y * 0.73,
x: scale * videoWidth * getImageOffset(position).x,
y: scale * videoHeight * getImageOffset(position).y,
};

// Create effect sequence
Expand Down Expand Up @@ -132,13 +132,13 @@ function getAnchor(position) {
function getImageOffset(position) {
switch (position) {
case "bot-left":
return { x: 0, y: -1 };
return { x: 0.27, y: -0.49 };
case "bot-right":
return { x: -1, y: -1 };
return { x: -.24, y: -.23 };
case "top-left":
return { x: 0, y: 0 };
return { x: 0.15, y: 0.26 };
case "top-right":
return { x: -1, y: 0 };
return { x: -0.24, y: 0.26 };
default:
return { x: 0.5, y: 1 };
}
Expand Down

0 comments on commit 4172679

Please sign in to comment.