Browse Source

fix code sample generation

was missing `new`
Gregg Tavares 7 years ago
parent
commit
cb050c4d67
1 changed files with 1 additions and 1 deletions
  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;