Hello all, I'm completely new to threejs and currently working on loading a texture to a cylinder from a different web directory. If anyone can offer some guidance on what might be incorrect in the following code snippet, that would be really helpful:
var geometry = new THREE.CylinderBufferGeometry( 17, 17, 30, 35 );
var material = new THREE.MeshLambertMaterial();
var cylinder = new THREE.Mesh( geometry, material );
const myUrl = 'https://user-images.githubusercontent.com/29174429/84787863-87516080-afff-11ea-9dca-3ed8d32d7b41.jpg'
const textureLoader = new THREE.TextureLoader()
textureLoader.crossOrigin = "Anonymous"
const myTexture = textureLoader.load(myUrl)
cylinder.material.map(myTexture)
Your assistance is greatly appreciated.