1

所以我正在使用webvr-boilder-plate开发一个项目

奇怪的是,文字不是在手机上以 VR 模式呈现,而是在网络浏览器(Firefox)中呈现。我还添加了一个立方体进行测试,立方体在 iPhone 和网络浏览器(Firefox)中都呈现

这是多维数据集和文本的代码:

// Create 3D objects.
var geometry = new THREE.BoxGeometry(0.5, 0.5, 0.5);
var material = new THREE.MeshNormalMaterial();
var cube = new THREE.Mesh(geometry, material);
// Position cube mesh
cube.position.z = -1;
scene.add(cube);

function displayCurrentStory(name) {
  scene.remove(currentStoryTextMesh);
  console.log("currentStoryText:",name);
  currentStoryText = new THREE.TextGeometry(name, {
  size: .25,
  height: .05,
  curveSegments: 12,
  font: "helvetiker"
});
currentStoryTextMesh = new THREE.Mesh(currentStoryText, 
new THREE.MeshBasicMaterial({color: 0xFF00FF}
 ));
currentStoryTextMesh.position.y = 0.2;
currentStoryTextMesh.position.z = -1;
currentStoryTextMesh.rotation.x = 0.0;
//currentStoryTextMesh.rotation.y = -180;
scene.add(currentStoryTextMesh);}

有什么见解吗?

4

0 回答 0