Skip to content

Commit 3a3c24c

Browse files
committed
Camera controls can change camera.
1 parent 27db941 commit 3a3c24c

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

v3/src/camera/controls/KeyControl.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,22 @@ var KeyControl = new Class({
4646
start: function ()
4747
{
4848
this.active = (this.camera !== null);
49+
50+
return this;
4951
},
5052

5153
stop: function ()
5254
{
5355
this.active = false;
56+
57+
return this;
58+
},
59+
60+
setCamera: function (camera)
61+
{
62+
this.camera = camera;
63+
64+
return this;
5465
},
5566

5667
update: function (delta)

v3/src/camera/controls/SmoothedKeyControl.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,22 @@ var SmoothedKeyControl = new Class({
8181
start: function ()
8282
{
8383
this.active = (this.camera !== null);
84+
85+
return this;
8486
},
8587

8688
stop: function ()
8789
{
8890
this.active = false;
91+
92+
return this;
93+
},
94+
95+
setCamera: function (camera)
96+
{
97+
this.camera = camera;
98+
99+
return this;
89100
},
90101

91102
update: function (delta)

0 commit comments

Comments
 (0)