我已经完成了使用OpenWeather api构建p5.js天气预报的项目。当我打开index.html文件时,代码可以完美运行。为什么在Web编辑器上运行天气或将其用作博客中的iframe时,为什么不显示天气?
答案 0 :(得分:0)
您没有上载包含p5和其他库的库文件夹。
更新您的index.html以包括这些库
这些行
<script src="libraries/p5.js" type="text/javascript"></script>
<script src="libraries/p5.dom.js" type="text/javascript"></script>
<script src="libraries/p5.sound.js" type="text/javascript"></script>