Fix JavaScript plugin build break after rotation->orientation property change 72/37172/2
authorNick Holland <nick.holland@partner.samsung.com>
Fri, 20 Mar 2015 14:18:38 +0000 (14:18 +0000)
committerNick Holland <nick.holland@partner.samsung.com>
Fri, 20 Mar 2015 14:20:07 +0000 (14:20 +0000)
Change-Id: Ia191f33ed1e4e5e30029c963c2dbbf78e96f87dd

plugins/dali-script-v8/docs/content/actor.js
plugins/dali-script-v8/docs/content/animation.js
plugins/dali-script-v8/docs/content/shader-effect.js
plugins/dali-script-v8/src/actors/actor-api.cpp

index 7bd5b20..b2ea595 100644 (file)
@@ -119,7 +119,7 @@ function OnPressed( actor, touchEvent )
   
   var anim = new dali.Animation( 4 );
   var rotation = new dali.Rotation( 90, 0, 0 ); // pitch, yaw, roll
   
   var anim = new dali.Animation( 4 );
   var rotation = new dali.Rotation( 90, 0, 0 ); // pitch, yaw, roll
-  anim.animateBy( actor, "rotation", rotation );
+  anim.animateBy( actor, "orientation", rotation );
   anim.play();
   return true;
 }
   anim.play();
   return true;
 }
index ec587fe..33c64f8 100644 (file)
@@ -68,8 +68,8 @@ myActor2.position=[ 100,0,-2000];  // x = 100, y = 0 , z = -2000
 function createAnimation() {
   
   var startRotation = new dali.Rotation(180, -180, 0);
 function createAnimation() {
   
   var startRotation = new dali.Rotation(180, -180, 0);
-  myActor1.rotation = startRotation;
-  myActor2.rotation = startRotation;
+  myActor1.orientation = startRotation;
+  myActor2.orientation = startRotation;
   
   dali.stage.add( myActor1 );
   dali.stage.add( myActor2 );
   
   dali.stage.add( myActor1 );
   dali.stage.add( myActor2 );
@@ -90,7 +90,7 @@ function createAnimation() {
   var endRotation = new dali.Rotation(0,0,0);
   
   animOptions.alpha = "easeInOutSine";
   var endRotation = new dali.Rotation(0,0,0);
   
   animOptions.alpha = "easeInOutSine";
-  anim.animateTo(myActor1, "rotation", endRotation, animOptions);
+  anim.animateTo(myActor1, "orientation", endRotation, animOptions);
   
   // Delay the myActor2  by  a second
   animOptions.delay = 0.0;
   
   // Delay the myActor2  by  a second
   animOptions.delay = 0.0;
@@ -99,7 +99,7 @@ function createAnimation() {
   
   //  rotate back to correct orientation
   animOptions.alpha = "easeInOutSine";
   
   //  rotate back to correct orientation
   animOptions.alpha = "easeInOutSine";
-  anim.animateTo(myActor2, "rotation", endRotation, animOptions);
+  anim.animateTo(myActor2, "orientation", endRotation, animOptions);
 
   return anim;
 }
 
   return anim;
 }
@@ -209,7 +209,7 @@ var shaderAnim = createShaderAnimation( shaderEffect, color,zoom, duration, dela
   
 // also rotate the imageActor 90 degrees at the same time.
 var rotation = new dali.Rotation(90,0,0,1);
   
 // also rotate the imageActor 90 degrees at the same time.
 var rotation = new dali.Rotation(90,0,0,1);
-shaderAnim.animateTo(imageActor, "rotation", rotation, { alpha:"linear", duration:duration, delay:delay });
+shaderAnim.animateTo(imageActor, "orientation", rotation, { alpha:"linear", duration:duration, delay:delay });
 
 
 shaderAnim.play();
 
 
 shaderAnim.play();
index eedfafa..a83df51 100644 (file)
@@ -238,7 +238,7 @@ imageActor.setCullFace( dali.CULL_FACE_DISABLE ); // disable face culling so we
 dali.stage.add( imageActor );
   
 // start it of tilted around the y-axis
 dali.stage.add( imageActor );
   
 // start it of tilted around the y-axis
-imageActor.rotation=new dali.Rotation(90, 0, 1, 0);
+imageActor.orientation=new dali.Rotation(90, 0, 1, 0);
   
 var twistEffect = createTwistEffect();
 imageActor.setShaderEffect( twistEffect );
   
 var twistEffect = createTwistEffect();
 imageActor.setShaderEffect( twistEffect );
index 4027a1b..d068554 100644 (file)
@@ -557,7 +557,7 @@ void ActorApi::RotateBy( const v8::FunctionCallbackInfo<v8::Value>& args )
   bool found( false );
   Property::Value rotation = V8Utils::GetPropertyValueParameter( PARAMETER_0, found, isolate, args );
 
   bool found( false );
   Property::Value rotation = V8Utils::GetPropertyValueParameter( PARAMETER_0, found, isolate, args );
 
-  if( rotation.GetType() != Property::ORIENTATION )
+  if( rotation.GetType() != Property::ROTATION )
   {
     DALI_SCRIPT_EXCEPTION( isolate, "Rotation parameter missing" );
     return;
   {
     DALI_SCRIPT_EXCEPTION( isolate, "Rotation parameter missing" );
     return;