Skip to content

Commit

Permalink
Support for faces with texture and normal indices
Browse files Browse the repository at this point in the history
  • Loading branch information
picosonic committed Aug 20, 2021
1 parent f403c5a commit 2f27016
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions obj2js.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@

$face=explode(" ", $line);

$t1=intval($face[1]);
$t2=intval($face[2]);
$t3=intval($face[3]);
$c=explode("/", $face[1]);
$t1=intval($c[0]);
$c=explode("/", $face[2]);
$t2=intval($c[0]);
$c=explode("/", $face[3]);
$t3=intval($c[0]);

if ($t1<$min_face) $min_face=$t1;
if ($t1>$max_face) $max_face=$t1;
Expand Down

0 comments on commit 2f27016

Please sign in to comment.