Giter VIP home page Giter VIP logo

dazzle's Introduction

Dazzle

Created by Leonhard Lichtschlag ([email protected]) on 9/Feb/12.
Copyright (c) 2012 Leonhard Lichtschlag. All rights reserved.


Dazzle is a demo of some effects one can do with Core Animation in iOS 5 with the CAEmitterCell and CAEmitterLayer classes:

  • The "info" tab shows a linear emitter with a shadow applied to all cells to create an emboss effect.
  • In the "hearts" tab the emitters are triggered by an animation to create the "burst" animation.
  • In the "fire" tab, additive overlaying of cell creates a somewhat realistic impression of fire. The source code here has been adapted from the corresponding Apple sample code for Mac.
  • In the fourth tab, I show how emitted cells can in turn again emit cells: the triangles sent away from the touch send two kinds of cells sideways and back to the touch location. The emitted cells start with their visual values set to those of their parents.
  • Emitters can also be invisible, but there seems to be a bug in CAEmitterLayer: setting the birthrate lower than 1.0 creates huge spawn rates even though it should be less. To still create the fireworks with it, the explosion can therefore only happen at most 1 sec after the rocket launches.

Performance-wise, setting the flame height to maximum will really stress the iPhone4's graphics to its max, resulting at about ~30 fps. Likewise a constant triggering of new touches in the frouth tab will average at about 22 fps.

Update: In iOS6 the behaviour of the birthrate property seems to have changed, a fireworks explosion is triggered at t= 0s. This is no longer the case in iOS7.

Update: In iOS7 the behaviour of the birthrate property seems to have changed, it now acts as if the objects would have been spawned in the past... (rdar:14413481)

dazzle's People

Contributors

lichtschlag avatar

Watchers

 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.