Skip to content

Instantly share code, notes, and snippets.

put your link here
@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) {
@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");
}
import processing.video.*;
Movie tex;
// PImage tex;
float rotx = PI/4;
float roty = PI/4;
void setup() {
size(640, 640, P3D);
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;
@studioijeoma
studioijeoma / Tween_Vec3D.pde
Created May 8, 2013 14:30
Tweening Toxiclibs Vec3D with ijeomamotion using the IProperty interface
import ijeoma.motion.Motion;
import ijeoma.motion.tween.Tween;
import toxi.geom.Vec3D;
Tween t;
PFont f;
Vec3D v1, v2;
#include "cinder/app/AppBasic.h"
#include "cinder/gl/gl.h"
#include "cinder/gl/Fbo.h"
#include "cinder/gl/Texture.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class MirroredFboApp : public AppBasic {
@studioijeoma
studioijeoma / WheelsOfSteel.pjs
Created January 28, 2012 21:57
WheelsOfSteel.pjs
// Generated by the Processing.js exporter for Processing IDE.
// https://github.com/fjenett/processingjstool
// this code was autogenerated from PJS
(function($p) {
var sampleRate = 0;
$p.ArrayList<Float> ttPositions = new $p.ArrayList<Float>();
var ttPositionIndex = 0;
@studioijeoma
studioijeoma / gist:1695886
Created January 28, 2012 21:55
WheelsOfSteel.pde
import java.util.ArrayList;
float sampleRate;
ArrayList<Float> ttPositions = new ArrayList<Float>();
int ttPositionIndex;
float ttPosition, pttPosition;
@studioijeoma
studioijeoma / webgl_canvastext_billboarding.html
Created September 3, 2011 02:04
three.js webgl - canvas text billboarding
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>three.js webgl - canvas text billboarding</title>
<meta charset="utf-8">
<style type="text/css">
body {
font-family:Monospace;
background-color:#000000;
margin:0px;