What is the resolution of your device?
TBH, I’m still not sure I get the issue. Do you mean the linked application renders nicely on your device but not your shared code?
I’ve created a live example with your code. It renders crystal clear on my iMac:
I’ve just added renderer.setPixelRatio(window.devicePixelRatio);
so the app utilizes the full resolution of my retina display.