SVG bug
in
Programming Questions
•
2 years ago
I have a SVG that I'm going to use for a video game. When I try to load a child and draw it I can't see anything.
Here's my code.
and here's my SVG
test.svg
test and test2 work fine but test3 shows nothing.
It's like test3 had absolutely no data in it. :(
EDIT:
What I found works best for me (for a video game).
is getting rid of "layer1" and having all the "frames" aligned in the same place (it looks like a mess but it works).
Here's my code.
- PShape test,test2,test3;
-
- void setup() {
- size(600,200);
- test = loadShape("test.svg");
- test2 = test.getChild("layer1");
- test3 = test2.getChild("0");
- }
- void draw() {
- shape(test3);
- }
and here's my SVG
test.svg
test and test2 work fine but test3 shows nothing.
It's like test3 had absolutely no data in it. :(
EDIT:
What I found works best for me (for a video game).
is getting rid of "layer1" and having all the "frames" aligned in the same place (it looks like a mess but it works).
1