I’m Daniel Perez Alvarez, a software engineer currently working at Microsoft. I enjoy building things more than I enjoy writing about them, but I do occasionally write. Here’s a bit of everything:
- Colored Noise
Using the Web Audio API to generate noise of different colors. You can move the sliders to adjust the gain on the white, pink and red noise generators.
- Deploying a Web App to a 2016 Samsung SmartTV
Lately I’ve been building a web app for my 2016 Samsung SmartTV using React Native for Web. It’s a Twitch client that you can control with your remote. Deploying this app to the TV is a pain in the rear. You need to follow the steps outlined in Samsung’s quick-start guide to developing web applications. That guide is not particularly well written, and it’s missing some key details, so I’ve decided to document the steps I followed.
- Notes on “Y Not”
- SVG Painter
You know that cool animation that Polygon used in their Xbox One and PS4 reviews, where SVG images appeared to draw progressively? It’s really easy to do. You just need to set the stroke-dasharray property of each path to its total length, and then animate the stroke-dashoffset property.
- Pixel Art Scaling Comparison Part 2
I’ve been playing with a few other scaling algorithms in the 2dimagefilter project. They produce even more impressive results than the previous batch… Part 1 showcased the Eagle, SuperEagle, SaI and SuperSaI algorithms. I will continue here with EPX/Scale, HQx, xBR and xBRZ.
- Pixel Art Scaling Comparison Part 1
I’ve been playing with a few scaling algorithms in the 2dimagefilter project. They produce quite impressive results when fed pixel art, and the fact that emulators are able to run them in real time is just mindboggling. Here I’ve chosen a bunch of images to showcase the Eagle, SuperEagle, SaI and SuperSaI algorithms. Part 2 continues with the EPX/Scale, HQx, xBR and xBRZ algorithms.
- Image Comparison
I wanted to compare two images side by side for my articles on pixel art scaling (parts one and two), to show the difference between various algorithms. The TwentyTwenty jQuery plugin does this beautifully, but I wanted to avoid external dependencies.
- Magnifying Glass
I wanted a magnifying glass effect for my articles on pixel art scaling (parts one and two), to show the difference between various algorithms. There are a few jQuery plugins that do this, but I didn’t want to add external dependencies, and this was a good excuse to play with the canvas element.
- Touch Grid
Straightforward experiment with a canvas displaying some circles. Move your mouse or fingers over the circles, and they will react.
- Lorenz Attractor with JS
Drawing a Lorenz attractor by absolutely positioning span elements along the x and y axes, and faking the z axis by adjusting their size.
- Lorenz Attractor with CSS
- Animated Cuboids with CSS
- Trigonometry in Sass
- GitHub Ribbon Using CSS Transforms
Do you know when Tom Preston-Werner released the ‘Fork me on GitHub’ ribbons that you often see on websites for open-source projects? It was December 2008! Man I feel old… I like the idea behind the ribbon. It’s an easy way of telling your users that this software is open-source, and that there’s a repo available for them to browse and fork. Using an image for the ribbon though? I don’t like that at all, for multiple reasons: Changing things like the font or the colors of the ribbon is really inconvenient, as it forces you to fire up an image editor. Including this image on your page means an additional request, and about 8KB of payload. You have to be careful with the positioning of the image, as it’s a pretty big square, and you don’t want it to block part of your site’s navigation. You have to think about generating and serving a high-definition version if you don’t want your ribbon to look all pixelated on HiDPI devices.