Giter Club home page Giter Club logo

react-native-particle-system's Introduction

A Particle System for React Native (iOS)

###Add particle effects to your React Native app

##Add it to your project ###iOS

  • Run npm install react-native-particle-system --save

Then:

  1. Open your project in XCode, select the folder you want project file in, right click it and click Add Files to "Your Folder Name". Look under node_modules/react-native-particle-system and add GPHParticleSystem.xcodeproj.
  2. Add GPHParticleSystem to Build Phases -> Target Dependencies.
  3. Add libGPHParticleSystem.a to Build Phases -> Link Binary With Libraries.

Then:

  • Whenever you want to use it within React code now you can: import ParticleView from 'react-native-particle-system/ParticleView

##Usage A particle system consist of one ParticleView component enclosing one or more ParticleCells. Each ParticleCell in turn encloses an Image component that is used to render the particle:

<ParticleView ...
  <ParticleCell ...
     <Image ... />
  </ParticleCell>
        .
        .
        .
  <ParticleCell ...
     <Image ... />
  </ParticleCell>
</ParticleView>

Both the ParticleView and the ParticleCells are highly configurable each with its own set of properties. Note that some of the ParticleView's properties are multiplied with the ParticleCell's properties to determine the final value. For example, the 'lifetime' property of the ParticleView is multiplied with the 'lifetime' property of a ParticleCell to determine the effective lifetime of that ParticleCell.

All of the properites correspond directly with the properties on CAEmitterLayer/CAEmitterCell, except the lifetime property of the former which is expressed in milliseconds in the JS component.

##Future Work Clearly a version for Android would be welcome.

react-native-particle-system's People

Contributors

greghe avatar erenn16 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.