functional particle and emitter. needs tweaking and refactoring.