Simple Sketch not working in Chrome - loadStrings.

edited October 2016 in p5.js

Hi there,

we are trying to code our own website with p5.js. We need to access several .txt files, read them and display the text in the website. We also need to load our own fonts and assets. Sofar, something as simple as loading a .txt does ONLY work in Firefox. Loading fonts doesn't work in either browser. We are directly using the sample script from the reference:

Any hints why this happens?

Thanks a lot!



  • edited October 2016

    @illpack -- Please provide more information.

    1. "ONLY work in Firefox" -- what browser(s) (with what version numbers) are you saying loading .txt does NOT work in?
    2. "We are directly using the sample script from the reference" -- that link contains two sample scripts. Which one is not working for you?
    3. The p5 online reference loadStrings demo runs in-page -- a grey box next to the script displays "I smell like butter" "I am a cat" "I like my nose" etc. when the page loads. Are you seeing that text, or not?
    4. "Loading fonts doesn't work in either browser." What specific code are you using to test font loading?
  • @illpack - sounds like a FAQ. Are you testing on your local machine? If so you're subject to security restrictions on some browsers (Firefox being an exception). To cinfirm hit F12 and look for security warnings in Chrome...

Sign In or Register to comment.