Hello @MMS
You find some information about using plugins here https://plugins.psychopy.org/. I do not know anything about importing your own JavaScript libraries into PsychoPy. But there are some postings in the forum that might help, e.g. Importing javascript libraries for use in an experiment on pavlovia, or JS library & Python library
Best wishes Jens