texture mapping actually works omg!

This commit is contained in:
tresabhi committed 2026-06-08 19:46:18 -05:00
1 parent 76fc900a15
commit a878a7a143
3 files changed
+19 -64

No files matched your search

+2 -2
View File
@@ -109,7 +109,7 @@ public partial class GameInterface
{ "gun", "DT_Guns" },
};
public string TankPart(string tag, string part)
public byte[] TankPart(string tag, string part)
{
try
{
@@ -146,7 +146,7 @@ public partial class GameInterface
var gltf = new MonoGltf(mesh);
return gltf.Write();
return gltf.Write($"{tag}/${part}");
}
catch (Exception e)
{
-23
View File
@@ -1,23 +0,0 @@
using System.Text.Json;
using Microsoft.JavaScript.NodeApi;
using SharpGLTF.Materials;
namespace BlitzKit.Game.JSExport;
[JSExport]
public readonly struct MappedGltf
{
public string Json { get; }
public Dictionary<string, Dictionary<KnownChannel, string>> TextureMap { get; }
public MappedGltf(string json, Dictionary<string, Dictionary<KnownChannel, string>> textureMap)
{
Json = json;
TextureMap = textureMap;
}
public string ToJson()
{
return JsonSerializer.Serialize(this);
}
}