简体   繁体   English

有什么方法可以在React Native应用中使用p5.js吗?

[英]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.

相关问题 将p5.js合并到Next.js(React App)网站 - incorporating p5.js in a Next.js (React App) website 有没有办法在 p5.js 中创建多个按钮? - is there any way to create multiple buttons in p5.js? 有没有办法在同一个 canvas 上使用 Fabric.js 和 p5.js - Is there a way to use Fabric.js and p5.js on the same canvas React 组件与 p5.js 画布重复 - React component is duplicated with p5.js canvas 有没有办法在 javascript 中翻译这个 p5.js 草图? - Is there a way to translate this p5.js sketch in javascript? 如何在 p5.js 中使用 mojang api - How to use the mojang api in p5.js 在 p5.js 中使用音频上下文作为音频输入 - Use the audiocontext as audio input in p5.js 有什么方法可以将图像对角移动到 javascript p5.js 中的所需位置,或者以任何方式显示图像并将其隐藏在所需位置 p5.js - is there any way to move an image diagonally to a desired location in javascript p5.js or any way to show image and hide it at a desired locationp5.js "<i>Why does changing state (useState) break my p5.js code?<\/i>为什么更改状态 (useState) 会破坏我的 p5.js 代码?<\/b> <i>(React + p5.js application)<\/i> (反应 + p5.js 应用程序)<\/b>" - Why does changing state (useState) break my p5.js code? (React + p5.js application) 我可以在p5.js画布上使用Seriously.js吗? - Can I use Seriously.js on a p5.js canvas?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM