diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Shaders/Test.mat.meta b/Assets/Shaders/Test.mat.meta new file mode 100644 index 0000000..fd02a57 --- /dev/null +++ b/Assets/Shaders/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 577c2e3c3c83a6c438a9116e1e16dfbe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Shaders/Test.mat.meta b/Assets/Shaders/Test.mat.meta new file mode 100644 index 0000000..fd02a57 --- /dev/null +++ b/Assets/Shaders/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 577c2e3c3c83a6c438a9116e1e16dfbe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloff.shader b/Assets/Shaders/WithCubeFalloff.shader new file mode 100644 index 0000000..cd1a3ef --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader @@ -0,0 +1,67 @@ +Shader "Custom/WithCubeFalloff" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + _LightCube("Light Cubemap", CUBE) = "" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + + struct Input + { + float2 uv_MainTex; + float3 worldPos; + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + uniform float4 _LightMapCameraPos; + samplerCUBE _LightCube; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) + { + float3 toFragment = IN.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.0008, sampleDist); + + + // Albedo comes from a texture tinted by color + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = check; // float3(check, check, check); // c.rgb; // *check; + // Metallic and smoothness come from slider variables + o.Metallic = 0; // _Metallic; + o.Smoothness = 1; // _Glossiness; + o.Alpha = 1; // c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Shaders/Test.mat.meta b/Assets/Shaders/Test.mat.meta new file mode 100644 index 0000000..fd02a57 --- /dev/null +++ b/Assets/Shaders/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 577c2e3c3c83a6c438a9116e1e16dfbe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloff.shader b/Assets/Shaders/WithCubeFalloff.shader new file mode 100644 index 0000000..cd1a3ef --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader @@ -0,0 +1,67 @@ +Shader "Custom/WithCubeFalloff" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + _LightCube("Light Cubemap", CUBE) = "" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + + struct Input + { + float2 uv_MainTex; + float3 worldPos; + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + uniform float4 _LightMapCameraPos; + samplerCUBE _LightCube; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) + { + float3 toFragment = IN.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.0008, sampleDist); + + + // Albedo comes from a texture tinted by color + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = check; // float3(check, check, check); // c.rgb; // *check; + // Metallic and smoothness come from slider variables + o.Metallic = 0; // _Metallic; + o.Smoothness = 1; // _Glossiness; + o.Alpha = 1; // c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/WithCubeFalloff.shader.meta b/Assets/Shaders/WithCubeFalloff.shader.meta new file mode 100644 index 0000000..56b0ff5 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2ef09d24bdf2d9b489f7a03442dc4b15 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Shaders/Test.mat.meta b/Assets/Shaders/Test.mat.meta new file mode 100644 index 0000000..fd02a57 --- /dev/null +++ b/Assets/Shaders/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 577c2e3c3c83a6c438a9116e1e16dfbe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloff.shader b/Assets/Shaders/WithCubeFalloff.shader new file mode 100644 index 0000000..cd1a3ef --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader @@ -0,0 +1,67 @@ +Shader "Custom/WithCubeFalloff" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + _LightCube("Light Cubemap", CUBE) = "" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + + struct Input + { + float2 uv_MainTex; + float3 worldPos; + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + uniform float4 _LightMapCameraPos; + samplerCUBE _LightCube; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) + { + float3 toFragment = IN.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.0008, sampleDist); + + + // Albedo comes from a texture tinted by color + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = check; // float3(check, check, check); // c.rgb; // *check; + // Metallic and smoothness come from slider variables + o.Metallic = 0; // _Metallic; + o.Smoothness = 1; // _Glossiness; + o.Alpha = 1; // c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/WithCubeFalloff.shader.meta b/Assets/Shaders/WithCubeFalloff.shader.meta new file mode 100644 index 0000000..56b0ff5 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2ef09d24bdf2d9b489f7a03442dc4b15 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloffUnlit.shader b/Assets/Shaders/WithCubeFalloffUnlit.shader new file mode 100644 index 0000000..62ee21e --- /dev/null +++ b/Assets/Shaders/WithCubeFalloffUnlit.shader @@ -0,0 +1,77 @@ +Shader "Unlit/WithCubeFalloffUnlit" +{ + Properties + { + _Color("Color", Color) = (1,1,1,1) + _MainTex("Albedo (RGB)", 2D) = "white" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + UNITY_FOG_COORDS(1) + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + float depth : TEXCOORD2; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + + samplerCUBE _LightCube; + + uniform float4 _Color; + + uniform float4 _LightMapCameraPos; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + o.depth = COMPUTE_DEPTH_01; + //UNITY_TRANSFER_FOG(o,o.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + float3 toFragment = i.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + fixed4 c = tex2D(_MainTex, i.uv) * _Color; + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.02, sampleDist); + + return fixed4(check, check, check, 1); + + //return fixed4(sampleCube.r, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Shaders/Test.mat.meta b/Assets/Shaders/Test.mat.meta new file mode 100644 index 0000000..fd02a57 --- /dev/null +++ b/Assets/Shaders/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 577c2e3c3c83a6c438a9116e1e16dfbe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloff.shader b/Assets/Shaders/WithCubeFalloff.shader new file mode 100644 index 0000000..cd1a3ef --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader @@ -0,0 +1,67 @@ +Shader "Custom/WithCubeFalloff" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + _LightCube("Light Cubemap", CUBE) = "" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + + struct Input + { + float2 uv_MainTex; + float3 worldPos; + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + uniform float4 _LightMapCameraPos; + samplerCUBE _LightCube; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) + { + float3 toFragment = IN.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.0008, sampleDist); + + + // Albedo comes from a texture tinted by color + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = check; // float3(check, check, check); // c.rgb; // *check; + // Metallic and smoothness come from slider variables + o.Metallic = 0; // _Metallic; + o.Smoothness = 1; // _Glossiness; + o.Alpha = 1; // c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/WithCubeFalloff.shader.meta b/Assets/Shaders/WithCubeFalloff.shader.meta new file mode 100644 index 0000000..56b0ff5 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2ef09d24bdf2d9b489f7a03442dc4b15 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloffUnlit.shader b/Assets/Shaders/WithCubeFalloffUnlit.shader new file mode 100644 index 0000000..62ee21e --- /dev/null +++ b/Assets/Shaders/WithCubeFalloffUnlit.shader @@ -0,0 +1,77 @@ +Shader "Unlit/WithCubeFalloffUnlit" +{ + Properties + { + _Color("Color", Color) = (1,1,1,1) + _MainTex("Albedo (RGB)", 2D) = "white" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + UNITY_FOG_COORDS(1) + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + float depth : TEXCOORD2; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + + samplerCUBE _LightCube; + + uniform float4 _Color; + + uniform float4 _LightMapCameraPos; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + o.depth = COMPUTE_DEPTH_01; + //UNITY_TRANSFER_FOG(o,o.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + float3 toFragment = i.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + fixed4 c = tex2D(_MainTex, i.uv) * _Color; + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.02, sampleDist); + + return fixed4(check, check, check, 1); + + //return fixed4(sampleCube.r, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/WithCubeFalloffUnlit.shader.meta b/Assets/Shaders/WithCubeFalloffUnlit.shader.meta new file mode 100644 index 0000000..3b23199 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloffUnlit.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bda8faa8d3e09f64f9014c503d81c7a2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Shaders/Test.mat.meta b/Assets/Shaders/Test.mat.meta new file mode 100644 index 0000000..fd02a57 --- /dev/null +++ b/Assets/Shaders/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 577c2e3c3c83a6c438a9116e1e16dfbe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloff.shader b/Assets/Shaders/WithCubeFalloff.shader new file mode 100644 index 0000000..cd1a3ef --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader @@ -0,0 +1,67 @@ +Shader "Custom/WithCubeFalloff" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + _LightCube("Light Cubemap", CUBE) = "" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + + struct Input + { + float2 uv_MainTex; + float3 worldPos; + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + uniform float4 _LightMapCameraPos; + samplerCUBE _LightCube; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) + { + float3 toFragment = IN.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.0008, sampleDist); + + + // Albedo comes from a texture tinted by color + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = check; // float3(check, check, check); // c.rgb; // *check; + // Metallic and smoothness come from slider variables + o.Metallic = 0; // _Metallic; + o.Smoothness = 1; // _Glossiness; + o.Alpha = 1; // c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/WithCubeFalloff.shader.meta b/Assets/Shaders/WithCubeFalloff.shader.meta new file mode 100644 index 0000000..56b0ff5 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2ef09d24bdf2d9b489f7a03442dc4b15 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloffUnlit.shader b/Assets/Shaders/WithCubeFalloffUnlit.shader new file mode 100644 index 0000000..62ee21e --- /dev/null +++ b/Assets/Shaders/WithCubeFalloffUnlit.shader @@ -0,0 +1,77 @@ +Shader "Unlit/WithCubeFalloffUnlit" +{ + Properties + { + _Color("Color", Color) = (1,1,1,1) + _MainTex("Albedo (RGB)", 2D) = "white" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + UNITY_FOG_COORDS(1) + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + float depth : TEXCOORD2; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + + samplerCUBE _LightCube; + + uniform float4 _Color; + + uniform float4 _LightMapCameraPos; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + o.depth = COMPUTE_DEPTH_01; + //UNITY_TRANSFER_FOG(o,o.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + float3 toFragment = i.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + fixed4 c = tex2D(_MainTex, i.uv) * _Color; + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.02, sampleDist); + + return fixed4(check, check, check, 1); + + //return fixed4(sampleCube.r, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/WithCubeFalloffUnlit.shader.meta b/Assets/Shaders/WithCubeFalloffUnlit.shader.meta new file mode 100644 index 0000000..3b23199 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloffUnlit.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bda8faa8d3e09f64f9014c503d81c7a2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index cb4a9cc..07ff5a7 100755 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -5,7 +5,7 @@ "com.unity.collab-proxy": "1.2.16", "com.unity.ide.rider": "1.1.4", "com.unity.ide.vscode": "1.1.4", - "com.unity.test-framework": "1.1.9", + "com.unity.test-framework": "1.1.11", "com.unity.textmeshpro": "2.0.1", "com.unity.timeline": "1.2.10", "com.unity.ugui": "1.0.0", diff --git a/.gitignore b/.gitignore index 85d9246..65afa32 100755 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ # Crashlytics generated file crashlytics-build.properties + +Packages/* +!Packages/manifest.json diff --git a/Assets/Animation.meta b/Assets/Animation.meta deleted file mode 100755 index a484b1b..0000000 --- a/Assets/Animation.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f2428cb72adde469c2b7d5d93cfcb8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Circle.anim b/Assets/Animation/Circle.anim deleted file mode 100755 index add6878..0000000 --- a/Assets/Animation/Circle.anim +++ /dev/null @@ -1,195 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.23333333 - value: {x: 1.31, y: 0, z: -0.8} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.5 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -0.16, y: 0, z: -4.58} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - 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: - - serializedVersion: 3 - time: 0 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: 1.31 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.16 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.23333333 - value: -0.8 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.5 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -4.58 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Animation/Circle.anim.meta b/Assets/Animation/Circle.anim.meta deleted file mode 100644 index f682f85..0000000 --- a/Assets/Animation/Circle.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24bbfee9c3fd57841a747e158d90962a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animation/Point Light.controller b/Assets/Animation/Point Light.controller deleted file mode 100755 index 0de1637..0000000 --- a/Assets/Animation/Point Light.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-5506673437501813555 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -3238746165502228193} - m_Position: {x: 200, y: 0, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -10, y: 40, z: 0} - m_EntryPosition: {x: 60, y: 220, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -3238746165502228193} ---- !u!1102 &-3238746165502228193 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Circle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - 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_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 24bbfee9c3fd57841a747e158d90962a, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Point Light - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -5506673437501813555} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Animation/Point Light.controller.meta b/Assets/Animation/Point Light.controller.meta deleted file mode 100644 index f5031aa..0000000 --- a/Assets/Animation/Point Light.controller.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ce23fd0a3391dd4a9e9e82e580501f3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b23ff29 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec52b82b60db80147806c5e218bf943d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/LightHolder.controller b/Assets/Animations/LightHolder.controller new file mode 100644 index 0000000..d122be6 --- /dev/null +++ b/Assets/Animations/LightHolder.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightHolder + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5895699774053910182} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &5125213850002236336 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + 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_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 22cc34b1774ff1b4a9954ea58a74953b, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5895699774053910182 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5125213850002236336} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5125213850002236336} diff --git a/Assets/Animations/LightHolder.controller.meta b/Assets/Animations/LightHolder.controller.meta new file mode 100644 index 0000000..7e1ddd8 --- /dev/null +++ b/Assets/Animations/LightHolder.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ccf7d55da6ee8b448b5d210cfc1374db +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MoveLight.anim b/Assets/Animations/MoveLight.anim new file mode 100644 index 0000000..6c20f2f --- /dev/null +++ b/Assets/Animations/MoveLight.anim @@ -0,0 +1,313 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MoveLight + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.43333334 + value: {x: -1.51, y: 1.17, z: -3.58} + inSlope: {x: 0, y: 0, z: -8.749091} + outSlope: {x: 0, y: 0, z: -8.749091} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.9166667 + value: {x: 3.76, y: 1.17, z: -7.38} + inSlope: {x: 6.752544, y: 0, z: 0} + outSlope: {x: 6.752544, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4166666 + value: {x: 5.42, y: 1.17, z: -1.41} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.9833333 + value: {x: -1.41, y: 1.17, z: -4.18} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2.5 + value: {x: 2.15, y: 1.17, z: 0.64} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2.5 + 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: + - serializedVersion: 3 + time: 0 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -1.51 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 3.76 + inSlope: 6.752544 + outSlope: 6.752544 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 5.42 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 2.15 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 1.17 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.43333334 + value: -3.58 + inSlope: -8.749091 + outSlope: -8.749091 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.9166667 + value: -7.38 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4166666 + value: -1.41 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.9833333 + value: -4.18 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2.5 + value: 0.64 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MoveLight.anim.meta b/Assets/Animations/MoveLight.anim.meta new file mode 100644 index 0000000..ed59469 --- /dev/null +++ b/Assets/Animations/MoveLight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22cc34b1774ff1b4a9954ea58a74953b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..894faf1 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a5208056b259b94c93011f559630e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 25257d4..720d389 100755 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -171,7 +171,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -209,7 +209,7 @@ m_GameObject: {fileID: 43374507} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 17.920061, y: 1, z: 19.432215} + m_LocalScale: {x: 51.072174, y: 1, z: 44.20829} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -291,7 +291,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.27, y: 7.12, z: -4.33} + m_LocalPosition: {x: 0.95, y: 15.9, z: -0.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -347,7 +347,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -400,7 +400,6 @@ m_Component: - component: {fileID: 1045790464} - component: {fileID: 1045790463} - - component: {fileID: 1045790465} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -422,7 +421,7 @@ m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 3.7 m_Range: 11.2 - m_SpotAngle: 76.9 + m_SpotAngle: 88 m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: @@ -477,31 +476,12 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1045790462} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -0.16, y: 0, z: -4.58} + m_LocalPosition: {x: 0, y: 6.35, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1052933562} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!95 &1045790465 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045790462} - m_Enabled: 0 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 7ce23fd0a3391dd4a9e9e82e580501f3, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1052933561 GameObject: m_ObjectHideFlags: 0 @@ -511,6 +491,7 @@ serializedVersion: 6 m_Component: - component: {fileID: 1052933562} + - component: {fileID: 1052933563} m_Layer: 0 m_Name: LightHolder m_TagString: Untagged @@ -526,13 +507,33 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1052933561} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.54, z: 0} + m_LocalPosition: {x: 2.15, y: 1.17, z: 0.64} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1045790464} + - {fileID: 1253261068} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &1052933563 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1052933561} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: ccf7d55da6ee8b448b5d210cfc1374db, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &1253261066 GameObject: m_ObjectHideFlags: 0 @@ -562,8 +563,8 @@ m_Script: {fileID: 11500000, guid: 92449bf555243f645ac1daa04cf9cd89, type: 3} m_Name: m_EditorClassIdentifier: - DepthShader: {fileID: 4800000, guid: 3dc942d4c3932f747989357e5cff6e75, type: 3} - SeeMap: {fileID: 0} + DepthShader: {fileID: 4800000, guid: a9aadcf9940a83d4db85f60b9f2ca91b, type: 3} + DepthMap: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} --- !u!4 &1253261068 Transform: m_ObjectHideFlags: 0 @@ -571,12 +572,12 @@ m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1253261066} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.86, z: -4.62} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 1052933562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1668528467 GameObject: @@ -628,7 +629,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -721,7 +722,7 @@ m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 577c2e3c3c83a6c438a9116e1e16dfbe, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Scripts/CubeMap.cs b/Assets/Scripts/CubeMap.cs index 7acbdb4..18b9b2e 100755 --- a/Assets/Scripts/CubeMap.cs +++ b/Assets/Scripts/CubeMap.cs @@ -6,40 +6,42 @@ public class CubeMap : MonoBehaviour { public Shader DepthShader; + public RenderTexture DepthMap; - private Camera see; + private Camera depthCamera; - public RenderTexture SeeMap; - // Start is called before the first frame update void Start() { - see = gameObject.AddComponent(); - see.aspect = 1; - see.fieldOfView = 90; + depthCamera = gameObject.AddComponent(); + + depthCamera.enabled = false; + depthCamera.farClipPlane = 12; + depthCamera.nearClipPlane = 0.03f; + depthCamera.backgroundColor = Color.white; - see.enabled = false; - see.farClipPlane = 20; - see.nearClipPlane = 0.1f; - - SeeMap = new RenderTexture(2048, 1024, 32, RenderTextureFormat.Depth); - - see.targetTexture = SeeMap; + //Shader.SetGlobalTexture("_LightCube", DepthMap); } - private Texture2D tex = null; - // Update is called once per frame void Update() { - //see.SetReplacementShader(DepthShader, ""); + // note: w is farplane + Shader.SetGlobalVector("_LightMapCameraPos", new Vector4(transform.position.x, transform.position.y, transform.position.z, depthCamera.farClipPlane)); + + depthCamera.SetReplacementShader(DepthShader, ""); + + if (!depthCamera.RenderToCubemap(DepthMap)) + { + Debug.LogError("Failed cubemap render"); + } + + depthCamera.ResetReplacementShader(); + + //see.targetTexture = null; + + //see.targetTexture = SanityMap; //see.Render(); - //if (!see.RenderToCubemap(SeeMap)) - //{ - // Debug.LogError("FAILED :("); - //} - - //see.ResetReplacementShader(); //see.targetTexture = null; //see.Render(); @@ -58,32 +60,32 @@ //f.Write(png, 0, png.Length); //f.Close(); - see.transform.forward = Vector3.forward; - see.transform.up = Vector3.up; - see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.right; - see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.back; - see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.left; - see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.down; - see.transform.up = Vector3.forward; - see.rect = new Rect(0, 0, 0.25f, 0.5f); - see.Render(); - - see.transform.forward = Vector3.up; - see.transform.up = Vector3.back; - see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); - see.Render(); + //see.transform.forward = Vector3.forward; + //see.transform.up = Vector3.up; + //see.rect = new Rect(0, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.right; + //see.rect = new Rect(0.25f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.back; + //see.rect = new Rect(0.5f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.left; + //see.rect = new Rect(0.75f, 0.5f, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.down; + //see.transform.up = Vector3.forward; + //see.rect = new Rect(0, 0, 0.25f, 0.5f); + //see.Render(); + // + //see.transform.forward = Vector3.up; + //see.transform.up = Vector3.back; + //see.rect = new Rect(0.25f, 0, 0.25f, 0.5f); + //see.Render(); } diff --git a/Assets/Shaders/Blue.mat b/Assets/Shaders/Blue.mat new file mode 100644 index 0000000..2c643f3 --- /dev/null +++ b/Assets/Shaders/Blue.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0.04155445, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Shaders/Blue.mat.meta b/Assets/Shaders/Blue.mat.meta new file mode 100644 index 0000000..d8d02f8 --- /dev/null +++ b/Assets/Shaders/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0429fe2dfb79e584fad7b4790a90c09a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CubeDepthShader.shader b/Assets/Shaders/CubeDepthShader.shader deleted file mode 100755 index acb5bbc..0000000 --- a/Assets/Shaders/CubeDepthShader.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/NewSurfaceShader" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - _CamPos("Camera Position", Vector) = (0,0,0,0) - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - float3 worldPos; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Shaders/CubeDepthShader.shader.meta b/Assets/Shaders/CubeDepthShader.shader.meta deleted file mode 100755 index d6efb80..0000000 --- a/Assets/Shaders/CubeDepthShader.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 883e3addcc6cced41b5b1afe0eea5a18 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Shaders/DepthShader.shader b/Assets/Shaders/DepthShader.shader new file mode 100644 index 0000000..4f653a2 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader @@ -0,0 +1,52 @@ +Shader "Unlit/DepthShader" +{ + Properties + { + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + }; + + struct v2f + { + float depth : TEXCOORD0; + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + }; + + //uniform float4 _ProjectionParams; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.depth = COMPUTE_DEPTH_01; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + return fixed4(length(i.worldPos - _WorldSpaceCameraPos.xyz) * _ProjectionParams.w, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/DepthShader.shader.meta b/Assets/Shaders/DepthShader.shader.meta new file mode 100644 index 0000000..12a4702 --- /dev/null +++ b/Assets/Shaders/DepthShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a9aadcf9940a83d4db85f60b9f2ca91b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/LightFalloffMap.asset b/Assets/Shaders/LightFalloffMap.asset new file mode 100644 index 0000000..3987abd --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!86 &8600000 +CustomRenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LightFalloffMap + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 1024 + m_Height: 1024 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 0 + m_ColorFormat: 49 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 1 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 4 + m_VolumeDepth: 1 + m_Material: {fileID: 0} + m_InitSource: 0 + m_InitMaterial: {fileID: 0} + m_InitColor: {r: 1, g: 1, b: 1, a: 1} + m_InitTexture: {fileID: 0} + m_UpdateMode: 0 + m_InitializationMode: 2 + m_UpdateZoneSpace: 0 + m_CurrentUpdateZoneSpace: 0 + m_UpdateZones: [] + m_UpdatePeriod: 0 + m_ShaderPass: 0 + m_CubemapFaceMask: 63 + m_DoubleBuffered: 0 + m_WrapUpdateZones: 0 diff --git a/Assets/Shaders/LightFalloffMap.asset.meta b/Assets/Shaders/LightFalloffMap.asset.meta new file mode 100644 index 0000000..0ab2957 --- /dev/null +++ b/Assets/Shaders/LightFalloffMap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b19a0e8c02d57344e8d352446607a21e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Test.mat b/Assets/Shaders/Test.mat new file mode 100644 index 0000000..2d085be --- /dev/null +++ b/Assets/Shaders/Test.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Test + m_Shader: {fileID: 4800000, guid: 2ef09d24bdf2d9b489f7a03442dc4b15, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LightCube: + m_Texture: {fileID: 8600000, guid: b19a0e8c02d57344e8d352446607a21e, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _CameraPos: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _LightMapCameraPos: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Shaders/Test.mat.meta b/Assets/Shaders/Test.mat.meta new file mode 100644 index 0000000..fd02a57 --- /dev/null +++ b/Assets/Shaders/Test.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 577c2e3c3c83a6c438a9116e1e16dfbe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloff.shader b/Assets/Shaders/WithCubeFalloff.shader new file mode 100644 index 0000000..cd1a3ef --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader @@ -0,0 +1,67 @@ +Shader "Custom/WithCubeFalloff" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + _LightCube("Light Cubemap", CUBE) = "" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + + struct Input + { + float2 uv_MainTex; + float3 worldPos; + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + uniform float4 _LightMapCameraPos; + samplerCUBE _LightCube; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) + { + float3 toFragment = IN.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.0008, sampleDist); + + + // Albedo comes from a texture tinted by color + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = check; // float3(check, check, check); // c.rgb; // *check; + // Metallic and smoothness come from slider variables + o.Metallic = 0; // _Metallic; + o.Smoothness = 1; // _Glossiness; + o.Alpha = 1; // c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/WithCubeFalloff.shader.meta b/Assets/Shaders/WithCubeFalloff.shader.meta new file mode 100644 index 0000000..56b0ff5 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloff.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2ef09d24bdf2d9b489f7a03442dc4b15 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/WithCubeFalloffUnlit.shader b/Assets/Shaders/WithCubeFalloffUnlit.shader new file mode 100644 index 0000000..62ee21e --- /dev/null +++ b/Assets/Shaders/WithCubeFalloffUnlit.shader @@ -0,0 +1,77 @@ +Shader "Unlit/WithCubeFalloffUnlit" +{ + Properties + { + _Color("Color", Color) = (1,1,1,1) + _MainTex("Albedo (RGB)", 2D) = "white" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + UNITY_FOG_COORDS(1) + float4 vertex : SV_POSITION; + float3 worldPos: TEXCOORD1; + float depth : TEXCOORD2; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + + samplerCUBE _LightCube; + + uniform float4 _Color; + + uniform float4 _LightMapCameraPos; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + o.depth = COMPUTE_DEPTH_01; + //UNITY_TRANSFER_FOG(o,o.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + float3 toFragment = i.worldPos - _LightMapCameraPos.xyz; + float3 toFragmentDir = normalize(toFragment); + float3 distToFrag = length(toFragment); + + fixed4 c = tex2D(_MainTex, i.uv) * _Color; + + float4 sampleDist = fixed4(texCUBE(_LightCube, toFragmentDir).rgb, 1) * _LightMapCameraPos.w; + + float check = step(distToFrag - 0.02, sampleDist); + + return fixed4(check, check, check, 1); + + //return fixed4(sampleCube.r, 0, 0, 1); + } + ENDCG + } + } +} diff --git a/Assets/Shaders/WithCubeFalloffUnlit.shader.meta b/Assets/Shaders/WithCubeFalloffUnlit.shader.meta new file mode 100644 index 0000000..3b23199 --- /dev/null +++ b/Assets/Shaders/WithCubeFalloffUnlit.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bda8faa8d3e09f64f9014c503d81c7a2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index cb4a9cc..07ff5a7 100755 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -5,7 +5,7 @@ "com.unity.collab-proxy": "1.2.16", "com.unity.ide.rider": "1.1.4", "com.unity.ide.vscode": "1.1.4", - "com.unity.test-framework": "1.1.9", + "com.unity.test-framework": "1.1.11", "com.unity.textmeshpro": "2.0.1", "com.unity.timeline": "1.2.10", "com.unity.ugui": "1.0.0", diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 4d3ac50..798259b 100755 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2019.3.0f5 -m_EditorVersionWithRevision: 2019.3.0f5 (44796c9d3c2c) +m_EditorVersion: 2019.3.0f6 +m_EditorVersionWithRevision: 2019.3.0f6 (27ab2135bccf)