Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

真机渲染文字问题 #18

Closed
jenerse opened this issue Apr 24, 2021 · 3 comments
Closed

真机渲染文字问题 #18

jenerse opened this issue Apr 24, 2021 · 3 comments

Comments

@jenerse
Copy link

jenerse commented Apr 24, 2021

https://github.com/deepkolos/three-platformize/issues/17
这个issue是上面issue的延伸。ios渲染会导致微信闪退,安卓渲染不出来。
真的神多坑。。
请问作者有实验过可以吗~有的话求指点一下~谢谢~

@deepkolos
Copy link
Owner

适配了fontloader,不过估计不太符合使用场景,svgloader不知道支不支持文字

@jenerse
Copy link
Author

jenerse commented Apr 27, 2021

@deepkolos 找到方法了,先把canvas转成base64,然后用TextureLoader加载就可以。

const imageData = canvas.toDataURL();
return new THREE.TextureLoader().load(imageData);

fontloader 看效果好像也可以是2d文字,不知道能不能实现。。有待验证。。

@deepkolos
Copy link
Owner

fontloader加载是3d的文字

@jenerse jenerse closed this as completed May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants