提交 6230e85c 编写于 作者: J Jaakko Manninen

Always stop WebVRManager animation if started when exiting VR

上级 854c560a
......@@ -56,6 +56,7 @@ function WebVRManager( renderer ) {
}
var currentSize, currentPixelRatio;
var isAnimating;
function onVRDisplayPresentChange() {
......@@ -72,11 +73,23 @@ function WebVRManager( renderer ) {
animation.start();
} else if ( scope.enabled ) {
isAnimating = true;
renderer.setDrawingBufferSize( currentSize.width, currentSize.height, currentPixelRatio );
} else {
if ( scope.enabled ) {
renderer.setDrawingBufferSize( currentSize.width, currentSize.height, currentPixelRatio );
}
animation.stop();
if ( isAnimating ) {
animation.stop();
isAnimating = false;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册