1

I have a working three.js program on firefox, everything loads normally. When I try to run the program on chrome, it partially renders the background and some flickering objects. I have checked the terminal and it seems to spew out thousands of errors relating to this issue --

    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.

Since it doesn't provide a line number to locate where the error might be, I'm quite confused. How might I go about resolving this issue?

EDIT -------

I changed the version of my three.min.js to the latest, and I had to amend several aspects of my program, such as CubeGeometry to BoxGeometry.

I now have the following issues in my log

"THREE.Projector has been moved to /examples/js/renderers/Projector.js."

Also several of these.

"THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. ( images/light.jpg )"
AMorton1989
  • 313
  • 1
  • 6
  • 30

1 Answers1

1

Debug with the non-minified version or developer version (three.js), and the last version of the library.

Also, you shouldn't use deprecated methods in your program.. try to use Vector3 and Vector2 instead of VERTEX or UV.

According to the SecurityError, try this:

THREE.ImageUtils.crossOrigin = '';
var yourtxture = THREE.ImageUtils.loadTexture('your url or whatever')

or read this post:

Three.js and loading a cross-domain image

Community
  • 1
  • 1
Miguel Xoel Garcia
  • 307
  • 1
  • 4
  • 18
  • Thank you for the tip. I resolved the security error. Then I obtained the latest three.min.js to experiment with. Since then I have been mopping up areas where the original constructor does not exist in the new three.min.js. For example I had to change CubeGeometry to BoxGeometry. However now I am having issues with other things. I will detail these in an edit above. – AMorton1989 Aug 05 '15 at 14:28
  • 1
    @AMorton1989 Do not change the question after is has been answered. Make a new post. – WestLangley Aug 05 '15 at 14:32