From c260783fd0ee0b1143b1602f069579af524cba5d Mon Sep 17 00:00:00 2001 From: pandamicro Date: Tue, 21 Jul 2015 18:23:57 +0800 Subject: [PATCH] [JS] Revert const to var to avoid issues on web compilation --- tests/js-tests/src/Particle3DTest/Particle3DTest.js | 2 +- tests/js-tests/src/Physics3DTest/Physics3DTest.js | 12 ++++++------ tests/js-tests/src/TerrainTest/TerrainTest.js | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/js-tests/src/Particle3DTest/Particle3DTest.js b/tests/js-tests/src/Particle3DTest/Particle3DTest.js index e5e5a0c663..f8b80e08f3 100644 --- a/tests/js-tests/src/Particle3DTest/Particle3DTest.js +++ b/tests/js-tests/src/Particle3DTest/Particle3DTest.js @@ -27,7 +27,7 @@ if(cc.sys.isNative)(function(){ var Particle3DTestIdx = -1; -const PARTICLE_SYSTEM_TAG = 0x0001; +var PARTICLE_SYSTEM_TAG = 0x0001; jsb.fileUtils.addSearchPath("res/Sprite3DTest"); jsb.fileUtils.addSearchPath("res/Particle3D/materials"); diff --git a/tests/js-tests/src/Physics3DTest/Physics3DTest.js b/tests/js-tests/src/Physics3DTest/Physics3DTest.js index 1f238406ce..886970aa74 100644 --- a/tests/js-tests/src/Physics3DTest/Physics3DTest.js +++ b/tests/js-tests/src/Physics3DTest/Physics3DTest.js @@ -27,13 +27,13 @@ var Physics3DTestIdx = -1; var physicsScene = null; -const START_POS_X = -0.5; -const START_POS_Y = -2.5; -const START_POS_Z = -0.5; +var START_POS_X = -0.5; +var START_POS_Y = -2.5; +var START_POS_Z = -0.5; -const ARRAY_SIZE_X = 4; -const ARRAY_SIZE_Y = 3; -const ARRAY_SIZE_Z = 4; +var ARRAY_SIZE_X = 4; +var ARRAY_SIZE_Y = 3; +var ARRAY_SIZE_Z = 4; var Physics3DTestDemo = cc.Layer.extend({ _title:"Physics3D Test", diff --git a/tests/js-tests/src/TerrainTest/TerrainTest.js b/tests/js-tests/src/TerrainTest/TerrainTest.js index 3f7759cb74..6c3a5dc679 100644 --- a/tests/js-tests/src/TerrainTest/TerrainTest.js +++ b/tests/js-tests/src/TerrainTest/TerrainTest.js @@ -189,7 +189,7 @@ var TerrainSimple = TerrainTestDemo.extend({ }); var TerrainWalkThru = (function(){ - const PlayerState = { + var PlayerState = { LEFT : 0, RIGHT : 1, IDLE : 2, @@ -197,8 +197,8 @@ var TerrainWalkThru = (function(){ BACKWARD : 4 }; - const PLAYER_HEIGHT = 0; - const camera_offset = cc.math.vec3(0, 45, 60); + var PLAYER_HEIGHT = 0; + var camera_offset = cc.math.vec3(0, 45, 60); var Player = jsb.Sprite3D.extend({ _targetPos:null,