Aller au contenu
galdurdocs

GaldurAnimations

classclient uniquementdepuis 0.1.0

com.galdurstudio.galdurui.api.anim.GaldurAnimations

Pas encore traduit : texte d’origine en anglais.

Global switch and durations of the Galdur UI animations.

The player can turn every animation off (Mods → Galdur UI → Config, or config/galdurui-client.toml); changes are then instant. An animation written by a mod should check enabled(); AnimatedValue already does.

public final class GaldurAnimations
PAQUETapi.anim
CÔTÉclient uniquement
THREADthread client

Champs 5

HOVER_MS

static
public static final long HOVER_MS = 90

Hover fade (buttons, tabs), in milliseconds.

TOGGLE_MS

static
public static final long TOGGLE_MS = 110

Checkbox mark growing or shrinking, in milliseconds.

OPEN_MS

static
public static final long OPEN_MS = 180

Screen opening, in milliseconds.

PAGE_MS

static
public static final long PAGE_MS = 160

Tab content sliding in, in milliseconds.

SCROLL_SMOOTHING_MS

static
public static final double SCROLL_SMOOTHING_MS = 45

Time constant of smooth scrolling, in milliseconds.

Méthodes 4

enabled

static
public static boolean enabled()

RENVOIEboolean — true unless the player turned animations off

now

static
public static long now()

RENVOIElong — the animation clock, in milliseconds

progress

static
public static double progress(long start, long durationMs)

PARAMÈTRES

startlongstart time, read from now()
durationMslongduration, in milliseconds

RENVOIEdouble — the progress of an animation started at start, from 0 to 1

approach

static
public static double approach(double current, double target, double elapsedMs, double timeConstMs, double epsilon)

PARAMÈTRES

currentdoublethe displayed value
targetdoublethe value to reach
elapsedMsdoubletime since the previous frame
timeConstMsdoubletime constant: the gap shrinks by a factor of e (~2.7) in that time
epsilondoublegap below which the target is reached

RENVOIEdouble — current moved towards target with frame-rate independent exponential smoothing

© 2026 Galdur Studio · galdurstudio.com · Discord · LGPL-3.0-onlyProduit non officiel. Non approuvé par Mojang ou Microsoft, ni associé à eux.