diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-12 19:44:16 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-05-12 19:44:16 (GMT) |
commit | 9a9afb6aaf314a68901cce3463e91512c261bd7a (patch) | |
tree | 20e7f888da47c67272cfd2c1c16d62e9189ed6c5 /apps/samples/vrml/viewer.js | |
parent | 363250f8a9e33dc3f198f114fdfccd100b55ca12 (diff) | |
download | uscxml-9a9afb6aaf314a68901cce3463e91512c261bd7a.zip uscxml-9a9afb6aaf314a68901cce3463e91512c261bd7a.tar.gz uscxml-9a9afb6aaf314a68901cce3463e91512c261bd7a.tar.bz2 |
Started with JavaScript DM in Java (Rhino)
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); |