From 7958951e55aac8aa1dc65e1465c23b37a54a2976 Mon Sep 17 00:00:00 2001 From: Cj-bc Date: Sat, 11 May 2024 18:09:06 +0900 Subject: [PATCH 1/2] Change: Update LitMotion in example/ project to 1.8.0 --- samples/LitMotion.Samples/Packages/packages-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/LitMotion.Samples/Packages/packages-lock.json b/samples/LitMotion.Samples/Packages/packages-lock.json index 8836140d..bc1b2046 100644 --- a/samples/LitMotion.Samples/Packages/packages-lock.json +++ b/samples/LitMotion.Samples/Packages/packages-lock.json @@ -9,7 +9,7 @@ "com.unity.collections": "1.5.1", "com.unity.mathematics": "1.0.0" }, - "hash": "da0555ceddaa60449917658e21358d9a9ca45433" + "hash": "b2bcc26e4d8a708fa24c493253785363424fd291" }, "com.cysharp.unitask": { "version": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", From dfa17f6009674f3d0c27e49c99c059371aada1ab Mon Sep 17 00:00:00 2001 From: Cj-bc Date: Sat, 11 May 2024 02:24:52 +0900 Subject: [PATCH 2/2] Add: AnimationCurve easing example to Samples/0. Basic/2. Easing scene --- .../0. Basic/2. Easing/Sample_0_Easing.cs | 6 + .../0. Basic/2. Easing/Sample_0_Easing.unity | 234 +++++++++++++++++- 2 files changed, 236 insertions(+), 4 deletions(-) diff --git a/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.cs b/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.cs index 31c52f2a..62f6983b 100644 --- a/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.cs +++ b/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.cs @@ -9,6 +9,8 @@ public class Sample_0_Easing : MonoBehaviour [SerializeField] Transform target1; [SerializeField] Transform target2; [SerializeField] Transform target3; + [SerializeField] Transform target4; + [SerializeField] AnimationCurve target4Curve; void Start() { @@ -23,6 +25,10 @@ void Start() LMotion.Create(-5f, 5f, 3f) .WithEase(Ease.OutBounce) .BindToPositionX(target3); + + LMotion.Create(-5f, 5f, 3f) + .WithEase(target4Curve) + .BindToPositionX(target4); } } } \ No newline at end of file diff --git a/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.unity b/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.unity index fd26884b..9f0b3a93 100644 --- a/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.unity +++ b/samples/LitMotion.Samples/Assets/Samples/0. Basic/2. Easing/Sample_0_Easing.unity @@ -123,6 +123,85 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &112990135 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 112990136} + - component: {fileID: 112990138} + - component: {fileID: 112990137} + m_Layer: 5 + m_Name: Text - AnimationCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &112990136 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 112990135} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1357889796} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -330, y: -180} + m_SizeDelta: {x: 800, y: 50} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &112990137 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 112990135} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 32 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 60 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: AnimationCurve +--- !u!222 &112990138 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 112990135} + m_CullTransparentMesh: 1 --- !u!1 &224055277 GameObject: m_ObjectHideFlags: 0 @@ -254,6 +333,67 @@ MonoBehaviour: target1: {fileID: 224055279} target2: {fileID: 901534722} target3: {fileID: 1271027961} + target4: {fileID: 1967917315} + target4Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.3248372 + value: 0.9665907 + inSlope: 0.08513137 + outSlope: 0.08513137 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6239457 + value: -0.027526677 + inSlope: 0.5937288 + outSlope: 0.5937288 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6815566 + value: 1.005105 + inSlope: -0.017104099 + outSlope: -0.017104099 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.88005656 + value: -0.013623118 + inSlope: -0.0055476786 + outSlope: -0.0055476786 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.79323584 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!1 &477488578 GameObject: m_ObjectHideFlags: 0 @@ -361,7 +501,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -330, y: -120.00003} + m_AnchoredPosition: {x: -330, y: -60} m_SizeDelta: {x: 800, y: 50} m_Pivot: {x: 0, y: 0.5} --- !u!114 &753285062 @@ -432,7 +572,7 @@ Transform: m_GameObject: {fileID: 901534721} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -5, y: -0.5, z: 0} + m_LocalPosition: {x: -5, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -516,7 +656,7 @@ Transform: m_GameObject: {fileID: 1271027960} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -5, y: -3, z: 0} + m_LocalPosition: {x: -5, y: -2, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -672,6 +812,7 @@ RectTransform: - {fileID: 1904142048} - {fileID: 1708854652} - {fileID: 753285061} + - {fileID: 112990136} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -792,7 +933,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -330, y: 30} + m_AnchoredPosition: {x: -330, y: 60} m_SizeDelta: {x: 800, y: 50} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1708854653 @@ -916,6 +1057,90 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1904142047} m_CullTransparentMesh: 1 +--- !u!1 &1967917313 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1967917315} + - component: {fileID: 1967917314} + m_Layer: 0 + m_Name: Target 4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &1967917314 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1967917313} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: -2413806693520163455, guid: ebe73ca9363db456bacf42c025bb4847, type: 3} + m_Color: {r: 0.3215686, g: 0.6880908, b: 0.9607843, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &1967917315 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1967917313} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -5, y: -4, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &5043977805797419532 PrefabInstance: m_ObjectHideFlags: 0 @@ -984,3 +1209,4 @@ SceneRoots: - {fileID: 224055279} - {fileID: 901534722} - {fileID: 1271027961} + - {fileID: 1967917315}