function generate_geometry(scene)
{
var mesh;
var material;
var texture;
var geometry;
geometry = new THREE.BufferGeometry();
geometry.attributes = {
position: {
itemSize: 3,
array: new Float32Array([..my object..])
},
normal: {
itemSize: 3,
array: new Float32Array([..my object..])
}
};
texture = THREE.ImageUtils.loadTexture('ull.jpg');
texture.needsUpdate = true;
material = new THREE.MeshPhongMaterial({
color: 0xFF0000,
...other material properties
// map: texture
});
mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
}
I'm facing an issue where everything works perfectly fine until I try to add a map into my material. As soon as I include the map, everything stops working but I can't figure out why. Is there anything else I need to do with my texture in order for it to work properly?