Here's an idea for delta

I noticed that in unity there is a fixed update and a onEnterFrame type update.

Instead of using a set delta, I'm calculating the difference of time between the calls.  Also I made it so you can define fps instead of delta.
`delta = 1 / fps` should be fine. Multiplying/dividing by 1000 might actually increase error, although I would expect it to be negligible either way.