Krešimir Fijačko 6 лет назад
Родитель
Сommit
341a347a07
1 измененных файлов: 3 добавлений и 0 удалений
  1. 3 0
      src/webgl.js

+ 3 - 0
src/webgl.js Просмотреть файл

@@ -73,6 +73,9 @@ WebGLRenderer.prototype.destroy = function() {
73 73
 	gl.deleteProgram(this.loadingProgram);
74 74
 
75 75
 	gl.deleteBuffer(this.vertexBuffer);
76
+
77
+	gl.getExtension('WEBGL_lose_context').loseContext();
78
+	this.canvas.remove();
76 79
 };
77 80
 
78 81
 WebGLRenderer.prototype.resize = function(width, height) {