0

I have this JS generated by blender and I load It trough JSONLoader. It is just a plane with a texture on it. I just want to find position of it to add a pointlight in its normal vector (in front of it) What is property to use to add a point light 3 points away? How can I know position of that light?

Im new on threejs and I've looking in javascript inspector some properties to find this but I can not see it...

Thank you!!!

{

"metadata" :
{
    "formatVersion" : 3.1,
    "generatedBy"   : "Blender 2.63 Exporter",
    "vertices"      : 4,
    "faces"         : 2,
    "normals"       : 1,
    "colors"        : 0,
    "uvs"           : [4],
    "materials"     : 1,
    "morphTargets"  : 0,
    "bones"         : 0
},

"scale" : 1.000000,

"materials" : [ {
    "DbgColor" : 15658734,
    "DbgIndex" : 0,
    "DbgName" : "texturaLadrillos",
    "blending" : "NormalBlending",
    "colorAmbient" : [0.6900000198185445, 0.6900000198185445, 0.6900000198185445],
    "colorDiffuse" : [0.6900000198185445, 0.6900000198185445, 0.6900000198185445],
    "colorSpecular" : [0.5, 0.5, 0.5],
    "depthTest" : true,
    "depthWrite" : true,
    "mapDiffuse" : "JP_Brick01_Bump.jpg",
    "mapDiffuseWrap" : ["repeat", "repeat"],
    "shading" : "Lambert",
    "specularCoef" : 50,
    "transparency" : 1.0,
    "transparent" : false,
    "vertexColors" : false
}],

"vertices" : [-53.8264,3.757e-06,85.9501,-8.9211,3.757e-06,85.9501,-53.8264,46.0109,85.9501,-8.9211,46.0109,85.9501],

"morphTargets" : [],

"normals" : [0,0,1],

"colors" : [],

"uvs" : [[0,0,1,0,1,1,0,1]],

"faces" : [42,0,1,3,0,0,1,2,0,0,0,42,2,0,3,0,3,0,2,0,0,0],

"bones" : [],

"skinIndices" : [],

"skinWeights" : [],

"animation" : {}

}

4

1 回答 1

0

This jsonfile doesn't contain the position data becuase it only has geometry and materials.

You should use a mesh to define the position.

于 2012-11-17T20:25:40.653 回答