javascript - ThreeJS DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext' -


i started working with/learning threejs, , i've been having trouble loading texture onto planemesh. have right plane:

var charactertexture = new three.imageutils.loadtexture( 'images/hunter_1.png' );     var geometry = new three.planegeometry( 100, 100, 32);     var material = new three.meshlambertmaterial( { map: charactertexture, side : three.doubleside} );     character = new three.mesh( geometry, material ); 

whenever run though, given error:

domexception: failed execute 'teximage2d' on 'webglrenderingcontext': cross-origin image @ file:///c:/users/name/desktop/images/hunter_1.png may not loaded.(…)

i have seen quite few answers similar questions, have been uncaught securityerrors instead of domexceptions , i'm not clear on if 2 similar. if has ideas of i've done wrong, please tell! thanks.

for security reasons it's not possible run localhost, upload web server , issue should resolved.

hope helps!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -