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
  • 21:30 (UTC +01:00)
View GitHub Profile
@KrabCode
KrabCode / SolarSystem2D.pde
Last active December 29, 2024 23:20
Install on Android with APDE.
float sunSize = 100;
float planetRadiusStep = 180;
float planetSize = 45;
int count = 4;
int brightColor;
int darkColor;
int orbitColor;
int bgColor;
ArrayList<Float> offsets = new ArrayList<Float>();
float mouseOffset = 0;
@KrabCode
KrabCode / Particles.pde
Created December 25, 2024 10:52
Demonstrating adding up various forces as acceleration of a single particle.
PVector emitter = new PVector();
int particleCount = 100;
int particlesCreatedPerFrame = 5;
int particleLifetimeFrames = 60;
float time;
ArrayList<Particle> particles = new ArrayList<Particle>();
void setup() {
size(800, 800);
background(24);
{
"children": [
{
"children": [
{
"children": [
{
"valueString": "dark",
"children": [
{
@KrabCode
KrabCode / MoonPhaseMonthGrid.pde
Last active November 9, 2024 10:59
A calendar of 365 moons in different phases as a looping trippy visual.
import com.krab.lazy.*;
LazyGui gui;
String[] monthNames = new String[]{
"January",
"February",
"March",
"April",
"May",
"June",
@KrabCode
KrabCode / MoonPhases.pde
Created November 7, 2024 23:39
Animated 2D moon with debug visuals. Uses LazyGui.
import com.krab.lazy.*;
LazyGui gui;
PGraphics pg;
float t;
float phase;
float lightPhase;
boolean growing;
float r;
float angle0;
float count = 10;
float step = 40;
float xPos = 400;
PGraphics gradient;
void setup() {
size(800, 600, P2D);
createGradient();
import com.krab.lazy.*;
LazyGui gui;
PGraphics noiseOverlay;
void setup() {
size(800, 800, P2D);
gui = new LazyGui(this, new LazyGuiSettings()
.setLoadLatestSaveOnStartup(true)
);
import ch.bildspur.postfx.builder.*;
import ch.bildspur.postfx.pass.*;
import ch.bildspur.postfx.*;
import org.gicentre.handy.*;
import com.krab.lazy.*;
PostFX fx;
LazyGui gui;
HandyRenderer hr;
PImage img;
@KrabCode
KrabCode / RecursiveBox.pde
Last active February 23, 2024 21:04
Recursive textured box. Runs on android using APDE.
int bgTop = 20;
int bgBot = 230;
PImage tex;
float sx, sy;
PMatrix3D mouseRotation = new PMatrix3D();
void mouseRotate() {
float x = mouseX - pmouseX;
float y = mouseY - pmouseY;
float drag = 0.98;
float prevX = 400;
float prevY = 400;
float dir = 0;
float off;
int imgSize = 120;
PImage img;
float bgColor = 30;