mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-12 05:48:47 -05:00
refactor
This commit is contained in:
@@ -136,7 +136,8 @@ namespace UniGLTF
|
||||
if (texture != null)
|
||||
{
|
||||
material.SetTexture(kv.Key, texture);
|
||||
SetTextureOffsetAndScale(material, kv.Key, kv.Value.Offset, kv.Value.Scale);
|
||||
material.SetTextureOffset(kv.Key, kv.Value.Offset);
|
||||
material.SetTextureScale(kv.Key, kv.Value.Scale);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,11 +175,5 @@ namespace UniGLTF
|
||||
|
||||
return material;
|
||||
}
|
||||
|
||||
public static void SetTextureOffsetAndScale(Material material, string propertyName, Vector2 offset, Vector2 scale)
|
||||
{
|
||||
material.SetTextureOffset(propertyName, offset);
|
||||
material.SetTextureScale(propertyName, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user