e24BubbleFx - Photo bubble transition effect

e24BubbleFx - Image transition effect
Introduction
e24BubbleFx is a plugin for Mootools that makes a transition between two photos. The transition comes in form of a bubble that move around the back picture discovering it.
But better we see it in action with the following demos.

Demos
Demo1: Basic
Demo2: Advanced

Usage
Include Mootools 1.2.2 Core inside the HTML header. Remember that you can generate an optimum version of the mootools library selecting only the required components at Mootools Core Builder. The required components are DOMReady, Fx.Transitions, Fx.Tween and all its dependencies. Also include e24BubbleFx library:

1
2
<script src="js/mootools-1.2.2-core-nc.js" type="text/javascript"></script>
<script src="js/e24bubblefx-1.0rc.js" type="text/javascript"></script>

Now write the necessary HTML code to define the effect container. We will need a container layer (“visor” in this case). This layer will have the image background that will appear while the animation executes. You must take into account that this background image will appear directly in case that javascript is disabled, so that this effect will degrade gracefully.

Then we have to add a very basic CSS rules for the container layer. We just have to define the dimensions and the background image.

1
2
3
4
5
6
#visor {
	position:relative;
	width:1000px;
	height:250px;
	background: url(img/back1.jpg) no-repeat;
}

Next we have to write the necessary javascript code. We need to pass an options object. The main option is the “container” that has to point to the container layer id, “visor” in this case. We will see the rest of the options in detail below.
Finally we have to call the start method with an array of coordinates that will describe the bubble steps.

?View Code JAVASCRIPT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
	var bubbleFx = new e24BubbleFx({
		container: 'visor',
		width: 1000,
		height: 250,
		initStep: {x:0, w:100},
		img: 'img/back2.jpg',
		transition: 'quad:out',
		infinite: false
	});
 
	discoverFx.start([
		{x:200, w:520, d1:800, d2:1100},
		{x:350, w:270, d1:800, d2:800},
		{x:0, w:230, d1:800, d2:1100},
		{x:250, w:530, d1:800, d2:1100},
		{x:300, w:700, d1:800, d2:1100}
	]);

Options

Events

Methods

Known Issues

License
Distributed under MIT License

Download
e24BubbleFx 1.0RC (218 KB, includes the demos)

Remember that the heart of this effect is the bubble’s step coordinates, so a creative combination of steps can result in a cool effect. I invite you to share your steps combination.

If you want to check what I am working on now, then follow me at twitter @aartiles24

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Bitacoras.com
  • E-mail this story to a friend!
  • Meneame
  • MySpace
  • Netvibes
  • Reddit
  • StumbleUpon
  • Technorati
  • Wikio
Comentarios

[...] Artiles me avisa por mail del nuevo plugin que ha desarrollado, e24BubleFx. Se trata de un plugin para MooTools que nos permite efectuar un elegante efecto de burbuja a [...]

[...] Alfredo Artiles ha desarrollado un plug-in para Mootools que nos permite realizar una transición entre dos fotografías usando un interesante efecto similar al movimiento de una burbuja. Les estoy hablando de e24BubbleFx. [...]

[...] Artiles me avisa por mail del nuevo plugin que ha desarrollado, e24BubleFx. Se trata de un plugin para MooTools que nos permite efectuar un elegante efecto de burbuja a [...]

Deja un comentario

(requerido)

(requerido)