public static interface AnimationMeta.Builder
AnimationMeta
and AnimationFrame instances| Modifier and Type | Method and Description |
|---|---|
@NotNull AnimationMeta.Builder |
addFrame(@NotNull AnimationFrame frame)
Adds an animation
AnimationFrame frame |
default @NotNull AnimationMeta.Builder |
addFrame(int index)
Adds an animation
AnimationFrame frame index |
default @NotNull AnimationMeta.Builder |
addFrame(int index,
int frameTime)
Adds an animation
AnimationFrame frame index
with a specific frame time |
@NotNull AnimationMeta |
build()
Finishes building the
AnimationMeta instance,
this method may fail if values were not correctly
provided |
default @NotNull AnimationMeta.Builder |
frames(AnimationFrame... frames)
Sets the animation
AnimationFrame frames |
default @NotNull AnimationMeta.Builder |
frames(int... indexes)
Sets the animation
AnimationFrame frames |
@NotNull AnimationMeta.Builder |
frames(@NotNull java.util.List<AnimationFrame> frames)
Sets the animation
AnimationFrame frames |
@NotNull AnimationMeta.Builder |
frameTime(int frameTime)
Sets the global frame time for all frames, it can
be overwritten by specific
AnimationFrame elements |
@NotNull AnimationMeta.Builder |
height(int height)
Sets the height of the tile as a ratio rather than
in pixels.
|
@NotNull AnimationMeta.Builder |
interpolate(boolean interpolate)
Sets whether this animation should interpolate
frames or not.
|
@NotNull AnimationMeta.Builder |
width(int width)
Sets the width of the tile, as a direct ratio
rather than in pixels.
|
@Contract(value="_ -> this") @NotNull @NotNull AnimationMeta.Builder interpolate(boolean interpolate)
Interpolated animations will have some generated keyframes between the specified ones for a smoother look.
interpolate - Whether this animation should interpolate frames or not@Contract(value="_ -> this") @NotNull @NotNull AnimationMeta.Builder width(int width)
width - The tile width@Contract(value="_ -> this") @NotNull @NotNull AnimationMeta.Builder height(int height)
height - The tile height@Contract(value="_ -> this") @NotNull @NotNull AnimationMeta.Builder frameTime(int frameTime)
AnimationFrame elementsframeTime - The fallback frame-time for frames that
don't specify one@Contract(value="_ -> this") @NotNull @NotNull AnimationMeta.Builder frames(@NotNull @NotNull java.util.List<AnimationFrame> frames)
AnimationFrame framesframes - The animation frames@Contract(value="_ -> this") @NotNull default @NotNull AnimationMeta.Builder frames(@NotNull AnimationFrame... frames)
AnimationFrame framesframes - The animation frames@Contract(value="_ -> this") @NotNull default @NotNull AnimationMeta.Builder frames(int... indexes)
AnimationFrame framesindexes - The animation frames indexes@Contract(value="_ -> this") @NotNull @NotNull AnimationMeta.Builder addFrame(@NotNull @NotNull AnimationFrame frame)
AnimationFrame frameframe - The animation frame@Contract(value="_ -> this") @NotNull default @NotNull AnimationMeta.Builder addFrame(int index)
AnimationFrame frame indexindex - The animation frame index@Contract(value="_, _ -> this") @NotNull default @NotNull AnimationMeta.Builder addFrame(int index, int frameTime)
AnimationFrame frame index
with a specific frame timeindex - The animation frame indexframeTime - The animation frame time@Contract(value="-> new") @NotNull @NotNull AnimationMeta build()
AnimationMeta instance,
this method may fail if values were not correctly
provided