diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-11-11 20:49:49 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-11-11 20:49:49 (GMT) |
commit | 5b92cc430ffe2a4e4f91c2d455652cd6f29f6d37 (patch) | |
tree | 5abd716999080c77ad0a5cdeafc60b0b98ce5613 | |
parent | d05c26f25d6058f587478dcd51cec4d6ad218fea (diff) | |
download | uscxml-5b92cc430ffe2a4e4f91c2d455652cd6f29f6d37.zip uscxml-5b92cc430ffe2a4e4f91c2d455652cd6f29f6d37.tar.gz uscxml-5b92cc430ffe2a4e4f91c2d455652cd6f29f6d37.tar.bz2 |
Standby when loading webgl
-rw-r--r-- | apps/samples/vrml/viewer-webgl.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/samples/vrml/viewer-webgl.js b/apps/samples/vrml/viewer-webgl.js index 5585c1d..e0827d9 100644 --- a/apps/samples/vrml/viewer-webgl.js +++ b/apps/samples/vrml/viewer-webgl.js @@ -105,6 +105,7 @@ function VRMLViewer(element, params) { normalizeParams(); var getWebGLModel = function(url) { + if (self.webGLStandby) { self.webGLStandby.show(); } var defer = osgDB.Promise.defer(); var node = new osg.MatrixTransform(); //node.setMatrix(osg.Matrix.makeRotate(-Math.PI/2, 1,0,0, [])); @@ -124,6 +125,7 @@ function VRMLViewer(element, params) { } else { osg.log("error " + url); } + if (self.webGLStandby) { self.webGLStandby.hide(); } } }; req.send(null); @@ -507,6 +509,9 @@ function VRMLViewer(element, params) { self.webGLViewer.getCamera().setClearColor([0.0, 0.0, 0.0, 0.0]); self.webGLViewer.setupManipulator(); self.webGLViewer.run(); + + self.webGLStandby = new Standby({target: self.element }); + self.element.appendChild(self.webGLStandby.domNode); } // show elements |