Lazy physics javascript engine