在THREE.Fontloader之外访问字体网格?

时间:2019-10-21 01:32:35

标签: javascript fonts three.js

我有一个场景设置,并使用字体加载器显示了一些文本。它运作良好,看起来像这样:

var count = 0;
var myInterval = setInterval(()=> {
    // i do somehting every 5 second
    if(count >= 10) {
        // we can access variable outside the callback because we are using the arrow operator.
        clearInterval(myInterval)
    }
    count++;
}, 5000);

但是,我不知道如何在此函数之外访问文本Mesh。我希望能够在加载文本后更新其坐标和旋转。各种方法始终会引发错误。访问以上任何变量都将返回undefined。即使使用loader.onLoadComplete也无效。有任何线索吗?

0 个答案:

没有答案