[Sie-announce] SIEコード [1441]

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 11月 27日 (金) 23:24:54 JST


Revision: 1441
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1441
Author:   dhrname
Date:     2009-11-27 23:24:54 +0900 (Fri, 27 Nov 2009)

Log Message:
-----------


Modified Paths:
--------------
    branches/05x/055/sie.js

Modified: branches/05x/055/sie.js
===================================================================
--- branches/05x/055/sie.js	2009-11-27 14:09:13 UTC (rev 1440)
+++ branches/05x/055/sie.js	2009-11-27 14:24:54 UTC (rev 1441)
@@ -2163,7 +2163,10 @@
   matrix = data = t = null;
 };
 
-NAIBU.Frame = [];
+NAIBU.Time = {
+  curentFrame : 0
+};
+NAIBU.Clip = [];
 function STSetElement(/*Element*/ ele, /*Matrix*/ matrix, /*float*/w, h) {
   var parent = ele.parentNode, dummy = new Matrix(1, 0, 0, 1, 0, 0), s = {};
   if (parent.nodeName === "shape") {
@@ -2213,7 +2216,7 @@
   this.h = h;
   this._begin = this._end = null;
   dummy = null;
-  NAIBU.Frame[NAIBU.Frame.length] = this;
+  NAIBU.Clip[NAIBU.Clip.length] = this;
   return this;
 };
 STSetElement.prototype.set = function (w,h){
@@ -2258,14 +2261,16 @@
   "s" : 1000,
   "ms" : 1000
 };
-//sはフレーム数であることに気をつけること
+//sは現在のフレーム数であることに気をつけること
 STSetElement.prototype._frame = function (/*int*/ s){
   if (this._begin && this._end) {
-    if (this._begin >= s && this.currentFrame === 0) {
-      this.beginElement();
+    if (this._begin <= s) {
+      if (this.currentFrame === 0) {
+        this.beginElement();
+      }
       this.currentFrame++;
     }
-    if (this._end >= s && this.currentFrame !== 0) {
+    if (this._end <= s && this.currentFrame !== 0) {
       this.endElement();
       this.currentFrame = 0;
       this._begin = null;
@@ -2305,10 +2310,10 @@
   return;
 };
 STSetElement.prototype.beginElementAt = function (offset){
-  this._begin = offset * 0.8 * 0.024;  //フレーム数に変換(軽量化のために、1s = 800msで計算)
+  this._begin = offset * 0.8 * 0.024 + NAIBU.Time.cuurentFrame;  //フレーム数に変換(軽量化のために、1s = 800msで計算)
 };
 STSetElement.prototype.endElementAt = function (offset){
-  this._end = offset * 0.8 * 0.024;
+  this._end = offset * 0.8 * 0.024 + NAIBU.Time.cuurentFrame;
 };
 
 function utf16( /*string*/ s)  {




Sie-announce メーリングリストの案内
Back to archive index