Three JS Keep Label Size On Zoom

前端 未结 4 541
臣服心动
臣服心动 2020-12-05 16:08

I\'m working on a solar system in three.js and am curious if there is an easy way to make the labels for the planets I have below all show up the same size regardless of how

4条回答
  •  星月不相逢
    2020-12-05 16:25

    If you are using spriteMaterial to present your text, you could try to set the sizeAttenuation attribute to false.

    var spriteMaterial = new THREE.SpriteMaterial( { map: spriteMap, color: 0xffffff, sizeAttenuation:false } );
    

    See more information from here: https://threejs.org/docs/index.html#api/en/materials/SpriteMaterial.sizeAttenuation

提交回复
热议问题