Skip to content

Instantly share code, notes, and snippets.

import java.util.ArrayList;
import java.util.Vector;
import processing.core.PApplet;
import processing.core.PVector;
public class NoisePathTest4 extends PApplet {
// ParticlePath pathParticle;
ArrayList<ParticlePath> particlePaths;
import processing.video.*;
Movie tex;
// PImage tex;
float rotx = PI/4;
float roty = PI/4;
void setup() {
size(640, 640, P3D);
@studioijeoma
studioijeoma / gist:5961868
Created July 9, 2013 22:25
image/shape mask
import processing.core.*;
public class MaskingTest extends PApplet {
PShape mask;
PImage profileImage;
public void setup() {
size(800, 600, P3D);
profileImage = loadImage("http://behance.vo.llnwd.net/profiles15/2970301/projects/9502097/404x344d3f03e5e6a05fba901c31189f9236.jpg");
}
@studioijeoma
studioijeoma / p5.textHeight.js
Created October 16, 2014 16:31
p5.js textHeight() gets height of text box – text(words,x,y,w,h)
function textHeight(text, maxWidth) {
var words = text.split(' ');
var line = '';
var h = this._textLeading;
for (var i = 0; i < words.length; i++) {
var testLine = line + words[i] + ' ';
var testWidth = drawingContext.measureText(testLine).width;
if (testWidth > maxWidth && i > 0) {
put your link here