Skip to content

Instantly share code, notes, and snippets.

View KrabCode's full-sized avatar
⚖️
maintaining LazyGui

Jakub Rak KrabCode

⚖️
maintaining LazyGui
  • Prague, Czech Republic
  • 10:59 (UTC +02:00)
View GitHub Profile
@KrabCode
KrabCode / rect_sphere_study.pde
Created November 29, 2022 15:05
cooler solution for equal spacing than angular diameter but I have no idea how it works...
float t = 1, x, y;
float sx, sy;
float rectSize = 30;
PMatrix3D mouseRotation = new PMatrix3D();
void setup() {
fullScreen(P3D);
rectMode(CENTER);
}
void setup() {
NodeFolder root = new NodeFolder("root");
root.addChild(new IntNode("nerdsSniped", 32));
root.addChild(new StringNode("cheese", "gouda"));
NodeFolder cats = new NodeFolder("cats");
cats.addChild(new IntNode("kittens", 3));
cats.addChild(new IntNode("chomkers", 7));
StringNode catSentiment = new StringNode("sentiment", "cute");
cats.addChild(catSentiment);
float radiusA = 200;
float radiusB = 300;
float fadeSize = 10;
int detail = 1000;
void setup() {
size(800, 800, P2D);
colorMode(HSB, 1, 1, 1, 1);
}
echo off
title noita backup
echo.
set noitaSaveLocation=%AppData%\..\LocalLow\Nolla_Games_Noita\save00
set /p dirName= New backup folder name:
robocopy "%noitaSaveLocation%" "%dirName%\save00" /s /e
echo Current noita save backed up as: %dirName%
echo.
pause
// TODO
// Extract key variables to the top
// Sinewave water level
// Drain blood somehow
ArrayList<P> ps = new ArrayList<P>();
ArrayList<L> ls = new ArrayList<L>();
float levelY;
void setup(){
PGraphics pg;
ArrayList<Leaf> leaves = new ArrayList<Leaf>();
ArrayList<Leaf> leavesToRemove = new ArrayList<Leaf>();
int lifeDuration;
public void setup() {
fullScreen(P2D);
pg = createGraphics(width, height, P2D);
}
@KrabCode
KrabCode / feedback.glsl
Last active March 29, 2022 09:50
Simple feedback effect in processing / glsl... feedback.glsl belongs in the data folder
uniform sampler2D texture; // the current canvas is passed to this shader in Processing as "texture" which is a bad name for it but whatever
uniform vec2 resolution; //set automatically by Processing
uniform float time; //set manually in code
void main(){
vec2 uv = gl_FragCoord.xy / resolution.xy; // coordinate with 0,0 at bottom left, and 1,1 at top right
vec2 offset = vec2(cos(time), sin(time)) / resolution.xy; // the rotating offset to sample a neighbour at
vec4 thisPixelColor = texture2D(texture, uv);
vec4 nearPixelColor = texture2D(texture, uv + offset);
vec4 finalColor = mix(thisPixelColor, nearPixelColor, 0.5); // lerp between the two colors, 0.5 specifies how quickly the effect fades into the background
int lineCount = 10;
int charsPerLine = 50;
int step;
PFont discordFont;
void setup() {
size(600, 200);
discordFont = createFont("Uni Sans Regular.ttf", 16);
import processing.core.PApplet;
public class ExampleSketch extends TransparentApplet{
public static void main(String[] args){
PApplet.main(java.lang.invoke.MethodHandles.lookup().lookupClass());
}
@Override
public void settings(){
PShader feedbackShader;
float t;
void setup() {
size(1000, 1000, P2D);
background(0);
feedbackShader = loadShader("feedback.frag");
}
void draw() {