diff --git a/tests/js-tests/src/Camera3DTest/Camera3DTest.js b/tests/js-tests/src/Camera3DTest/Camera3DTest.js index 2f8ef99e2f..c7a3e08b98 100644 --- a/tests/js-tests/src/Camera3DTest/Camera3DTest.js +++ b/tests/js-tests/src/Camera3DTest/Camera3DTest.js @@ -1103,7 +1103,6 @@ var FogTestDemo = Camera3DTestDemo.extend({ ctor:function(){ this._super(); - cc.director.setClearColor(cc.color(128, 128, 128)); cc.eventManager.addListener({ event:cc.EventListener.TOUCH_ALL_AT_ONCE, @@ -1191,6 +1190,11 @@ var FogTestDemo = Camera3DTestDemo.extend({ layer3D.setCameraMask(2); }, + onEnter: function() { + this._super(); + cc.director.setClearColor(cc.color(128, 128, 128)); + }, + onExit:function(){ this._super(); cc.director.setClearColor(cc.color(0, 0, 0));