CSS Art: Nintendo Switch

css-art:-nintendo-switch

This weekend, I streamed while live coding/drawing a Nintendo Switch with HTML and CSS. The drawing is:

  • Responsive: resize the window to see it change
  • Semantic: sections, the buttons are buttons
  • Customizable: CSS variables to change the JoyCon colors
  • Realistic: at least that was the goal 😅

Here’s the demo on CodePen (the drawing and the original photograph):

The process took around 4 hours (broken into different sessions that I will call “my kids are finally sleeping” and “my kids are not awake yet“) that I put together and sped up on this video:

Later, I did another version. This time I plugged in a library I created to handle the Gamepad API, and I tried connecting the JoyCon to the computer… it works 🙂

If you have a Nintendo Switch, try plugging the left controller into your computer via Bluetooth, then head to this demo (only some of the buttons will work):

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
checking-if-a-value-is-a-number-in-javascript-with-isnan()

Checking if a value is a number in Javascript with isNaN()

Next Post
getting-into-the-field-(cs)-is-hard!-my-way-to-help-out…

Getting into the field (CS) is hard! My way to help out…

Related Posts