Skip to content

Commit

Permalink
Updated error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
craigsketchley committed May 28, 2015
1 parent bf67ef5 commit 134afdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v0.4 - 2015-05-21

* Updated to latest Firefox WebVR API.

### v0.3 - 2014-12-18

* Removed VR.js, now using WebVR, specifically Firefox VR build.
Expand Down
4 changes: 3 additions & 1 deletion src/CesiumVR.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ var CesiumVR = (function() {
var CesiumVR = function(scale, callback, errorHandler) {
this.errorHandler = typeof errorHandler === 'undefined' ? defaultErrorHandler : errorHandler;

this.errorMsg = "A VR-enabled browser is required for Virtual Reality Mode. Please visit http://mozvr.com/downloads for more details.";

// Holds the vr device and sensor
this.hmdDevice = undefined;
this.sensorDevice = undefined;
Expand Down Expand Up @@ -138,7 +140,7 @@ var CesiumVR = (function() {
navigator.mozGetVRDevices(EnumerateVRDevices);
} else {
// No VR API detected...
that.errorHandler("A VR-enabled browser is required for this plugin. Please visit http://mozvr.com/download.html to download a build of Firefox VR.");
that.errorHandler(this.errorMsg);
}
};

Expand Down

0 comments on commit 134afdc

Please sign in to comment.