P5js in Laytheme
-
This post is deleted!
-
Hello everybody,
I have also been following the tutorial @debutdebut
My Libraries and sketch.js load fine but the .ttf font file (stored in assets also) called by sketch.js can't be found. (console says "Load was performed." )The sketch isn't displayed at all, even when I comment out everything in my sketch related to my specific font (i thought there would be a standard font displayed instead like in the p5.js editor)
I also tried choosing a path of a font i had already installed as a Webfont in Laytheme, but the problem remained the same.
All I see is "Loading..." at the bottom of my sketch
I can't figure out the problem.
Does somebody know what could be the issue here?
Beginners-Greetings :)
Lena -
-
Hey There,
i'm sorry if this is a stupid question – my Programming Skills are very basic...With the code provided by the p5.js Web-Editor, I embedded a sketch via <iframe> on my Website http://homeoffice.kroenker.com
<iframe src="https://editor.p5js.org/cgvdv_bk/embed/-zDedzX57" style="position: fixed; width: 100%; height: 100%; border: none"></iframe>
Naturally i can't place anything onto the <iframe> Element... But is there any "easy" possibility (especially in Laytheme) to nest the <iframe> element into the Background?
Best,
Bernd -
yea you can put the iframe in lay options -> custom css & html -> custom html in footer
for exampleand then make the background transparent so your background iframe is shown (put this in some css field)
#grid, .cover-region-desktop .cover-inner{ background!transparent!important; }
-
@arminunruh Thanks, i'll give it a try!
-
dear @lena-weber, from your description I suppose that the path to your font is wrong. I good place to start is by opening the developer console of your browser. Usually, p5js tells you there if something is wrong with your path.
Hope this helps! ✌️
-
Dear @debutdebut
Thank you for helping!
We appreciate the time people take to make the LayTheme community stronger.
Best!
Marius -
i followed this but seems like if i come back i need to do a hard refresh or else nothing shows up.
-
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it