Skip to content

Commit

Permalink
Test 3D models scale against one another
Browse files Browse the repository at this point in the history
  • Loading branch information
picosonic committed Aug 29, 2021
1 parent 908304f commit 908260a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion threedee.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ class mesh
loadfromobject(obj)
{
if (obj==undefined) return;

obj.s*=0.05;

for (var i=0; i<obj.f.length; i++)
{
Expand Down Expand Up @@ -206,6 +208,9 @@ class engine3D

this.meshcube.cleartris();
this.meshcube.loadfromobject(this.findmodel("stealth"));
this.meshcube.loadfromobject(this.findmodel("cvn-65"));

this.theta=4.3;
}

// Find 3D model by name
Expand Down Expand Up @@ -261,7 +266,7 @@ class engine3D
var matrotz=new mat4x4();
var matrotx=new mat4x4();

this.theta+=0.05;
this.theta+=0.005;
this.theta%=(4*Math.PI);

// Rotation Z
Expand Down

0 comments on commit 908260a

Please sign in to comment.