Adding Typography to my Sphere sketch caused further problems:
-Some of the glyphs appear to have a white background, whereas others appear to have a transparent background. (Potentially an issue caused by the font being rendered as images instead of vectors?)
-If the text part featured below is added, the outer spheres disappear. Comment it out and you see four spheres.
-The last very weird one: Change for (i = 0; i < 8; i++) {
to for (i = 0; i < 1; i++) {
and the sketch crashes.
The problematic part of the drawSphere() function:
fill(0);
for (i = 0; i < 8; i++) {
push();
rotateY(i * QUARTER_PI);
for (j = 0; j < letters.length; j++) {
let rot = map(j, 0, letters.length-1, HALF_PI, -HALF_PI);
push();
rotateX(rot);
translate(-textS / 3, 0, radius / 2);
text(letters.charAt(j), 0, 0);
pop();
}
pop();
}
This was tested with chrome and an atom live server.
Here’s a link to the source files: