【发布时间】:2015-10-28 03:00:23
【问题描述】:
我在 firefox 上有一个可以工作的 three.js 程序,一切正常加载。当我尝试在 chrome 上运行该程序时,它会部分呈现背景和一些闪烁的对象。我检查了终端,它似乎吐出了与此问题相关的数千个错误--
Uncaught TypeError: Cannot read property 'update' of undefined
THREE.Vertex has been DEPRECATED. Use THREE.Vector3 instead.
THREE.Vertex has been DEPRECATED. Use THREE.Vector3 instead.
THREE.Vertex has been DEPRECATED. Use THREE.Vector3 instead.
THREE.UV has been DEPRECATED. Use THREE.Vector2 instead.
THREE.UV has been DEPRECATED. Use THREE.Vector2 instead.
THREE.UV has been DEPRECATED. Use THREE.Vector2 instead.
THREE.WebGLRenderer 66
WebGL: INVALID_VALUE: uniform3fv: no array
WebGL: INVALID_VALUE: uniform3fv: no array
Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///C:/foodshop/images/wall-2.jpg may not be loaded.
WebGL: INVALID_VALUE: uniform3fv: no array
Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///C:/foodshop/images/wall-2.jpg may not be loaded.
WebGL: INVALID_VALUE: uniform3fv: no array
Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///C:/foodshop/images/wall-2.jpg may not be loaded.
由于它没有提供行号来定位错误的位置,我很困惑。我该如何解决这个问题?
编辑-------
我将我的three.min.js 的版本更改为最新版本,我不得不修改我的程序的几个方面,例如CubeGeometry 到BoxGeometry。
我现在的日志中有以下问题
"THREE.Projector has been moved to /examples/js/renderers/Projector.js."
还有几个。
"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. ( images/light.jpg )"
【问题讨论】:
-
使用
chrome.exe --allow-file-access-from-files启动浏览器
标签: three.js