exported app for web does not run
in
Integration and Hardware
•
3 years ago
hi,
i have a app which runs fine offline, but when i export it and upload it, it doesnt.
error is; that its asking for a class. i use this public class in the same pde, nothing outside?
thanks!
i have a app which runs fine offline, but when i export it and upload it, it doesnt.
error is; that its asking for a class. i use this public class in the same pde, nothing outside?
thanks!
- public class finger
{
color c;
float x;
float y;
float xCenter;
float yCenter;
float radius;
float xoff;
float xincrement;
//int border = 50;
finger
(float r, float xo, float xi) {
radius = r;
xoff = xo;
xincrement = xi;
}
void update()
{
float n = noise(xoff)*10000;
float r = noise(xoff)*10;
float sc = noise(xoff)*100;
xoff += xincrement;
radius = r;
x = (cos(radians(n)) * radius) + xCenter;
y = (sin(radians(n)) * radius) + yCenter;
if(mousePressed == true){
x = mouseX;
y = mouseY;
}
//strokeWeight(sc);
//stroke(c,200);
if(((x > 0 - border) && (x < width + border)) && ((y > 0 - border) && (y < height + border))){
strokeWeight(sc+2);
stroke(c,2);
line(x, y, xCenter, yCenter);
strokeWeight(sc);
stroke(c, 4);
line(x, y, xCenter, yCenter);
}
else {
ix = int(random(img.width));
iy = int(random(img.height));
c = img.get(ix, iy);
x = width/2;
y = height/2;
}
xCenter = x;
yCenter = y;
}
}
1