I want add image texture to line as below , but only get black line. from how-to-apply-a-texture-to-a-custom-geometry-in-three-js, I need set UV or write my own shade. But I am very new to three.js and webGL, not sure how to do it. any help is welcome. Thanks.
loader.load('images/direction.png', function ( texture ) {
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 40, 40 );
var material = new THREE.MeshBasicMaterial({map: texture});
var geometry = new THREE.Geometry();
geometry.vertices.push(new THREE.Vector3(-10, 10, 0));
geometry.vertices.push(new THREE.Vector3(-10, 20, 0));
line = new THREE.Line(geometry, material);
line.material.linewidth = 5;
scene.add(line);
renderer.render( scene, camera );
}