diff options
Diffstat (limited to 'apps/samples/vrml/viewer.js')
-rw-r--r-- | apps/samples/vrml/viewer.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/samples/vrml/viewer.js b/apps/samples/vrml/viewer.js index ed62047..4b59a8c 100644 --- a/apps/samples/vrml/viewer.js +++ b/apps/samples/vrml/viewer.js @@ -141,13 +141,18 @@ function VRMLViewer(element, params) { }); } - this.refreshServer = function(server) { - self.serverURL = server; + this.setServer = function(serverURL) { + if (!serverURL || serverURL == self.serverURL) { + // nothing to do + return; + } + + self.serverURL = serverURL; if (self.fileStandby) { self.fileStandby.show(); } self.xhr.get({ // The URL to request - url: server, + url: serverURL, handleAs:"json", headers:{"X-Requested-With":null}, error: function(result) { @@ -212,6 +217,10 @@ function VRMLViewer(element, params) { }); }; + this.setModel = function(imagePath) { + self.imagePath = imagePath; + } + this.setPose = function(imagePath, pose, serverURL) { if (serverURL && serverURL != self.serverURL) { self.refreshServer(serverURL); |