Mouthpiece: Technology

The Open Mouthpiece designer was originally built to render mouthpiece models using JavaScript within NodeJS. It uses extensive JavaScript code to render a set of Bezier curves defining the shape of a mouthpiece that is then rotated around an axis.

The JavaScript code has now migrated into the frontend, as this allows for a much more responsive user experience, with the downside of a requirement for greater processing power in the computer being used to visit the site.

The JavaScript code forms two parts: the model, which takes in a set of parameters (defined by sliders in the UI) and receives back a set of points representing the outline of a mouthpiece shape. The second part is the front end code that makes use of the three.js library to render the model in a browser.