为什么不包含此 'bigInt' 脚本? (p5.js 网络编辑器)
Why isn't including this 'bigInt' script working? (p5.js web editor)
我正在关注 The Coding Train and learning about the p5.js library. In this particular exercise, I want to work with potentially massive integers, so I looked around and found peterolson/BigInteger.js。
我试图以与包含 p5.js 库本身相同的方式将此脚本包含在我的项目中,并按照 BigInteger 的自述文件中的建议:
<script src="http://peterolson.github.com/BigInteger.js/BigInteger.min.js"></script>
但是,这样做之后,当我尝试从我的 script.js
中引用它时,我仍然会遇到 bigInt is not defined
错误。
任何人都可以帮助我了解我所缺少的吗?您可以在 p5.js 网络编辑器 here!
中看到我的项目
此类问题最好通过查看您的 developer tools 来回答。查看 JavaScript 控制台和网络日志以查看您遇到的错误。
基本上,您无法像尝试引用 BigInteger.min.js
那样引用 GitHub 上的文件。你要么需要找到一个为你托管文件的 CDNS,要么你需要将它上传到你的草图并通过亲戚引用它 url.
我正在关注 The Coding Train and learning about the p5.js library. In this particular exercise, I want to work with potentially massive integers, so I looked around and found peterolson/BigInteger.js。
我试图以与包含 p5.js 库本身相同的方式将此脚本包含在我的项目中,并按照 BigInteger 的自述文件中的建议:
<script src="http://peterolson.github.com/BigInteger.js/BigInteger.min.js"></script>
但是,这样做之后,当我尝试从我的 script.js
中引用它时,我仍然会遇到 bigInt is not defined
错误。
任何人都可以帮助我了解我所缺少的吗?您可以在 p5.js 网络编辑器 here!
中看到我的项目此类问题最好通过查看您的 developer tools 来回答。查看 JavaScript 控制台和网络日志以查看您遇到的错误。
基本上,您无法像尝试引用 BigInteger.min.js
那样引用 GitHub 上的文件。你要么需要找到一个为你托管文件的 CDNS,要么你需要将它上传到你的草图并通过亲戚引用它 url.