Closed arihantparsoya closed 8 years ago
hi @parsoyaarihant, loadShape() isn't implemented yet. or is it loadStrings() that is not working? to simplify, i would suggest trying to put your test.txt file right in the same folder as your sketch.js file and index.html, and then change the path to loadStrings("test.txt")
sorry my typo error it was loadStrings. I tried the running the code keeping all the files in the same folder but it doesn't seems to work. I even tried running the code in p5 editor and it doesn't seem to run, where as the example in 3D mode for loadImage seems to work in the editor.
I'm sorry, I'm not able to reproduce this. Could you include which version of the library you're using, and the contents of your html and txt file? Are there any errors in the console. This may be a question better suited for the forum, which is the place for general debugging help.
I tried running the following code from p5.js website in the editor and it doesn't produce any output :
var result; function preload() { result = loadStrings('assets/test.txt'); }
function setup() { background(200); var ind = floor(random(result.length)); text(result[ind], 10, 10, 80, 80); }
the loadImage method( as given in example) seems to work fine but loadStrings isn't even though both the files were kept in the same folder.