FAQ
I have the same concerns that Bill does.
On May 25, 2010, at 6:40 PM, Bill Keese wrote:

I was hoping that in the brave new world of CSS3/HTML5, we'd do all
animations in CSS. Certainly using CSS for something like your
example
of the collapsible textbox. I suppose you'd still need a library
like
this if you were doing something really complicated, like an actual
anime (ie, cartoon). What uses are you (Antonio) expecting for
this
library beyond what CSS animations give?
On 5/25/10 11:50 PM, Dylan Schiemann wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Overview
- ---------

I (Antonio Cisternino) would like to propose the AnimeJ JavaScript
library for joining the Dojo Foundation. AnimeJ is a peculiar library
originally conceived as an animation engine for a web site about
Tuscany
I was developing as part of an European project. The library
contains 10
years of experience in my being a web developer, but academic as well
(at present I'm an Assistant Professor in the Computer Science
Department at the University of Pisa) and a lover of JavaScript. I
always thought of AnimeJ as an animation library until recently,
when I
realized that it was a misconception: AnimeJ is an efficient
generalized
timer for JavaScript. Time is an important dimension and it is the
foundation for animation. The essential traits of the library are:

* Very small
* Single setTimeout call for as many tasks are needed
* Implementation of a timeline API based on the underlying
generalized
timer capable of pause and reverse play

Details
- --------

Shared timer is a well-known technique dating back to the good old
days
of Operating Systems, a heap is used to keep organized deadlines
and you
sleep the time needed for the upcoming. AnimeJ leverage on this basic
principle and implements a scheduler of Finite State Automata: a
JavaScript object that simply performs a task by implementing the
DoAction method and then possibly reschedules itself for the next
deadline.

Using this abstraction a general timeline has been implemented that
simply features interpolators of general JS objects (including DOMs).
Moreover it is possible to obtain non-trivial general purpose service
such as pause and resume of a timeline (you can schedule as many as
you
want) and play it in reverse. This is because interpolators are
generalized linear interpolators (you provide an array saying how
values
change in the time 0-1 and you get linear interpolation among an
arbitrary number of intermediate steps).

The fact that time is seen in the 0-1 interval has another
consequence
not yet fully exploited by the library: the variation of a value over
time can be independent from the actual value. This is one of the
main
aspects of animation: a "boing" of some window is a "boing"
independently from the actual size.

Currently we are developing two tools for AnimeJ (a student of
mine): an
editor of interpolation curves (using HTML5) so that one can edit
non-trivial interpolations. A physics engine generating curves using
simplified physics laws.

Let us consider this simple example:

<html>
<head>
<title>Auto-hide text box</title>
<script type="text/javascript" src="../../src/AnimeJCompact.js"></
script>
<script>
function transition(btn) {
var txt = btn.parentNode.getElementsByTagName('input')[0];
var isHidden = txt.style.display == 'none';
if (isHidden) {txt.style.display = 'inline';}
if (!btn.timeline) {
var t = new Timeline();
t.SetAt(0, AnimeJInterp.px(1000, 30, txt.style, 'width', 0, 120));
t.SetAt(0, AnimeJInterp.alpha(1000, 30, txt, 0.0, 1.0));
t.OnEnd = function (d, rev) {
if (!rev) { btn.innerHTML = '&lt;&lt;';}
else { btn.innerHTML = '&gt;&gt;'; txt.style.display = 'none'; }
};
btn.timeline = t;
}
btn.timeline.Run(!isHidden);
}
</script>
</head>
<body>
<span>
<input type="text" width="120px"></input>
<span style="cursor: pointer; color: blue"
onclick="transition(this)">&lt;&lt;</span>
</span>
</body>
</html>

This is a collapsible textbox. Behind the scenes, the px and alpha
functions generate an interpolated task interpolating values of the
appropriate objects with the given timespan (millisecs) and at a
given
pace. Timelines do support callbacks so that you can do something
at the
end (in this way it is easy to build sequence of timelines).

I believe that AnimeJ is a lovely piece of JavaScript in which I put
years of experience of web programming (my first HTML app using
Java and
JavaScript dates back to 1996 and it was the first Italian Java
applet
doing something useful). I think it should stay small, as all the
foundations and kernel are independent from anything other than time
management. It is efficient because it reduces crossing the barrier
of
the browser/Javascript interpreter, reducing "context switches"
between
native and interpreted code. I would love to join the Dojo Foundation
because I think the library deserves a better future than that I can
ensure by simply maintaining it on CodePlex. Moreover since I
realized
it is not a real animation framework, but the ideal foundation to
easily
implement animation frameworks, I reckon it is useful only if part of
something larger.

I really hope to join the foundation and help contribute to its
success!

Project Lead:
- ----------------

Antonio Cisternino, who wrote the proposal above, would be the
project lead.

Integration within other Dojo projects:
- ----------------------------------------

As with Sizzle and Acme, the jQuery and Dojo selector engines,
projects
will be free to use/contribute to AnimeJ if desired. Given the
general
interest in all things animation (dojo.fx/dojox.gfx, css3 animations,
canvas/svg animations, mobile animations, etc., a small project for
animation/timing seems like a reasonable goal for the foundation.

The Measure:
- ----------------

Having preformed all due diligence, shall the Dojo Foundation
accept the
assets, liability, and goodwill of the AnimeJ project and sponsor the
AnimeJ project in an ongoing fashion?

Further, shall the Foundation accept the members of the AnimeJ team
as
committers on this new project and therefore as voters on Foundation
matters?


Voting rules:
- ----------------

* in order to vote, you must be a committer on a Dojo Foundation
Project
* voting will take place on this mailing list, via email. Respond to
this message with a "+1" or "-1" in the body of the message.
* a simple majority of votes cast wins the election
* voting will remain open for 48 hours from the posting if this
message,
as defined by when the message is shown to have been received by list
archiving software like gmane.
* keep it clean. If you don't like the idea, vote, don't flame.

Please send objections to the rules to this list. If enough
objections
are filed (more than 3), the vote will be canceled, new rules
formulated, and a new vote taken.

If you are not sure of your eligibility to vote or would like to cast
your vote in private, please email me directly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkv7468ACgkQ1E2HcBNypM7CfgCghBKKb6yQLexoObPEDfrlZf+N
7T4AniLlISQ4XEnqCGR1sRzuOK85kFHG
=pK2N
-----END PGP SIGNATURE-----
_______________________________________________
Foundation mailing list
Foundation at mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/foundation
_______________________________________________
Foundation mailing list
Foundation at mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/foundation

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 11 of 17 | next ›
Discussion Overview
groupfoundation @
categoriesdojo
postedMay 25, '10 at 10:50a
activeMay 28, '10 at 5:31p
posts17
users13
websitedojotoolkit.org

People

Translate

site design / logo © 2022 Grokbase