From d51f0b1f052b5611fb489052ac2e65c2e972f46f Mon Sep 17 00:00:00 2001 From: jianglong0156 Date: Mon, 27 Jul 2015 10:51:53 +0800 Subject: [PATCH] add animate support new --- .../js-tests/src/Camera3DTest/Camera3DTest.js | 2 +- tests/js-tests/src/LightTest/LightTest.js | 2 +- tests/js-tests/src/NavMeshTest/NavMeshTest.js | 2 +- .../src/Particle3DTest/Particle3DTest.js | 2 +- .../js-tests/src/Sprite3DTest/Sprite3DTest.js | 24 +++++++++---------- tests/js-tests/src/TerrainTest/TerrainTest.js | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/js-tests/src/Camera3DTest/Camera3DTest.js b/tests/js-tests/src/Camera3DTest/Camera3DTest.js index ae22f222a2..655c12fd28 100644 --- a/tests/js-tests/src/Camera3DTest/Camera3DTest.js +++ b/tests/js-tests/src/Camera3DTest/Camera3DTest.js @@ -374,7 +374,7 @@ var Camera3DTest = (function(){ if(playAnimation){ var animation = new jsb.Animation3D(file, "Take 001"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } } diff --git a/tests/js-tests/src/LightTest/LightTest.js b/tests/js-tests/src/LightTest/LightTest.js index 6867e67b6b..02d92528c8 100644 --- a/tests/js-tests/src/LightTest/LightTest.js +++ b/tests/js-tests/src/LightTest/LightTest.js @@ -184,7 +184,7 @@ var LightTest = LightTestDemo.extend({ orc.getAttachNode("Bip001 R Hand").addChild(axe); var animation = new jsb.Animation3D("Sprite3DTest/orc.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); orc.runAction(cc.repeatForever(animate)); } this.addChild(orc); diff --git a/tests/js-tests/src/NavMeshTest/NavMeshTest.js b/tests/js-tests/src/NavMeshTest/NavMeshTest.js index af1d088f9e..9877b7ffb9 100644 --- a/tests/js-tests/src/NavMeshTest/NavMeshTest.js +++ b/tests/js-tests/src/NavMeshTest/NavMeshTest.js @@ -158,7 +158,7 @@ var NavMeshBaseTestDemo = NavMeshTestScene.extend({ physicsScene.addChild(node); var animation = new jsb.Animation3D(filePath); - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); if (animate){ agentNode.runAction(new cc.RepeatForever(animate)); diff --git a/tests/js-tests/src/Particle3DTest/Particle3DTest.js b/tests/js-tests/src/Particle3DTest/Particle3DTest.js index cdb8f0404a..ffc2796513 100644 --- a/tests/js-tests/src/Particle3DTest/Particle3DTest.js +++ b/tests/js-tests/src/Particle3DTest/Particle3DTest.js @@ -379,7 +379,7 @@ var Particle3DWithSprite3DDemo = Particle3DTestDemo.extend({ sprite.setCameraMask(2); var animation = new jsb.Animation3D(c3bfileName); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } diff --git a/tests/js-tests/src/Sprite3DTest/Sprite3DTest.js b/tests/js-tests/src/Sprite3DTest/Sprite3DTest.js index 5a029c9d75..ceb59d5311 100644 --- a/tests/js-tests/src/Sprite3DTest/Sprite3DTest.js +++ b/tests/js-tests/src/Sprite3DTest/Sprite3DTest.js @@ -308,7 +308,7 @@ var Sprite3DWithSkinTest = Sprite3DTestDemo.extend({ var animation = new jsb.Animation3D("Sprite3DTest/orc.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); var inverse = Math.random() < 0.33 ? true : false; var rand2 = Math.random(); @@ -373,12 +373,12 @@ var Animate3DTest = (function(){ var animation = new jsb.Animation3D("Sprite3DTest/tortoise.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation, 0, 1.933); + var animate = new jsb.Animate3D(animation, 0, 1.933); this._swim = new cc.RepeatForever(animate); sprite.runAction(this._swim); this._swim.retain(); - this._hurt = jsb.Animate3D.create(animation, 1.933, 2.8); + this._hurt = new jsb.Animate3D(animation, 1.933, 2.8); this._hurt.retain(); this._state = State.SWIMMING; @@ -486,7 +486,7 @@ var AttachmentTest = Sprite3DTestDemo.extend({ var animation = new jsb.Animation3D("Sprite3DTest/orc.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } @@ -568,7 +568,7 @@ var Sprite3DReskinTest = (function(){ sprite.setPosition(cc.p(position.x, position.y - 60)); var animation = new jsb.Animation3D("Sprite3DTest/ReskinGirl.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } this._sprite = sprite; @@ -702,7 +702,7 @@ var Sprite3DWithOBBPerformanceTest = Sprite3DTestDemo.extend({ this._sprite = sprite; var animation = new jsb.Animation3D("Sprite3DTest/tortoise.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } @@ -812,7 +812,7 @@ var Sprite3DMirrorTest = Sprite3DTestDemo.extend({ var animation = new jsb.Animation3D(fileName); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } @@ -831,7 +831,7 @@ var Sprite3DMirrorTest = Sprite3DTestDemo.extend({ var animation = new jsb.Animation3D(fileName); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } } @@ -856,7 +856,7 @@ var QuaternionTest = Sprite3DTestDemo.extend({ this._sprite = sprite; var animation = new jsb.Animation3D("Sprite3DTest/tortoise.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation, 0, 1.933); + var animate = new jsb.Animate3D(animation, 0, 1.933); sprite.runAction(cc.repeatForever(animate)); } @@ -939,7 +939,7 @@ var UseCaseSprite3D1 = Sprite3DTestDemo.extend({ sprite.setScale(0.15); var animation = new jsb.Animation3D("Sprite3DTest/girl.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } @@ -1008,7 +1008,7 @@ var UseCaseSprite3D2 = Sprite3DTestDemo.extend({ sprite.setScale(0.5); var animation = new jsb.Animation3D("Sprite3DTest/girl.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); sprite.runAction(cc.repeatForever(animate)); } sprite.setPosition(s.width/4, s.height/4); @@ -1141,7 +1141,7 @@ var Sprite3DWithSkinOutlineTest = Sprite3DTestDemo.extend({ var animation = new jsb.Animation3D("Sprite3DTest/orc.c3b"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); var inverse = Math.random() < 0.33 ? true : false; var rand2 = Math.random(); diff --git a/tests/js-tests/src/TerrainTest/TerrainTest.js b/tests/js-tests/src/TerrainTest/TerrainTest.js index 6c5e08a841..a7f4be2a1e 100644 --- a/tests/js-tests/src/TerrainTest/TerrainTest.js +++ b/tests/js-tests/src/TerrainTest/TerrainTest.js @@ -334,7 +334,7 @@ var TerrainWalkThru = (function(){ var animation = new jsb.Animation3D("Sprite3DTest/girl.c3b", "Take 001"); if(animation){ - var animate = jsb.Animate3D.create(animation); + var animate = new jsb.Animate3D(animation); this._player.runAction(cc.repeatForever(animate)); }