Processing常见问题

Use only numbers(not variables) fro size() command

这一报错出现在Proccessing 3中,原因是在size()中使用了变量来指定宽度和高度。解决方法是使用另外一个命令surface.setSize()来代替size(),再次执行(Ctrl+R或Cmd+R)报错就会消失

The size of this sketch could not be determined from your code.....

待解决问题

使用Minim库在引入音频文件时,出现如下报错:

==== JavaSound Minim Error ====

==== Error reading from the file – Stream closed

常见命令

void keyPressed(){
//按下键盘执行语句
}

void mousePressed(){
//按下鼠标执行语句
}

mouseX、mouseY 鼠标坐标

pmouseX、pmouseY 鼠标所在的上一个坐标

cursor(ARROW); //有效值有ARROW,CROSS,HAND,TEXT,WAIT

noCursor();


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.