When I preview the sketch in browser directly from processing I have no problem viewing it. When I try to serve it as a webpage though it's just blank.
Can anyone offer some suggestions?
Thanks
Sketch Code
------
import processing.opengl.*;
// Pi digits
String[] lines;
float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0;
float px = 0, py = 0, pz = 0;
int renderCounter = 0;
//Define Sphere item size & Coordinates
float itemSize;
float radius = 100;
float theta = 0;
float phi = 0;
float thetaSpeed = PI/10;
float phiSpeed = PI/10;
int phiCounter;
Balls ba;
ArrayList items;
void setup()
{
size(600,600,OPENGL);
frameRate(50);
noStroke();
//load pi digits from file
String lines[] = loadStrings("pinumbers.txt");
ballArray = new ArrayList();
for (int i = 0; i < 400; i++)
{
// Increment phi once 20 balls have been placed
if (phiCounter == 20)
{
phi += phiSpeed;
phiCounter = 0;
}
// increment theta angle
theta += thetaSpeed;
phiCounter++; // counter for number of balls placed
I've created a sketch that plots different sized balls around the surface of a larger 3D sphere but I'm having trouble rotating the camera angle relative to the larger sphere.
I'm trying to compile this as javascript rather than java.