├── .gitignore ├── Assets ├── Materials.meta ├── Materials │ ├── MaterialMetaballs.mat │ ├── MaterialMetaballs.mat.meta │ ├── ShaderMetaballs.shader │ └── ShaderMetaballs.shader.meta ├── Scenes.meta ├── Scenes │ ├── SceneMain.unity │ └── SceneMain.unity.meta ├── Scripts.meta └── Scripts │ ├── ColorPicker.cs │ ├── ColorPicker.cs.meta │ ├── MetaballDefs.cs │ ├── MetaballDefs.cs.meta │ ├── MetaballRenderer.cs │ └── MetaballRenderer.cs.meta ├── LICENSE.md ├── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | Builds 2 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad2fc5b1800a944c1912235affe21e51 3 | folderAsset: yes 4 | timeCreated: 1436779800 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/MaterialMetaballs.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: MaterialMetaballs 10 | m_Shader: {fileID: 4800000, guid: 056d8660dcd404925920542855e8bc5f, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | data: 26 | first: 27 | name: _BumpMap 28 | second: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | data: 33 | first: 34 | name: _DetailNormalMap 35 | second: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | data: 40 | first: 41 | name: _ParallaxMap 42 | second: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | data: 47 | first: 48 | name: _OcclusionMap 49 | second: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | data: 54 | first: 55 | name: _EmissionMap 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | data: 61 | first: 62 | name: _DetailMask 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | data: 68 | first: 69 | name: _DetailAlbedoMap 70 | second: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | data: 75 | first: 76 | name: _MetallicGlossMap 77 | second: 78 | m_Texture: {fileID: 0} 79 | m_Scale: {x: 1, y: 1} 80 | m_Offset: {x: 0, y: 0} 81 | m_Floats: 82 | data: 83 | first: 84 | name: _SrcBlend 85 | second: 1 86 | data: 87 | first: 88 | name: _DstBlend 89 | second: 0 90 | data: 91 | first: 92 | name: _Cutoff 93 | second: .5 94 | data: 95 | first: 96 | name: _Parallax 97 | second: .0199999996 98 | data: 99 | first: 100 | name: _ZWrite 101 | second: 1 102 | data: 103 | first: 104 | name: _Glossiness 105 | second: .5 106 | data: 107 | first: 108 | name: _BumpScale 109 | second: 1 110 | data: 111 | first: 112 | name: _OcclusionStrength 113 | second: 1 114 | data: 115 | first: 116 | name: _DetailNormalMapScale 117 | second: 1 118 | data: 119 | first: 120 | name: _UVSec 121 | second: 0 122 | data: 123 | first: 124 | name: _Mode 125 | second: 0 126 | data: 127 | first: 128 | name: _Metallic 129 | second: 0 130 | data: 131 | first: 132 | name: _EmissionScaleUI 133 | second: 0 134 | m_Colors: 135 | data: 136 | first: 137 | name: _EmissionColor 138 | second: {r: 0, g: 0, b: 0, a: 1} 139 | data: 140 | first: 141 | name: _Color 142 | second: {r: .992156923, g: .592156887, b: .192156881, a: 0} 143 | data: 144 | first: 145 | name: _EmissionColorUI 146 | second: {r: 1, g: 1, b: 1, a: 1} 147 | -------------------------------------------------------------------------------- /Assets/Materials/MaterialMetaballs.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10decc6a67f3941deb1e7a79e2c8a218 3 | timeCreated: 1435933000 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/ShaderMetaballs.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/ShaderMetaballs" { 2 | Properties { 3 | _Color ("Color", Color) = (1,1,1,1) 4 | } 5 | SubShader { 6 | Tags { "RenderType"="Opaque" } 7 | 8 | Cull Off 9 | 10 | Pass { 11 | CGPROGRAM 12 | 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | 16 | uniform fixed4 _Color; 17 | 18 | float4 vert(float4 v:POSITION) : SV_POSITION { 19 | return mul (UNITY_MATRIX_MVP, v); 20 | } 21 | 22 | fixed4 frag() : SV_Target { 23 | return _Color; 24 | } 25 | 26 | ENDCG 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/Materials/ShaderMetaballs.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 056d8660dcd404925920542855e8bc5f 3 | timeCreated: 1435933010 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3f3a7b1b9d344d02a29b23a31d26ddd 3 | folderAsset: yes 4 | timeCreated: 1436779808 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SceneMain.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | SceneSettings: 5 | m_ObjectHideFlags: 0 6 | m_PVSData: 7 | m_PVSObjectsArray: [] 8 | m_PVSPortalsArray: [] 9 | m_OcclusionBakeSettings: 10 | smallestOccluder: 5 11 | smallestHole: .25 12 | backfaceThreshold: 100 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 6 17 | m_Fog: 0 18 | m_FogColor: {r: .5, g: .5, b: .5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: .00999999978 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1} 24 | m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1} 25 | m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 29 | m_HaloStrength: .5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | --- !u!127 &3 41 | LevelGameManager: 42 | m_ObjectHideFlags: 0 43 | --- !u!157 &4 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 5 47 | m_GIWorkflowMode: 0 48 | m_LightmapsMode: 1 49 | m_GISettings: 50 | serializedVersion: 2 51 | m_BounceScale: 1 52 | m_IndirectOutputScale: 1 53 | m_AlbedoBoost: 1 54 | m_TemporalCoherenceThreshold: 1 55 | m_EnvironmentLightingMode: 0 56 | m_EnableBakedLightmaps: 1 57 | m_EnableRealtimeLightmaps: 1 58 | m_LightmapEditorSettings: 59 | serializedVersion: 3 60 | m_Resolution: 2 61 | m_BakeResolution: 40 62 | m_TextureWidth: 1024 63 | m_TextureHeight: 1024 64 | m_AOMaxDistance: 1 65 | m_Padding: 2 66 | m_CompAOExponent: 0 67 | m_LightmapParameters: {fileID: 0} 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherRayCount: 1024 71 | m_LightmapSnapshot: {fileID: 0} 72 | m_RuntimeCPUUsage: 25 73 | --- !u!196 &5 74 | NavMeshSettings: 75 | serializedVersion: 2 76 | m_ObjectHideFlags: 0 77 | m_BuildSettings: 78 | serializedVersion: 2 79 | agentRadius: .5 80 | agentHeight: 2 81 | agentSlope: 45 82 | agentClimb: .400000006 83 | ledgeDropHeight: 0 84 | maxJumpAcrossDistance: 0 85 | accuratePlacement: 0 86 | minRegionArea: 2 87 | cellSize: .166666672 88 | manualCellSize: 0 89 | m_NavMeshData: {fileID: 0} 90 | --- !u!1 &355266125 91 | GameObject: 92 | m_ObjectHideFlags: 0 93 | m_PrefabParentObject: {fileID: 0} 94 | m_PrefabInternal: {fileID: 0} 95 | serializedVersion: 4 96 | m_Component: 97 | - 4: {fileID: 355266130} 98 | - 20: {fileID: 355266129} 99 | m_Layer: 0 100 | m_Name: CameraMain 101 | m_TagString: MainCamera 102 | m_Icon: {fileID: 0} 103 | m_NavMeshLayer: 0 104 | m_StaticEditorFlags: 0 105 | m_IsActive: 1 106 | --- !u!20 &355266129 107 | Camera: 108 | m_ObjectHideFlags: 0 109 | m_PrefabParentObject: {fileID: 0} 110 | m_PrefabInternal: {fileID: 0} 111 | m_GameObject: {fileID: 355266125} 112 | m_Enabled: 1 113 | serializedVersion: 2 114 | m_ClearFlags: 2 115 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: .0196078438} 116 | m_NormalizedViewPortRect: 117 | serializedVersion: 2 118 | x: 0 119 | y: 0 120 | width: 1 121 | height: 1 122 | near clip plane: .300000012 123 | far clip plane: 1000 124 | field of view: 60 125 | orthographic: 1 126 | orthographic size: 2 127 | m_Depth: -1 128 | m_CullingMask: 129 | serializedVersion: 2 130 | m_Bits: 4294967295 131 | m_RenderingPath: -1 132 | m_TargetTexture: {fileID: 0} 133 | m_TargetDisplay: 0 134 | m_HDR: 0 135 | m_OcclusionCulling: 1 136 | m_StereoConvergence: 10 137 | m_StereoSeparation: .0219999999 138 | m_StereoMirrorMode: 0 139 | --- !u!4 &355266130 140 | Transform: 141 | m_ObjectHideFlags: 0 142 | m_PrefabParentObject: {fileID: 0} 143 | m_PrefabInternal: {fileID: 0} 144 | m_GameObject: {fileID: 355266125} 145 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 146 | m_LocalPosition: {x: 0, y: 0, z: -10} 147 | m_LocalScale: {x: 1, y: 1, z: 1} 148 | m_Children: [] 149 | m_Father: {fileID: 0} 150 | m_RootOrder: 0 151 | --- !u!1 &358606376 152 | GameObject: 153 | m_ObjectHideFlags: 0 154 | m_PrefabParentObject: {fileID: 0} 155 | m_PrefabInternal: {fileID: 0} 156 | serializedVersion: 4 157 | m_Component: 158 | - 4: {fileID: 358606377} 159 | - 114: {fileID: 358606378} 160 | - 33: {fileID: 358606380} 161 | - 23: {fileID: 358606379} 162 | m_Layer: 0 163 | m_Name: MetaballRenderer 164 | m_TagString: Untagged 165 | m_Icon: {fileID: 0} 166 | m_NavMeshLayer: 0 167 | m_StaticEditorFlags: 0 168 | m_IsActive: 1 169 | --- !u!4 &358606377 170 | Transform: 171 | m_ObjectHideFlags: 0 172 | m_PrefabParentObject: {fileID: 0} 173 | m_PrefabInternal: {fileID: 0} 174 | m_GameObject: {fileID: 358606376} 175 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 176 | m_LocalPosition: {x: 0, y: 0, z: 0} 177 | m_LocalScale: {x: 1, y: 1, z: 1} 178 | m_Children: [] 179 | m_Father: {fileID: 0} 180 | m_RootOrder: 1 181 | --- !u!114 &358606378 182 | MonoBehaviour: 183 | m_ObjectHideFlags: 0 184 | m_PrefabParentObject: {fileID: 0} 185 | m_PrefabInternal: {fileID: 0} 186 | m_GameObject: {fileID: 358606376} 187 | m_Enabled: 1 188 | m_EditorHideFlags: 0 189 | m_Script: {fileID: 11500000, guid: 8b798ec0ca3ee483aa9339932979d457, type: 3} 190 | m_Name: 191 | m_EditorClassIdentifier: 192 | numberOfBalls: 7 193 | bounds: 194 | serializedVersion: 2 195 | x: -3.5 196 | y: -2 197 | width: 7 198 | height: 4 199 | gridResolution: {x: 90, y: 90} 200 | --- !u!23 &358606379 201 | MeshRenderer: 202 | m_ObjectHideFlags: 0 203 | m_PrefabParentObject: {fileID: 0} 204 | m_PrefabInternal: {fileID: 0} 205 | m_GameObject: {fileID: 358606376} 206 | m_Enabled: 1 207 | m_CastShadows: 1 208 | m_ReceiveShadows: 1 209 | m_Materials: 210 | - {fileID: 2100000, guid: 10decc6a67f3941deb1e7a79e2c8a218, type: 2} 211 | m_SubsetIndices: 212 | m_StaticBatchRoot: {fileID: 0} 213 | m_UseLightProbes: 1 214 | m_ReflectionProbeUsage: 1 215 | m_ProbeAnchor: {fileID: 0} 216 | m_ScaleInLightmap: 1 217 | m_PreserveUVs: 0 218 | m_ImportantGI: 0 219 | m_AutoUVMaxDistance: .5 220 | m_AutoUVMaxAngle: 89 221 | m_LightmapParameters: {fileID: 0} 222 | m_SortingLayerID: 0 223 | m_SortingOrder: 0 224 | --- !u!33 &358606380 225 | MeshFilter: 226 | m_ObjectHideFlags: 0 227 | m_PrefabParentObject: {fileID: 0} 228 | m_PrefabInternal: {fileID: 0} 229 | m_GameObject: {fileID: 358606376} 230 | m_Mesh: {fileID: 0} 231 | --- !u!1 &1138812476 232 | GameObject: 233 | m_ObjectHideFlags: 0 234 | m_PrefabParentObject: {fileID: 0} 235 | m_PrefabInternal: {fileID: 0} 236 | serializedVersion: 4 237 | m_Component: 238 | - 4: {fileID: 1138812478} 239 | - 114: {fileID: 1138812477} 240 | m_Layer: 0 241 | m_Name: GameObject 242 | m_TagString: Untagged 243 | m_Icon: {fileID: 0} 244 | m_NavMeshLayer: 0 245 | m_StaticEditorFlags: 0 246 | m_IsActive: 1 247 | --- !u!114 &1138812477 248 | MonoBehaviour: 249 | m_ObjectHideFlags: 0 250 | m_PrefabParentObject: {fileID: 0} 251 | m_PrefabInternal: {fileID: 0} 252 | m_GameObject: {fileID: 1138812476} 253 | m_Enabled: 1 254 | m_EditorHideFlags: 0 255 | m_Script: {fileID: 11500000, guid: e1c75b25e698945c7abdd766b5269bd7, type: 3} 256 | m_Name: 257 | m_EditorClassIdentifier: 258 | colorMaterials: 259 | - {r: .937254965, g: .921568692, b: .80392164, a: 0} 260 | - {r: .70588237, g: .290196091, b: .184313729, a: 0} 261 | - {r: .113725498, g: .635294139, b: .53725493, a: 0} 262 | - {r: .129411772, g: .58431375, b: .631372571, a: 0} 263 | - {r: .992156923, g: .592156887, b: .192156881, a: 0} 264 | - {r: .850980461, g: .262745112, b: .125490203, a: 0} 265 | colorBackgrounds: 266 | - {r: .0431372561, g: .392156899, b: .494117677, a: 0} 267 | - {r: .996078491, g: .68235296, b: .309803933, a: 0} 268 | - {r: .756862819, g: .913725555, b: .647058845, a: 0} 269 | - {r: .956862807, g: .996078491, b: .894117713, a: 0} 270 | - {r: .494117677, g: .545098066, b: .627451003, a: 0} 271 | - {r: .678431392, g: .811764777, b: .800000072, a: 0} 272 | targetCamera: {fileID: 355266129} 273 | targetMaterial: {fileID: 2100000, guid: 10decc6a67f3941deb1e7a79e2c8a218, type: 2} 274 | --- !u!4 &1138812478 275 | Transform: 276 | m_ObjectHideFlags: 0 277 | m_PrefabParentObject: {fileID: 0} 278 | m_PrefabInternal: {fileID: 0} 279 | m_GameObject: {fileID: 1138812476} 280 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 281 | m_LocalPosition: {x: 0, y: 0, z: 0} 282 | m_LocalScale: {x: 1, y: 1, z: 1} 283 | m_Children: [] 284 | m_Father: {fileID: 0} 285 | m_RootOrder: 2 286 | -------------------------------------------------------------------------------- /Assets/Scenes/SceneMain.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd195008f9f91469983f7ebc683be20f 3 | timeCreated: 1435874479 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3e577d5ad06a461c9b509e9c78fec9e 3 | folderAsset: yes 4 | timeCreated: 1436779790 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/ColorPicker.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | /// 5 | /// Author: Luke Holland (@luke161) 6 | /// http://lukeholland.me/ 7 | /// 8 | /// 9 | 10 | public class ColorPicker : MonoBehaviour { 11 | 12 | public Color[] colorMaterials; 13 | public Color[] colorBackgrounds; 14 | 15 | public Camera targetCamera; 16 | public Material targetMaterial; 17 | 18 | protected void Awake() 19 | { 20 | int index = Random.Range(0,colorMaterials.Length); 21 | 22 | targetCamera.backgroundColor = colorBackgrounds[index]; 23 | targetMaterial.color = colorMaterials[index]; 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Assets/Scripts/ColorPicker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1c75b25e698945c7abdd766b5269bd7 3 | timeCreated: 1436779821 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/MetaballDefs.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// Lookup tables for marching square implementation. 5 | /// 6 | /// Author: Luke Holland (@luke161) 7 | /// http://lukeholland.me/ 8 | /// 9 | /// 10 | 11 | public static class MetaballDefs 12 | { 13 | 14 | public static Vector3[][] pointLookupTable = new Vector3[][]{ 15 | // 0 16 | new Vector3[]{ }, 17 | // 1 18 | new Vector3[]{ new Vector3(-1,0,3),new Vector3(0,-1,2), new Vector3(-1,-1,-1) }, 19 | // 2 20 | new Vector3[]{ new Vector3(0,-1,2),new Vector3(1,0,1), new Vector3(1,-1,-1) }, 21 | // 3 22 | new Vector3[]{ new Vector3(-1,0,3),new Vector3(1,0,1), new Vector3(-1,-1,-1), new Vector3(1,-1,-1) }, 23 | // 4 24 | new Vector3[]{ new Vector3(0,1,0), new Vector3(1,0,1), new Vector3(1,1,-1) }, 25 | // 5 26 | new Vector3[]{ new Vector3(-1,0,3),new Vector3(0,-1,2), new Vector3(-1,-1,-1), 27 | new Vector3(0,1,0), new Vector3(1,0,1), new Vector3(1,1,-1) }, 28 | // 6 29 | new Vector3[]{ new Vector3(0,1,0), new Vector3(0,-1,2), new Vector3(1,1,-1), new Vector3(1,-1,-1)}, 30 | // 7 31 | new Vector3[]{ new Vector3(-1,0,3),new Vector3(0,1,0), new Vector3(1,1,-1), new Vector3(1,-1,-1), new Vector3(-1,-1,-1) }, 32 | // 8 33 | new Vector3[]{ new Vector3(-1,0,3),new Vector3(0,1,0), new Vector3(-1,1,-1)}, 34 | // 9 35 | new Vector3[]{ new Vector3(0,1,0), new Vector3(0,-1,2), new Vector3(-1,1,-1), new Vector3(-1,-1,-1)}, 36 | // 10 37 | new Vector3[]{ new Vector3(0,-1,2),new Vector3(1,0,1), new Vector3(1,-1,-1), 38 | new Vector3(-1,0,3),new Vector3(0,1,0), new Vector3(-1,1,-1) }, 39 | // 11 40 | new Vector3[]{ new Vector3(0,1,0), new Vector3(1,0,1),new Vector3(-1,1,-1), new Vector3(-1,-1,-1), new Vector3(1,-1,-1)}, 41 | // 12 42 | new Vector3[]{ new Vector3(-1,0,3),new Vector3(1,0,1), new Vector3(-1,1,-1), new Vector3(1,1,-1)}, 43 | // 13 44 | new Vector3[]{ new Vector3(0,-1,2),new Vector3(1,0,1), new Vector3(-1,1,-1), new Vector3(1,1,-1), new Vector3(-1,-1,-1)}, 45 | // 14 46 | new Vector3[]{ new Vector3(-1,0,3),new Vector3(0,-1,2), new Vector3(-1,1,-1), new Vector3(1,1,-1), new Vector3(1,-1,-1)}, 47 | // 15 48 | new Vector3[]{ new Vector3(-1,1,0), new Vector3(1,1,0), new Vector3(1,-1,0), new Vector3(-1,-1,0) } 49 | }; 50 | 51 | public static int[][] triangleLookupTable = new int[][]{ 52 | // 0 53 | new int[] {}, 54 | // 1 55 | new int[] { 0,1,2}, 56 | // 2 57 | new int[] { 0,1,2}, 58 | // 3 59 | new int[] { 0,1,2, 60 | 1,2,3}, 61 | // 4 62 | new int[] { 0,1,2}, 63 | // 5 64 | new int[] { 0,1,2, 65 | 5,4,3}, 66 | // 6 67 | new int[] { 0,1,2, 68 | 1,2,3}, 69 | // 7 70 | new int[] { 0,4,3, 71 | 0,1,3, 72 | 1,2,3}, 73 | // 8 74 | new int[] { 0,1,2}, 75 | // 9 76 | new int[] { 0,1,2, 77 | 1,2,3}, 78 | // 10 79 | new int[] { 0,1,2, 80 | 3,4,5}, 81 | // 11 82 | new int[] { 0,2,3, 83 | 0,3,1, 84 | 1,3,4}, 85 | // 12 86 | new int[] { 0,1,2, 87 | 1,2,3}, 88 | // 13 89 | new int[] { 2,3,1, 90 | 2,1,0, 91 | 2,0,4}, 92 | // 14 93 | new int[] { 0,2,3, 94 | 0,3,1, 95 | 1,3,4}, 96 | // 15 97 | new int[] { 0,1,3, 98 | 1,2,3} 99 | }; 100 | 101 | } 102 | 103 | -------------------------------------------------------------------------------- /Assets/Scripts/MetaballDefs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 245e0c2c95eb44bde833b9ab30b94caa 3 | timeCreated: 1436778987 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/MetaballRenderer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// Generates and renders 2D metaballs using marching squares to create a procedural mesh. 5 | /// Based on: http://jamie-wong.com/2014/08/19/metaballs-and-marching-squares/ 6 | /// 7 | /// Author: Luke Holland (@luke161) 8 | /// http://lukeholland.me/ 9 | /// 10 | /// 11 | 12 | [RequireComponent(typeof(MeshRenderer))] 13 | [RequireComponent(typeof(MeshFilter))] 14 | public class MetaballRenderer : MonoBehaviour 15 | { 16 | 17 | public int numberOfBalls = 6; 18 | public Rect bounds = new Rect(-3,-2,6,3); 19 | public Vector2 gridResolution = new Vector2(80,80); 20 | 21 | private Metaball[] _metaballs; 22 | private GridSample[] _grid; 23 | private float _gridSize; 24 | 25 | private Vector3[] _vertices; 26 | private int[] _triangles; 27 | private Mesh _mesh; 28 | private int _verticesLength; 29 | private int _trianglesLength; 30 | 31 | protected void Awake() 32 | { 33 | Application.targetFrameRate = 60; 34 | 35 | // create metaballs 36 | _metaballs = new Metaball[numberOfBalls]; 37 | int i = 0; 38 | for(; i=cols ? i : (r*cols)+(c+1); 61 | g.iC = r+1>=rows ? i : ((r+1)*cols)+(c); 62 | g.iD = c+1>=cols || r+1>=rows ? i : ((r+1)*cols)+(c+1); 63 | 64 | _grid[(r*cols)+c] = g; 65 | 66 | ++r; 67 | 68 | y += xstep; 69 | } 70 | 71 | ++c; 72 | x += xstep; 73 | } 74 | 75 | // create mesh and vertex/triangle buffers 76 | _verticesLength = cols*rows*4; 77 | _trianglesLength = _verticesLength; 78 | _vertices = new Vector3[_verticesLength]; 79 | _triangles = new int[_trianglesLength]; 80 | 81 | _mesh = new Mesh(); 82 | _mesh.MarkDynamic(); 83 | 84 | GetComponent().mesh = _mesh; 85 | } 86 | 87 | protected void Update() 88 | { 89 | // update ball positions 90 | int i = 0; 91 | for(; ibounds.xMax || ball.position.xbounds.yMax || ball.position.y0 && index<15){ 120 | 121 | // populate vertext and triangle buffers for this grid position 122 | Vector3 p = new Vector3(grid.x,grid.y,0); 123 | 124 | Vector3[] points = MetaballDefs.pointLookupTable[index]; 125 | int[] triangles = MetaballDefs.triangleLookupTable[index]; 126 | int j = 0, k = triangles.Length; 127 | for(j = 0; j=1f) result |= 1; 212 | if(b1>=1f) result |= 2; 213 | if(b2>=1f) result |= 4; 214 | if(b3>=1f) result |= 8; 215 | 216 | return result; 217 | } 218 | 219 | private Vector3 SmoothFunction(Vector3 p, float sA, float sB, float sC, float sD) 220 | { 221 | if(p.z==0) p.x = Mathf.Lerp(-1f,1f,(1f-sC)/(sD-sC)); 222 | else if(p.z==1) p.y = Mathf.Lerp(-1f,1f,(1f-sB)/(sD-sB)); 223 | else if(p.z==2) p.x = Mathf.Lerp(-1f,1f,(1f-sA)/(sB-sA)); 224 | else if(p.z==3) p.y = Mathf.Lerp(-1f,1f,(1f-sA)/(sC-sA)); 225 | 226 | p.z = 0; 227 | 228 | return p; 229 | } 230 | 231 | 232 | 233 | private class Metaball { 234 | 235 | public Vector3 position; 236 | public Vector3 velocity; 237 | public float radius; 238 | 239 | public Metaball(Vector3 startPosition) 240 | { 241 | velocity = new Vector3(Random.Range(0.01f,0.5f)*(Random.Range(0f,1f)>0.5f ? 1 : -1), 242 | Random.Range(0.01f,0.5f)*(Random.Range(0f,1f)>0.5f ? 1 : -1), 243 | 0); 244 | position = startPosition; 245 | radius = Random.Range(0.2f,0.7f); 246 | } 247 | } 248 | 249 | private class GridSample { 250 | 251 | public float x; 252 | public float y; 253 | public float sample; 254 | 255 | public int iB; 256 | public int iC; 257 | public int iD; 258 | 259 | public GridSample(float x, float y){ 260 | this.x = x; 261 | this.y = y; 262 | } 263 | 264 | } 265 | 266 | } 267 | -------------------------------------------------------------------------------- /Assets/Scripts/MetaballRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b798ec0ca3ee483aa9339932979d457 3 | timeCreated: 1435873672 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_DisableAudio: 0 15 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepThreshold: .00499999989 10 | m_DefaultContactOffset: .00999999978 11 | m_SolverIterationCount: 6 12 | m_RaycastsHitTriggers: 1 13 | m_EnableAdaptiveForce: 0 14 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 15 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SceneMain.unity 10 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 0 13 | m_SpritePackerPaddingPower: 1 14 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_LegacyDeferred: 11 | m_Mode: 1 12 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 13 | m_AlwaysIncludedShaders: 14 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 15 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 16 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 17 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 18 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 19 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 20 | m_PreloadedShaders: [] 21 | m_LightmapStripping: 0 22 | m_LightmapKeepPlain: 1 23 | m_LightmapKeepDirCombined: 1 24 | m_LightmapKeepDirSeparate: 1 25 | m_LightmapKeepDynamic: 1 26 | m_FogStripping: 0 27 | m_FogKeepLinear: 1 28 | m_FogKeepExp: 1 29 | m_FogKeepExp2: 1 30 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: .00100000005 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: .00100000005 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: .00100000005 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: .00100000005 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left cmd 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: .00100000005 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: .00100000005 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: .100000001 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: .100000001 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: .100000001 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: .189999998 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: .189999998 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: .00100000005 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: .00100000005 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: .00100000005 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: .00100000005 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: .00100000005 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: .00100000005 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: .00100000005 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshAreas: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_VelocityIterations: 8 9 | m_PositionIterations: 3 10 | m_VelocityThreshold: 1 11 | m_MaxLinearCorrection: .200000003 12 | m_MaxAngularCorrection: 8 13 | m_MaxTranslationSpeed: 100 14 | m_MaxRotationSpeed: 360 15 | m_MinPenetrationForPenalty: .00999999978 16 | m_BaumgarteScale: .200000003 17 | m_BaumgarteTimeOfImpactScale: .75 18 | m_TimeToSleep: .5 19 | m_LinearSleepTolerance: .00999999978 20 | m_AngularSleepTolerance: 2 21 | m_RaycastsHitTriggers: 1 22 | m_RaycastsStartInColliders: 1 23 | m_ChangeStopsCallbacks: 0 24 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 25 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | AndroidProfiler: 0 8 | defaultScreenOrientation: 4 9 | targetDevice: 2 10 | targetResolution: 0 11 | accelerometerFrequency: 60 12 | companyName: DefaultCompany 13 | productName: Metaballs2D 14 | defaultCursor: {fileID: 0} 15 | cursorHotspot: {x: 0, y: 0} 16 | m_ShowUnitySplashScreen: 0 17 | defaultScreenWidth: 1024 18 | defaultScreenHeight: 768 19 | defaultScreenWidthWeb: 960 20 | defaultScreenHeightWeb: 600 21 | m_RenderingPath: 1 22 | m_MobileRenderingPath: 1 23 | m_ActiveColorSpace: 0 24 | m_MTRendering: 1 25 | m_MobileMTRendering: 0 26 | m_Stereoscopic3D: 0 27 | iosShowActivityIndicatorOnLoading: -1 28 | androidShowActivityIndicatorOnLoading: -1 29 | iosAppInBackgroundBehavior: 0 30 | displayResolutionDialog: 1 31 | allowedAutorotateToPortrait: 1 32 | allowedAutorotateToPortraitUpsideDown: 1 33 | allowedAutorotateToLandscapeRight: 1 34 | allowedAutorotateToLandscapeLeft: 1 35 | useOSAutorotation: 1 36 | use32BitDisplayBuffer: 1 37 | disableDepthAndStencilBuffers: 0 38 | defaultIsFullScreen: 1 39 | defaultIsNativeResolution: 1 40 | runInBackground: 0 41 | captureSingleScreen: 0 42 | Override IPod Music: 0 43 | Prepare IOS For Recording: 0 44 | submitAnalytics: 1 45 | usePlayerLog: 1 46 | bakeCollisionMeshes: 0 47 | forceSingleInstance: 0 48 | resizableWindow: 0 49 | useMacAppStoreValidation: 0 50 | gpuSkinning: 0 51 | xboxPIXTextureCapture: 0 52 | xboxEnableAvatar: 0 53 | xboxEnableKinect: 0 54 | xboxEnableKinectAutoTracking: 0 55 | xboxEnableFitness: 0 56 | visibleInBackground: 0 57 | macFullscreenMode: 2 58 | d3d9FullscreenMode: 1 59 | d3d11FullscreenMode: 1 60 | xboxSpeechDB: 0 61 | xboxEnableHeadOrientation: 0 62 | xboxEnableGuest: 0 63 | xboxOneResolution: 0 64 | ps3SplashScreen: {fileID: 0} 65 | videoMemoryForVertexBuffers: 0 66 | psp2PowerMode: 0 67 | psp2AcquireBGM: 1 68 | m_SupportedAspectRatios: 69 | 4:3: 1 70 | 5:4: 1 71 | 16:10: 1 72 | 16:9: 1 73 | Others: 1 74 | bundleIdentifier: 75 | bundleVersion: 1.0 76 | preloadedAssets: [] 77 | metroEnableIndependentInputSource: 0 78 | metroEnableLowLatencyPresentationAPI: 0 79 | xboxOneDisableKinectGpuReservation: 0 80 | virtualRealitySupported: 0 81 | productGUID: 84c934eb66a2d4f12988cdf2f5d85106 82 | AndroidBundleVersionCode: 1 83 | AndroidMinSdkVersion: 9 84 | AndroidPreferredInstallLocation: 1 85 | aotOptions: 86 | apiCompatibilityLevel: 2 87 | iPhoneStrippingLevel: 3 88 | iPhoneScriptCallOptimization: 0 89 | ForceInternetPermission: 0 90 | ForceSDCardPermission: 0 91 | CreateWallpaper: 0 92 | APKExpansionFiles: 0 93 | preloadShaders: 0 94 | StripUnusedMeshComponents: 0 95 | iPhoneSdkVersion: 988 96 | iPhoneTargetOSVersion: 22 97 | uIPrerenderedIcon: 0 98 | uIRequiresPersistentWiFi: 0 99 | uIStatusBarHidden: 1 100 | uIExitOnSuspend: 0 101 | uIStatusBarStyle: 0 102 | iPhoneSplashScreen: {fileID: 0} 103 | iPhoneHighResSplashScreen: {fileID: 0} 104 | iPhoneTallHighResSplashScreen: {fileID: 0} 105 | iPhone47inSplashScreen: {fileID: 0} 106 | iPhone55inPortraitSplashScreen: {fileID: 0} 107 | iPhone55inLandscapeSplashScreen: {fileID: 0} 108 | iPadPortraitSplashScreen: {fileID: 0} 109 | iPadHighResPortraitSplashScreen: {fileID: 0} 110 | iPadLandscapeSplashScreen: {fileID: 0} 111 | iPadHighResLandscapeSplashScreen: {fileID: 0} 112 | iOSLaunchScreenType: 0 113 | iOSLaunchScreenPortrait: {fileID: 0} 114 | iOSLaunchScreenLandscape: {fileID: 0} 115 | iOSLaunchScreenBackgroundColor: 116 | serializedVersion: 2 117 | rgba: 0 118 | iOSLaunchScreenFillPct: 100 119 | iOSLaunchScreenSize: 100 120 | iOSLaunchScreenCustomXibPath: 121 | AndroidTargetDevice: 0 122 | AndroidSplashScreenScale: 0 123 | androidSplashScreen: {fileID: 0} 124 | AndroidKeystoreName: 125 | AndroidKeyaliasName: 126 | AndroidTVCompatibility: 1 127 | AndroidIsGame: 1 128 | androidEnableBanner: 1 129 | m_AndroidBanners: 130 | - width: 320 131 | height: 180 132 | banner: {fileID: 0} 133 | androidGamepadSupportLevel: 0 134 | resolutionDialogBanner: {fileID: 0} 135 | m_BuildTargetIcons: 136 | - m_BuildTarget: 137 | m_Icons: 138 | - m_Icon: {fileID: 0} 139 | m_Size: 128 140 | m_BuildTargetBatching: 141 | - m_BuildTarget: WebGL 142 | m_StaticBatching: 0 143 | m_DynamicBatching: 0 144 | m_BuildTargetGraphicsAPIs: [] 145 | webPlayerTemplate: APPLICATION:Default 146 | m_TemplateCustomTags: {} 147 | actionOnDotNetUnhandledException: 1 148 | enableInternalProfiler: 0 149 | logObjCUncaughtExceptions: 1 150 | enableCrashReportAPI: 0 151 | locationUsageDescription: 152 | XboxTitleId: 153 | XboxImageXexPath: 154 | XboxSpaPath: 155 | XboxGenerateSpa: 0 156 | XboxDeployKinectResources: 0 157 | XboxSplashScreen: {fileID: 0} 158 | xboxEnableSpeech: 0 159 | xboxAdditionalTitleMemorySize: 0 160 | xboxDeployKinectHeadOrientation: 0 161 | xboxDeployKinectHeadPosition: 0 162 | ps3TitleConfigPath: 163 | ps3DLCConfigPath: 164 | ps3ThumbnailPath: 165 | ps3BackgroundPath: 166 | ps3SoundPath: 167 | ps3NPAgeRating: 12 168 | ps3TrophyCommId: 169 | ps3NpCommunicationPassphrase: 170 | ps3TrophyPackagePath: 171 | ps3BootCheckMaxSaveGameSizeKB: 128 172 | ps3TrophyCommSig: 173 | ps3SaveGameSlots: 1 174 | ps3TrialMode: 0 175 | ps3VideoMemoryForAudio: 0 176 | ps3EnableVerboseMemoryStats: 0 177 | ps3UseSPUForUmbra: 0 178 | ps3EnableMoveSupport: 1 179 | ps3DisableDolbyEncoding: 0 180 | ps4NPAgeRating: 12 181 | ps4NPTitleSecret: 182 | ps4NPTrophyPackPath: 183 | ps4ParentalLevel: 1 184 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 185 | ps4Category: 0 186 | ps4MasterVersion: 01.00 187 | ps4AppVersion: 01.00 188 | ps4AppType: 0 189 | ps4ParamSfxPath: 190 | ps4VideoOutPixelFormat: 0 191 | ps4VideoOutResolution: 4 192 | ps4PronunciationXMLPath: 193 | ps4PronunciationSIGPath: 194 | ps4BackgroundImagePath: 195 | ps4StartupImagePath: 196 | ps4SaveDataImagePath: 197 | ps4BGMPath: 198 | ps4ShareFilePath: 199 | ps4NPtitleDatPath: 200 | ps4RemotePlayKeyAssignment: -1 201 | ps4EnterButtonAssignment: 1 202 | ps4ApplicationParam1: 0 203 | ps4ApplicationParam2: 0 204 | ps4ApplicationParam3: 0 205 | ps4ApplicationParam4: 0 206 | ps4GarlicHeapSize: 2048 207 | ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE 208 | ps4pnSessions: 1 209 | ps4pnPresence: 1 210 | ps4pnFriends: 1 211 | ps4pnGameCustomData: 1 212 | playerPrefsSupport: 0 213 | monoEnv: 214 | psp2Splashimage: {fileID: 0} 215 | psp2NPTrophyPackPath: 216 | psp2NPSupportGBMorGJP: 0 217 | psp2NPAgeRating: 12 218 | psp2NPTitleDatPath: 219 | psp2NPCommsID: 220 | psp2NPCommunicationsID: 221 | psp2NPCommsPassphrase: 222 | psp2NPCommsSig: 223 | psp2ParamSfxPath: 224 | psp2ManualPath: 225 | psp2LiveAreaGatePath: 226 | psp2LiveAreaBackroundPath: 227 | psp2LiveAreaPath: 228 | psp2LiveAreaTrialPath: 229 | psp2PatchChangeInfoPath: 230 | psp2PatchOriginalPackage: 231 | psp2PackagePassword: WRK5RhRXdCdG5nG5azdNMK66MuCV6GXi 232 | psp2KeystoneFile: 233 | psp2MemoryExpansionMode: 0 234 | psp2DRMType: 0 235 | psp2StorageType: 0 236 | psp2MediaCapacity: 0 237 | psp2DLCConfigPath: 238 | psp2ThumbnailPath: 239 | psp2BackgroundPath: 240 | psp2SoundPath: 241 | psp2TrophyCommId: 242 | psp2TrophyPackagePath: 243 | psp2PackagedResourcesPath: 244 | psp2SaveDataQuota: 10240 245 | psp2ParentalLevel: 1 246 | psp2ShortTitle: Not Set 247 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 248 | psp2Category: 0 249 | psp2MasterVersion: 01.00 250 | psp2AppVersion: 01.00 251 | psp2TVBootMode: 0 252 | psp2EnterButtonAssignment: 2 253 | psp2TVDisableEmu: 0 254 | psp2AllowTwitterDialog: 1 255 | psp2Upgradable: 0 256 | psp2HealthWarning: 0 257 | psp2UseLibLocation: 0 258 | psp2InfoBarOnStartup: 0 259 | psp2InfoBarColor: 0 260 | psmSplashimage: {fileID: 0} 261 | spritePackerPolicy: 262 | scriptingDefineSymbols: {} 263 | metroPackageName: MetaballsTest 264 | metroPackageLogo: 265 | metroPackageLogo140: 266 | metroPackageLogo180: 267 | metroPackageLogo240: 268 | metroPackageVersion: 269 | metroCertificatePath: 270 | metroCertificatePassword: 271 | metroCertificateSubject: 272 | metroCertificateIssuer: 273 | metroCertificateNotAfter: 0000000000000000 274 | metroApplicationDescription: MetaballsTest 275 | metroStoreTileLogo80: 276 | metroStoreTileLogo: 277 | metroStoreTileLogo140: 278 | metroStoreTileLogo180: 279 | metroStoreTileWideLogo80: 280 | metroStoreTileWideLogo: 281 | metroStoreTileWideLogo140: 282 | metroStoreTileWideLogo180: 283 | metroStoreTileSmallLogo80: 284 | metroStoreTileSmallLogo: 285 | metroStoreTileSmallLogo140: 286 | metroStoreTileSmallLogo180: 287 | metroStoreSmallTile80: 288 | metroStoreSmallTile: 289 | metroStoreSmallTile140: 290 | metroStoreSmallTile180: 291 | metroStoreLargeTile80: 292 | metroStoreLargeTile: 293 | metroStoreLargeTile140: 294 | metroStoreLargeTile180: 295 | metroStoreSplashScreenImage: 296 | metroStoreSplashScreenImage140: 297 | metroStoreSplashScreenImage180: 298 | metroPhoneAppIcon: 299 | metroPhoneAppIcon140: 300 | metroPhoneAppIcon240: 301 | metroPhoneSmallTile: 302 | metroPhoneSmallTile140: 303 | metroPhoneSmallTile240: 304 | metroPhoneMediumTile: 305 | metroPhoneMediumTile140: 306 | metroPhoneMediumTile240: 307 | metroPhoneWideTile: 308 | metroPhoneWideTile140: 309 | metroPhoneWideTile240: 310 | metroPhoneSplashScreenImage: 311 | metroPhoneSplashScreenImage140: 312 | metroPhoneSplashScreenImage240: 313 | metroTileShortName: 314 | metroCommandLineArgsFile: 315 | metroTileShowName: 0 316 | metroMediumTileShowName: 0 317 | metroLargeTileShowName: 0 318 | metroWideTileShowName: 0 319 | metroDefaultTileSize: 1 320 | metroTileForegroundText: 1 321 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 322 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 323 | metroSplashScreenUseBackgroundColor: 0 324 | platformCapabilities: {} 325 | metroFTAName: 326 | metroFTAFileTypes: [] 327 | metroProtocolName: 328 | metroCompilationOverrides: 1 329 | blackberryDeviceAddress: 330 | blackberryDevicePassword: 331 | blackberryTokenPath: 332 | blackberryTokenExires: 333 | blackberryTokenAuthor: 334 | blackberryTokenAuthorId: 335 | blackberryCskPassword: 336 | blackberrySaveLogPath: 337 | blackberrySharedPermissions: 0 338 | blackberryCameraPermissions: 0 339 | blackberryGPSPermissions: 0 340 | blackberryDeviceIDPermissions: 0 341 | blackberryMicrophonePermissions: 0 342 | blackberryGamepadSupport: 0 343 | blackberryBuildId: 0 344 | blackberryLandscapeSplashScreen: {fileID: 0} 345 | blackberryPortraitSplashScreen: {fileID: 0} 346 | blackberrySquareSplashScreen: {fileID: 0} 347 | tizenProductDescription: 348 | tizenProductURL: 349 | tizenSigningProfileName: 350 | tizenGPSPermissions: 0 351 | tizenMicrophonePermissions: 0 352 | stvDeviceAddress: 353 | stvProductDescription: 354 | stvProductAuthor: 355 | stvProductAuthorEmail: 356 | stvProductLink: 357 | stvProductCategory: 0 358 | XboxOneProductId: 359 | XboxOneUpdateKey: 360 | XboxOneSandboxId: 361 | XboxOneContentId: 362 | XboxOneTitleId: 363 | XboxOneSCId: 364 | XboxOneGameOsOverridePath: 365 | XboxOnePackagingOverridePath: 366 | XboxOneAppManifestOverridePath: 367 | XboxOnePackageEncryption: 0 368 | XboxOnePackageUpdateGranularity: 2 369 | XboxOneDescription: 370 | XboxOneIsContentPackage: 0 371 | XboxOneEnableGPUVariability: 0 372 | XboxOneSockets: {} 373 | XboxOneSplashScreen: {fileID: 0} 374 | XboxOneAllowedProductIds: [] 375 | XboxOnePersistentLocalStorageSize: 0 376 | intPropertyNames: 377 | - WebGL::ScriptingBackend 378 | - WebGL::audioCompressionFormat 379 | - WebGL::exceptionSupport 380 | - WebGL::memorySize 381 | - iOS::Architecture 382 | - iOS::ScriptingBackend 383 | WebGL::ScriptingBackend: 1 384 | WebGL::audioCompressionFormat: 4 385 | WebGL::exceptionSupport: 0 386 | WebGL::memorySize: 128 387 | iOS::Architecture: 0 388 | iOS::ScriptingBackend: 0 389 | boolPropertyNames: 390 | - WebGL::analyzeBuildSize 391 | - WebGL::dataCaching 392 | - WebGL::useEmbeddedResources 393 | - XboxOne::enus 394 | WebGL::analyzeBuildSize: 0 395 | WebGL::dataCaching: 0 396 | WebGL::useEmbeddedResources: 0 397 | XboxOne::enus: 1 398 | stringPropertyNames: 399 | - WebGL::emscriptenArgs 400 | - WebGL::template 401 | WebGL::emscriptenArgs: 402 | WebGL::template: APPLICATION:Minimal 403 | firstStreamedSceneWithResources: 0 404 | cloudProjectId: 405 | projectId: 406 | projectName: 407 | organizationId: 408 | cloudEnabled: 0 409 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.1.1f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Good 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 40 17 | shadowCascade2Split: .333333343 18 | shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} 19 | blendWeights: 1 20 | textureQuality: 0 21 | anisotropicTextures: 1 22 | antiAliasing: 2 23 | softParticles: 0 24 | softVegetation: 1 25 | realtimeReflectionProbes: 0 26 | billboardsFaceCameraPosition: 1 27 | vSyncCount: 1 28 | lodBias: 1 29 | maximumLODLevel: 0 30 | particleRaycastBudget: 256 31 | excludedTargetPlatforms: [] 32 | m_PerPlatformDefaultQuality: 33 | Android: 2 34 | BlackBerry: 2 35 | GLES Emulation: 5 36 | PS3: 5 37 | PS4: 5 38 | PSM: 5 39 | PSP2: 5 40 | Samsung TV: 2 41 | Standalone: 5 42 | Tizen: 2 43 | WP8: 5 44 | Web: 5 45 | WebGL: 3 46 | Windows Store Apps: 5 47 | XBOX360: 5 48 | XboxOne: 5 49 | iPhone: 2 50 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity-Metaballs-2D 2 | 3 | Generates and renders 2D Metaballs, uses marching squares to create a procedural mesh. 4 | Based on: http://jamie-wong.com/2014/08/19/metaballs-and-marching-squares/ 5 | 6 | _Preview_: http://lukeholland.me/builds/Metaballs2D/index.html 7 | 8 | _Author_: Luke Holland (@luke161) 9 | http://lukeholland.me/ 10 | 11 | ### Usage 12 | 13 | Built with Unity 5, open in Unity and load [Scenes/SceneMain](master/Assets/Scenes/SceneMain.unity) 14 | --------------------------------------------------------------------------------