seed r836 - trunk/examples/same-seed
- From: hortont svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r836 - trunk/examples/same-seed
- Date: Tue, 3 Feb 2009 10:04:22 +0000 (UTC)
Author: hortont
Date: Tue Feb 3 10:04:22 2009
New Revision: 836
URL: http://svn.gnome.org/viewvc/seed?rev=836&view=rev
Log:
Significantly better animation performance.
Modified:
trunk/examples/same-seed/board.js
trunk/examples/same-seed/light.js
Modified: trunk/examples/same-seed/board.js
==============================================================================
--- trunk/examples/same-seed/board.js (original)
+++ trunk/examples/same-seed/board.js Tue Feb 3 10:04:22 2009
@@ -41,8 +41,8 @@
var con = [li];
- while(GLib.main_context_pending())
- GLib.main_context_iteration();
+ //while(GLib.main_context_pending())
+ // GLib.main_context_iteration();
// Do all of the concatenation together for performance
@@ -214,8 +214,9 @@
li.set_light_x(real_x);
li.set_light_y(parseInt(y,10));
- if(li.get_closed())
+ if(li.get_closed() && !li.on.anim)
{
+ Seed.print("hiding");
li.on.anim = li.on.animate(Clutter.AnimationMode.LINEAR,500,
{
height: [GObject.TYPE_INT, tile_size * 2],
@@ -233,7 +234,8 @@
});
li.anim.timeline.start();
}
- else
+ else if(((real_x * tile_size + offset) != li.x) ||
+ (((tiles_h - y - 1) * tile_size + offset) != li.y))
{
animating = true;
Modified: trunk/examples/same-seed/light.js
==============================================================================
--- trunk/examples/same-seed/light.js (original)
+++ trunk/examples/same-seed/light.js Tue Feb 3 10:04:22 2009
@@ -44,14 +44,14 @@
this.close_tile = function ()
{
closed = true;
-
- //this.hide();
}
this.hide_light = function (timeline, light)
{
light.hide();
+ delete on;
+
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]