write js code for my website to create a VTT token creator for my website here are the functions :
The user can upload an image they want to create a token for.
The user drag and drop the image onto the workspace.
The user customize the token border by using the options at the top of the page. The use can change the border tint, background colour of the token.
The user can also use the Scale slider to resize the token and the Border Opacity and Overlay Opacity sliders to change the transparency of your token.
The user can also choose a different border or overlay design by clicking on the Set Custom Border or Set Custom Mask buttons.
there is a real time Preview and edit your token by looking at the workspace.
The user can drag your token around to reposition it.
The user can also clear the workspace or reset the position by using the button reset on the right side of the page.
The user can Download the token with a button on the right side of the page.
The exported image should a round PNG 280*280 pixels.
Assistant
Here's a simple implementation of the requested features in JavaScript, HTML and CSS:
This code facilitates image upload, resizing, and downloading as requested. However, the custom border and overlay functionality will require more complex implementations, depending on your specific requirements.