three.js fontloader无法在ios上运行

时间:2018-04-25 11:48:48

标签: ios three.js

loadFont() {
    return new Promise((resolve, reject) => {
        this.FontLoader.load(
            fontParams.url,
            (response) => {
                console.log('loadfont')
                this.font = response
                this.createTextMaterials()
                this.createNumberList()
                console.log('loadfont')
                resolve(response)
            }, (xhr) => {
                console.log((xhr.loaded / xhr.total * 100) + '% loaded');
            }, (err) => {
                console.log(err)
            })
    })
}

它适用于Android,但不适用于IOS,我在iphone5和iphone6上测试它。 调试始终显示:“请求开始”

我打印错误:

  

{“target”:{“onabort”:null,“onloadstart”:null,“ontimeout”:null,   “onloadend”:null,“onreadystatechange”:null,“readyState”:1,   “response”:null,“responseText”:null,“responseType”:“”,   “responseXML”:null,“status”:0,“statusText”:“”,“upload”:{},   “withCredentials”:假}}

err mseeage

0 个答案:

没有答案