Josh Engebretson 10 years ago
parent
commit
68ff6762e9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Light2DExample/Resources/Components/Background.js

+ 2 - 2
Light2DExample/Resources/Components/Background.js

@@ -12,8 +12,8 @@ function start() {
     var width = sprite2D.texture.width;
     var height = sprite2D.texture.height;
 
-    var viewWidth = game.viewport.width;
-    var viewHeight = game.viewport.height;
+    var viewWidth = game.graphics.width;
+    var viewHeight = game.graphics.height;
 
     node.scale2D = [viewWidth / width, viewHeight / height];