-
Notifications
You must be signed in to change notification settings - Fork 0
/
Txtgenerator.pde
78 lines (58 loc) · 1.4 KB
/
Txtgenerator.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// Example of a controlled Spout sender
//
// spout.zeal.co
//
// http://spout.zeal.co/download-spout/
//
// RH click to open/close the controller.
//
// Rotating cube - by Dave Bollinger
// http://processing.org/examples/texturecube.html
//
// IMPORT THE SPOUT LIBRARY
import spout.*;
// DECLARE A SPOUT OBJECT
Spout spout;
String sendername;
// CONTROL ARRAYS
String[] controlName;
int[] controlType;
float[] controlValue;
String[] controlText;
String UserText = "";
PImage img; // image to use for the rotating cube demo
PFont f; // font for control text
float size=10;
float hue=150,sat=200,bri=255,trans=255;
float speedX=0;
float speedY=0;
float Rotation = 0;
boolean restorbounce = true;
boolean BGrefresh = true;
Restext VJtext;
void setup() {
// Initial window size
size(1200, 800, P3D);
textureMode(NORMAL);
// CREATE A NEW SPOUT OBJECT
VJtext = new Restext();
colorMode(HSB);
textAlign(CENTER);
iniciarspout();
}
void draw() {
if (BGrefresh){
background(0);
}
ActualizarControlesResolume();
fill(hue,sat,bri,trans);
VJtext.display(UserText,size);
VJtext.rotar(Rotation);
VJtext.move(speedX,speedY);
VJtext.restorbounce(restorbounce);
spout.sendTexture();
}
void exit() {
spout.closeSpoutControls();
}