使用three.js在特定点上写入2d Text

时间:2017-03-18 09:30:38

标签: javascript three.js

var sourcePos=new THREE.Vector3(-5,0,0);
var targetPos=new THREE.Vector3(-5,2,0);
var direction=new THREE.Vector3().sub(targetPos,sourcePos);
var arrow=newTHREE.ArrowHelper(direction.clone().normalize(),sourcePos,direction.length(),0x00ff00);
scene.add(arrow);

在Point sourcePos和targetPos,我想要一个标签,如' A'和' B'。 我怎样才能在three.js中实现这一目标?

1 个答案:

答案 0 :(得分:0)

Three.js有sampletimes<-as.POSIXct(c("2001/01/10 9:54", "2002/01/10 9:55", "2004/01/10 9:50")) output<-tapply(sampletimes, format(sampletimes, "%H"), length) 。当您将高度设置为1时,它会像2d文本一样变平,您可以将其设置为场景中的特定点:

TextGeometry