Added pointerlock option to camera
This commit is contained in:
parent
567fa552d8
commit
29074e51e8
|
@ -34,8 +34,8 @@ block content
|
||||||
input#fullarrow(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'})
|
input#fullarrow(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'})
|
||||||
label(for="fullarrow" style={'margin-right':'10px'}) Full arrow
|
label(for="fullarrow" style={'margin-right':'10px'}) Full arrow
|
||||||
|
|
||||||
input#collisions(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'}, checked)
|
input#lock(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'}, checked)
|
||||||
label(for="collisions" style={'margin-right':'10px'}) Collisions
|
label(for="lock" style={'margin-right':'10px'}) Use pointer lock
|
||||||
|
|
||||||
input#showarrows(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'}, checked)
|
input#showarrows(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'}, checked)
|
||||||
label(for="showarrows" style={'margin-right':'10px'}) Show arrows
|
label(for="showarrows" style={'margin-right':'10px'}) Show arrows
|
||||||
|
|
|
@ -74,6 +74,7 @@ PrototypeTools:
|
||||||
--js Hermite.js \
|
--js Hermite.js \
|
||||||
--js Camera.js \
|
--js Camera.js \
|
||||||
--js PointerCamera.js \
|
--js PointerCamera.js \
|
||||||
|
--js PointerLockCamera.js \
|
||||||
--js CameraContainer.js \
|
--js CameraContainer.js \
|
||||||
--js prototype/ArrowCamera.js \
|
--js prototype/ArrowCamera.js \
|
||||||
--js prototype/FixedCamera.js \
|
--js prototype/FixedCamera.js \
|
||||||
|
|
|
@ -11,7 +11,7 @@ var ButtonManager = function(cameras, previewer) {
|
||||||
this.undoElement = document.getElementById('undo');
|
this.undoElement = document.getElementById('undo');
|
||||||
this.redoElement = document.getElementById('redo');
|
this.redoElement = document.getElementById('redo');
|
||||||
|
|
||||||
this.collisionElement = document.getElementById('collisions');
|
this.pointerLockElement = document.getElementById('lock');
|
||||||
this.showarrowsElement = document.getElementById('showarrows');
|
this.showarrowsElement = document.getElementById('showarrows');
|
||||||
|
|
||||||
this.recommendationElement = document.getElementById('recommendation');
|
this.recommendationElement = document.getElementById('recommendation');
|
||||||
|
@ -19,6 +19,11 @@ var ButtonManager = function(cameras, previewer) {
|
||||||
this.fullscreenElement.onclick = function() {fullscreen();};
|
this.fullscreenElement.onclick = function() {fullscreen();};
|
||||||
|
|
||||||
(function(self) {
|
(function(self) {
|
||||||
|
|
||||||
|
self.pointerLockElement.onchange = function() {
|
||||||
|
self.cameras.mainCamera().shouldLock = self.pointerLockElement.checked;
|
||||||
|
}
|
||||||
|
|
||||||
self.undoElement.onclick = function() {self.cameras.mainCamera().undo(); self.updateElements();}
|
self.undoElement.onclick = function() {self.cameras.mainCamera().undo(); self.updateElements();}
|
||||||
self.redoElement.onclick = function() {self.cameras.mainCamera().redo(); self.updateElements();}
|
self.redoElement.onclick = function() {self.cameras.mainCamera().redo(); self.updateElements();}
|
||||||
|
|
||||||
|
@ -31,7 +36,6 @@ var ButtonManager = function(cameras, previewer) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.collisionElement.onchange = function() {self.cameras.mainCamera().collisions = self.collisionElement.checked;}
|
|
||||||
self.showarrowsElement.onchange = function() {self.showArrows = self.showarrowsElement.checked;}
|
self.showarrowsElement.onchange = function() {self.showArrows = self.showarrowsElement.checked;}
|
||||||
|
|
||||||
self.resetElement.onclick = function() {
|
self.resetElement.onclick = function() {
|
||||||
|
|
Loading…
Reference in New Issue