[英]Is there any way to use p5.js in react native app?
I have found a p5 JS wrapper for react (react-p5-wrapper) . 我已经找到了一个p5 JS包装器来进行react(react-p5-wrapper)。 Is there any way to implement p5 in react native app too ?
是否有任何方法也可以在react native应用中实现p5?
I'm afraid there's no way at the moment. 恐怕此刻无法实现。
I just checked the GitHub repo of p5.js and it uses DOM elements (like canvas) in its source code (for example https://github.com/processing/p5.js/blob/master/src/image/image.js ). 我刚刚检查了p5.js的GitHub存储库,它在其源代码(例如https://github.com/processing/p5.js/blob/master/src/image/image )中使用了DOM元素(例如canvas) 。 js )。 React Native doesn't have a DOM, so that's not possible (except maybe using a WebView or jsdom, but what's the point using RN then?).
React Native没有DOM,因此不可能(除非使用WebView或jsdom,但是使用RN有什么意义呢?)。
I think you'll have to wait till someone makes a fork especially for React Native. 我认为您必须等到有人专门为React Native制作叉子。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.