mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-19 01:07:32 -05:00
* MeshUtility を UniGLTF 下に移動 * Assets/VRM10 を追加 * JsonSchemaからのコード生成 UniGLTF/Editor/Generator を追加
30 lines
658 B
C#
30 lines
658 B
C#
using System.Numerics;
|
|
|
|
namespace VrmLib
|
|
{
|
|
public class TextureInfo
|
|
{
|
|
|
|
public Texture Texture;
|
|
// uv = uv * scaling + offset
|
|
public Vector2 Offset;
|
|
public Vector2 Scaling = Vector2.One;
|
|
|
|
public float[] OffsetScaling
|
|
{
|
|
get => new float[] { Offset.X, Offset.Y, Scaling.X, Scaling.Y };
|
|
set
|
|
{
|
|
Offset.X = value[0];
|
|
Offset.Y = value[1];
|
|
Scaling.X = value[2];
|
|
Scaling.Y = value[3];
|
|
}
|
|
}
|
|
|
|
public TextureInfo(Texture texture)
|
|
{
|
|
Texture = texture;
|
|
}
|
|
}
|
|
} |