From 6253e2ea731e41ee02118b4c603f5fcf9988855f Mon Sep 17 00:00:00 2001 From: blueyy <464176845@qq.com> Date: Mon, 7 Mar 2016 15:52:29 +0800 Subject: [PATCH] "document.getElementById("WebGL-output").empty();" "document.getElementById("WebGL-output").empty();"this is a jquery function,should be "$("#WebGL-output").empty();". --- chapter-04/01-basic-mesh-material.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chapter-04/01-basic-mesh-material.html b/chapter-04/01-basic-mesh-material.html index 2a371730..f07b49e7 100644 --- a/chapter-04/01-basic-mesh-material.html +++ b/chapter-04/01-basic-mesh-material.html @@ -124,11 +124,13 @@ this.switchRenderer = function () { if (renderer instanceof THREE.WebGLRenderer) { renderer = canvasRenderer; - document.getElementById("WebGL-output").empty(); + // document.getElementById("WebGL-output").empty(); + $("#WebGL-output").empty(); document.getElementById("WebGL-output").appendChild(renderer.domElement); } else { renderer = webGLRenderer; - document.getElementById("WebGL-output").empty(); + // document.getElementById("WebGL-output").empty(); + $("#WebGL-output").empty(); document.getElementById("WebGL-output").appendChild(renderer.domElement); } } @@ -237,4 +239,4 @@ window.onload = init; - \ No newline at end of file +