Skip to content

Commit bb6a6cc

Browse files
author
Hardy--Lee
committed
fix: spelling issue
1 parent dcd337d commit bb6a6cc

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

packages/webgal/src/Core/Modules/animationFunctions.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { baseTransform } from '@/store/stageInterface';
77
import { generateTimelineObj } from '@/Core/controller/stage/pixi/animations/timeline';
88
import { WebGAL } from '@/Core/WebGAL';
99
import PixiStage, { IAnimationObject } from '@/Core/controller/stage/pixi/PixiController';
10-
import { DEFALUT_FIG_IN_DURATION, DEFALUT_FIG_OUT_DURATION } from '../constants';
10+
import { DEFAULT_FIG_IN_DURATION, DEFAULT_FIG_OUT_DURATION } from '../constants';
1111

1212
// eslint-disable-next-line max-params
1313
export function getAnimationObject(animationName: string, target: string, duration: number, writeDefault: boolean) {
@@ -57,7 +57,7 @@ export function getEnterExitAnimation(
5757
animation: IAnimationObject | null;
5858
} {
5959
if (type === 'enter') {
60-
let duration = DEFALUT_FIG_IN_DURATION;
60+
let duration = DEFAULT_FIG_IN_DURATION;
6161
if (isBg) {
6262
duration = 1500;
6363
}
@@ -70,18 +70,18 @@ export function getEnterExitAnimation(
7070
const transformState = webgalStore.getState().stage.effects;
7171
const targetEffect = transformState.find((effect) => effect.target === target);
7272

73-
const animarionName = webgalStore
73+
const animationName = webgalStore
7474
.getState()
7575
.stage.animationSettings.find((setting) => setting.target === target)?.enterAnimationName;
76-
if (animarionName && !targetEffect) {
76+
if (animationName && !targetEffect) {
7777
logger.debug('取代默认进入动画', target);
78-
animation = getAnimationObject(animarionName, realTarget ?? target, getAnimateDuration(animarionName), false);
79-
duration = getAnimateDuration(animarionName);
78+
animation = getAnimationObject(animationName, realTarget ?? target, getAnimateDuration(animationName), false);
79+
duration = getAnimateDuration(animationName);
8080
}
8181
return { duration, animation };
8282
} else {
8383
// exit
84-
let duration = DEFALUT_FIG_OUT_DURATION;
84+
let duration = DEFAULT_FIG_OUT_DURATION;
8585
if (isBg) {
8686
duration = 1500;
8787
}
@@ -90,13 +90,13 @@ export function getEnterExitAnimation(
9090
?.exitDuration ?? duration;
9191
// 走默认动画
9292
let animation: IAnimationObject | null = generateUniversalSoftOffAnimationObj(realTarget ?? target, duration);
93-
const animarionName = webgalStore
93+
const animationName = webgalStore
9494
.getState()
9595
.stage.animationSettings.find((setting) => setting.target + '-off' === target)?.exitAnimationName;
96-
if (animarionName) {
96+
if (animationName) {
9797
logger.debug('取代默认退出动画', target);
98-
animation = getAnimationObject(animarionName, realTarget ?? target, getAnimateDuration(animarionName), false);
99-
duration = getAnimateDuration(animarionName);
98+
animation = getAnimationObject(animationName, realTarget ?? target, getAnimateDuration(animationName), false);
99+
duration = getAnimateDuration(animationName);
100100
}
101101
return { duration, animation };
102102
}

packages/webgal/src/Core/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export const STAGE_KEYS = {
77
};
88

99
export const WEBGAL_NONE = 'none';
10-
export const DEFALUT_FIG_IN_DURATION = 300;
11-
export const DEFALUT_FIG_OUT_DURATION = 450;
10+
export const DEFAULT_FIG_IN_DURATION = 300;
11+
export const DEFAULT_FIG_OUT_DURATION = 450;

packages/webgal/src/Core/gameScripts/changeFigure.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { logger } from '@/Core/util/logger';
1212
import { getAnimateDuration } from '@/Core/Modules/animationFunctions';
1313
import { WebGAL } from '@/Core/WebGAL';
1414
import { baseBlinkParam, baseFocusParam, BlinkParam, FocusParam } from '@/Core/live2DCore';
15-
import { DEFALUT_FIG_IN_DURATION, WEBGAL_NONE } from '../constants';
15+
import { DEFAULT_FIG_IN_DURATION, WEBGAL_NONE } from '../constants';
1616
/**
1717
* 更改立绘
1818
* @param sentence 语句
@@ -87,7 +87,7 @@ export function changeFigure(sentence: ISentence): IPerform {
8787
// 其他参数
8888
const transformString = getStringArgByKey(sentence, 'transform');
8989
const ease = getStringArgByKey(sentence, 'ease') ?? '';
90-
let duration = getNumberArgByKey(sentence, 'duration') ?? DEFALUT_FIG_IN_DURATION;
90+
let duration = getNumberArgByKey(sentence, 'duration') ?? DEFAULT_FIG_IN_DURATION;
9191
const enterAnimation = getStringArgByKey(sentence, 'enter');
9292
const exitAnimation = getStringArgByKey(sentence, 'exit');
9393
let zIndex = getNumberArgByKey(sentence, 'zIndex') ?? -1;

0 commit comments

Comments
 (0)