json - three.js positioning texture on a model with many faces -


i trying show furniture design , make on website. people can move around , alter materials , colors. configurator speak.

here got far: http://www.wijmakenalles.nl/configurator.php

as can see texture on table top has repeat seam should not. know can move textures around tweaking uv's there on 600 faces , on 900 uv's on model seems pointless search corresponding face/uv's in json file. not cube. here materials part of json: {

"metadata" : {     "formatversion" : 3.1,     "generatedby"   : "blender 2.65 exporter",     "vertices"      : 1116,     "faces"         : 647,     "normals"       : 208,     "colors"        : 0,     "uvs"           : [972],     "materials"     : 1,     "morphtargets"  : 0,     "bones"         : 0 },  "scale" : 1.000000,  "materials" : [ {     "dbgcolor" : 15658734,     "dbgindex" : 0,     "dbgname" : "beton.001",     "blending" : "normalblending",     "colorambient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colordiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colorspecular" : [0.5, 0.5, 0.5],     "depthtest" : true,     "depthwrite" : true,     "mapdiffuse" : "texturez_3914.jpg",     "mapdiffuserepeat" : [2, 2],     "mapdiffusewrap" : ["repeat", "repeat"],     "shading" : "lambert",     "specularcoef" : 50,     "transparency" : 1.0,     "transparent" : false,     "vertexcolors" : false },  {     "dbgcolor" : 15658734,     "dbgindex" : 0,     "dbgname" : "default",     "vertexcolors" : false },  {     "dbgcolor" : 15597568,     "dbgindex" : 1,     "dbgname" : "beton",     "blending" : "normalblending",     "colorambient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colordiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colorspecular" : [0.5, 0.5, 0.5],     "depthtest" : true,     "depthwrite" : true,     "mapdiffuse" : "concrete.jpg",     "mapdiffuserepeat" : [1, 8],     "shading" : "lambert",     "specularcoef" : 50,     "transparency" : 1.0,     "transparent" : false,     "vertexcolors" : false },  {     "dbgcolor" : 15597568,     "dbgindex" : 1,     "dbgname" : "beton",     "blending" : "normalblending",     "colorambient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colordiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colorspecular" : [0.5, 0.5, 0.5],     "depthtest" : true,     "depthwrite" : true,     "mapdiffuse" : "concrete.jpg",     "mapdiffuserepeat" : [1, 8],     "shading" : "lambert",     "specularcoef" : 50,     "transparency" : 1.0,     "transparent" : false,     "vertexcolors" : false },  {     "dbgcolor" : 15597568,     "dbgindex" : 0,     "dbgname" : "houtpaneel",     "blending" : "normalblending",     "colorambient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colordiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],     "colorspecular" : [0.5, 0.5, 0.5],     "depthtest" : true,     "depthwrite" : true,     "mapdiffuse" : "eikenorigineel.jpg",     "mapdiffuserepeat" : [0.01, 0.027],     "mapdiffusewrap" : ["norepeat", "norepeat"],     "shading" : "face",     "specularcoef" : 50,     "transparency" : 1.0,     "transparent" : false,     "vertexcolors" : false }],  "vertices" : [5.4625,-0.0032920.....etc. 

and de loader code:

    // load in mesh , add scene.   var loader = new three.jsonloader();   loader.load( "json/eikenbetontafel.js", function(geo, materials){     var material = new three.meshfacematerial(materials);     mesh = new three.mesh(geo, material);             mesh.position.set(-.45, 0, .18);     scene.add(mesh);   }); 

hope can give me direction go, thanks


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -