mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
texture mapping actually works omg!
This commit is contained in:
1 parent
76fc900a15
commit
a878a7a143
3 files changed
+19
-64
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user