It's better to resign; this way, it's on your terms. Getting fired means you have to explain this to the next job. Getting fired also means the reference if you get one is unlikely to help with getting another one.