javascript - Three js, block textures are blured -


i'm trying make 3d block three.js library.
i've done it. wan't put texture on it. did , it's working :

var textureherbe = [      new three.meshbasicmaterial({map:three.imageutils.loadtexture('img/texture/herbe/border.gif')}),      new three.meshbasicmaterial({map:three.imageutils.loadtexture('img/texture/herbe/border.gif')}),      new three.meshbasicmaterial({map:three.imageutils.loadtexture('img/texture/herbe/top.gif')}),      new three.meshbasicmaterial({map:three.imageutils.loadtexture('img/texture/herbe/bottom.gif')}),      new three.meshbasicmaterial({map:three.imageutils.loadtexture('img/texture/herbe/border.gif')}),      new three.meshbasicmaterial({map:three.imageutils.loadtexture('img/texture/herbe/border.gif')}) ]; 

thats result :
enter image description here
@ this, it's blured !
looked @ this link. , don't know how mix code solution's code :/
jnow how can ? thx , have day.

first of loading same texture several times. assign variable , make textures resolution-independent , render without blurriness.

var border_tex = new three.imageutils.loadtexture('img/texture/herbe/border.gif'); border_tex.magfilter = three.nearestfilter; border_tex.minfilter = three.linearmipmaplinearfilter;  var top_tex = new three.imageutils.loadtexture('img/texture/herbe/top.gif'); top_tex.magfilter = three.nearestfilter; top_tex.minfilter = three.linearmipmaplinearfilter;  var bottom_tex = new three.imageutils.loadtexture('img/texture/herbe/bottom.gif'); bottom_tex.magfilter = three.nearestfilter; bottom_tex.minfilter = three.linearmipmaplinearfilter;  var textureherbe = [     new three.meshbasicmaterial( { map: border_tex } ),     new three.meshbasicmaterial( { map: border_tex } ),     new three.meshbasicmaterial( { map: top_tex } ),     new three.meshbasicmaterial( { map: bottom_tex } ),     new three.meshbasicmaterial( { map: border_tex } ),     new three.meshbasicmaterial( { map: border_tex } ), ]; 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -