diff options
Diffstat (limited to 'apps/samples/vrml')
-rw-r--r-- | apps/samples/vrml/ffmpeg-server.invoked.scxml | 7 | ||||
-rw-r--r-- | apps/samples/vrml/viewer-webgl.js | 8 | ||||
-rw-r--r-- | apps/samples/vrml/viewer.html | 43 | ||||
-rw-r--r-- | apps/samples/vrml/vrml-server.scxml | 3 |
4 files changed, 41 insertions, 20 deletions
diff --git a/apps/samples/vrml/ffmpeg-server.invoked.scxml b/apps/samples/vrml/ffmpeg-server.invoked.scxml index bac0792..0c6449f 100644 --- a/apps/samples/vrml/ffmpeg-server.invoked.scxml +++ b/apps/samples/vrml/ffmpeg-server.invoked.scxml @@ -121,7 +121,7 @@ --> <script> //<![CDATA[ -// dump(_event); + dump(_event); var pathDelim = ':'; // we need to flatten directories - this will seperate them in filenames // store event @@ -158,9 +158,7 @@ } var keyFrame = job.keyFrames[kfIndex]; - keyFrame.modelFile = keyFrame.imageURL.substr(keyFrame.serverURL.length + 1); - keyFrame.file = keyFrame.modelFile.substr(0, keyFrame.modelFile.indexOf('.')); - keyFrame.ext = keyFrame.modelFile.substr(keyFrame.modelFile.indexOf('.') + 1); + keyFrame.file = keyFrame.imagePath.substr(1); keyFrame.modelFile = keyFrame.file + ".osgb"; keyFrame.modelFile = keyFrame.modelFile.replace(/\//g, pathDelim); @@ -236,6 +234,7 @@ _event.data.pathComponent.length == 3 && _event.data.pathComponent[1] === 'movie' && _event.data.pathComponent[2] === 'codecs'"> + <log expr="_invokers['ffmpeg']" /> <send target="#_parent" event="send.codecs"> <param name="context" expr="_event.origin" /> <param name="codecs" expr="_invokers['ffmpeg']" /> diff --git a/apps/samples/vrml/viewer-webgl.js b/apps/samples/vrml/viewer-webgl.js index c376e25..10dbd72 100644 --- a/apps/samples/vrml/viewer-webgl.js +++ b/apps/samples/vrml/viewer-webgl.js @@ -184,7 +184,7 @@ function VRMLViewer(element, params) { } if (self.enableSceneshots) { self.imgElem.src = self.serverURL + self.imagePath + self.imageFormat + urlSuffixForPose(self.pose); - if (self.enableMovies) { + if (self.enableMovies && self.movieAddButton) { // we are showing an image, activate movie controls self.movieAddButton.domNode.style.display = ""; self.movieDropDown.domNode.style.display = ""; @@ -964,7 +964,7 @@ function VRMLViewer(element, params) { avatarPose.width = 60; avatarPose.height = 60; var avatarImgUrl = urlSuffixForPose(avatarPose); - avatar.innerHTML = '<img src=' + self.imagePath + avatarImgUrl + ' /> '; + avatar.innerHTML = '<img src=' + self.imagePath + self.imageFormat + avatarImgUrl + ' /> '; item.srcEcc = "VRMLViewer"; item.iconPoseUrl = self.imagePath + avatarImgUrl; item.imagePath = self.imagePath; @@ -1054,7 +1054,7 @@ function VRMLViewer(element, params) { thumbPose.height = self.pose.height / 10; var thumbImgUrl = urlSuffixForPose(thumbPose); - thumbImgElem.src = self.imagePath + thumbImgUrl; + thumbImgElem.src = self.serverURL + self.imagePath + self.imageFormat + thumbImgUrl; // removeImgElem.src = self.resRoot + 'img/close.png'; item.srcEcc = "VRMLViewer"; @@ -1074,7 +1074,7 @@ function VRMLViewer(element, params) { style: "width: 320px", options: [] }); - self.populateMovieCodecs("http://" + self.serverURL + '/movie/codecs', self.movieFormatSelection); + self.populateMovieCodecs(self.serverURL + '/movie/codecs', self.movieFormatSelection); self.movieFormatLengthRowElem.appendChild(dojo.create('td', { innerHTML: 'Format:'} )); self.movieFormatLengthRowElem.appendChild(dojo.create('td', { colspan: "2"})); diff --git a/apps/samples/vrml/viewer.html b/apps/samples/vrml/viewer.html index 345ee56..50a2fef 100644 --- a/apps/samples/vrml/viewer.html +++ b/apps/samples/vrml/viewer.html @@ -60,7 +60,32 @@ <script type="text/javascript"> require(["dojo/domReady!", "dojo"], function(dom, dojo) { - var viewer = new VRMLViewer("scene1", { + var viewer = new VRMLViewer("scene1", { + pose: { + pitch : 0, + roll : 0, + yaw : 0, + zoom : 1, + x : 0, + y : 0, + z : 0, + autorotate : true + }, + height: 300, + width: 400, + enableMovies: false, + enableDND: false, + enableWebGL: true, + enableSceneshots: false, + enableDraggables: false, + listNavigationStyle: true, + treeNavigationStyle: true, + listDirectory: "/hard_mp", + imagePath: "/hard_mp/HARD_MP_VAL_000", + imageFormat: "png", + serverURL: "http://localhost:8082/vrml", + }); + var viewer2 = new VRMLViewer("scene2", { pose: { pitch : 0, roll : 0, @@ -71,22 +96,20 @@ z : 0, autorotate : true }, - height: 600, - width: 800, - enableMovies: false, + height: 300, + width: 400, + enableMovies: true, enableDND: false, - enableWebGL: true, - enableSceneshots: false, - enableDraggables: false, + enableWebGL: false, + enableSceneshots: true, + enableDraggables: true, listNavigationStyle: true, treeNavigationStyle: true, listDirectory: "/hard_mp", imagePath: "/hard_mp/HARD_MP_VAL_000", imageFormat: "png", - serverURL: "http://localhost:8081/vrml", + serverURL: "http://localhost:8082/vrml" }); - //var viewer2 = new VRMLViewer("scene2"); -// var annotations = new Annotations("annotations1", { 'viewer': viewer }); }); </script> </head> diff --git a/apps/samples/vrml/vrml-server.scxml b/apps/samples/vrml/vrml-server.scxml index e35d221..c71f066 100644 --- a/apps/samples/vrml/vrml-server.scxml +++ b/apps/samples/vrml/vrml-server.scxml @@ -325,8 +325,7 @@ <script>//dump(_event);</script> <respond status="200" to="_event.data.context"> <header name="Connection" value="close" /> - <header name="Content-Type" valueexpr="application/json" /> - <header name="Content-Disposition" valueexpr="'attachment; filename=' + _event.data.filename" /> + <header name="Content-Type" value="application/json" /> <content expr="_event.data.codecs" /> </respond> </transition> |