mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
fixed positions
This commit is contained in:
parent
071ad6bec5
commit
74dde11d2c
2 changed files with 7 additions and 7 deletions
|
|
@ -6,7 +6,7 @@ define(['Lib/Vendor/Three', 'Game/Config/Settings'], function (Three, Settings)
|
|||
? true
|
||||
: isOrthographic;
|
||||
|
||||
if(isOrthographic) {
|
||||
if(!isOrthographic) {
|
||||
|
||||
this.camera = new Three.OrthographicCamera(
|
||||
-Settings.STAGE_WIDTH/2,
|
||||
|
|
@ -22,13 +22,13 @@ define(['Lib/Vendor/Three', 'Game/Config/Settings'], function (Three, Settings)
|
|||
this.camera = new Three.PerspectiveCamera(
|
||||
45,
|
||||
Settings.STAGE_WIDTH / Settings.STAGE_HEIGHT,
|
||||
-2000,
|
||||
1000
|
||||
1,
|
||||
-500
|
||||
);
|
||||
}
|
||||
|
||||
this.camera.position.z = 481;
|
||||
this.setPosition(0,0);
|
||||
this.setPosition(Settings.STAGE_WIDTH / 2, -Settings.STAGE_HEIGHT / 2);
|
||||
}
|
||||
|
||||
CameraController.prototype.getCamera = function () {
|
||||
|
|
@ -36,8 +36,8 @@ define(['Lib/Vendor/Three', 'Game/Config/Settings'], function (Three, Settings)
|
|||
}
|
||||
|
||||
CameraController.prototype.setPosition = function (x, y) {
|
||||
this.camera.position.x = x + Settings.STAGE_WIDTH / 2;
|
||||
this.camera.position.y = y - Settings.STAGE_HEIGHT / 2;
|
||||
this.camera.position.x = x;
|
||||
this.camera.position.y = y;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ define(requires, function (DomController, Three, Settings, CameraController) {
|
|||
//this.renderer = new Three.CanvasRenderer(rendererOptions);
|
||||
//}
|
||||
|
||||
this.renderer.setClearColorHex(0x333333, 1);
|
||||
this.renderer.setClearColor("#333333", 1);
|
||||
this.renderer.setSize(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT);
|
||||
|
||||
DomController.setCanvas(this.renderer.domElement);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue