Skip to content

Commit

Permalink
Demo: Add transition blur button & dialog with captured image.
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai authored and Takashi Sakai committed Jan 6, 2018
1 parent 81a99d4 commit 9ec1982
Show file tree
Hide file tree
Showing 8 changed files with 20,351 additions and 10,952 deletions.
30,229 changes: 19,285 additions & 10,944 deletions Assets/UIEffect/Demo/Demo - UIEffect.unity

Large diffs are not rendered by default.

808 changes: 808 additions & 0 deletions Assets/UIEffect/Demo/Dialog.controller

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Assets/UIEffect/Demo/Dialog.controller.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Assets/UIEffect/Demo/Pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Assets/UIEffect/Demo/Pattern.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

217 changes: 210 additions & 7 deletions Assets/UIEffect/Demo/Transition.controller
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: 0 to 1
m_Name: Mono
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
Expand Down Expand Up @@ -140,6 +140,130 @@ AnimatorState:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!74 &7415318
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Blur
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path:
classID: 114
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 304273561
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 3
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 3
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path:
classID: 114
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events:
- time: 0
functionName: Capture
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
--- !u!74 &7450624
AnimationClip:
m_ObjectHideFlags: 3
Expand Down Expand Up @@ -327,7 +451,7 @@ AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: 1 to 0
m_Name: Cutoff
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
Expand Down Expand Up @@ -459,6 +583,12 @@ AnimatorController:
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: Blur
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
Expand Down Expand Up @@ -541,6 +671,51 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110161426
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 0}
m_Solo: 0
m_Mute: 0
m_IsExit: 1
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110166844
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Blur
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110202250}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.9
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &110176334
AnimatorStateTransition:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -608,13 +783,37 @@ AnimatorState:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &110202250
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Blur
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 110161426}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7415318}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &110244674
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: 0 to 1
m_Name: Mono
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
Expand All @@ -638,7 +837,7 @@ AnimatorState:
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: 1 to 0
m_Name: Cutoff
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
Expand Down Expand Up @@ -666,22 +865,26 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 110244674}
m_Position: {x: 12, y: 108, z: 0}
m_Position: {x: 336, y: 108, z: 0}
- serializedVersion: 1
m_State: {fileID: 110299230}
m_Position: {x: 276, y: 108, z: 0}
m_Position: {x: 336, y: 48, z: 0}
- serializedVersion: 1
m_State: {fileID: 110201538}
m_Position: {x: 336, y: -12, z: 0}
- serializedVersion: 1
m_State: {fileID: 110202250}
m_Position: {x: 336, y: 168, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- {fileID: 110109394}
- {fileID: 110120972}
- {fileID: 110166844}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 144, y: 48, z: 0}
m_EntryPosition: {x: 144, y: -12, z: 0}
m_ExitPosition: {x: 144, y: 180, z: 0}
m_ExitPosition: {x: 564, y: 48, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 110201538}
27 changes: 27 additions & 0 deletions Assets/UIEffect/Demo/UIEffectDialogDemo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class UIEffectDialogDemo : MonoBehaviour {

public void Open()
{
gameObject.SetActive(true);
GetComponent<Animator>().SetTrigger("Open");
}

public void Close()
{
GetComponent<Animator>().SetTrigger("Close");
}

public void Closed()
{
gameObject.SetActive(false);
}

public void CaptureBackground()
{
GetComponentInChildren<UIEffectCapturedImage>().Capture();
}
}
12 changes: 12 additions & 0 deletions Assets/UIEffect/Demo/UIEffectDialogDemo.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9ec1982

Please sign in to comment.