私は、three.jsでテキストを使用し、キャンバスに描画し、その結果をテクスチャとして使用する2番目のアプローチを試みています。次の問題を除いて、基本的には機能します-バグかどうかはわかりません:
背景が透明な2つのテキストを作成し、重ね合わせます。それらは大丈夫ですが、そのうちの1つを回転させると、透明度が台無しになります。
次の(抜粋)関数でテキストオブジェクトを作成します
function createText(text, ...){
var textHolder = document.createElement( 'canvas' );
var ctext = textHolder.getContext('2d');
...
var tex = new THREE.Texture(textHolder);
var mat = new THREE.MeshBasicMaterial( { map: tex, overdraw: true});
mat.transparent = true;
mat.map.needsUpdate = true;
var textBoard = new THREE.Mesh(new THREE.PlaneGeometry(textHolder.width, textHolder.height),mat);
textBoard.dynamic = true;
textBoard.doubleSided = true;
return textBoard;
}
それらをシーンに追加します。jsfiddleの完全なコードを使用したデモを参照してください