PShape not working when exported
in
Programming Questions
•
1 year ago
Hi guys,
I've created an application that will work on my local machine but will not on a server.
It uses PShape and wherever it is used it bugs out.
Here is the link:
Now whenever you click a tab the cell and some text should show up. The last two work fine as they use no shapes. The third, guard, works as I have commented out the PShape section. I have the images in the right directory on the server and have tried placing them in the sketches root directory and pointing to them but that wont work either.
Here is the full code for the first tab:
- void animalCell() {
- strokeWeight(1);
- /* animal cell membrane */
- PShape animalMembrane = loadShape("images/animalMembrane2.svg");
- shape(animalMembrane, 220, 90, 162, 281);
- /* random mitochondria */
- int mitoCount = 9;
- Mitochondria[] mitochondria = new Mitochondria[mitoCount];
- randomSeed(2245632);
- for (int i=0; i<mitoCount; i++) {
- mitochondria[i] = new Mitochondria(random(235, 367), random(140, 330), 10);
- mitochondria[i].display();
- }
- /* animal cell nucleus */
- Nucleus animalNucleus = new Nucleus(300, 225, 80);
- animalNucleus.display();
- /* DNA inside the nucleus */
- int DNAcount = 15;
- DNA[] dna = new DNA[DNAcount];
- for (int i=0; i<DNAcount; i++) {
- dna[i] = new DNA(random(280, 320), random(210, 250));
- dna[i].display();
- }
- leftArrow cytoplasm = new leftArrow(320, 110, 440, 110);
- cytoplasm.display();
- leftArrow membrane = new leftArrow(365, 340, 420, 340);
- membrane.display();
- rightArrow nucleus = new rightArrow(270, 240, 200, 240);
- nucleus.display();
- rightArrow mito = new rightArrow(237, 140, 180, 140);
- mito.display();
- }
Does anyone have any insight into what is going on?
1