I’ve seen countless examples so far where the contents of a JSON file are displayed with println. But how would one run those contents through a simple text() in processing?
Because I’ve been trying to get the array below within a text so I could display it next to a planet, though so far it only gives me:
> A JSONObject text must begin with '{'
[
{
"id_code": "15LD2345",
"Gravity": "5.2g",
"name": "Georgiamayne-2LD"
},
{
"id_code": "291XS931",
"Gravity": "10.2g",
"name": "XS-Alpha"
},
{
"id_code": "99287OE2",
"Gravity": "0.2g",
"name": "Bicronla-99"
}
]
1 Like
glv
June 18, 2019, 2:06am
3
1 Like
Thanks for the links! Didn’t get it to work with the text() function unfortunately, but I’ll have another look at it later on.
glv
June 18, 2019, 3:42pm
5
Here is an example of displaying text to get you started:
I was using different text sizes in a recent project and was getting blurry fonts.
I solve this issue by setting the largest text size in setup() and problem solved!
Here is the code I used to test this:
/*
Project: Blurry Text
Author: GLV
Date: 2019-05-15
Version: 01
*/
void settings()
{
size(1024, 768, P3D);
}
void setup()
{
textSize(128); // Set to largest text size used to prevent blurring of text
}
void draw()
{
background(0);
text24();
t…
1 Like