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
  • 01:58 (UTC +02:00)
View GitHub Profile
float framesToRecord = 120;
void setup() {
size(600, 600);
smooth(4);
}
void draw() {
background(16);
noStroke();
float minValue = 0;
float maxValue = 300;
float startValue = 100;
float stepLength = 200;
float stepValue = 1.5;
int stepCount = ceil((maxValue - minValue) / stepValue);
float xDrag = 0;
float xDragSpd = 0;
float xSpdCoeff = 0.9;
float lineHeight = 150;
@KrabCode
KrabCode / Spirograph.pde
Last active August 1, 2023 13:17
Simple spirograph editor using the LazyGui library and Processing 4
import com.krab.lazy.*;
LazyGui gui;
int shapeCount = 3;
int shapeCountMax = 10;
void setup() {
size(800, 800, P3D);

cd

  • bez dalších argumentů vypíše aktuální adresář, aby fungoval git tak by měl být v rootu repozitáře kde je .git složka

git pull --help

  • za každý git příkaz jde napsat --help
import java.util.*;
PImage s;
ArrayList<P> ps = new ArrayList<P>();
ArrayList<M> ms = new ArrayList<M>();
ArrayList<M> mbin = new ArrayList<M>();
HashMap<Integer, PImage> imgs = new HashMap<Integer,PImage>();
void setup(){
void setup() {
size(600, 300);
}
void draw() {
textAlign(CENTER, BOTTOM);
translate(width/2, height*0.8);
background(36);
fill(255);
textSize(22);
@KrabCode
KrabCode / Cog.pde
Last active December 13, 2023 15:59
import com.krab.lazy.*;
LazyGui gui;
void setup() {
size(1200, 800, P3D);
smooth(8);
gui = new LazyGui(this);
}
@KrabCode
KrabCode / ShaderTest.java
Created March 20, 2023 12:34
Arbitrary number of uniforms for shaders using the LazyGui library
package examples_intellij;
import lazy.LazyGui;
import lazy.ShaderReloader;
import processing.core.PApplet;
import processing.core.PGraphics;
import processing.opengl.PShader;
public class ShaderTest extends PApplet {
LazyGui gui;
uniform sampler2D texture;
uniform vec2 resolution;
uniform float time;
uniform float rotationTime;
uniform float scalingTime;
uniform int copies;
#define PI 3.14159
vec2 cartesianToLogPolar(vec2 p){