Skip to content

Commit 32921fd

Browse files
committed
initial scaling experiment
1 parent d0f635f commit 32921fd

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

DenizenModelsConverter/DoubleVector.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public DoubleVector(double x, double y, double z)
3434
return new DoubleVector(v1.X + v2.X, v1.Y + v2.Y, v1.Z + v2.Z);
3535
}
3636

37+
public static DoubleVector operator *(in DoubleVector v1, in double mul)
38+
{
39+
return new DoubleVector(v1.X * mul, v1.Y * mul, v1.Z * mul);
40+
}
41+
3742
public string ToDenizenString()
3843
{
3944
return $"{X},{Y},{Z}";

DenizenModelsConverter/MinecraftModelMaker.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public static string CreateModelFor(BBModel model, BBModel.Outliner outline)
8282
group.Add("color", 0);
8383
group.Add("children", childrenList);
8484
groups.Add(group);
85-
head.Add("translation", new JArray(8, 2, 8));
85+
head.Add("translation", new JArray(8 * Program.SCALE, 2 * Program.SCALE, 8 * Program.SCALE));
86+
head.Add("scale", new JArray(Program.SCALE, Program.SCALE, Program.SCALE));
8687
display.Add("head", head);
8788
jout.Add("textures", textures);
8889
jout.Add("elements", elements);

DenizenModelsConverter/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public static class Program
1313
{
1414
public static AsciiMatcher PATH_CHARS = new(AsciiMatcher.LowercaseLetters + AsciiMatcher.Digits + "_/");
1515

16+
public const double SCALE = 1.5f;
17+
1618
public static bool Verbose = false;
1719

1820
public static void Debug(string text)

scripts/dmodels.dsc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dmodel_part_stand:
77
marker: true
88
gravity: false
99
visible: false
10+
is_small: true
1011

1112
dmodels_load_model:
1213
type: task

0 commit comments

Comments
 (0)