I'm trying to write a simulation in the Javascript version of VPython. After a bit of hair-pulling, I've been mostly successful. I have one remaining issue. I am getting an error when I use the text command. The relevant lines of code are:
line 125
console.log(wristband.pos.add(vec(-0.02, -0.09, 0.023)));
line 126 let R = text({text:"R", font:"sans", height:0.08, pos:wristband.pos.add(vec(-0.02, -0.09, 0.023)), color:color.red, align:"center"});
I included the console.log statement so you could see that the text pos attribute has a value that is valid. Below is a copy of the console error message that results.
d9YNuHR:125 vec {x: -0.02, y: -0.24, z: 0.023}
glow.3.2.min.js:1 Uncaught (in promise) Error: Font not available for text object.
at text3D (glow.3.2.min.js:1:4318616)
at new text (glow.3.2.min.js:1:4239610)
at text (glow.3.2.min.js:1:4239067)
at new righthand (d9YNuHR:126:17)
at start (d9YNuHR:252:12)
at __main__ (d9YNuHR:338:2)
at d9YNuHR:358:1
text3D @ glow.3.2.min.js:1
text @ glow.3.2.min.js:1
text @ glow.3.2.min.js:1
righthand @ d9YNuHR:126
start @ d9YNuHR:252
__main__ @ d9YNuHR:338
(anonymous) @ d9YNuHR:358
I do not know how to handle this error. Any advice will be appreciated.
Mark