import - Issue with Standalone in Processing -
i have sketch running in processing 2.1.2
, , runs fine sketch window. when try export standalone windows application, processing creates application.windows folder, contains 'lib' , 'source' subdirectories. when double-click application, showing me blank window.
can guide me on how resolve issue? coding of program given below:
import toxi.geom.*; import toxi.geom.mesh.*; import toxi.processing.*; import processing.serial.*; trianglemesh mesh; toxiclibssupport gfx; pimage img; string input; serial port; int x,y,z; void setup() { size(448, 299,p3d); println(serial.list()); port = new serial(this,serial.list()[0], 9600); port.bufferuntil('\n'); mesh=(trianglemesh)new stlreader().loadbinary(sketchpath("check.stl"),stlreader.trianglemesh); gfx=new toxiclibssupport(this); img=loadimage("imagei.jpg"); } void draw() { background(img); translate(width/2,height/2,0); rotatex(radians(x)); // pitch rotatey(radians(y)); // roll rotatez(radians(z)); // yaw directionallight(192, 168, 128,0, -1000, -0.5); directionallight(255, 64, 0, 0.5f, -0.5f, -0.1f); nostroke(); scale(2); gfx.mesh(mesh,false); } void serialevent(serial port) { input = port.readstring(); if(input != null) { string[] values = split(input, " "); println(values[0]); println(values[1]); println(values[2]); x= int(values[0]);y= int(values[1]);z= int(values[2]); } }
edit line of program:
mesh=(trianglemesh)new stlreader().loadbinary(sketchpath("check.stl"),stlreader.trianglemesh);
by:
mesh=(trianglemesh)new stlreader().loadbinary(sketchpath("data/check.stl"),stlreader.trianglemesh);
and rest of program fine, check , let me know if error.
Comments
Post a Comment