This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uniform sampler2D texture; | |
| uniform vec2 resolution; | |
| uniform float time; | |
| #define pi acos(-1.) | |
| // beautiful sdf visualisation from here: https://www.shadertoy.com/view/XsyGRW | |
| vec3 draw_line(float d, float thickness) { | |
| const float aa = 3.0; | |
| return vec3(smoothstep(0.0, aa / resolution.y, max(0.0, abs(d) - thickness))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float imageScale = 2; | |
| private float time; | |
| private int catCount = 3; | |
| private ArrayList<Cat> cats = new ArrayList<Cat>(); | |
| private Cat held = null; | |
| private PImage sticksIdle, sticksHeld, catHeld; | |
| private PImage[] catDown, catRight, catUp; | |
| int sticksFadeoutDelay = 60; | |
| int sticksFadeoutDuration = 60; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float imageScale = 1; | |
| private float time; | |
| private int catCount = 12; | |
| private ArrayList<Cat> cats = new ArrayList<Cat>(); | |
| private Cat held = null; | |
| private PImage sticksIdle, sticksHeld, catHeld; | |
| private PImage[] catDown, catRight, catUp; | |
| int sticksFadeoutDelay = 60; | |
| int sticksFadeoutDuration = 60; | |
| int sticksLastReleasedFrame = - sticksFadeoutDuration*3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int glyphRowsAndColumns = 19; | |
| int resultGlyphSize = 10; | |
| int glyphSize; | |
| ArrayList<Glyph> glyphs = new ArrayList<Glyph>(); | |
| PImage sourceImage; | |
| PGraphics pg; | |
| boolean displayResult = true; | |
| void setup() { | |
| size(800, 800, P2D); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| STATE_BEGIN | |
| UNDO | |
| GROUP§Fireball§true | |
| Fireball§record frames§0.0§100.0 | |
| Fireball§fade to black§1.3770002§25.5 | |
| Fireball§blur§1.1499996§10.0 | |
| Fireball§translate§100.0§0.0§0.0§0.0 | |
| Fireball§rotate§3.1415927§0.0§1.7592926§0.0 | |
| Fireball§axis§0.10000001§0.0§0.0§0.026970005 | |
| Fireball§speed§0.38999966§10.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| size(800, 800, P2D); | |
| } | |
| void draw() { | |
| float[] positions = new float[]{0, 0.25, 0.5, 0.55, 1}; | |
| int[] colors = new int[]{ | |
| color(0), | |
| color(4, 38, 102), | |
| color(255, 255, 255), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| size(800,800, P2D); | |
| } | |
| void draw() { | |
| float[] positions = new float[]{0, 0.25, 0.5, 0.55, 1}; | |
| int[] colors = new int[]{ | |
| color(0), | |
| color(4,38,102), | |
| color(255,255,255), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PShape createSphere(float r, int detail) { | |
| PShape res = createShape(); | |
| float deg5 = TWO_PI / 5f; | |
| float deg6 = acos((1f + sqrt(5f)) / (5f + sqrt(5f))); | |
| PVector top = new PVector(0, r, 0); | |
| PVector[] sides = new PVector[5]; | |
| for (int i = 0; i < 5; i++) { | |
| sides[i] = new PVector( | |
| r * sin(deg6) * cos(deg5 * i), | |
| r * cos(deg6), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| size(800, 800, P2D); | |
| background(0); | |
| } | |
| void draw() { | |
| group("global"); //collapsible groups | |
| background(picker("background", 0).clr()); // instead of the whole clr() you can query hue, sat, br and alpha separately in the 0-1 range | |
| PVector translate = sliderXY("translate"); | |
| translate(translate.x, translate.y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| size(600, 600, P2D); | |
| } | |
| void draw() { | |
| float t = radians(frameCount); | |
| String testShader = "frag.glsl"; | |
| uniform(testShader).set("time", t); | |
| hotFilter(testShader); | |
| } |