Node.js 如何开始使用yeoman和three.js?
我用Node.js 如何开始使用yeoman和three.js?,node.js,three.js,gruntjs,yeoman,bower,Node.js,Three.js,Gruntjs,Yeoman,Bower,我用bower安装threejs安装了three.js 然后,我希望我的页面中有三个.js,因此我的app.js文件以: define(["jquery", "three"], function() { "use strict"; 但是,当我的页面加载时,Chrome控制台显示: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/scrip
bower安装threejs
安装了three.js
然后,我希望我的页面中有三个.js,因此我的app.js文件以:
define(["jquery", "three"], function() {
"use strict";
但是,当我的页面加载时,Chrome控制台显示:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/scripts/three.js
Uncaught Error: Script error
那么,它不应该像jQuery一样在组件中查找吗
基本上,我如何开始使用yeoman并安装three.js?解决方案如下 app.js文件需要如上所述引用“三个”,这是指main.js文件,该文件具有以下内容
require.config({
paths: {
jquery: '../components/jquery/jquery',
three: '../components/threejs/build/three'
},
shim: {
bootstrap: {
deps: ['jquery'],
exports: 'jquery'
}
}
});
这里的关键是threejs three.js文件所在的三个点