kikito/tween.lua — pull request #9 by mrcharles (2012-12-24 04:16:53+00:00)
Title: preserve metatables when copying tables

This solves an issue I was having when tweening complex tables that use metatables. On finishing a tween, the subject lost its metatable, due to finishTween() copying the target into the subject.

The deep copy of copyTables was creating new tables and thus failing to account for a metatable; this change simply checks of a source table has a metatable, and if so, sets it as the metatable of the new table.