animation code generation, part 1
frame code generation