p5.j s代码在Web编辑器中未按预期运行

问题描述 投票:0回答:1

我已经完成了使用OpenWeather的api构建p5.js天气预报的项目。打开index.html文件时代码运行完美。当我在网页编辑器上运行天气或在我的博客上将其用作iframe时,为什么不显示天气?

github gist

project

javascript html api iframe p5.js
1个回答
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>
© www.soinside.com 2019 - 2024. All rights reserved.