当我尝试通过在 bower.json 文件中指定版本来下载 three.js 文件时出现错误。
"dependencies": {
"three.js":"~0.0.69"
}
Error :No versions found in git://github.com/jiyinyiyong/three.js.git
相反,我通过指定这样的 url 下载整个 repo:
"dependencies": {
"three.js":"https://github.com/mrdoob/three.js.git"
}
这需要时间和空间。 我怎样才能只从 git 仓库下载文件?
最佳答案
摆脱 three.js 中的句点,即
"dependencies": {
"threejs": "r70"
}
这指向官方的 ThreeJS 存储库。
如果您希望只有缩小的库文件(下载小得多),请使用:
"dependencies": {
"threejs": "https://raw.githubusercontent.com/mrdoob/three.js/master/build/three.min.js"
}
关于javascript - 无法使用 bower 下载 three.js 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28291911/