createAnimationsFromNaming
createAnimationsFromNaming(
spriteSheet,prefix,options?):Animation[]
Defined in: packages/three-flatland/src/animation/utils.ts:61
Create animations from a naming convention.
Assumes frames are named: {prefix}_{animationName}_{frameIndex}
Parameters
Section titled “Parameters”spriteSheet
Section titled “spriteSheet”prefix
Section titled “prefix”string
options?
Section titled “options?”number
boolean
Returns
Section titled “Returns”Example
Section titled “Example”// Auto-detect animations from frames like 'player_idle_0', 'player_walk_0', etc.const animations = createAnimationsFromNaming(sheet, 'player');