0

I am trying to find a solution in three.js to implement a serial of sprites along a curve. And the sprites would share a single texture stretching all the way along the length of the curve. I am totally new to three.js. Just wondering if there is any possible way to do this in three.js.

Thank you.

  • Please add a minimum example about the problem – gañañufla Jan 18 '21 at 07:41
  • I have a curve and a sprite, how do I duplicate the sprite along the curve and having the sprite oriented according to the curve direction. thank you. – aladdin abudula Jan 19 '21 at 01:03
  • const map = new THREE.TextureLoader().load( 'img/5.png' ); const spritematerial = new THREE.SpriteMaterial( { map: map, color: 0xffffff } ); const sprite = new THREE.Sprite( spritematerial ); sprite.scale.set(5, 5, 1) scene.add( sprite ); – aladdin abudula Jan 19 '21 at 01:03
  • //create a blue LineBasicMaterial var lineMaterial = new THREE.LineBasicMaterial( { color: 0x0000ff } ); var points = []; points.push( new THREE.Vector3( - 10, 0, 0 ) ); points.push( new THREE.Vector3( 0, 10, 0 ) ); points.push( new THREE.Vector3( 10, 0, 0 ) ); var lineGeometry = new THREE.BufferGeometry().setFromPoints( points ); var line = new THREE.Line(lineGeometry, lineMaterial); scene.add(line); – aladdin abudula Jan 19 '21 at 01:04

0 Answers0