natiny.mesh.get_skinned

Lua
natiny.mesh.get_skinned(mesh) -> skinned

Returns whether this mesh came with a skeleton, and so whether a model built on it can be animated.

Parameters

Name Type Description
mesh number Mesh handle

Returns

Type Description
boolean true when the glTF file carried at least one skin; false for an invalid handle

Example

Lua
if natiny.mesh.get_skinned(hero_mesh) then
    animator = natiny.animator.create(hero)
end