Skip to content

Commit

Permalink
Multi-model showing
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed May 30, 2021
1 parent 562a1b7 commit a84c07a
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,19 @@ void main(string[] args)

inGetCamera().scale = vec2(1);

Puppet puppet = inLoadPuppet(args[1]);
Puppet[] puppets;

float size = (args.length-1)*2048;
float halfway = size/2;
if (args.length == 1) {
puppets ~= inLoadPuppet(args[1]);
} else {
foreach(i; 1..args.length) {
puppets ~= inLoadPuppet(args[i]);

puppets[i-1].root.localTransform.translation.x = (((i)*2048)-halfway)-1024;
}
}

if (environment.get("DEBUG") == "1") {
inDbgDrawMeshOutlines = true;
Expand All @@ -74,9 +86,11 @@ void main(string[] args)

updateCamera();

puppet.update();
puppet.draw();
puppet.drawOutlines();
foreach(puppet; puppets) {
puppet.update();
puppet.draw();
puppet.drawOutlines();
}

inEndScene();

Expand Down

0 comments on commit a84c07a

Please sign in to comment.