Skip to content

Commit bd19793

Browse files
authored
Update index.js (#114)
1 parent 908cb98 commit bd19793

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ function init() {
6161

6262
const mesh = myObj.render();
6363
for (let i = 0; i < mesh.length; i++) {
64-
scene.add(mesh[i]);
64+
if (mesh[i] && mesh[i].isObject3D) {
65+
scene.add(mesh[i]);
66+
} else {
67+
window.printError('not Object');
68+
}
6569
}
6670
if (displayInfo) {
6771
gui = new GUI();

0 commit comments

Comments
 (0)