我尝试从Max初始化处理PApplet。 我可以创建Applet,但我无法运行它。 我可以创建一个java Frame,所以我的猜测是PApplet应该是可能的。
以下是我所知道的:
public class PAppletInMax extends MaxObject {
public static class Test {
Test() {
// this is to have a message in Max console
post("construct Test");
// create the Processing sketch
MaxTest_01 mt_01 = new MaxTest_01();
// call main
// here is where it goes wrong
//mt_01.main(new String[]{});
// this crashes max
//mt_01.runSketch(new String[]{}, mt_01);
//PApplet.runSketch(new String[]{}, mt_01);
}
}
public PAppletInMax() {
/*
// this works
JFrame frame = new JFrame("FrameDemo");
frame.pack();
frame.setVisible(true);
*/
Test t = new Test();
}
}
如果有人可以提供帮助,那将是非常好的。因为一旦它运作起来就容易得多,因为OSC不再需要进行通信了。