processing / p5.js-editor

Deprecated desktop editor for p5.js
https://p5js.org
MIT License
338 stars 91 forks source link

loadString error #201

Closed arihantparsoya closed 8 years ago

arihantparsoya commented 8 years ago

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.

lmccart commented 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")

arihantparsoya commented 8 years ago

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.

lmccart commented 8 years ago

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.