Class CoverModel
java.lang.Object
net.ixdarklord.folios.internal.client.handheld.CoverModel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA band round the spine: fromy0toy1up it (0 at the foot, 16 at the head), standingoutoff it (in x's units), its face from that part oftexture(0 to 1), tinted as a face's "tintindex" says. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatHow much of a book's opening its latch takes, unlatching before its cover swings. -
Method Summary
Modifier and TypeMethodDescriptionbands()The bands round the spine.static voidclear()voiddraw(com.mojang.blaze3d.vertex.PoseStack pose, SubmitNodeCollector collector, int light, boolean left, float width, float top, float bottom, float outside, int cover, int accent, float open, @Nullable org.joml.Matrix3f relight) Draws it on a board's outside.static @Nullable CoverModelget(net.minecraft.resources.ResourceLocation id) The model with that id, read the first time it is asked for; null when there is none or it can't be read.static floatswing(float open) How far the cover has swung open, 0 to 1, when the book isopenthat far (the latch goes first).
-
Field Details
-
LATCH
public static final float LATCHHow much of a book's opening its latch takes, unlatching before its cover swings.- See Also:
-
-
Method Details
-
swing
public static float swing(float open) How far the cover has swung open, 0 to 1, when the book isopenthat far (the latch goes first). -
bands
The bands round the spine. -
clear
public static void clear() -
get
The model with that id, read the first time it is asked for; null when there is none or it can't be read. -
draw
public void draw(com.mojang.blaze3d.vertex.PoseStack pose, SubmitNodeCollector collector, int light, boolean left, float width, float top, float bottom, float outside, int cover, int accent, float open, @Nullable org.joml.Matrix3f relight) Draws it on a board's outside. The pose is the book's (page pixels: x right from the spine, y down, z towards the reader);outsideis the z of the board's outer face, the boardwidthacross andtoptobottomtall;leftmirrors it for the left board.openis how far the book is open, 0 shut to 1, for the boxes shown only shut or only open.
-