Skip to content

Instantly share code, notes, and snippets.

View groverburger's full-sized avatar

Zach groverburger

View GitHub Profile
@EngineerSmith
EngineerSmith / main.lua
Last active February 21, 2022 14:41
Pinch and zoom + pan in love2d
local lg, lt = love.graphics, love.touch
local insert, remove = table.insert, table.remove
local sqrt = math.sqrt
local x,y, w,h = love.window.getSafeArea()
local textW, textH = x+w,y+h
local a, b = textW/2, textH/2
local texture = lg.newCanvas(textW,textH)
lg.setCanvas(texture)
lg.setColor(.5,.5,.5)
@nadako
nadako / Main.hx
Created June 24, 2015 19:36
Haxe + SDL = native love \o/
class Main {
static function main() {
Sdl.init(Sdl.INIT_EVERYTHING);
var win = Sdl.createWindow("Hello", 100, 100, 800, 600, Sdl.WINDOW_OPENGL);
var ren = Sdl.createRenderer(win, -1, Sdl.RENDERER_ACCELERATED);
var bmp = Sdl.loadBMP("test.bmp");
var tex = Sdl.createTextureFromSurface(ren, bmp);
Sdl.freeSurface(bmp);
for (i in 0...3) {