image_framesetsize(3)
π image_framesetsize(3) β Arcan Lua API β¨
okay bestie, welcome to the image corner of the Arcan Lua API π this one's called image_framesetsize and honestly? it's giving backstage-pass energy π
πΈ NAME πΈ
image_framesetsize β allocate slots for multi-frame objects, periodt π
β¨ SYNOPSIS β¨
nil
image_framesetsize( vid, int:count )
image_framesetsize( vid, int:count, int:mode )
π¦ DESCRIPTION π¦
so like, objects can literally have a frameset associated with them π«Ά and a frameset is comprised of references to vstores that have been acquired from other pre-existing objects β including the source object itself, yes ma'am π
the way this mechanism works? it's similar to image_sharestorage, and the lifecycle of the frameset association is tied to the supplied vid π (iykyk, that link is forever... or at least until the object dips π)
this can be used for applications e.g. multitexturing, animations, texturing complex 3D models, and as a round-robin storage for dynamic data sources (effectively giving you access to previous frames β time travel but make it graphics β³β¨).
mode is FRAMESET_SPLIT, and the other option is FRAMESET_MULTITEXTURE. let's break those down:
FRAMESET_SPLITonly has one active frame, like any other video object β and it then relies onframecyclemodeor manually selecting the visible frame by explicitly callingimage_active_frameπFRAMESET_MULTITEXTUREtries to split the frameset across multiple texture units π₯ these can be accessed in a shader through the samplersmap_tu0,map_tu1etc. slay π
π NOTES π
- A frameset associated with a 3D model will be split across each mesh, where a single mesh can consume multiple frameset slots β unless the source is a cubemap π§
- Once initialized with a frameset, the size of the frameset can only increase during the life-cycle of the object π€ with the special case of setting a frameset to
1, which will drop and reset the object to only have one active frame and revert to normal mapping mode π - The initial state of frameset slots for
vidis that all reference the default vstore for the object π± - A persistant object cannot have a frameset β associating a frameset with an object disqualifies the object to be marked as persistant π« no cap, that's just how it is
- frameset support only applies to objects with a normal, textured backing store π¨
π EXAMPLE π
function image_framesetsize0()
a = fill_surface(32, 32, 255, 0, 0);
image_framesetsize(a, 3);
b = fill_surface(32, 32, 0, 255, 0);
c = fill_surface(32, 32, 0, 0, 255);
set_image_as_frame(a, b, 1);
set_image_as_frame(a, c, 2);
image_framecyclemode(1, -1);
show_image(a);
end
look at her go π red, green, blue, cycling frames β main character energy fr fr π₯
π SEE ALSO: π
π cute little sign-off π
this page is from the image manual, dated October 2026, and it's image_framesetsize(3) β go forth and multitexture, bestie π§π
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms