skeleton.bones

Type: table (read-only)
See also: skeleton, bone

Overview:


An array of bone objects, each controlling the transform (position, rotation, scale) of a skeleton’s structure.

Example:


local spine = require("plugin.spine")
local atlas = spine.loadAtlas("hero.atlas")
local skeletonData = spine.loadSkeletonData("hero.skel", atlas)
local hero = spine.create(skeletonData)

-- Iterate bones and print their names
for i, bone in ipairs(hero.bones) do
    print("Bone:", i, "Name:", bone.name)
end