I was tasked to come up with a working prototype of a 3D clothing customiser for a company that sold clothing made for biking. The biggest problem with this was that they had absolutely no requests apart from the general concept I was given, so I found myself very lost in the first moments or designing this.
A big chunk of the time was spent looking at all the available technologies that would allow me to interact with a 3D model from a browser. Despite having a few different options I decided to settle on using ThreeJS, as it is just an amazing library, its compatibility with devices, speed and just sheer simplicity pushed it above and beyond everything else.
The second biggest problem was switching textures. After spending a week trying out every combination of texture switching from the script I realised that even if it had worked smoothly I still would not have been able to mix different colors together. The solution finally came to me when, instead of applying the image directly to the 3D model, I tried applying an HTML canvas as a texture, and then applying the textures to the canvas.
As I expected this was quick, efficient, and allowed me to have a much less complicated script. From then on I just tried to get a basic interface going that would illustrate the function of the script.
A live, working version, of this can be viewed here here.