Please tell me you've been to an opticians since?
This is probably a blood flow issue, cocaine constricts a bunch of small blood vessels severely while ramping up blood pressure at the same time. When you're young, or just lucky you can get away with this shit but mostly you should be very concerned. You might be prone to high IOP (Intra-Ocular Pressure) and/or high blood pressure, everyone's individual physiology varies but the configuration of veins and such supplying blood to your eyes might be odd in a way that means one or both of your eyes and/or optic nerves were starved of sufficient blood supply. If your IOP stays high for too long it will progress to glaucomatous optic nerve damage which is a progressive condition which you will need to monitor the rest of your life - by the sounds of it that might have already happened. An alternative but no less concerning scenario is that the spike in IOP or possibly even a counterintuitive drop or something else as a downstream side effect of general fuckery happening in all the tiny lil twisted blood vessels surrounding your brain and eyes could have induced a partial retinal detachment, or possibly just inflammation. The retina is an extremely delicate and easily damaged piece of biological machinery that everyone blessed with sight would do well to try to appreciate, and can be damaged severely and permanently from either of these scenarios, and much like glaucomatous optic nerve damage is almost universally progressive once it starts, retinal damage often creates a cascade of oxidative stress within the eyeball which goes on to damage more of this delicate, currently irreplaceable layer of tiny light sensitive cells.
Wait wait wtf I just re-read your post. This happened THREE YEARS AGO, and you're just now asking about it?
If what you described was the extent of your issues and your sight in the affected eye is 100% recovered since, you probably have got away with it, but everything I said still applies, it's not normal to lose vision for any reason in one or both of your eyes and when stimulant drugs are involved blood and IOP pressure issues are an obvious culprit.
You might well still be prone to these conditions later in life, visit an actual ophthalmologist and get your eyes looked at properly so if you are, you can take steps early to prevent any serious and irreversible conditions from ever manifesting. And when I say properly I mean they're gonna take pressure readings, take photos of the back of your eye, generally have you sitting there a while doing stuff other than just reading the lil eye chart. Take the health of your eyes seriously for the love of god.