Ajout de python-obja

This commit is contained in:
2021-07-22 15:19:40 +02:00
parent 61bf8f59ad
commit bd1ba14af7
11 changed files with 4482 additions and 4213 deletions

View File

@@ -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) {

View File

@@ -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;