mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-04-25 07:28:51 -05:00
implement Mesh.colors
This commit is contained in:
parent
2ecba6cba6
commit
e530c4c6da
|
|
@ -157,6 +157,15 @@ namespace VrmLib
|
|||
Write(bytes, i + 8, value.z);
|
||||
Write(bytes, i + 12, value.w);
|
||||
}
|
||||
|
||||
public static void Write(byte[] bytes, int i, UnityEngine.Color value)
|
||||
{
|
||||
Write(bytes, i, value.r);
|
||||
Write(bytes, i + 4, value.g);
|
||||
Write(bytes, i + 8, value.b);
|
||||
Write(bytes, i + 12, value.a);
|
||||
}
|
||||
|
||||
public static void Write(byte[] bytes, int i, UnityEngine.Matrix4x4 value)
|
||||
{
|
||||
Write(bytes, i, value.m00);
|
||||
|
|
@ -436,6 +445,16 @@ namespace VrmLib
|
|||
),
|
||||
Setter = BitWriter.Write
|
||||
}},
|
||||
{typeof(UnityEngine.Color), new GetSet<UnityEngine.Color>{
|
||||
Getter = (array, start) =>
|
||||
new UnityEngine.Color(
|
||||
BitConverter.ToSingle(array, start),
|
||||
BitConverter.ToSingle(array, start + 4),
|
||||
BitConverter.ToSingle(array, start + 8),
|
||||
BitConverter.ToSingle(array, start + 12)
|
||||
),
|
||||
Setter = BitWriter.Write
|
||||
}},
|
||||
{typeof(UnityEngine.Matrix4x4), new GetSet<UnityEngine.Matrix4x4>{
|
||||
Getter = (array, start) =>
|
||||
// UnityEngine.Matrix4x4
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user