[2D3DAnimation][TNEXT-18085, fix 3d cube disappears issue] 14/200614/2
authorzhongyuan <zy123.yuan@samsung.com>
Wed, 27 Feb 2019 09:31:23 +0000 (17:31 +0800)
committerzhongyuan <zy123.yuan@samsung.com>
Wed, 27 Feb 2019 09:34:22 +0000 (17:34 +0800)
Change-Id: I7979a470985ded0528f6abd829becfe2847222f7

mobile/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js
tv/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js
wearable/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js

index 7494f86935377d52a8871399b918301e2c00ab77..b329e2a1b7aa30f3e6cd7fb12f47bf37e6111035 100755 (executable)
@@ -135,7 +135,9 @@ function drawPicture(gl) {
     // Draw the cube
     gl.drawElements(gl.TRIANGLES, g.box.numIndices, gl.UNSIGNED_BYTE, 0);
 
-    currentAngle += incAngle;
-    if (currentAngle > 360)
-    currentAngle -= 360;
+    if(!isNaN(incAngle)){
+      currentAngle += incAngle;
+      if (currentAngle > 360)
+        currentAngle -= 360;
+    }
 }
index 7494f86935377d52a8871399b918301e2c00ab77..b329e2a1b7aa30f3e6cd7fb12f47bf37e6111035 100755 (executable)
@@ -135,7 +135,9 @@ function drawPicture(gl) {
     // Draw the cube
     gl.drawElements(gl.TRIANGLES, g.box.numIndices, gl.UNSIGNED_BYTE, 0);
 
-    currentAngle += incAngle;
-    if (currentAngle > 360)
-    currentAngle -= 360;
+    if(!isNaN(incAngle)){
+      currentAngle += incAngle;
+      if (currentAngle > 360)
+        currentAngle -= 360;
+    }
 }
index 7494f86935377d52a8871399b918301e2c00ab77..6f10806968e5679194509e3ed70e98771848e7de 100755 (executable)
@@ -134,8 +134,9 @@ function drawPicture(gl) {
 
     // Draw the cube
     gl.drawElements(gl.TRIANGLES, g.box.numIndices, gl.UNSIGNED_BYTE, 0);
-
-    currentAngle += incAngle;
-    if (currentAngle > 360)
-    currentAngle -= 360;
+    if(!isNaN(incAngle)){
+      currentAngle += incAngle;
+      if (currentAngle > 360)
+        currentAngle -= 360;
+    }
 }