Add: frames to each state, more smooth animation

This commit is contained in:
DaZuo0122
2026-02-15 16:51:17 +08:00
parent 832fbda04d
commit bed7a052f3
9 changed files with 58 additions and 48 deletions

View File

@@ -42,7 +42,7 @@ const SCALE_MAX = 3.0;
const LOGICAL_BASE_FRAME_WIDTH = 512;
const LOGICAL_BASE_FRAME_HEIGHT = 512;
const SLOWDOWN_FACTOR_MIN = 1;
const SLOWDOWN_FACTOR_MAX = 20;
const SLOWDOWN_FACTOR_MAX = 200;
const SLOWDOWN_FACTOR_DEFAULT = 3;
async function invokeSetSpritePack(packIdOrPath: string): Promise<UiSnapshot> {
@@ -725,7 +725,8 @@ function SettingsWindow(): JSX.Element {
</label>
<label className="field">
<span>
Animation Speed Factor: x{settings.tauri_animation_slowdown_factor}
Animation Slowdown Factor (higher = slower): x
{settings.tauri_animation_slowdown_factor}
</span>
<input
type="range"

View File

@@ -54,7 +54,7 @@ const HALO_VAL_MIN = 0.04;
const RENDER_FIT_PADDING = 16;
const MIN_RENDER_SCALE = 0.01;
const ANIMATION_SLOWDOWN_FACTOR_MIN = 1;
const ANIMATION_SLOWDOWN_FACTOR_MAX = 20;
const ANIMATION_SLOWDOWN_FACTOR_MAX = 200;
const ANIMATION_SLOWDOWN_FACTOR_DEFAULT = 3;
export class PixiPetRenderer {