/[suikacvs]/webroot/www/jsanim/jsanim.js
Suika

Contents of /webroot/www/jsanim/jsanim.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sat Jan 14 10:37:29 2012 UTC (12 years, 4 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: application/javascript
Current

1 wakaba 1.1 function JSATimeline () {
2     this.currentTime = 0;
3     } // JSATimeline
4    
5     // Force the "current time" property of the timeline object being /t/.
6     JSATimeline.prototype.setCurrentTime = function (t) {
7     this.currentTime = t;
8     }; // setCurrentTime
9    
10     function JSAEvent (time) {
11     this,time = time;
12     } // JSAEvent
13    
14     function JSAEventSet () {
15     this.events = [];
16     } // JSAEventSet
17    
18     JSAEventSet.prototype.addEvent = function (e) {
19     if (e.eventSet) {
20     throw new JSAEventException ("RegisteredEvent");
21     }
22    
23     this.events.push (e);
24     this.events = this.events.sort (function (a, b) { return a.time < b.time });
25     }; // addEvent
26    
27     function JSAEventException (s) {
28     this.type = s;
29     } // JSAEventException
30    
31     JSAEventException.prototype.toString = function () {
32     return "JSAEventException: " + this.type;
33     }; // toString

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24