From a 3d sketch I can produce an applet without problems and when i call the index.html the browser displays it properly.
The problem is that if i call it a second time it results in a black screen.
I have tested it on various computers and with different browsers.
Then, if i close the browser and again call index.html, it works fine but again also only once.
Is this a known problem?
I'm using version 2.06a on WinXP with a Geforce GT9600.
Here is a sample sketch:
// 3D Array of objects
import peasy.*;
PeasyCam cam;
GridObject[][][] cellModel;
// Number of columns and rows in the grid
int cols = 4;
int rows = 4;
int staples = 4;
//translate(-cols/2*100, -rows/2*100, -staples/2*100);
// rotateX(radians(64));
// rotateZ(radians(32));
// The counter variables i and j are also the column and row numbers and
// are used as arguments to the constructor for each object in the grid.
for (int i = 0; i < cols; i++) {
for (int j = 0; j < rows; j++) {
for (int k = 0; k < rows; k++) {
if (xyzPos[i][j][k] == 1) {
// Oscillate and display each object
cellModel[i][j][k].run();
} else {
cellModel[i][j][k].display_fillcubes();
// fill(255, 0, 0);
// box(64);
// A Grid object
class GridObject {
// A cell object knows about its location in the grid as well as its size with the variables x,y,w,h.
float x, y, z; // x,y location
float w, h; // width and height
float angle; // angle for oscillating brightness
float z_box;
int colorshift = (int)random(-32, 32);
int sizeshift = (int)random(-16, 32);
int translationshift = (int)random(-16, 16);
// Grid Constructor
GridObject(float tempX, float tempY, float tempZ) {
x = tempX;
y = tempY;
z = tempZ;
// angle = tempAngle;
// z_box = tempZ_box;
}