简体   繁体   English

如何在 A-Frame 中使用 Chart.js?

[英]How to use Chart.js in A-Frame?

I am having trouble adding a Chart.js canvas graph inside an A-Frame scene.我在 A-Frame 场景中添加 Chart.js 画布图时遇到问题。

You can see my problem and the source code in this Glitch project , or you can view the image here:你可以在这个Glitch 项目中看到我的问题和源代码,或者你可以在这里查看图像:图片

You can see the original canvas graph on the left, and on the right, the graph as a texture for an image inside the A-Frame's scene.您可以在左侧看到原始画布图,在右侧,该图作为 A-Frame 场景内图像的纹理。 This graph is all glitchy, and I can't understand why.这张图有问题,我不明白为什么。

Is there a way to fix the texture?有没有办法修复纹理? Or another way to add a 2D Chart.js graph inside the scene?或者另一种在场景中添加 2D Chart.js 图形的方法?

Thank you.谢谢你。

Hm, after careful testing it appears this bug only occurs in Google Chrome.嗯,经过仔细测试,这个错误似乎只出现在谷歌浏览器中。 I have tested with Mozilla Firefox and the Oculus browser and it works well.我已经用 Mozilla Firefox 和 Oculus 浏览器进行了测试,效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM