Skip to content

Commit

Permalink
fix(Atlas): add missing argument to function call
Browse files Browse the repository at this point in the history
  • Loading branch information
andretchen0 committed Jan 23, 2024
1 parent d45ae6d commit e6b147e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/abstractions/AnimatedSprite/Atlas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export async function getAtlasPageAsync(
&& atlas.length === 2
&& typeof atlas[0] === 'number')
) {
return framesFromNumColsNumRowsWidthHeight
return getFramesFromNumColsNumRowsWidthHeight
}
else {
return framesFromAnimationNamesWidthHeight
return getFramesFromAnimationNamesWidthHeight
}
})()
const frames = processingFn(
Expand Down Expand Up @@ -177,13 +177,13 @@ function getFramesFromNumColsNumRowsWidthHeight(
return result
}

function framesFromAnimationNamesWidthHeight(
function getFramesFromAnimationNamesWidthHeight(
animationNames: string[],
width: number,
height: number,
): AtlasFrame[] {
const numCols = animationNames.length
const frames = framesFromNumColsNumRowsWidthHeight(numCols, width, height)
const frames = getFramesFromNumColsNumRowsWidthHeight(numCols, width, height)
const padAmount = numCols.toString().length
animationNames.forEach((name, i) => {
frames[i].name = `${name}_${String(i).padStart(padAmount, '0')}`
Expand All @@ -209,9 +209,9 @@ function setDefinitions(page: AtlasPage, definitions: Record<string, string>) {
export function getFrames(
page: AtlasPage,
animationNameOrFrameNumber: string | number | [number, number],
reversed: boolean,
reversed: boolean
): AtlasFrame[] {
let frames: AtlasFrame[]
let frames: AtlasFrame[];
if (typeof animationNameOrFrameNumber === 'string')
frames = getFramesByName(page, animationNameOrFrameNumber)
else if (typeof animationNameOrFrameNumber === 'number')
Expand Down

0 comments on commit e6b147e

Please sign in to comment.