How to use libpag in the React Nactive framework? #2489
-
I want to use animated graphics in. pag format in the React Nactive framework, but the official documentation does not support direct use in this framework. Can I use. pag in other ways? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
PAG only provides native rendering solutions for each platform. Some frameworks based on native platforms require the business layer to handle. |
Beta Was this translation helpful? Give feedback.
PAG only provides native rendering solutions for each platform. Some frameworks based on native platforms require the business layer to handle.
If you want to use PAG in React Native, you must do some wrapping. On the Android platform, you can obtain the texture data for each frame rendered by PAG. Similarly, on the iOS platform, you can obtain the CVPixelBuffer for each rendered frame.
You can refer to the encapsulation of other businesses in the Flutter framework. https://github.com/libpag/pag-flutter