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

AI治理最重要的能力:缺乏证据支持时懂得暂停

1)观点先行(P0) 一句话观点: 在 AI 协作里,最有价值的治理能力不是“更快修完”,而是“证据不够时敢停下,并把缺什么证据说清楚”。 2)治理背景(P1) 复杂系统里的真实问题,不是没人干活,而是大家都在干活,却很难判断到底有没有真的完成。 AI 参与后,这个问题会更明显: AI 很容易给出“看起来已经完成”的答案。 多个智能体并行提交回执,信息会很快变成噪音。 模块测试通过,常常被误读成系统已经恢复。 本地治理体系之所以更快,不是因为流程更短,而是因为它把“没完成”这件事制度化了: 可以停在中间状态。 可以明确写出阻断原因。 可以等证据补齐后再推进状态。 3)信号提取(P0)…
Read More