summaryrefslogtreecommitdiff
path: root/lasertext/src/vectortext.h
diff options
context:
space:
mode:
authorTim Redfern <redfernt@gmail.com>2023-08-18 15:53:23 +0100
committerTim Redfern <redfernt@gmail.com>2023-08-18 15:53:23 +0100
commit03eacae3ff028f7e565b3aebf28af48a0b08c585 (patch)
tree4f763978d81605b0d72fe25abeadd7c44746b4f9 /lasertext/src/vectortext.h
parentae1a7a509b9c5f08636b449f5de3ffede4ae954a (diff)
starfield randomisation
Diffstat (limited to 'lasertext/src/vectortext.h')
-rw-r--r--lasertext/src/vectortext.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lasertext/src/vectortext.h b/lasertext/src/vectortext.h
index 088ee96..69ea98c 100644
--- a/lasertext/src/vectortext.h
+++ b/lasertext/src/vectortext.h
@@ -68,6 +68,11 @@ class glyphbanner{
ofColor::fromHex(0x102ADC),
ofColor::fromHex(0x9FA1AC)
};
+ vector<ofColor> als23={
+ ofColor::fromHex(0x00A8FF),
+ ofColor::fromHex(0xFFB700),
+ ofColor::fromHex(0xFF3082)
+ };
}palettes;
vector<string> split(string s) {
size_t pos_start = 0, pos_end;
@@ -85,10 +90,10 @@ class glyphbanner{
}
public:
glyphbanner(){
- palette=palettes.uneasy;
+ palette=palettes.als23;
};
void init(string message){
- createWords(message);
+ createWords(message,true);
lastUpdateTime=ofGetElapsedTimef();
playhead=0.0f;
}
@@ -214,6 +219,10 @@ public:
lastUpdateTime=ofGetElapsedTimef();
playhead+=delta*speed;
+ if (ofRandom(1.0f)<.001){
+ playhead=ofRandom(100);
+ }
+
int theword=0;
float segment=0.0f;
if (false){ //1 word per second