Skip to content

Instantly share code, notes, and snippets.

View monxa's full-sized avatar

monxa

  • Germany
View GitHub Profile
@Tam
Tam / smooth_camera_zoom_and_pan.gd
Last active November 12, 2025 19:32
A smoothly panning and zooming camera for Godot 4 (now with mouse edge panning)
extends Camera2D
# Note: Limit smoothing and position smoothing must be disabled
const V2_2: Vector2 = Vector2.ONE * 2
const PAN_SPEED: int = 2000
const PAN_SMOOTHING: int = 8
# How far from the edge of the screen panning starts (% of screen size)
const EDGE_PAN_THRESHOLD_MIN: Vector2 = Vector2(0.06, 0.12)
@whi-tw
whi-tw / printer.cfg
Created August 10, 2021 17:26
Klipper config for my ANET A8
# This file contains common pin mappings for Anet A8 printer from 2016
# and 2017. To use this config, the firmware should be compiled for
# the AVR atmega1284p.
# Note that the "make flash" command does not work with Anet boards -
# the boards are typically flashed with this command:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# See docs/Config_Reference.md for a description of parameters.