mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-16 19:14:15 -04:00
Improve integration with Live2D assets
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
using AssetStudio;
|
||||
|
||||
namespace CubismLive2DExtractor.CubismUnityClasses
|
||||
{
|
||||
public sealed class CubismExpressionData : MonoBehaviour
|
||||
{
|
||||
public string Type { get; set; }
|
||||
public float FadeInTime { get; set; }
|
||||
public float FadeOutTime { get; set; }
|
||||
public SerializableExpressionParameter[] Parameters { get; set; }
|
||||
|
||||
public class SerializableExpressionParameter
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public float Value { get; set; }
|
||||
public BlendType Blend { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using AssetStudio;
|
||||
|
||||
namespace CubismLive2DExtractor.CubismUnityClasses
|
||||
{
|
||||
public sealed class CubismExpressionList : MonoBehaviour
|
||||
{
|
||||
public PPtr<CubismExpressionData>[] CubismExpressionObjects { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using AssetStudio;
|
||||
|
||||
namespace CubismLive2DExtractor.CubismUnityClasses
|
||||
{
|
||||
public sealed class CubismFadeMotionData : MonoBehaviour
|
||||
{
|
||||
public string MotionName { get; set; }
|
||||
public float FadeInTime { get; set; }
|
||||
public float FadeOutTime { get; set; }
|
||||
public string[] ParameterIds { get; set; } = Array.Empty<string>();
|
||||
public AnimationCurve<float>[] ParameterCurves { get; set; }
|
||||
public float[] ParameterFadeInTimes { get; set; }
|
||||
public float[] ParameterFadeOutTimes { get; set; }
|
||||
public float MotionLength { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using AssetStudio;
|
||||
|
||||
namespace CubismLive2DExtractor.CubismUnityClasses
|
||||
{
|
||||
public sealed class CubismFadeMotionList : MonoBehaviour
|
||||
{
|
||||
public int[] MotionInstanceIds { get; set; }
|
||||
public PPtr<CubismFadeMotionData>[] CubismFadeMotionObjects { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
using AssetStudio;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace CubismLive2DExtractor.CubismUnityClasses
|
||||
{
|
||||
public class CubismPhysicsNormalizationTuplet
|
||||
{
|
||||
public float Maximum { get; set; }
|
||||
public float Minimum { get; set; }
|
||||
public float Default { get; set; }
|
||||
}
|
||||
|
||||
public class CubismPhysicsNormalization
|
||||
{
|
||||
public CubismPhysicsNormalizationTuplet Position { get; set; }
|
||||
public CubismPhysicsNormalizationTuplet Angle { get; set; }
|
||||
}
|
||||
|
||||
public class CubismPhysicsParticle
|
||||
{
|
||||
public Vector2 InitialPosition { get; set; }
|
||||
public float Mobility { get; set; }
|
||||
public float Delay { get; set; }
|
||||
public float Acceleration { get; set; }
|
||||
public float Radius { get; set; }
|
||||
}
|
||||
|
||||
public class CubismPhysicsOutput
|
||||
{
|
||||
public string DestinationId { get; set; }
|
||||
public int ParticleIndex { get; set; }
|
||||
public Vector2 TranslationScale { get; set; }
|
||||
public float AngleScale { get; set; }
|
||||
public float Weight { get; set; }
|
||||
public CubismPhysicsSourceComponent SourceComponent { get; set; }
|
||||
public bool IsInverted { get; set; }
|
||||
}
|
||||
|
||||
public enum CubismPhysicsSourceComponent
|
||||
{
|
||||
X,
|
||||
Y,
|
||||
Angle,
|
||||
}
|
||||
|
||||
public class CubismPhysicsInput
|
||||
{
|
||||
public string SourceId { get; set; }
|
||||
public Vector2 ScaleOfTranslation { get; set; }
|
||||
public float AngleScale { get; set; }
|
||||
public float Weight { get; set; }
|
||||
public CubismPhysicsSourceComponent SourceComponent { get; set; }
|
||||
public bool IsInverted { get; set; }
|
||||
}
|
||||
|
||||
public class CubismPhysicsSubRig
|
||||
{
|
||||
public CubismPhysicsInput[] Input { get; set; }
|
||||
public CubismPhysicsOutput[] Output { get; set; }
|
||||
public CubismPhysicsParticle[] Particles { get; set; }
|
||||
public CubismPhysicsNormalization Normalization { get; set; }
|
||||
}
|
||||
|
||||
public class CubismPhysicsRig
|
||||
{
|
||||
public CubismPhysicsSubRig[] SubRigs { get; set; }
|
||||
public Vector2 Gravity { get; set; } = new Vector2(0, -1);
|
||||
public Vector2 Wind { get; set; }
|
||||
public float Fps { get; set; }
|
||||
}
|
||||
|
||||
public sealed class CubismPhysics : MonoBehaviour
|
||||
{
|
||||
[JsonProperty("_rig")]
|
||||
public CubismPhysicsRig Rig { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user