diff --git a/examples/cameraExample.js b/examples/cameraExample.js index bf91c46699..4c02ce2f2e 100644 --- a/examples/cameraExample.js +++ b/examples/cameraExample.js @@ -23,7 +23,7 @@ var THRUST_CONTROLLER = 0; var VIEW_CONTROLLER = 1; function checkCamera(deltaTime) { - if (Camera.getModeString() == "independent") { + if (Camera.mode == "independent") { var THRUST_MAG_UP = 800.0; var THRUST_MAG_DOWN = 300.0; var THRUST_MAG_FWD = 500.0; @@ -102,19 +102,19 @@ function keyPressEvent(event) { } if (event.text == "1") { - Camera.setMode("first person"); + Camera.mode = "first person"; } if (event.text == "2") { - Camera.setMode("mirror"); + Camera.mode = "mirror"; } if (event.text == "3") { - Camera.setMode("third person"); + Camera.mode = "third person"; } if (event.text == "4") { - Camera.setMode("independent"); + Camera.mode = "independent"; joysticksCaptured = true; Controller.captureJoystick(THRUST_CONTROLLER); Controller.captureJoystick(VIEW_CONTROLLER); diff --git a/examples/concertCamera.js b/examples/concertCamera.js index 1e6aa1e414..7ab7785345 100644 --- a/examples/concertCamera.js +++ b/examples/concertCamera.js @@ -20,15 +20,15 @@ var cameraLocations = [ {x: 7971.9, y: 241.3, z: 7304.1}, {x: 7973.0, y: 241.3, var cameraLookAts = [ {x: 7971.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7971.3, y: 241.3, z: 7304.2} ]; function saveCameraState() { - oldMode = Camera.getModeString(); + oldMode = Camera.mode; avatarPosition = MyAvatar.position; Camera.setModeShiftPeriod(0.0); - Camera.setMode("independent"); + Camera.mode = "independent"; } function restoreCameraState() { Camera.stopLooking(); - Camera.setMode(oldMode); + Camera.mode = oldMode; } function update(deltaTime) { @@ -52,7 +52,7 @@ function keyPressEvent(event) { saveCameraState(); freeCamera = true; } - Camera.setMode("independent"); + Camera.mode = "independent"; Camera.setPosition(cameraLocations[choice - 1]); Camera.keepLookingAt(cameraLookAts[choice - 1]); } diff --git a/examples/concertCamera_kims.js b/examples/concertCamera_kims.js index 3017d3c008..ff4fb632de 100644 --- a/examples/concertCamera_kims.js +++ b/examples/concertCamera_kims.js @@ -20,15 +20,15 @@ var cameraLocations = [ {x: 8027.5, y: 237.5, z: 7305.7}, {x: 8027.5, y: 237.5, var cameraLookAts = [ {x: 8027.5, y: 237.5, z: 7304.0}, {x: 8027.5, y: 237.5, z: 7305.7}, {x: 8027.5, y: 237.5, z: 7304.0}, {x: 8027.5, y: 237.5, z: 7304.0}, {x: 8027.5, y: 237.5, z: 7304.0}, {x: 8027.5, y: 237.5, z: 7304.0} ]; function saveCameraState() { - oldMode = Camera.getMode(); + oldMode = Camera.mode; avatarPosition = MyAvatar.position; Camera.setModeShiftPeriod(0.0); - Camera.setMode("independent"); + Camera.mode = "independent"; } function restoreCameraState() { Camera.stopLooking(); - Camera.setMode(oldMode); + Camera.mode = oldMode; } function update(deltaTime) { @@ -52,7 +52,7 @@ function keyPressEvent(event) { saveCameraState(); freeCamera = true; } - Camera.setMode("independent"); + Camera.mode = "independent"; Camera.setPosition(cameraLocations[choice - 1]); Camera.keepLookingAt(cameraLookAts[choice - 1]); } diff --git a/examples/libraries/entityCameraTool.js b/examples/libraries/entityCameraTool.js index 2f03cb28c8..8fed42eeee 100644 --- a/examples/libraries/entityCameraTool.js +++ b/examples/libraries/entityCameraTool.js @@ -88,8 +88,8 @@ CameraManager = function() { that.focalPoint = focalPoint; that.setFocalPoint(focalPoint); - that.previousCameraMode = Camera.getMode(); - Camera.setMode("independent"); + that.previousCameraMode = Camera.mode; + Camera.mode = "independent"; that.updateCamera(); @@ -102,7 +102,7 @@ CameraManager = function() { that.mode = MODE_INACTIVE; if (!ignoreCamera) { - Camera.setMode(that.previousCameraMode); + Camera.mode = that.previousCameraMode; } cameraTool.setVisible(false); } @@ -271,7 +271,7 @@ CameraManager = function() { } that.updateCamera = function() { - if (!that.enabled || Camera.getMode() != "independent") return; + if (!that.enabled || Camera.mode != "independent") return; var yRot = Quat.angleAxis(that.yaw, { x: 0, y: 1, z: 0 }); var xRot = Quat.angleAxis(that.pitch, { x: 1, y: 0, z: 0 }); @@ -300,7 +300,7 @@ CameraManager = function() { // Ease the position and orbit of the camera that.update = function(dt) { - if (Camera.getMode() != "independent") { + if (Camera.mode != "independent") { return; } @@ -350,7 +350,7 @@ CameraManager = function() { Controller.keyReleaseEvent.connect(function (event) { if (event.text == "ESC" && that.enabled) { - Camera.setMode(lastAvatarCameraMode); + Camera.mode = lastAvatarCameraMode; cameraManager.disable(true); } });