立方体等都可以显示,真机文字未渲染出来,开发工具是正常的~~
官网demo代码中加入以下代码
//文字
loader = new THREE.FontLoader();
textMesh = new THREE.Mesh();
createTypo = font => {
const word = "Javascript";
const typoProperties = {
font: font,
size: 30,
height: 6,
type: "str",
curveSegments: 1,
bevelEnabled: true,
bevelThickness: 1,
bevelSize: 1,
bevelOffset: 1,
bevelSegments: 20
};
const material = new THREE.MeshNormalMaterial();
const text = new THREE.TextGeometry(word, typoProperties);
textMesh.geometry = text;
textMesh.material = material;
textMesh.position.set(-100, 0, 0);
scene.add(textMesh);
};
//******.json 是一个字体文件
loader.load("******.json", createTypo);
开发工具正常~·
真机预览就不显示了~~·
请具体描述问题出现的流程,并提供能复现问题的简单代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
谢邀:
我没接触过小程序上用THREE,看现象应该是小程序真机上可能不支持THREE