From: zhongyuan Date: Wed, 27 Feb 2019 09:31:23 +0000 (+0800) Subject: [2D3DAnimation][TNEXT-18085, fix 3d cube disappears issue] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa6e60698bcf3d743b33ee35979b8369b1bb76a1;p=test%2Ftct%2Fweb%2Fbehavior.git [2D3DAnimation][TNEXT-18085, fix 3d cube disappears issue] Change-Id: I7979a470985ded0528f6abd829becfe2847222f7 --- diff --git a/mobile/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js b/mobile/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js index 7494f86..b329e2a 100755 --- a/mobile/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js +++ b/mobile/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js @@ -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; + } } diff --git a/tv/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js b/tv/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js index 7494f86..b329e2a 100755 --- a/tv/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js +++ b/tv/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js @@ -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; + } } diff --git a/wearable/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js b/wearable/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js index 7494f86..6f10806 100755 --- a/wearable/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js +++ b/wearable/tct-behavior-tests/tests/2D3DAnimation/js/SpinningBox.js @@ -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; + } }