three.js:找不到变量THREE&意外的字符串文字' ./polyfills.js'

时间:2018-01-31 21:33:51

标签: javascript html three.js

[erroe screen shot ][1]

绝对是three.js的初学者 不确定导致这两个错误的原因。 错误: 1.无法找到变量:THREE line 21:31 frame.html 2. import' ./polyfills.js&#39 ;;第1行three.js



import './polyfills.js'; error:import './polyfills.js'; line 1 three.js

   ----- //a bunch of other imports

<!DOCTYPE html>
   //other
        var scene = new THREE.Scene();  error:Can't find variable: THREE
        
//OTHER
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

如果您已下载three.js,则必须使用以下路径 three.js-master / build / three.js three.js-master / build / 3。 min.js

您可能会将其与 three.js-master / src / Three.js 混淆。