Skip to content

Instantly share code, notes, and snippets.

View TechnicJelle's full-sized avatar

TechnicJelle

View GitHub Profile
@TechnicJelle
TechnicJelle / SimpleDragWindow.pde
Last active February 22, 2024 20:51
A simple class you can use to easily add dragging to your Processing window. Just click and drag anywhere inside the sketch, and it'll move the window along!
WindowDragger windowDragger;
void setup() {
size(400, 400);
//Set the start position of the window here (in screen pixels)
windowDragger = new WindowDragger(100, 100);
//OR:
@TechnicJelle
TechnicJelle / BlueMapDistanceMeasurer.js
Created January 3, 2024 23:55
A BlueMap script that adds a basic distance measuring tool to the website.
const positions = [];
const distanceLineMarker = new BlueMap.LineMarker("distanceLineMarker");
distanceLineMarker.line.depthTest = false;
distanceLineMarker.line.linewidth = 2;
bluemap.popupMarkerSet.add(distanceLineMarker);
hijack(bluemap.popupMarker, 'open', function (original) {
return function () {
const pos = bluemap.popupMarker.position;
positions.push([pos.x, pos.y, pos.z]);