{"repo":"software-mansion-labs/typegpu-confetti","free":true,"listed":false,"github":"https://github.com/software-mansion-labs/typegpu-confetti","clone":"git clone https://github.com/software-mansion-labs/typegpu-confetti.git","description":"Confetti animations package for React and React Native, computed and rendered exclusively on the GPU","language":"TypeScript","stars":188,"topics":["confetti","react-native","webgpu"],"license":null,"category":"mobile-apps","readme_excerpt":"typegpu-confetti typegpu-confetti is a package for highly-customizable confetti animations in React Native, computed and rendered exclusively on the GPU. Written using react-native-wgpu and TypeGPU. Installation In order to use the package in React Native, you need to install the react-native-wgpu package: Please refer to the react-native-wgpu documentation for further information about its installation. Note that the package is not supported by Expo Go, so running expo prebuild is required. Then to install the typegpu-confetti package, run: Furthermore, if you want to be able to pass JavaScript functions marked with the \"use gpu\" directive to the Confetti component, you need to include the unplugin-typegpu babel plugin in your project. For further information about the plugin and the overall tgpu functions functionality, please refer to the TypeGPU documentation. Usage 1. Recommended useConfetti hook The hook returns a reference to a Confetti component, exposing the following functions allowing to control the animation: To use the hook, the component needs to be descendent from the ConfettiProvider component, which accepts the same props as Confetti (see the Props section). It's recommended to wrap a top-level component with the provider, to make sure the confetti covers the whole screen (if that's the desired effect) and make the hook accessible anywhere inside the app. 2. Alternative Confetti component The Confetti component is positioned absolutely and will completely cov","default_branch":null,"files":null,"tree":[],"storefront":"/r/software-mansion-labs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/software-mansion-labs/typegpu-confetti/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}