restore group names during obj decoding
This commit is contained in:
parent
7ea66a9e7b
commit
e3b31203c3
2 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ function load_data(data, file, ext) {
|
||||||
}]);
|
}]);
|
||||||
break;
|
break;
|
||||||
case "obj":
|
case "obj":
|
||||||
resolve(load.OBJ.parse(data).map(m => { return {mesh: m.toFloat32(), file} }));
|
resolve(load.OBJ.parse(data).map(m => { return {mesh: m.toFloat32(), file: m.name || file} }));
|
||||||
break;
|
break;
|
||||||
case "3mf":
|
case "3mf":
|
||||||
load.TMF.parseAsync(data).then((meshes) => {
|
load.TMF.parseAsync(data).then((meshes) => {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ function parse(text) {
|
||||||
objs.push(faces = []);
|
objs.push(faces = []);
|
||||||
}
|
}
|
||||||
if (toks[0]) {
|
if (toks[0]) {
|
||||||
faces.name = toks[0];
|
faces.name = toks.join(' ');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue