Просмотр исходного кода

Set animation context only if window is available

Harold Iedema 7 лет назад
Родитель
Сommit
edd804017a
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/renderers/WebGLRenderer.js

+ 2 - 1
src/renderers/WebGLRenderer.js

@@ -1029,7 +1029,8 @@ function WebGLRenderer( parameters ) {
 
 
 	var animation = new WebGLAnimation();
 	var animation = new WebGLAnimation();
 	animation.setAnimationLoop( onAnimationFrame );
 	animation.setAnimationLoop( onAnimationFrame );
-	animation.setContext( typeof window !== 'undefined' ? window : null );
+
+	if ( typeof window !== 'undefined' ) animation.setContext( window );
 
 
 	this.setAnimationLoop = function ( callback ) {
 	this.setAnimationLoop = function ( callback ) {
 
 

粤ICP备19079148号