Skip to content

Instantly share code, notes, and snippets.

View KrabCode's full-sized avatar
🔮
discovering Tooll3

Jakub Rak KrabCode

🔮
discovering Tooll3
  • Prague, Czech Republic
  • 20:17 (UTC +02:00)
View GitHub Profile
@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){
@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);