i'm creating some presentation program and it simply "lag's" (freezes) because of the photos.
1. What's the most efficient way of loading photos during draw() (is it requestImage()) ?
2. How to delete loaded image from RAM (is it enough/good to do img=null) ?
3. Should i run photos on separate thread(is it good/worth) ?
i have ranned into problems with saveStrings(). As documented:
http://processingjs.org/reference/saveStrings_/ it does not work. Why it is not written how to use it to write data to server. I understand that it is complicated and it is not easy to do with javaScript, but why then you do not write it in the reference?
void keyReleased() {
if (key != CODED) {
switch(key) {
case BACKSPACE:
typedText = typedText.substring(0,max(0,typedText.length()-1));
break;
case TAB:
break;
case ENTER:
case RETURN:
typedText += ";" ;
newFormData [ 0 ] += typedText ;
typedText = "";
if ( i < ilgis )
{
i ++ ;
if ( i == ilgis )
{
for ( k = 0 ; k < oldFormData.length ; k ++ )
{
DataToFile [ k ] = oldFormData [ k ] ;
}
DataToFile [ DataToFile.length - 1 ] = newFormData [ 0 ] ;
saveStrings ( sOutFileName, DataToFile ) ;
bSucessfulInput = true ;
i = 0 ;
}
}
break;
case ESC:
case DELETE:
break;
default:
typedText += key;
bSucessfulInput = false ;
}
}
}
And the problem is that is shows on screen keycode. It does not capture the code.. Even if i try example with exact keycodes (as in here:
http://processingjs.org/reference/globalKeyEvents/) ir does not work. Although it work in my computer with processing compiler.
What should i do and what is wrong?
My code in the internet:
http://alumni.vgtusa.lt/ and when you click (make active) the sketch you can try to write... On backspace it should delete a letter (it works on my computer, but not online), when you press enter - it should change the text before " : ", and when you press any letter it should show it on screen (again, it works on my screen).
i'm new to processing and i have written some code which does not work properly (i want that blue and that green (i do not know how do you call them) to rotate like they have to..):
And the problem is that my rotating images draw's on themselfs. If i draw a rectangle and set it to this kind of rotation - it rotates on himself and becomes a circle...