Преглед изворни кода

fix code sample generation

was missing `new`
Gregg Tavares пре 7 година
родитељ
комит
cb050c4d67
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      threejs/lessons/resources/threejs-primitives.js

+ 1 - 1
threejs/lessons/resources/threejs-primitives.js

@@ -415,7 +415,7 @@
     }
     addDiv(right, '.note').innerHTML = text;
 
-    const rawLines = info.create.toString().replace('return new', 'const geometry =').split(/\n/);
+    const rawLines = info.create.toString().replace('return new', 'const geometry = new').split(/\n/);
     const createRE = /^( *create\()/;
     const m = createRE.exec(rawLines[0]);
     const prefixLen = m[1].length + 1;