Ajout de python-obja
This commit is contained in:
@@ -5,7 +5,7 @@ animate();
|
||||
|
||||
function init() {
|
||||
|
||||
let url = 'assets/' + (document.URL.split('?')[1] || "bunny.obj");
|
||||
let url = (document.URL.split('?')[1] || "exemple/suzanne.obja");
|
||||
|
||||
loader = new Loader(url, 1024, 20);
|
||||
loader.start(function(elements) {
|
||||
|
||||
@@ -29,8 +29,7 @@ function fetchData(path, start, end, callback) {
|
||||
|
||||
function parseLine(line, number) {
|
||||
let element = {};
|
||||
let split = line.split(/[ \t]+/);
|
||||
|
||||
let split = line.split('#')[0].split(/[ \t]+/);
|
||||
if (split.length === 0) {
|
||||
return;
|
||||
}
|
||||
@@ -358,6 +357,7 @@ class Model extends THREE.Mesh {
|
||||
normal.normalize();
|
||||
|
||||
f.normal = normal;
|
||||
f.color = this.geometry.faces[element.id].color;
|
||||
|
||||
|
||||
this.geometry.faces[element.id] = f;
|
||||
|
||||
Reference in New Issue
Block a user