3

I'm trying to create a three-dimensional compass, that also displays roll and pitch. In order to show the roll (in degrees), I need to apply a texture with numbers to a TorusMaterial. How can I get it on in such a way that the scale is (somewhat) retained?

The black ring in the picture below (around the compass) is the TorusGeometry. The other attached picture is the texture.

Code:

var geometry    = new THREE.TorusGeometry(2.41, 0.2, 50, 50);
// var material = new THREE.MeshBasicMaterial({ color: 0x000000, wireframe: false });
var material    = new THREE.MeshPhongMaterial();
material.map    = THREE.ImageUtils.loadTexture('styles/quarters.png');

var torus       = new THREE.Mesh(geometry, material);

scene.add(torus);

Screenshot: Texture is wrong

Texture

Texture

WestLangley
  • 102,557
  • 10
  • 276
  • 276
Fabdrol
  • 728
  • 1
  • 7
  • 20

0 Answers0