Skip to content

Instantly share code, notes, and snippets.

View bellinitte's full-sized avatar

Charlie Bellini bellinitte

View GitHub Profile
@bellinitte
bellinitte / image.png
Last active October 6, 2021 18:36
Displaying an image on a Nokia 5510 LCD controlled by an ATmega328P
image.png
@bellinitte
bellinitte / viewport.js
Last active September 23, 2020 19:35
Utility functions for handling geometrically correct panning and zooming of a canvas
class Viewport {
constructor(canvas) {
this.canvas = canvas;
this.camera = {
x: 0,
y: 0,
z: 1,
};
this.pivot = null;
}