├── Assets ├── .gitignore ├── .DS_Store ├── Fonts │ ├── Potra.ttf │ └── Potra.ttf.meta ├── 3D Models │ ├── .DS_Store │ └── spaceshipMesh.fbx ├── Plugins │ ├── GitHub │ │ ├── Editor │ │ │ ├── credits.txt │ │ │ ├── libsfw.so │ │ │ ├── libsfw.bundle │ │ │ ├── QuickGuide.pdf │ │ │ ├── sfw.net.dll │ │ │ ├── GitHub.Api.dll │ │ │ ├── GitHub.Unity.dll │ │ │ ├── Mono.Posix.dll │ │ │ ├── big-logo@2x.png │ │ │ ├── x64 │ │ │ │ ├── sfw_x64.dll │ │ │ │ ├── pthreadVC2.dll │ │ │ │ ├── sfw_x64.dll.meta │ │ │ │ └── pthreadVC2.dll.meta │ │ │ ├── x86 │ │ │ │ ├── sfw_x86.dll │ │ │ │ ├── pthreadVC2.dll │ │ │ │ ├── pthreadVC2.dll.meta │ │ │ │ └── sfw_x86.dll.meta │ │ │ ├── AsyncBridge.Net35.dll │ │ │ ├── GitHub.Api.45.dll │ │ │ ├── GitHub.Logging.dll │ │ │ ├── GitHub.Unity.45.dll │ │ │ ├── GitHub.UnityShim.dll │ │ │ ├── System.Threading.dll │ │ │ ├── ReadOnlyCollectionsInterfaces.dll │ │ │ ├── QuickGuide.pdf.meta │ │ │ ├── credits.txt.meta │ │ │ ├── eula.txt.meta │ │ │ ├── x64.meta │ │ │ ├── x86.meta │ │ │ ├── UnityAPIWrapper.cs.meta │ │ │ ├── UnityAPIWrapper.cs │ │ │ ├── GitHub.UnityShim.dll.meta │ │ │ ├── GitHub.Api.45.dll.meta │ │ │ ├── GitHub.Unity.45.dll.meta │ │ │ ├── sfw.net.dll.meta │ │ │ ├── GitHub.Api.dll.meta │ │ │ ├── GitHub.Logging.dll.meta │ │ │ ├── GitHub.Unity.dll.meta │ │ │ ├── Mono.Posix.dll.meta │ │ │ ├── AsyncBridge.Net35.dll.meta │ │ │ ├── System.Threading.dll.meta │ │ │ ├── ReadOnlyCollectionsInterfaces.dll.meta │ │ │ ├── ExtensionLoader.cs.meta │ │ │ ├── libsfw.so.meta │ │ │ ├── libsfw.bundle.meta │ │ │ ├── big-logo@2x.png.meta │ │ │ ├── ExtensionLoader.cs │ │ │ └── eula.txt │ │ └── Editor.meta │ └── GitHub.meta ├── Scenes │ ├── MainScene │ │ ├── ReflectionProbe-0.exr │ │ └── ReflectionProbe-0.exr.meta │ ├── CreatorScene │ │ ├── ReflectionProbe-0.exr │ │ └── ReflectionProbe-0.exr.meta │ ├── MainScene.unity.meta │ ├── CreatorScene.unity.meta │ ├── MainScene.meta │ └── CreatorScene.meta ├── Textures │ ├── verloop 1.jpg │ ├── SpaceShipAO.jpg │ ├── SpaceShipDiff.jpg │ ├── SpaceShipEmit.png │ ├── SpaceShipMetal&Smooth.png │ ├── SpaceShip.mat.meta │ ├── rear light.mat.meta │ ├── rear light.mat │ ├── SpaceShipAO.jpg.meta │ ├── SpaceShipDiff.jpg.meta │ ├── SpaceShipEmit.png.meta │ ├── SpaceShipMetal&Smooth.png.meta │ ├── SpaceShip.mat │ └── verloop 1.jpg.meta ├── Prefabs │ ├── Player.prefab.meta │ ├── CollisionPoint.prefab.meta │ ├── Standard Scene.prefab.meta │ └── CollisionPoint.prefab ├── Fonts.meta ├── Prefabs.meta ├── Scenes.meta ├── Shaders.meta ├── scripts.meta ├── 3D Models.meta ├── Animations.meta ├── Materials.meta ├── Textures.meta ├── Shaders │ ├── DistanceFunctions.cginc.meta │ ├── ForceField.shader.meta │ ├── Raymarch.shader.meta │ ├── RaymarchCam.shader.meta │ ├── ForceField.shader │ └── Raymarch.shader ├── Materials │ ├── Raymarch.mat.meta │ ├── ForceField.mat.meta │ ├── PhysicsMatForceField.physicMaterial.meta │ ├── PhysicsMatForceField.physicMaterial │ ├── Raymarch.mat │ └── ForceField.mat ├── Animations │ ├── PlayerFly.anim.meta │ ├── PlayerStart.anim.meta │ ├── PlayerStop.anim.meta │ ├── playerIdle.anim.meta │ ├── Player.controller.meta │ └── Player.controller ├── Plugins.meta └── scripts │ ├── RaymarchCam.cs.meta │ ├── FractalCreator.cs.meta │ ├── PlayerController.cs.meta │ ├── SceneViewFilter.cs.meta │ ├── DistanceFunctions.cs.meta │ ├── FractalRandomizer.cs.meta │ ├── CollisionPlaneController.cs.meta │ ├── NormalFractalController.cs.meta │ ├── PlayerRayMarchCollider.cs.meta │ ├── CollisionPlaneController.cs │ ├── NormalFractalController.cs │ ├── SceneViewFilter.cs │ ├── PlayerController.cs │ ├── FractalRandomizer.cs │ ├── PlayerRayMarchCollider.cs │ ├── FractalCreator.cs │ ├── RaymarchCam.cs │ └── DistanceFunctions.cs ├── .DS_Store ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── XRSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorBuildSettings.asset ├── UnityConnectSettings.asset ├── EditorSettings.asset ├── DynamicsManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── QualitySettings.asset └── InputManager.asset ├── README.md ├── .gitignore ├── LICENSE ├── Packages └── manifest.json └── .gitattributes /Assets/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/.DS_Store -------------------------------------------------------------------------------- /Assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/.DS_Store -------------------------------------------------------------------------------- /Assets/Fonts/Potra.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/Fonts/Potra.ttf -------------------------------------------------------------------------------- /Assets/3D Models/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/3D Models/.DS_Store -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.3.0f5 2 | m_EditorVersionWithRevision: 2019.3.0f5 (44796c9d3c2c) 3 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/credits.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/Plugins/GitHub/Editor/credits.txt -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/libsfw.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/Plugins/GitHub/Editor/libsfw.so -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/libsfw.bundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/Plugins/GitHub/Editor/libsfw.bundle -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/QuickGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/Plugins/GitHub/Editor/QuickGuide.pdf -------------------------------------------------------------------------------- /Assets/Scenes/MainScene/ReflectionProbe-0.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/Scenes/MainScene/ReflectionProbe-0.exr -------------------------------------------------------------------------------- /Assets/Scenes/CreatorScene/ReflectionProbe-0.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jellevermandere/Fractal-Explorer/HEAD/Assets/Scenes/CreatorScene/ReflectionProbe-0.exr -------------------------------------------------------------------------------- /Assets/Textures/verloop 1.jpg: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:08541bbb30cc4b08b9aeb8c1bdb749bab9dadcb4fe6a2edd034b4bb38413e612 3 | size 179533 4 | -------------------------------------------------------------------------------- /Assets/3D Models/spaceshipMesh.fbx: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:08a076803683357877cf6058c3a0334c83c351d92e26c9e087b9f10490e44cf2 3 | size 862524 4 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipAO.jpg: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:359b76a5ad59261c943b110f172a16f4772c8a4063c4ef94505d3577da2d5b2d 3 | size 385382 4 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipDiff.jpg: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:81f1cd7ba208eec62efa5c6c8c6726047a88002154024f7e3516c330bdfa17db 3 | size 482407 4 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipEmit.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ef0028096f9551c96f8e592e8182139217d82fe0fe4967c45d094b2fe67ef21a 3 | size 58380 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/sfw.net.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:21feeaa73e42bf03e86525bc5e1b954f4b9a2f16eed58a87c69e576509231480 3 | size 7168 4 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Api.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0598ee39acaec9732f0a00bd20528f07855a5298c67f53957bc6ad258c42d815 3 | size 750080 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Unity.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:966ffe7a5f4de501e439b9441fd29d7ceba3b76970f105ed331a6b385674ab3d 3 | size 299520 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/Mono.Posix.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bda42c2c2c6d83a5c840d5262bfb1ae0e24e3c1778c96d5ea1ff96a1bb244f70 3 | size 184320 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/big-logo@2x.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e986d8a21f6f621e89885d0e4e28a9c6171e02f2c095fbeb075e22d9b0f40f74 3 | size 9961 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x64/sfw_x64.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4f8d586e00ddbe3cfa0cd2446bdd416a65e6c12ef31e7f451af14867b880c0dc 3 | size 182784 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x86/sfw_x86.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:843682e312df272a4222e2ba85f4feebfb0195524f101ef9f636f56ae0e0af21 3 | size 179200 4 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipMetal&Smooth.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3198cfcfa98f548c098713670144978756626bdd761b1cacd3fbdd1a4521dd4d 3 | size 3399596 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/AsyncBridge.Net35.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0f61d9c0550c3a1e36e6eaa9bebbc3b5ca701c4e960dc2a92746df792d392140 3 | size 26112 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Api.45.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1f88b65d56d7542c171548019eb408ae2b9ff10aa54657d71eddc2499384f856 3 | size 750592 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Logging.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e495cb21943c4ea67673c11db54e737d25fd2aa00ef1af37d1df7ccba026759b 3 | size 11776 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Unity.45.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4abacb70e20c2f22a43d9cff198f7709f6601f7e3ff4f0aeb6f0f3b9dd7d74ba 3 | size 299520 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.UnityShim.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:409891774be0755c72effe01a3f47157858ce19fe8cba7e68c913acf0671ed75 3 | size 5120 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/System.Threading.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:25a3ec89ffc468c53a44a90ae99c23e1bcff9e5901be74033b4ce794a3202395 3 | size 382464 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x64/pthreadVC2.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0e6af724609ef6846982ef717013426c359c455fff324e906d8d55c8bb88d16e 3 | size 82944 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x86/pthreadVC2.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bac4472990c1dc2f037019791bd18888e78a3ae86605f3aae86f812a4d7d4f60 3 | size 55808 4 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/ReadOnlyCollectionsInterfaces.dll: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:64803681966f009feaab1f02278ac2a38683fc99e88b4247d54d0534f1429b55 3 | size 5632 4 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Player.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 800cd3714844b414db8e641ba29b3672 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/MainScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Fonts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0254cc116b499419bb08f6eee1f53228 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdaa8e602bb074e00a02c8a515e182c5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/CollisionPoint.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e0074cbc72f24aee8086549af0cbf09 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Standard Scene.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 437cb8ace764a403ba2123e4b2c24c73 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcae9a5fed31540dc830ebda48deede0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/CreatorScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9be4d2a6794fd4184b05578d69977f3e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2518692f7b4f148e2981f96fb6711866 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f6239738f2754452a7e430fe9bcd1ac 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/3D Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d692cf270bcb4d7a9596840a430595c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc6d5c83429444ec5a950c89e7bd650a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87d8067e134a44a01899fadd803a0377 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bc082a3a996441f8ac0182d46b3444e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/MainScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d7e9d9611b414249bf6e6be88f86c1e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/DistanceFunctions.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f58ca8257db94bd7b487cde0325d89f 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/CreatorScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ef1104708785429bb2e223705107a62 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/Materials/Raymarch.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abf1f03cb0dfb4b53a5de739fbb48a8c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShip.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 059fe61c329904e9cbb41ead51d5497b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations/PlayerFly.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70b72e60880394521b50c7e15cbec698 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations/PlayerStart.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bef6b856f5474aec8480da7f8658261 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations/PlayerStop.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9161772e948d4f65b82c04b2d7932b1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations/playerIdle.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f9552f10193e4d7ca52fdfc663297a1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/ForceField.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cec72b88ce0a14a60b5393c556953398 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/QuickGuide.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d601ecb6855bb432bae2aa49d8fd82e8 3 | timeCreated: 1526676893 4 | licenseType: Store 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/credits.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0188ec438976e5849b40a2c1ce5f20f9 3 | timeCreated: 1491603973 4 | licenseType: Store 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/eula.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 136dc24f151211d438acee17aff4e934 3 | timeCreated: 1491603974 4 | licenseType: Store 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Textures/rear light.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43a7b709143e3497487470e4deb1c01f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animations/Player.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73a8fb530e3e54ecfa8d1bd83ea1fbe8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 720712be6e31c444f88f57bb85bf5fa5 3 | folderAsset: yes 4 | timeCreated: 1504268238 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18e096a98c2704c40a818dd1214cd179 3 | folderAsset: yes 4 | timeCreated: 1503666358 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/PhysicsMatForceField.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ae4c4c5d6003435c8aa2c642ea15548 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cad92998c5182496e8b989b406d9f156 3 | folderAsset: yes 4 | timeCreated: 1503666365 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0ded7adcc817ce489fec07977f16d13 3 | folderAsset: yes 4 | timeCreated: 1493304320 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99b48d4d4f6a66340ab06bd487d70a45 3 | folderAsset: yes 4 | timeCreated: 1493304320 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /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: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Shaders/ForceField.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1020d6d50e9d34ea699db97309db68d3 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Raymarch.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 916276786c76946e3b5d319e2b783f2d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/RaymarchCam.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cb0914c8f66e4be5872460812782cfd 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/scripts/RaymarchCam.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6abce305ab0594f1d90cd32192b3f15f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/FractalCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afd186d3bc98943b49acd21d4101eaac 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/PlayerController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 476ba2a9d83a6491aa008a4c8c5bf2fa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/SceneViewFilter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9115becfe0294ad383faf95b2c9274e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/DistanceFunctions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf8852ab938dc44e99417783976a9036 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/FractalRandomizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f63a59e14ac447d695b9af3a94efe98 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/CollisionPlaneController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 898c1345a5e894b31b7db8a7c3b7ca3a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/NormalFractalController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e050685bb31644ab1a76588a599425e2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/scripts/PlayerRayMarchCollider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8fd2fc98283d43ba8f6f5a9649a9b49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/UnityAPIWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 555cd6f54c03341b1970d950df1a5ee5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /Assets/Materials/PhysicsMatForceField.physicMaterial: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!134 &13400000 4 | PhysicMaterial: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: PhysicsMatForceField 10 | dynamicFriction: 0 11 | staticFriction: 0.3 12 | bounciness: 0.5 13 | frictionCombine: 0 14 | bounceCombine: 0 15 | -------------------------------------------------------------------------------- /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 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/UnityAPIWrapper.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using System.IO; 4 | using System; 5 | 6 | namespace GitHub.Unity 7 | { 8 | [InitializeOnLoad] 9 | public class UnityAPIWrapper : ScriptableSingleton 10 | { 11 | static UnityAPIWrapper() 12 | { 13 | #if UNITY_2018_2_OR_NEWER 14 | Editor.finishedDefaultHeaderGUI += editor => { 15 | UnityShim.Raise_Editor_finishedDefaultHeaderGUI(editor); 16 | }; 17 | #endif 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Assets/Fonts/Potra.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6ee0fd2806d8497782079ed6f43fe16 3 | TrueTypeFontImporter: 4 | externalObjects: {} 5 | serializedVersion: 4 6 | fontSize: 16 7 | forceTextureCase: -2 8 | characterSpacing: 0 9 | characterPadding: 1 10 | includeFontData: 1 11 | fontName: Potra 12 | fontNames: 13 | - Potra 14 | fallbackFontReferences: [] 15 | customCharacters: 16 | fontRenderingMode: 0 17 | ascentCalculationMode: 1 18 | useLegacyBoundsCalculation: 0 19 | shouldRoundAdvanceValue: 1 20 | userData: 21 | assetBundleName: 22 | assetBundleVariant: 23 | -------------------------------------------------------------------------------- /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 | - Goal 8 | - ColPlane 9 | - PlayerMesh 10 | - PlayerCam 11 | layers: 12 | - Default 13 | - TransparentFX 14 | - Ignore Raycast 15 | - 16 | - Water 17 | - UI 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | - 42 | - 43 | - 44 | m_SortingLayers: 45 | - name: Default 46 | uniqueID: 0 47 | locked: 0 48 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.UnityShim.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 863e1b9976c4e46d29bf83928b3a8ab2 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | isPreloaded: 0 9 | isOverridable: 0 10 | platformData: 11 | - first: 12 | Any: 13 | second: 14 | enabled: 0 15 | settings: {} 16 | - first: 17 | Editor: Editor 18 | second: 19 | enabled: 1 20 | settings: 21 | DefaultValueInitialized: true 22 | - first: 23 | Windows Store Apps: WindowsStoreApps 24 | second: 25 | enabled: 0 26 | settings: 27 | CPU: AnyCPU 28 | userData: 29 | assetBundleName: 30 | assetBundleVariant: 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fractal-Explorer 2 | A raymarcher with working unity physics and fractals 3 | 4 | ## Workings 5 | 6 | The raymarcher is created as both a shader, and a c# script. 7 | The shader creates the image the camera sees and the c# script is used to calculate the collisions with the player character. 8 | 9 | 10 | ## Explainer video: 11 | 12 | https://www.youtube.com/embed/0jwkZKDOzfc 13 | 14 | ## game download: 15 | https://jellever.itch.io/fractal-collector 16 | 17 | ## references: 18 | 19 | Distance function library : https://www.iquilezles.org/index.html , 20 | Initial inspiration : https://github.com/HackerPoet/MarbleMarcher , 21 | Raymarcher in Unity : https://www.youtube.com/playlist?list=PL3POsQzaCw53iK_EhOYR39h1J9Lvg-m-g 22 | 23 | This project is licensed under the terms of the MIT license. 24 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Api.45.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c743ae24ee231884887054d20ccdd0ab 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Unity.45.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68c7e4565cde54155bb78d8e935f1ddb 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/sfw.net.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9fc9b08ecd899944adf9860b4abd6b6 3 | timeCreated: 1491392718 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Api.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c743ae24ee231884887054d20ccdd0ae 3 | timeCreated: 1491391261 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Logging.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15ca2bebf173f2d4484686a03a45b56d 3 | timeCreated: 1491391259 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/GitHub.Unity.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68c7e4565cde54155bb78d8e935f1dd4 3 | timeCreated: 1527097377 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/Mono.Posix.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddb8611e748af425a82a497ac5a98c0c 3 | timeCreated: 1503427590 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/AsyncBridge.Net35.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d516f2a1bec6a9645a084ef8c9237132 3 | timeCreated: 1491391262 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/System.Threading.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 790749ba7e4b18141953e39cb13f1b79 3 | timeCreated: 1491392717 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | [Ll]ogs/ 7 | 8 | # Uncomment this line if you wish to ignore the asset store tools plugin 9 | # [Aa]ssets/AssetStoreTools* 10 | 11 | # Visual Studio cache directory 12 | .vs/ 13 | 14 | # Gradle cache directory 15 | .gradle/ 16 | 17 | # Autogenerated VS/MD/Consulo solution and project files 18 | ExportedObj/ 19 | .consulo/ 20 | *.csproj 21 | *.unityproj 22 | *.sln 23 | *.suo 24 | *.tmp 25 | *.user 26 | *.userprefs 27 | *.pidb 28 | *.booproj 29 | *.svd 30 | *.pdb 31 | *.mdb 32 | *.opendb 33 | *.VC.db 34 | 35 | # Unity3D generated meta files 36 | *.pidb.meta 37 | *.pdb.meta 38 | *.mdb.meta 39 | 40 | # Unity3D generated file on crash reports 41 | sysinfo.txt 42 | 43 | # Builds 44 | *.apk 45 | *.unitypackage 46 | 47 | # Crashlytics generated file 48 | crashlytics-build.properties 49 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/ReadOnlyCollectionsInterfaces.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48c22d5d7479fcb49ab3be0cdd2ccec0 3 | timeCreated: 1491391260 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/ExtensionLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dae2ecee8a704dd59797e26554ff8606 3 | timeCreated: 1534504082 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Windows Store Apps: WindowsStoreApps 28 | second: 29 | enabled: 0 30 | settings: 31 | CPU: AnyCPU 32 | userData: 33 | assetBundleName: 34 | assetBundleVariant: 35 | -------------------------------------------------------------------------------- /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/StartScene.unity 10 | guid: 94c884c9bf9dc49b7b3f05a511572b44 11 | - enabled: 1 12 | path: Assets/Scenes/Level1.unity 13 | guid: 4ca46e7896ede42da88f8fcb057632a3 14 | - enabled: 1 15 | path: Assets/Scenes/Level2.unity 16 | guid: 4f9ec7876364e4f518859109b8a427e7 17 | - enabled: 1 18 | path: Assets/Scenes/Level3.unity 19 | guid: b8df2316d2e814ab4b43720bebe02d95 20 | - enabled: 1 21 | path: Assets/Scenes/MainScene.unity 22 | guid: 9fc0d4010bbf28b4594072e72b8655ab 23 | - enabled: 1 24 | path: Assets/Scenes/CreatorScene.unity 25 | guid: 9be4d2a6794fd4184b05578d69977f3e 26 | - enabled: 1 27 | path: Assets/Scenes/EndScene.unity 28 | guid: 808c7bf07339d4d62932b0204714c88d 29 | m_configObjects: {} 30 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/scripts/CollisionPlaneController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CollisionPlaneController : MonoBehaviour 6 | { 7 | public float maxDistance = 20.0f; 8 | public float lifeTime; 9 | private Transform player; 10 | private float timeAlive; 11 | 12 | // Start is called before the first frame update 13 | void Start() 14 | { 15 | player = GameObject.FindGameObjectWithTag("Player").transform; 16 | transform.LookAt(2 * transform.position - player.position); // rotates the plane towards the player 17 | timeAlive = 0; 18 | } 19 | 20 | // Update is called once per frame 21 | void Update() 22 | { 23 | timeAlive += Time.deltaTime; 24 | if (DistanceToPlayer()> maxDistance || timeAlive > lifeTime) 25 | { 26 | Destroy(gameObject); // destroy after a certain time 27 | } 28 | } 29 | 30 | float DistanceToPlayer() 31 | { 32 | return Vector3.Distance(player.position, transform.position); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Jelle Vermandere 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /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 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 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 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.cinemachine": "2.5.0", 4 | "com.unity.collab-proxy": "1.2.16", 5 | "com.unity.ide.rider": "1.1.4", 6 | "com.unity.ide.vscode": "1.1.3", 7 | "com.unity.test-framework": "1.1.9", 8 | "com.unity.textmeshpro": "2.0.1", 9 | "com.unity.timeline": "1.2.9", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.modules.ai": "1.0.0", 12 | "com.unity.modules.androidjni": "1.0.0", 13 | "com.unity.modules.animation": "1.0.0", 14 | "com.unity.modules.assetbundle": "1.0.0", 15 | "com.unity.modules.audio": "1.0.0", 16 | "com.unity.modules.cloth": "1.0.0", 17 | "com.unity.modules.director": "1.0.0", 18 | "com.unity.modules.imageconversion": "1.0.0", 19 | "com.unity.modules.imgui": "1.0.0", 20 | "com.unity.modules.jsonserialize": "1.0.0", 21 | "com.unity.modules.particlesystem": "1.0.0", 22 | "com.unity.modules.physics": "1.0.0", 23 | "com.unity.modules.physics2d": "1.0.0", 24 | "com.unity.modules.screencapture": "1.0.0", 25 | "com.unity.modules.terrain": "1.0.0", 26 | "com.unity.modules.terrainphysics": "1.0.0", 27 | "com.unity.modules.tilemap": "1.0.0", 28 | "com.unity.modules.ui": "1.0.0", 29 | "com.unity.modules.uielements": "1.0.0", 30 | "com.unity.modules.umbra": "1.0.0", 31 | "com.unity.modules.unityanalytics": "1.0.0", 32 | "com.unity.modules.unitywebrequest": "1.0.0", 33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 34 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 35 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 36 | "com.unity.modules.unitywebrequestwww": "1.0.0", 37 | "com.unity.modules.vehicles": "1.0.0", 38 | "com.unity.modules.video": "1.0.0", 39 | "com.unity.modules.vr": "1.0.0", 40 | "com.unity.modules.wind": "1.0.0", 41 | "com.unity.modules.xr": "1.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /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 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Assets/Materials/Raymarch.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Raymarch 11 | m_Shader: {fileID: 4800000, guid: 6cb0914c8f66e4be5872460812782cfd, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Textures/rear light.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: rear light 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 77 | - _EmissionColor: {r: 2, g: 0.6039216, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/scripts/NormalFractalController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class NormalFractalController : MonoBehaviour 6 | { 7 | public GameObject playerCam; 8 | public float AnimSpeed; 9 | 10 | private RaymarchCam camScript; 11 | private float randColor; 12 | //private Animation anim; 13 | 14 | 15 | // Start is called before the first frame update 16 | void Start() 17 | { 18 | camScript = GetComponent(); 19 | playerCam.SetActive(false); 20 | 21 | 22 | SetRandColor(); 23 | /* 24 | * // plays specific animation of that level 25 | * anim = GetComponent(); 26 | * anim.Play("Level"+SceneManager.GetActiveScene().buildIndex.ToString()); 27 | */ 28 | 29 | Invoke("ActivatePlay", 1 / AnimSpeed); 30 | } 31 | 32 | // Update is called once per frame 33 | void Update() 34 | { 35 | 36 | } 37 | 38 | void ActivatePlay() 39 | { 40 | playerCam.SetActive(true); 41 | } 42 | 43 | void SetRandColor() 44 | { 45 | randColor = Random.Range(0.0f, 1.0f); 46 | camScript._mainColor = Color.HSVToRGB(randColor, 0.95f, 0.9f); 47 | if (randColor > 2f / 3f) 48 | { 49 | camScript._secColor = Color.HSVToRGB(randColor - 1f / 3f, 0.9f, 0.9f); 50 | camScript._skyColor = Color.HSVToRGB(randColor - 2f / 3f, 0.3f, 0.95f); 51 | Camera.main.backgroundColor = Color.HSVToRGB(randColor - 2f / 3f, 0.2f, 0.95f); 52 | } 53 | else if (randColor < 1f / 3f) 54 | { 55 | camScript._secColor = Color.HSVToRGB(randColor + 2f / 3f, 0.9f, 0.9f); 56 | camScript._skyColor = Color.HSVToRGB(randColor + 1f / 3f, 0.3f, 0.95f); 57 | Camera.main.backgroundColor = Color.HSVToRGB(randColor + 1f / 3f, 0.2f, 0.95f); 58 | } 59 | else 60 | { 61 | camScript._secColor = Color.HSVToRGB(randColor - 1f / 3f, 0.9f, 0.9f); 62 | camScript._skyColor = Color.HSVToRGB(randColor + 1f / 3f, 0.3f, 0.95f); 63 | Camera.main.backgroundColor = Color.HSVToRGB(randColor + 1f / 3f, 0.2f, 0.95f); 64 | } 65 | RenderSettings.ambientLight = Camera.main.backgroundColor; 66 | RenderSettings.fogColor = camScript._skyColor; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipAO.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 439c357651f7e488d98a3b84ed758f9f 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipDiff.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe03409c65e804a75b7da930a00305df 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipEmit.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b3387fd778434976a1390faaaa6e8cc 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/Scenes/MainScene/ReflectionProbe-0.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 874424043cb034076875955ee14044e8 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 1 29 | seamlessCubemap: 1 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: 0 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 2 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 100 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/Scenes/CreatorScene/ReflectionProbe-0.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e1ec7aa6d364423ead2fd3ae5fed8f6 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 1 29 | seamlessCubemap: 1 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: 0 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 2 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 100 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShipMetal&Smooth.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe819fff3e6b64821b5bfc8e9420ab26 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: [] 77 | physicsShape: [] 78 | bones: [] 79 | spriteID: 80 | internalID: 0 81 | vertices: [] 82 | indices: 83 | edges: [] 84 | weights: [] 85 | secondaryTextures: [] 86 | spritePackingTag: 87 | pSDRemoveMatte: 0 88 | pSDShowRemoveMatteOption: 0 89 | userData: 90 | assetBundleName: 91 | assetBundleVariant: 92 | -------------------------------------------------------------------------------- /Assets/scripts/SceneViewFilter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | #if UNITY_EDITOR 3 | using UnityEditor; 4 | #endif 5 | 6 | public class SceneViewFilter : MonoBehaviour 7 | { 8 | #if UNITY_EDITOR 9 | bool hasChanged = false; 10 | 11 | public virtual void OnValidate() 12 | { 13 | hasChanged = true; 14 | } 15 | 16 | static SceneViewFilter() 17 | { 18 | SceneView.duringSceneGui += CheckMe; 19 | } 20 | 21 | static void CheckMe(SceneView sv) 22 | { 23 | if (Event.current.type != EventType.Layout) 24 | return; 25 | if (!Camera.main) 26 | return; 27 | // Get a list of everything on the main camera that should be synced. 28 | SceneViewFilter[] cameraFilters = Camera.main.GetComponents(); 29 | SceneViewFilter[] sceneFilters = sv.camera.GetComponents(); 30 | 31 | // Let's see if the lists are different lengths or something like that. 32 | // If so, we simply destroy all scene filters and recreate from maincamera 33 | if (cameraFilters.Length != sceneFilters.Length) 34 | { 35 | Recreate(sv); 36 | return; 37 | } 38 | for (int i = 0; i < cameraFilters.Length; i++) 39 | { 40 | if (cameraFilters[i].GetType() != sceneFilters[i].GetType()) 41 | { 42 | Recreate(sv); 43 | return; 44 | } 45 | } 46 | 47 | // Ok, WHICH filters, or their order hasn't changed. 48 | // Let's copy all settings for any filter that has changed. 49 | for (int i = 0; i < cameraFilters.Length; i++) 50 | if (cameraFilters[i].hasChanged || sceneFilters[i].enabled != cameraFilters[i].enabled) 51 | { 52 | EditorUtility.CopySerialized(cameraFilters[i], sceneFilters[i]); 53 | cameraFilters[i].hasChanged = false; 54 | } 55 | } 56 | 57 | static void Recreate(SceneView sv) 58 | { 59 | SceneViewFilter filter; 60 | while (filter = sv.camera.GetComponent()) 61 | DestroyImmediate(filter); 62 | 63 | foreach (SceneViewFilter f in Camera.main.GetComponents()) 64 | { 65 | SceneViewFilter newFilter = sv.camera.gameObject.AddComponent(f.GetType()) as SceneViewFilter; 66 | EditorUtility.CopySerialized(f, newFilter); 67 | } 68 | } 69 | #endif 70 | } -------------------------------------------------------------------------------- /Assets/Materials/ForceField.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ForceField 11 | m_Shader: {fileID: 4800000, guid: 1020d6d50e9d34ea699db97309db68d3, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _IntersectionPower: 0 67 | - _Metallic: 0 68 | - _Mode: 0 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _RimPower: 0.867 72 | - _SmoothnessTextureChannel: 0 73 | - _SpecularHighlights: 1 74 | - _SrcBlend: 1 75 | - _UVSec: 0 76 | - _ZWrite: 1 77 | m_Colors: 78 | - _Color: {r: 1, g: 1, b: 1, a: 1} 79 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 80 | - _MainColor: {r: 0.5339979, g: 0.9056604, b: 0.8829166, a: 1} 81 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/libsfw.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21206c65839f84d0e9ae14bc1fdc68db 3 | timeCreated: 1503931807 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | '': Any 15 | second: 16 | enabled: 0 17 | settings: 18 | Exclude Editor: 0 19 | Exclude Linux: 1 20 | Exclude Linux64: 1 21 | Exclude LinuxUniversal: 1 22 | Exclude OSXIntel: 1 23 | Exclude OSXIntel64: 1 24 | Exclude OSXUniversal: 1 25 | Exclude Win: 1 26 | Exclude Win64: 1 27 | data: 28 | first: 29 | '': Editor 30 | second: 31 | enabled: 0 32 | settings: 33 | CPU: AnyCPU 34 | OS: Linux 35 | data: 36 | first: 37 | Any: 38 | second: 39 | enabled: 0 40 | settings: {} 41 | data: 42 | first: 43 | Editor: Editor 44 | second: 45 | enabled: 1 46 | settings: 47 | DefaultValueInitialized: true 48 | data: 49 | first: 50 | Facebook: Win 51 | second: 52 | enabled: 0 53 | settings: 54 | CPU: AnyCPU 55 | data: 56 | first: 57 | Facebook: Win64 58 | second: 59 | enabled: 0 60 | settings: 61 | CPU: AnyCPU 62 | data: 63 | first: 64 | Standalone: Linux 65 | second: 66 | enabled: 0 67 | settings: 68 | CPU: x86 69 | data: 70 | first: 71 | Standalone: Linux64 72 | second: 73 | enabled: 0 74 | settings: 75 | CPU: x86_64 76 | data: 77 | first: 78 | Standalone: OSXIntel 79 | second: 80 | enabled: 0 81 | settings: 82 | CPU: AnyCPU 83 | data: 84 | first: 85 | Standalone: OSXIntel64 86 | second: 87 | enabled: 0 88 | settings: 89 | CPU: AnyCPU 90 | data: 91 | first: 92 | Standalone: Win 93 | second: 94 | enabled: 0 95 | settings: 96 | CPU: AnyCPU 97 | data: 98 | first: 99 | Standalone: Win64 100 | second: 101 | enabled: 0 102 | settings: 103 | CPU: AnyCPU 104 | userData: 105 | assetBundleName: 106 | assetBundleVariant: 107 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/libsfw.bundle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 636d33ae594884e7d80b569f429d245d 3 | timeCreated: 1503667182 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | '': Any 15 | second: 16 | enabled: 0 17 | settings: 18 | Exclude Editor: 0 19 | Exclude Linux: 1 20 | Exclude Linux64: 1 21 | Exclude LinuxUniversal: 1 22 | Exclude OSXIntel: 1 23 | Exclude OSXIntel64: 1 24 | Exclude OSXUniversal: 1 25 | Exclude Win: 1 26 | Exclude Win64: 1 27 | data: 28 | first: 29 | '': Editor 30 | second: 31 | enabled: 0 32 | settings: 33 | CPU: AnyCPU 34 | OS: OSX 35 | data: 36 | first: 37 | Any: 38 | second: 39 | enabled: 0 40 | settings: {} 41 | data: 42 | first: 43 | Editor: Editor 44 | second: 45 | enabled: 1 46 | settings: 47 | DefaultValueInitialized: true 48 | data: 49 | first: 50 | Facebook: Win 51 | second: 52 | enabled: 0 53 | settings: 54 | CPU: AnyCPU 55 | data: 56 | first: 57 | Facebook: Win64 58 | second: 59 | enabled: 0 60 | settings: 61 | CPU: AnyCPU 62 | data: 63 | first: 64 | Standalone: Linux 65 | second: 66 | enabled: 0 67 | settings: 68 | CPU: x86 69 | data: 70 | first: 71 | Standalone: Linux64 72 | second: 73 | enabled: 0 74 | settings: 75 | CPU: x86_64 76 | data: 77 | first: 78 | Standalone: OSXIntel 79 | second: 80 | enabled: 0 81 | settings: 82 | CPU: AnyCPU 83 | data: 84 | first: 85 | Standalone: OSXIntel64 86 | second: 87 | enabled: 0 88 | settings: 89 | CPU: AnyCPU 90 | data: 91 | first: 92 | Standalone: Win 93 | second: 94 | enabled: 0 95 | settings: 96 | CPU: AnyCPU 97 | data: 98 | first: 99 | Standalone: Win64 100 | second: 101 | enabled: 0 102 | settings: 103 | CPU: AnyCPU 104 | userData: 105 | assetBundleName: 106 | assetBundleVariant: 107 | -------------------------------------------------------------------------------- /Assets/Textures/SpaceShip.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: SpaceShip 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _EMISSION _METALLICGLOSSMAP 13 | m_LightmapFlags: 2 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 2800000, guid: 7b3387fd778434976a1390faaaa6e8cc, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: fe03409c65e804a75b7da930a00305df, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 2800000, guid: fe819fff3e6b64821b5bfc8e9420ab26, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 2800000, guid: 439c357651f7e488d98a3b84ed758f9f, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Shaders/ForceField.shader: -------------------------------------------------------------------------------- 1 | //1. Transparent 2 | //2. Rim 3 | //3. Intersection Highlight 4 | Shader "Custom/ForceField" 5 | { 6 | Properties 7 | { 8 | _MainColor("Main Color", Color) = (1,1,1,1) 9 | _RimPower("Rim Power", Range(0, 1)) = 1 10 | _IntersectionPower("Intersect Power", Range(0, 1)) = 0 11 | } 12 | SubShader 13 | { 14 | Tags { "Queue"="Transparent" "RenderType"="Transparent" } 15 | 16 | Pass 17 | { 18 | ZWrite Off 19 | Blend SrcAlpha OneMinusSrcAlpha 20 | 21 | CGPROGRAM 22 | #pragma vertex vert 23 | #pragma fragment frag 24 | 25 | #include "UnityCG.cginc" 26 | 27 | struct appdata 28 | { 29 | float4 vertex : POSITION; 30 | float2 uv : TEXCOORD0; 31 | float3 normal : NORMAL; 32 | }; 33 | 34 | struct v2f 35 | { 36 | float4 vertex : SV_POSITION; 37 | float3 worldNormal : TEXCOORD0; 38 | float3 worldViewDir : TEXCOORD1; 39 | float4 screenPos : TEXCOORD2; 40 | float eyeZ : TEXCOORD3; 41 | float2 uv : TEXCOORD4; 42 | }; 43 | 44 | sampler2D _CameraDepthTexture; 45 | fixed4 _MainColor; 46 | float _RimPower; 47 | float _IntersectionPower; 48 | 49 | v2f vert (appdata v) 50 | { 51 | v2f o; 52 | o.vertex = UnityObjectToClipPos(v.vertex); 53 | float4 worldPos = mul(unity_ObjectToWorld, v.vertex); 54 | o.worldNormal = UnityObjectToWorldDir(v.normal); 55 | o.worldViewDir = UnityWorldSpaceViewDir(worldPos); 56 | o.screenPos = ComputeScreenPos(o.vertex); 57 | COMPUTE_EYEDEPTH(o.eyeZ); 58 | o.uv = v.uv; 59 | return o; 60 | } 61 | 62 | fixed4 frag (v2f i) : SV_Target 63 | { 64 | float3 worldNormal = normalize(i.worldNormal); 65 | float3 worldViewDir = normalize(i.worldViewDir); 66 | float rim = 1 - saturate(dot(worldNormal, worldViewDir)) * _RimPower; 67 | 68 | float screenZ = LinearEyeDepth(SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.screenPos))); 69 | float intersect = (1 - (screenZ - i.eyeZ)) * _IntersectionPower; 70 | float v = max (rim, intersect); 71 | 72 | return _MainColor * v; 73 | } 74 | ENDCG 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /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: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 0} 45 | m_TransparencySortMode: 0 46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 47 | m_DefaultRenderingPath: 1 48 | m_DefaultMobileRenderingPath: 1 49 | m_TierSettings: [] 50 | m_LightmapStripping: 0 51 | m_FogStripping: 0 52 | m_InstancingStripping: 0 53 | m_LightmapKeepPlain: 1 54 | m_LightmapKeepDirCombined: 1 55 | m_LightmapKeepDynamicPlain: 1 56 | m_LightmapKeepDynamicDirCombined: 1 57 | m_LightmapKeepShadowMask: 1 58 | m_LightmapKeepSubtractive: 1 59 | m_FogKeepLinear: 1 60 | m_FogKeepExp: 1 61 | m_FogKeepExp2: 1 62 | m_AlbedoSwatchInfos: [] 63 | m_LightsUseLinearIntensity: 0 64 | m_LightsUseColorTemperature: 0 65 | m_LogWhenShaderIsCompiled: 0 66 | m_AllowEnlightenSupportForUpgradedProject: 0 67 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/big-logo@2x.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f81094832d834c64d93b198cb16b6a3e 3 | timeCreated: 1491392813 4 | licenseType: Store 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: iPhone 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: tvOS 78 | maxTextureSize: 2048 79 | textureFormat: -1 80 | textureCompression: 1 81 | compressionQuality: 50 82 | crunchedCompression: 0 83 | allowsAlphaSplitting: 0 84 | overridden: 0 85 | - buildTarget: Android 86 | maxTextureSize: 2048 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | - buildTarget: WebGL 94 | maxTextureSize: 2048 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | spriteSheet: 102 | serializedVersion: 2 103 | sprites: [] 104 | outline: [] 105 | spritePackingTag: 106 | userData: 107 | assetBundleName: 108 | assetBundleVariant: 109 | -------------------------------------------------------------------------------- /Assets/scripts/PlayerController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class PlayerController : MonoBehaviour 6 | { 7 | public float initMaxSpeed = 10f; 8 | [HideInInspector] 9 | public float maxSpeed = 10f; 10 | public float maxMaxSpeed = 50f; 11 | public float rotationSpeed = 20; 12 | public float acceleration = 100; 13 | 14 | 15 | //private float roll = 0; 16 | private float pitch; 17 | private float yaw; 18 | 19 | private bool giveForce; 20 | private AudioSource collectSound; 21 | private Rigidbody rb; 22 | private Animator anim; 23 | 24 | // Start is called before the first frame update 25 | void Start() 26 | { 27 | anim = GameObject.FindGameObjectWithTag("PlayerMesh").GetComponent(); 28 | rb = GetComponent(); 29 | } 30 | 31 | // Update is called once per frame 32 | void Update() 33 | { 34 | CheckControls(); 35 | } 36 | 37 | private void FixedUpdate() 38 | { 39 | ApplyRot(); 40 | if (giveForce) 41 | { 42 | ApplyForce(); 43 | } 44 | } 45 | 46 | //checks the controlls and rotates the player 47 | void CheckControls() 48 | { 49 | if (Input.GetKey("space")) 50 | { 51 | giveForce = true; 52 | anim.SetBool("IsFlying", true); 53 | //Debug.Log(anim.GetBool("IsFlying")); 54 | 55 | } 56 | else 57 | { 58 | giveForce = false; 59 | anim.SetBool("IsFlying", false); 60 | } 61 | 62 | //roll = Input.GetAxis("Roll") * rotationSpeed; 63 | pitch = Input.GetAxis("Pitch") * rotationSpeed; 64 | yaw = Input.GetAxis("Yaw") * rotationSpeed; 65 | 66 | 67 | } 68 | 69 | //Applies the rotation to the player 70 | void ApplyRot() 71 | { 72 | 73 | //type1 pitch and roll 74 | //transform.SetPositionAndRotation(transform.position, transform.rotation * Quaternion.Euler(pitch, 0, -yaw)); 75 | 76 | //type2 pitch yaw and roll 77 | transform.SetPositionAndRotation(transform.position, transform.rotation * Quaternion.Euler(-pitch, yaw, -Mathf.Abs(pitch) * yaw / 2)); 78 | 79 | //type3 pitch and yaw 80 | //transform.SetPositionAndRotation(transform.position, transform.rotation * Quaternion.Euler(pitch, yaw, 0 )); 81 | 82 | //type4 - pitch yaw and roll 83 | //transform.SetPositionAndRotation(transform.position, transform.rotation * Quaternion.Euler(pitch, yaw, -Mathf.Abs(pitch) * yaw / 2)); 84 | 85 | //type5 - pitch and yaw 86 | //transform.SetPositionAndRotation(transform.position, transform.rotation * Quaternion.Euler(pitch, yaw, 0 )); 87 | 88 | } 89 | 90 | 91 | //applies a forwards force 92 | void ApplyForce() 93 | { 94 | 95 | //Debug.Log(giveForce); 96 | rb.AddForce(transform.forward * (Time.deltaTime * acceleration * (rb.velocity.magnitude+1)), ForceMode.Impulse); 97 | 98 | rb.velocity = Vector3.ClampMagnitude(rb.velocity, maxSpeed); 99 | } 100 | 101 | 102 | } 103 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | # Unity files 4 | *.meta -text merge=unityyamlmerge diff 5 | *.unity -text merge=unityyamlmerge diff 6 | *.asset -text merge=unityyamlmerge diff 7 | *.prefab -text merge=unityyamlmerge diff 8 | *.mat -text merge=unityyamlmerge diff 9 | *.anim -text merge=unityyamlmerge diff 10 | *.controller -text merge=unityyamlmerge diff 11 | *.overrideController -text merge=unityyamlmerge diff 12 | *.physicMaterial -text merge=unityyamlmerge diff 13 | *.physicsMaterial2D -text merge=unityyamlmerge diff 14 | *.playable -text merge=unityyamlmerge diff 15 | *.mask -text merge=unityyamlmerge diff 16 | *.brush -text merge=unityyamlmerge diff 17 | *.flare -text merge=unityyamlmerge diff 18 | *.fontsettings -text merge=unityyamlmerge diff 19 | *.guiskin -text merge=unityyamlmerge diff 20 | *.giparams -text merge=unityyamlmerge diff 21 | *.renderTexture -text merge=unityyamlmerge diff 22 | *.spriteatlas -text merge=unityyamlmerge diff 23 | *.terrainlayer -text merge=unityyamlmerge diff 24 | *.mixer -text merge=unityyamlmerge diff 25 | *.shadervariants -text merge=unityyamlmerge diff 26 | 27 | # Image formats 28 | *.psd filter=lfs diff=lfs merge=lfs -text 29 | *.jpg filter=lfs diff=lfs merge=lfs -text 30 | *.png filter=lfs diff=lfs merge=lfs -text 31 | *.gif filter=lfs diff=lfs merge=lfs -text 32 | *.bmp filter=lfs diff=lfs merge=lfs -text 33 | *.tga filter=lfs diff=lfs merge=lfs -text 34 | *.tiff filter=lfs diff=lfs merge=lfs -text 35 | *.tif filter=lfs diff=lfs merge=lfs -text 36 | *.iff filter=lfs diff=lfs merge=lfs -text 37 | *.pict filter=lfs diff=lfs merge=lfs -text 38 | *.dds filter=lfs diff=lfs merge=lfs -text 39 | *.xcf filter=lfs diff=lfs merge=lfs -text 40 | 41 | # Audio formats 42 | *.mp3 filter=lfs diff=lfs merge=lfs -text 43 | *.ogg filter=lfs diff=lfs merge=lfs -text 44 | *.wav filter=lfs diff=lfs merge=lfs -text 45 | *.aiff filter=lfs diff=lfs merge=lfs -text 46 | *.aif filter=lfs diff=lfs merge=lfs -text 47 | *.mod filter=lfs diff=lfs merge=lfs -text 48 | *.it filter=lfs diff=lfs merge=lfs -text 49 | *.s3m filter=lfs diff=lfs merge=lfs -text 50 | *.xm filter=lfs diff=lfs merge=lfs -text 51 | 52 | # Video formats 53 | *.mov filter=lfs diff=lfs merge=lfs -text 54 | *.avi filter=lfs diff=lfs merge=lfs -text 55 | *.asf filter=lfs diff=lfs merge=lfs -text 56 | *.mpg filter=lfs diff=lfs merge=lfs -text 57 | *.mpeg filter=lfs diff=lfs merge=lfs -text 58 | *.mp4 filter=lfs diff=lfs merge=lfs -text 59 | 60 | # 3D formats 61 | *.fbx filter=lfs diff=lfs merge=lfs -text 62 | *.obj filter=lfs diff=lfs merge=lfs -text 63 | *.max filter=lfs diff=lfs merge=lfs -text 64 | *.blend filter=lfs diff=lfs merge=lfs -text 65 | *.dae filter=lfs diff=lfs merge=lfs -text 66 | *.mb filter=lfs diff=lfs merge=lfs -text 67 | *.ma filter=lfs diff=lfs merge=lfs -text 68 | *.3ds filter=lfs diff=lfs merge=lfs -text 69 | *.dfx filter=lfs diff=lfs merge=lfs -text 70 | *.c4d filter=lfs diff=lfs merge=lfs -text 71 | *.lwo filter=lfs diff=lfs merge=lfs -text 72 | *.lwo2 filter=lfs diff=lfs merge=lfs -text 73 | *.abc filter=lfs diff=lfs merge=lfs -text 74 | *.3dm filter=lfs diff=lfs merge=lfs -text 75 | 76 | # Build 77 | *.dll filter=lfs diff=lfs merge=lfs -text 78 | *.pdb filter=lfs diff=lfs merge=lfs -text 79 | *.mdb filter=lfs diff=lfs merge=lfs -text 80 | 81 | # Packaging 82 | *.zip filter=lfs diff=lfs merge=lfs -text 83 | *.7z filter=lfs diff=lfs merge=lfs -text 84 | *.gz filter=lfs diff=lfs merge=lfs -text 85 | *.rar filter=lfs diff=lfs merge=lfs -text 86 | *.tar filter=lfs diff=lfs merge=lfs -text 87 | -------------------------------------------------------------------------------- /Assets/Shaders/Raymarch.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/Raymarch" 2 | { 3 | SubShader 4 | { 5 | Tags { "RenderType"="Opaque" } 6 | LOD 100 7 | 8 | Pass 9 | { 10 | CGPROGRAM 11 | #pragma vertex vert 12 | #pragma fragment frag 13 | 14 | #define MAX_STEPS 100 // maximum raycast loops 15 | #define MAX_DIST 10. // ray cannot go further than this distance 16 | #define SURF_DIST .01 // how near to surface we should raycast to 17 | 18 | // ********** Basic Raymarcher *************** // 19 | 20 | 21 | struct appdata 22 | { 23 | float4 vertex : POSITION; 24 | float2 uv : TEXCOORD0; 25 | }; 26 | 27 | struct v2f 28 | { 29 | float4 vertex : SV_POSITION; 30 | float2 uv : TEXCOORD0; 31 | float3 ro : TEXCOORD1; 32 | float3 hitPos : TEXCOORD2; 33 | }; 34 | 35 | 36 | 37 | 38 | 39 | // returns distance to the scene objects (we have 2 objects here, sphere and ground plane) 40 | float GetDist(float3 p) 41 | { 42 | 43 | float4 sphere = float4(0, 0, 0, 0.1); // x,y,z,radius 44 | float d = length(fmod(p,0.5) - sphere.xyz) - sphere.w; 45 | d = length(float2(length(fmod(p.xz, 1)) - 0.4, fmod(p.y,1))) - 0.1; 46 | 47 | return d; 48 | } 49 | 50 | 51 | // jump along the ray until we get close enough to some of our objects 52 | float RayMarch(float3 ro, float3 rd) 53 | { 54 | float dO = 0.; 55 | for (int i = 0; i < MAX_STEPS; i++) 56 | { 57 | float3 p = ro + rd * dO; 58 | float dS = GetDist(p); 59 | dO += dS; 60 | if (dO > MAX_DIST || dS < SURF_DIST) break; 61 | } 62 | return dO; 63 | } 64 | 65 | float3 GetNormal(float3 p) 66 | { 67 | float d = GetDist(p); 68 | float2 e = float2(.01, 0); 69 | float3 n = d - float3(GetDist(p - e.xyy),GetDist(p - e.yxy),GetDist(p - e.yyx)); 70 | return normalize(n); 71 | } 72 | 73 | 74 | 75 | v2f vert (appdata v) 76 | { 77 | v2f o; 78 | o.vertex = UnityObjectToClipPos(v.vertex); 79 | o.uv = v.uv; 80 | o.ro = mul(unity_WorldToObject,float4( _WorldSpaceCameraPos,1)); 81 | o.hitPos = v.vertex; 82 | return o; 83 | } 84 | 85 | fixed4 frag(v2f i) : SV_Target 86 | { 87 | float2 uv = (i.uv - 0.5); 88 | float3 col = float3(0,0,0); 89 | 90 | float3 ro = i.ro; //float3(0,0,-3); 91 | float3 rd = normalize(i.hitPos - ro); //normalize(float3(uv.x, uv.y, 1)); 92 | 93 | float d = RayMarch(ro, rd); 94 | 95 | if(d < MAX_DIST){ 96 | 97 | float3 p = ro + rd * d; 98 | float3 n = GetNormal(p); 99 | 100 | col.rgb = n; 101 | 102 | } else discard; 103 | 104 | return float4(col,1); 105 | } 106 | ENDCG 107 | } // pass 108 | } // subshader 109 | } 110 | -------------------------------------------------------------------------------- /Assets/Prefabs/CollisionPoint.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5601161849892915549 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 5601161849892915545} 12 | - component: {fileID: 5601161849892915546} 13 | - component: {fileID: 5601161849892915547} 14 | - component: {fileID: 7187493020375210039} 15 | - component: {fileID: 729387930353988085} 16 | m_Layer: 0 17 | m_Name: CollisionPoint 18 | m_TagString: ColPlane 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 1 23 | --- !u!4 &5601161849892915545 24 | Transform: 25 | m_ObjectHideFlags: 0 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 5601161849892915549} 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!33 &5601161849892915546 38 | MeshFilter: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 5601161849892915549} 44 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 45 | --- !u!23 &5601161849892915547 46 | MeshRenderer: 47 | m_ObjectHideFlags: 0 48 | m_CorrespondingSourceObject: {fileID: 0} 49 | m_PrefabInstance: {fileID: 0} 50 | m_PrefabAsset: {fileID: 0} 51 | m_GameObject: {fileID: 5601161849892915549} 52 | m_Enabled: 0 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_DynamicOccludee: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 1 58 | m_ReflectionProbeUsage: 1 59 | m_RayTracingMode: 2 60 | m_RenderingLayerMask: 1 61 | m_RendererPriority: 0 62 | m_Materials: 63 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 64 | m_StaticBatchInfo: 65 | firstSubMesh: 0 66 | subMeshCount: 0 67 | m_StaticBatchRoot: {fileID: 0} 68 | m_ProbeAnchor: {fileID: 0} 69 | m_LightProbeVolumeOverride: {fileID: 0} 70 | m_ScaleInLightmap: 1 71 | m_ReceiveGI: 1 72 | m_PreserveUVs: 0 73 | m_IgnoreNormalsForChartDetection: 0 74 | m_ImportantGI: 0 75 | m_StitchLightmapSeams: 1 76 | m_SelectedEditorRenderState: 3 77 | m_MinimumChartSize: 4 78 | m_AutoUVMaxDistance: 0.5 79 | m_AutoUVMaxAngle: 89 80 | m_LightmapParameters: {fileID: 0} 81 | m_SortingLayerID: 0 82 | m_SortingLayer: 0 83 | m_SortingOrder: 0 84 | --- !u!114 &7187493020375210039 85 | MonoBehaviour: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_GameObject: {fileID: 5601161849892915549} 91 | m_Enabled: 1 92 | m_EditorHideFlags: 0 93 | m_Script: {fileID: 11500000, guid: 898c1345a5e894b31b7db8a7c3b7ca3a, type: 3} 94 | m_Name: 95 | m_EditorClassIdentifier: 96 | maxDistance: 1 97 | lifeTime: 0.5 98 | --- !u!135 &729387930353988085 99 | SphereCollider: 100 | m_ObjectHideFlags: 0 101 | m_CorrespondingSourceObject: {fileID: 0} 102 | m_PrefabInstance: {fileID: 0} 103 | m_PrefabAsset: {fileID: 0} 104 | m_GameObject: {fileID: 5601161849892915549} 105 | m_Material: {fileID: 0} 106 | m_IsTrigger: 0 107 | m_Enabled: 1 108 | serializedVersion: 2 109 | m_Radius: 0.49 110 | m_Center: {x: 0, y: 0, z: 0.49} 111 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/ExtensionLoader.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using System.IO; 4 | using System; 5 | 6 | namespace GitHub.Unity 7 | { 8 | [InitializeOnLoad] 9 | public class ExtensionLoader : ScriptableSingleton 10 | { 11 | [SerializeField] private bool initialized = true; 12 | 13 | public bool Initialized 14 | { 15 | get 16 | { 17 | return initialized; 18 | } 19 | set 20 | { 21 | initialized = value; 22 | Save(true); 23 | } 24 | } 25 | 26 | private static bool inSourceMode = false; 27 | private const string sourceModePath = "Assets/Editor/build/"; 28 | private const string realPath = "Assets/Plugins/GitHub/Editor/"; 29 | 30 | private static string[] assemblies20 = { "System.Threading.dll", "AsyncBridge.Net35.dll", "ReadOnlyCollectionsInterfaces.dll", "GitHub.Api.dll", "GitHub.Unity.dll" }; 31 | private static string[] assemblies45 = { "GitHub.Api.45.dll", "GitHub.Unity.45.dll" }; 32 | 33 | private const string GITHUB_UNITY_DISABLE = "GITHUB_UNITY_DISABLE"; 34 | private static bool IsDisabled { get { return Environment.GetEnvironmentVariable(GITHUB_UNITY_DISABLE) == "1"; } } 35 | 36 | static ExtensionLoader() 37 | { 38 | if (IsDisabled) 39 | { 40 | return; 41 | } 42 | EditorApplication.update += Initialize; 43 | } 44 | 45 | private static void Initialize() 46 | { 47 | EditorApplication.update -= Initialize; 48 | 49 | // we're always doing this right now because if the plugin gets updated all the meta files will be disabled and we need to re-enable them 50 | // we should probably detect if our assets change and re-run this instead of doing it every time 51 | //if (!ExtensionLoader.instance.Initialized) 52 | { 53 | var scriptPath = Path.Combine(Application.dataPath, "Editor" + Path.DirectorySeparatorChar + "GitHub.Unity" + Path.DirectorySeparatorChar + "EntryPoint.cs"); 54 | inSourceMode = File.Exists(scriptPath); 55 | ToggleAssemblies(); 56 | //ExtensionLoader.instance.Initialized = true; 57 | AssetDatabase.SaveAssets(); 58 | } 59 | 60 | } 61 | 62 | private static void ToggleAssemblies() 63 | { 64 | var path = inSourceMode ? sourceModePath : realPath; 65 | #if NET_4_6 66 | ToggleAssemblies(path, assemblies20, false); 67 | ToggleAssemblies(path, assemblies45, true); 68 | #else 69 | ToggleAssemblies(path, assemblies45, false); 70 | ToggleAssemblies(path, assemblies20, true); 71 | #endif 72 | } 73 | 74 | private static void ToggleAssemblies(string path, string[] assemblies, bool enable) 75 | { 76 | foreach (var file in assemblies) 77 | { 78 | var filepath = path + file; 79 | PluginImporter importer = AssetImporter.GetAtPath(filepath) as PluginImporter; 80 | if (importer == null) 81 | { 82 | Debug.LogFormat("GitHub for Unity: Could not find importer for {0}. Some functionality may fail.", filepath); 83 | continue; 84 | } 85 | if (importer.GetCompatibleWithEditor() != enable) 86 | { 87 | importer.SetCompatibleWithEditor(enable); 88 | importer.SaveAndReimport(); 89 | } 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/Textures/verloop 1.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa274483fc39c4792b481e88d928042e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 0 51 | alphaUsage: 2 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | - serializedVersion: 3 74 | buildTarget: Standalone 75 | maxTextureSize: 2048 76 | resizeAlgorithm: 0 77 | textureFormat: -1 78 | textureCompression: 1 79 | compressionQuality: 50 80 | crunchedCompression: 0 81 | allowsAlphaSplitting: 0 82 | overridden: 0 83 | androidETC2FallbackOverride: 0 84 | forceMaximumCompressionQuality_BC6H_BC7: 0 85 | - serializedVersion: 3 86 | buildTarget: iPhone 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 1 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | androidETC2FallbackOverride: 0 96 | forceMaximumCompressionQuality_BC6H_BC7: 0 97 | - serializedVersion: 3 98 | buildTarget: Android 99 | maxTextureSize: 2048 100 | resizeAlgorithm: 0 101 | textureFormat: -1 102 | textureCompression: 1 103 | compressionQuality: 50 104 | crunchedCompression: 0 105 | allowsAlphaSplitting: 0 106 | overridden: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | - serializedVersion: 3 110 | buildTarget: WebGL 111 | maxTextureSize: 2048 112 | resizeAlgorithm: 0 113 | textureFormat: -1 114 | textureCompression: 1 115 | compressionQuality: 50 116 | crunchedCompression: 0 117 | allowsAlphaSplitting: 0 118 | overridden: 0 119 | androidETC2FallbackOverride: 0 120 | forceMaximumCompressionQuality_BC6H_BC7: 0 121 | spriteSheet: 122 | serializedVersion: 2 123 | sprites: [] 124 | outline: [] 125 | physicsShape: [] 126 | bones: [] 127 | spriteID: 5e97eb03825dee720800000000000000 128 | internalID: 0 129 | vertices: [] 130 | indices: 131 | edges: [] 132 | weights: [] 133 | secondaryTextures: [] 134 | spritePackingTag: 135 | pSDRemoveMatte: 0 136 | pSDShowRemoveMatteOption: 0 137 | userData: 138 | assetBundleName: 139 | assetBundleVariant: 140 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x86/pthreadVC2.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 151a1d946b98deb4b98445400983ba92 3 | timeCreated: 1493300307 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | '': Any 15 | second: 16 | enabled: 0 17 | settings: 18 | Exclude Editor: 0 19 | Exclude Linux: 1 20 | Exclude Linux64: 1 21 | Exclude LinuxUniversal: 1 22 | Exclude OSXIntel: 1 23 | Exclude OSXIntel64: 1 24 | Exclude OSXUniversal: 1 25 | Exclude Win: 1 26 | Exclude Win64: 1 27 | data: 28 | first: 29 | '': Editor 30 | second: 31 | enabled: 0 32 | settings: 33 | CPU: x86 34 | OS: Windows 35 | data: 36 | first: 37 | Android: Android 38 | second: 39 | enabled: 0 40 | settings: 41 | CPU: ARMv7 42 | data: 43 | first: 44 | Any: 45 | second: 46 | enabled: 0 47 | settings: 48 | Exclude Android: 1 49 | Exclude Editor: 0 50 | Exclude Linux: 1 51 | Exclude Linux64: 1 52 | Exclude LinuxUniversal: 1 53 | Exclude OSXIntel: 1 54 | Exclude OSXIntel64: 1 55 | Exclude OSXUniversal: 1 56 | Exclude SamsungTV: 1 57 | Exclude Tizen: 1 58 | Exclude WebGL: 1 59 | Exclude Win: 1 60 | Exclude Win64: 1 61 | Exclude WindowsStoreApps: 1 62 | Exclude iOS: 1 63 | Exclude tvOS: 1 64 | data: 65 | first: 66 | Editor: Editor 67 | second: 68 | enabled: 1 69 | settings: 70 | CPU: x86 71 | DefaultValueInitialized: true 72 | OS: Windows 73 | data: 74 | first: 75 | Facebook: Win 76 | second: 77 | enabled: 0 78 | settings: 79 | CPU: AnyCPU 80 | data: 81 | first: 82 | Facebook: Win64 83 | second: 84 | enabled: 0 85 | settings: 86 | CPU: AnyCPU 87 | data: 88 | first: 89 | Samsung TV: SamsungTV 90 | second: 91 | enabled: 0 92 | settings: 93 | STV_MODEL: STANDARD_15 94 | data: 95 | first: 96 | Standalone: Linux 97 | second: 98 | enabled: 0 99 | settings: 100 | CPU: x86 101 | data: 102 | first: 103 | Standalone: Linux64 104 | second: 105 | enabled: 0 106 | settings: 107 | CPU: x86_64 108 | data: 109 | first: 110 | Standalone: OSXIntel 111 | second: 112 | enabled: 0 113 | settings: 114 | CPU: AnyCPU 115 | data: 116 | first: 117 | Standalone: OSXIntel64 118 | second: 119 | enabled: 0 120 | settings: 121 | CPU: AnyCPU 122 | data: 123 | first: 124 | Standalone: Win 125 | second: 126 | enabled: 0 127 | settings: 128 | CPU: AnyCPU 129 | data: 130 | first: 131 | Standalone: Win64 132 | second: 133 | enabled: 0 134 | settings: 135 | CPU: AnyCPU 136 | data: 137 | first: 138 | Windows Store Apps: WindowsStoreApps 139 | second: 140 | enabled: 0 141 | settings: 142 | CPU: AnyCPU 143 | DontProcess: False 144 | PlaceholderPath: 145 | SDK: AnySDK 146 | ScriptingBackend: AnyScriptingBackend 147 | data: 148 | first: 149 | iPhone: iOS 150 | second: 151 | enabled: 0 152 | settings: 153 | CompileFlags: 154 | FrameworkDependencies: 155 | data: 156 | first: 157 | tvOS: tvOS 158 | second: 159 | enabled: 0 160 | settings: 161 | CompileFlags: 162 | FrameworkDependencies: 163 | userData: 164 | assetBundleName: 165 | assetBundleVariant: 166 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x86/sfw_x86.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a83159a46d87d2a4f8cec651049b9231 3 | timeCreated: 1493304330 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | '': Any 15 | second: 16 | enabled: 0 17 | settings: 18 | Exclude Editor: 0 19 | Exclude Linux: 1 20 | Exclude Linux64: 1 21 | Exclude LinuxUniversal: 1 22 | Exclude OSXIntel: 1 23 | Exclude OSXIntel64: 1 24 | Exclude OSXUniversal: 1 25 | Exclude Win: 1 26 | Exclude Win64: 1 27 | data: 28 | first: 29 | '': Editor 30 | second: 31 | enabled: 0 32 | settings: 33 | CPU: x86 34 | OS: Windows 35 | data: 36 | first: 37 | Android: Android 38 | second: 39 | enabled: 0 40 | settings: 41 | CPU: ARMv7 42 | data: 43 | first: 44 | Any: 45 | second: 46 | enabled: 0 47 | settings: 48 | Exclude Android: 1 49 | Exclude Editor: 0 50 | Exclude Linux: 1 51 | Exclude Linux64: 1 52 | Exclude LinuxUniversal: 1 53 | Exclude OSXIntel: 1 54 | Exclude OSXIntel64: 1 55 | Exclude OSXUniversal: 1 56 | Exclude SamsungTV: 1 57 | Exclude Tizen: 1 58 | Exclude WebGL: 1 59 | Exclude Win: 1 60 | Exclude Win64: 1 61 | Exclude WindowsStoreApps: 1 62 | Exclude iOS: 1 63 | Exclude tvOS: 1 64 | data: 65 | first: 66 | Editor: Editor 67 | second: 68 | enabled: 1 69 | settings: 70 | CPU: x86 71 | DefaultValueInitialized: true 72 | OS: Windows 73 | data: 74 | first: 75 | Facebook: Win 76 | second: 77 | enabled: 0 78 | settings: 79 | CPU: AnyCPU 80 | data: 81 | first: 82 | Facebook: Win64 83 | second: 84 | enabled: 0 85 | settings: 86 | CPU: AnyCPU 87 | data: 88 | first: 89 | Samsung TV: SamsungTV 90 | second: 91 | enabled: 0 92 | settings: 93 | STV_MODEL: STANDARD_15 94 | data: 95 | first: 96 | Standalone: Linux 97 | second: 98 | enabled: 0 99 | settings: 100 | CPU: x86 101 | data: 102 | first: 103 | Standalone: Linux64 104 | second: 105 | enabled: 0 106 | settings: 107 | CPU: x86_64 108 | data: 109 | first: 110 | Standalone: OSXIntel 111 | second: 112 | enabled: 0 113 | settings: 114 | CPU: AnyCPU 115 | data: 116 | first: 117 | Standalone: OSXIntel64 118 | second: 119 | enabled: 0 120 | settings: 121 | CPU: AnyCPU 122 | data: 123 | first: 124 | Standalone: Win 125 | second: 126 | enabled: 0 127 | settings: 128 | CPU: AnyCPU 129 | data: 130 | first: 131 | Standalone: Win64 132 | second: 133 | enabled: 0 134 | settings: 135 | CPU: AnyCPU 136 | data: 137 | first: 138 | Windows Store Apps: WindowsStoreApps 139 | second: 140 | enabled: 0 141 | settings: 142 | CPU: AnyCPU 143 | DontProcess: False 144 | PlaceholderPath: 145 | SDK: AnySDK 146 | ScriptingBackend: AnyScriptingBackend 147 | data: 148 | first: 149 | iPhone: iOS 150 | second: 151 | enabled: 0 152 | settings: 153 | CompileFlags: 154 | FrameworkDependencies: 155 | data: 156 | first: 157 | tvOS: tvOS 158 | second: 159 | enabled: 0 160 | settings: 161 | CompileFlags: 162 | FrameworkDependencies: 163 | userData: 164 | assetBundleName: 165 | assetBundleVariant: 166 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x64/sfw_x64.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe5abeadcbe591e4fa9107fbc02f3998 3 | timeCreated: 1493304330 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | '': Any 15 | second: 16 | enabled: 0 17 | settings: 18 | Exclude Editor: 0 19 | Exclude Linux: 1 20 | Exclude Linux64: 1 21 | Exclude LinuxUniversal: 1 22 | Exclude OSXIntel: 1 23 | Exclude OSXIntel64: 1 24 | Exclude OSXUniversal: 1 25 | Exclude Win: 1 26 | Exclude Win64: 1 27 | data: 28 | first: 29 | '': Editor 30 | second: 31 | enabled: 0 32 | settings: 33 | CPU: AnyCPU 34 | OS: Windows 35 | data: 36 | first: 37 | Android: Android 38 | second: 39 | enabled: 0 40 | settings: 41 | CPU: ARMv7 42 | data: 43 | first: 44 | Any: 45 | second: 46 | enabled: 0 47 | settings: 48 | Exclude Android: 1 49 | Exclude Editor: 0 50 | Exclude Linux: 1 51 | Exclude Linux64: 1 52 | Exclude LinuxUniversal: 1 53 | Exclude OSXIntel: 1 54 | Exclude OSXIntel64: 1 55 | Exclude OSXUniversal: 1 56 | Exclude SamsungTV: 1 57 | Exclude Tizen: 1 58 | Exclude WebGL: 1 59 | Exclude Win: 1 60 | Exclude Win64: 1 61 | Exclude WindowsStoreApps: 1 62 | Exclude iOS: 1 63 | Exclude tvOS: 1 64 | data: 65 | first: 66 | Editor: Editor 67 | second: 68 | enabled: 1 69 | settings: 70 | CPU: x86_64 71 | DefaultValueInitialized: true 72 | OS: Windows 73 | data: 74 | first: 75 | Facebook: Win 76 | second: 77 | enabled: 0 78 | settings: 79 | CPU: AnyCPU 80 | data: 81 | first: 82 | Facebook: Win64 83 | second: 84 | enabled: 0 85 | settings: 86 | CPU: AnyCPU 87 | data: 88 | first: 89 | Samsung TV: SamsungTV 90 | second: 91 | enabled: 0 92 | settings: 93 | STV_MODEL: STANDARD_15 94 | data: 95 | first: 96 | Standalone: Linux 97 | second: 98 | enabled: 0 99 | settings: 100 | CPU: x86 101 | data: 102 | first: 103 | Standalone: Linux64 104 | second: 105 | enabled: 0 106 | settings: 107 | CPU: x86_64 108 | data: 109 | first: 110 | Standalone: OSXIntel 111 | second: 112 | enabled: 0 113 | settings: 114 | CPU: AnyCPU 115 | data: 116 | first: 117 | Standalone: OSXIntel64 118 | second: 119 | enabled: 0 120 | settings: 121 | CPU: AnyCPU 122 | data: 123 | first: 124 | Standalone: Win 125 | second: 126 | enabled: 0 127 | settings: 128 | CPU: AnyCPU 129 | data: 130 | first: 131 | Standalone: Win64 132 | second: 133 | enabled: 0 134 | settings: 135 | CPU: AnyCPU 136 | data: 137 | first: 138 | Windows Store Apps: WindowsStoreApps 139 | second: 140 | enabled: 0 141 | settings: 142 | CPU: AnyCPU 143 | DontProcess: False 144 | PlaceholderPath: 145 | SDK: AnySDK 146 | ScriptingBackend: AnyScriptingBackend 147 | data: 148 | first: 149 | iPhone: iOS 150 | second: 151 | enabled: 0 152 | settings: 153 | CompileFlags: 154 | FrameworkDependencies: 155 | data: 156 | first: 157 | tvOS: tvOS 158 | second: 159 | enabled: 0 160 | settings: 161 | CompileFlags: 162 | FrameworkDependencies: 163 | userData: 164 | assetBundleName: 165 | assetBundleVariant: 166 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/x64/pthreadVC2.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 868fbb4c41814baebc00f96e24ede2f8 3 | timeCreated: 1491391266 4 | licenseType: Store 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | '': Any 15 | second: 16 | enabled: 0 17 | settings: 18 | Exclude Editor: 0 19 | Exclude Linux: 1 20 | Exclude Linux64: 1 21 | Exclude LinuxUniversal: 1 22 | Exclude OSXIntel: 1 23 | Exclude OSXIntel64: 1 24 | Exclude OSXUniversal: 1 25 | Exclude Win: 1 26 | Exclude Win64: 1 27 | data: 28 | first: 29 | '': Editor 30 | second: 31 | enabled: 0 32 | settings: 33 | CPU: x86_64 34 | OS: Windows 35 | data: 36 | first: 37 | Android: Android 38 | second: 39 | enabled: 0 40 | settings: 41 | CPU: ARMv7 42 | data: 43 | first: 44 | Any: 45 | second: 46 | enabled: 0 47 | settings: 48 | Exclude Android: 1 49 | Exclude Editor: 0 50 | Exclude Linux: 1 51 | Exclude Linux64: 1 52 | Exclude LinuxUniversal: 1 53 | Exclude OSXIntel: 1 54 | Exclude OSXIntel64: 1 55 | Exclude OSXUniversal: 1 56 | Exclude SamsungTV: 1 57 | Exclude Tizen: 1 58 | Exclude WebGL: 1 59 | Exclude Win: 1 60 | Exclude Win64: 1 61 | Exclude WindowsStoreApps: 1 62 | Exclude iOS: 1 63 | Exclude tvOS: 1 64 | data: 65 | first: 66 | Editor: Editor 67 | second: 68 | enabled: 1 69 | settings: 70 | CPU: x86_64 71 | DefaultValueInitialized: true 72 | OS: Windows 73 | data: 74 | first: 75 | Facebook: Win 76 | second: 77 | enabled: 0 78 | settings: 79 | CPU: AnyCPU 80 | data: 81 | first: 82 | Facebook: Win64 83 | second: 84 | enabled: 0 85 | settings: 86 | CPU: AnyCPU 87 | data: 88 | first: 89 | Samsung TV: SamsungTV 90 | second: 91 | enabled: 0 92 | settings: 93 | STV_MODEL: STANDARD_15 94 | data: 95 | first: 96 | Standalone: Linux 97 | second: 98 | enabled: 0 99 | settings: 100 | CPU: x86 101 | data: 102 | first: 103 | Standalone: Linux64 104 | second: 105 | enabled: 0 106 | settings: 107 | CPU: x86_64 108 | data: 109 | first: 110 | Standalone: OSXIntel 111 | second: 112 | enabled: 0 113 | settings: 114 | CPU: AnyCPU 115 | data: 116 | first: 117 | Standalone: OSXIntel64 118 | second: 119 | enabled: 0 120 | settings: 121 | CPU: AnyCPU 122 | data: 123 | first: 124 | Standalone: Win 125 | second: 126 | enabled: 0 127 | settings: 128 | CPU: AnyCPU 129 | data: 130 | first: 131 | Standalone: Win64 132 | second: 133 | enabled: 0 134 | settings: 135 | CPU: AnyCPU 136 | data: 137 | first: 138 | Windows Store Apps: WindowsStoreApps 139 | second: 140 | enabled: 0 141 | settings: 142 | CPU: AnyCPU 143 | DontProcess: False 144 | PlaceholderPath: 145 | SDK: AnySDK 146 | ScriptingBackend: AnyScriptingBackend 147 | data: 148 | first: 149 | iPhone: iOS 150 | second: 151 | enabled: 0 152 | settings: 153 | CompileFlags: 154 | FrameworkDependencies: 155 | data: 156 | first: 157 | tvOS: tvOS 158 | second: 159 | enabled: 0 160 | settings: 161 | CompileFlags: 162 | FrameworkDependencies: 163 | userData: 164 | assetBundleName: 165 | assetBundleVariant: 166 | -------------------------------------------------------------------------------- /Assets/scripts/FractalRandomizer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class FractalRandomizer : MonoBehaviour 6 | { 7 | public float animationSpeed; 8 | 9 | public float positionRandom; 10 | public float rotationRandom; 11 | public float globalRotationRandom; 12 | public float scaleRandom; 13 | 14 | public GameObject fractalCam; 15 | public GameObject playerCam; 16 | public Transform player; 17 | private RaymarchCam camScript; 18 | 19 | 20 | private Vector3 posRand; 21 | private Vector3 globRotRand; 22 | private Vector3 rotRand; 23 | private float scaleRand; 24 | private float startTime; 25 | private float randColor; 26 | private float sphereRand; 27 | private float sphereScaleRand; 28 | private float globScaleRand; 29 | 30 | 31 | 32 | 33 | // Start is called before the first frame update 34 | void Start() 35 | { 36 | camScript = GetComponent(); 37 | playerCam.SetActive(false); 38 | 39 | SetFractal(); 40 | 41 | SetRandColor(); 42 | 43 | posRand = new Vector3(Random.Range(-positionRandom, positionRandom), Random.Range(-positionRandom, positionRandom), Random.Range(-positionRandom, positionRandom)); 44 | rotRand = new Vector3(Random.Range(-rotationRandom, rotationRandom), Random.Range(-rotationRandom, rotationRandom), Random.Range(-rotationRandom, rotationRandom)); 45 | globRotRand = new Vector3(Random.Range(-globalRotationRandom, globalRotationRandom), Random.Range(-globalRotationRandom, globalRotationRandom), Random.Range(-globalRotationRandom, globalRotationRandom)); 46 | scaleRand = 1f + Random.Range(-scaleRandom, scaleRandom); 47 | sphereScaleRand = 1f - Random.Range(0, scaleRandom); 48 | sphereRand = Random.Range(1.0f, 3.0f); 49 | globScaleRand = Random.Range(15.0f, 500.0f); 50 | 51 | if (globScaleRand > 400) 52 | { 53 | camScript._iterations = 5; 54 | } 55 | else if (globScaleRand > 200) 56 | { 57 | camScript._iterations = 4; 58 | } 59 | else if (globScaleRand > 50) 60 | { 61 | camScript._iterations = 3; 62 | } 63 | else 64 | { 65 | camScript._iterations = 2; 66 | } 67 | 68 | fractalCam.transform.position = new Vector3(-globScaleRand * 4, globScaleRand * 4, -globScaleRand * 4); 69 | player.position = new Vector3(0, 0, -globScaleRand * 1.5f); 70 | 71 | } 72 | 73 | // Update is called once per frame 74 | void Update() 75 | { 76 | 77 | 78 | if (startTime < 1) 79 | { 80 | moveFractal(); 81 | } 82 | 83 | } 84 | 85 | void moveFractal() 86 | { 87 | 88 | camScript._iterationOffsetPos = Vector3.Slerp(Vector3.zero, posRand, startTime); 89 | camScript._iterationOffsetRot = Vector3.Slerp(Vector3.zero, rotRand, startTime); 90 | camScript._GlobalRotation = Vector3.Slerp(Vector3.zero, globRotRand, startTime); 91 | camScript._scaleFactor = Mathf.Lerp(1, scaleRand, startTime); 92 | camScript._GlobalScale = Mathf.Lerp(15, globScaleRand, startTime); 93 | camScript._innerSphereRad = Mathf.Lerp(1, sphereScaleRand, startTime); 94 | 95 | startTime += Time.deltaTime * animationSpeed; 96 | 97 | if (startTime >= 1) 98 | { 99 | startTime = 1; 100 | camScript._iterationOffsetPos = posRand; 101 | camScript._iterationOffsetRot = rotRand; 102 | camScript._GlobalRotation = globRotRand; 103 | camScript._scaleFactor = scaleRand; 104 | camScript._GlobalScale = globScaleRand; 105 | 106 | playerCam.SetActive(true); 107 | } 108 | 109 | 110 | } 111 | 112 | void SetFractal() 113 | { 114 | camScript._drawMergerSponge = false; 115 | camScript._drawMergerCylinder = false; 116 | camScript._drawMergerPyramid = false; 117 | camScript._drawNegativeSphere = false; 118 | camScript._drawSphere = false; 119 | camScript._drawBox = false; 120 | 121 | int fractalnr = Random.Range(1, 5); 122 | 123 | switch (fractalnr) 124 | { 125 | case 1: 126 | camScript._drawMergerSponge = true; 127 | 128 | Debug.Log("MengerSponge"); 129 | break; 130 | case 2: 131 | camScript._drawMergerCylinder = true; 132 | Debug.Log("MengerCylinder"); 133 | break; 134 | case 3: 135 | camScript._drawMergerPyramid = true; 136 | Debug.Log("MengerPyramid"); 137 | break; 138 | case 4: 139 | camScript._drawNegativeSphere = true; 140 | camScript._useModulor = true; 141 | Debug.Log("inversesphere"); 142 | break; 143 | 144 | 145 | case 5: 146 | camScript._drawSphere = true; 147 | camScript._useModulor = true; 148 | Debug.Log("Sphere"); 149 | break; 150 | 151 | 152 | case 6: 153 | camScript._drawBox = true; 154 | camScript._useModulor = true; 155 | Debug.Log("box"); 156 | break; 157 | case 0: 158 | Debug.Log("none of the above"); 159 | break; 160 | } 161 | } 162 | 163 | void SetRandColor() 164 | { 165 | randColor = Random.Range(0.0f, 1.0f); 166 | camScript._mainColor = Color.HSVToRGB(randColor, 0.95f, 0.9f); 167 | if (randColor > 2f / 3f) 168 | { 169 | camScript._secColor = Color.HSVToRGB(randColor - 1f / 3f, 0.9f, 0.9f); 170 | camScript._skyColor = Color.HSVToRGB(randColor - 2f / 3f, 0.3f, 0.95f); 171 | Camera.main.backgroundColor = Color.HSVToRGB(randColor - 2f / 3f, 0.2f, 0.95f); 172 | } 173 | else if (randColor < 1f / 3f) 174 | { 175 | camScript._secColor = Color.HSVToRGB(randColor + 2f / 3f, 0.9f, 0.9f); 176 | camScript._skyColor = Color.HSVToRGB(randColor + 1f / 3f, 0.3f, 0.95f); 177 | Camera.main.backgroundColor = Color.HSVToRGB(randColor + 1f / 3f, 0.2f, 0.95f); 178 | } 179 | else 180 | { 181 | camScript._secColor = Color.HSVToRGB(randColor - 1f / 3f, 0.9f, 0.9f); 182 | camScript._skyColor = Color.HSVToRGB(randColor + 1f / 3f, 0.3f, 0.95f); 183 | Camera.main.backgroundColor = Color.HSVToRGB(randColor + 1f / 3f, 0.2f, 0.95f); 184 | } 185 | RenderSettings.ambientLight = Camera.main.backgroundColor; 186 | RenderSettings.fogColor = camScript._skyColor; 187 | } 188 | } 189 | -------------------------------------------------------------------------------- /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: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo 3DS: 5 223 | Nintendo Switch: 5 224 | PS4: 5 225 | PSP2: 2 226 | Stadia: 5 227 | Standalone: 5 228 | WebGL: 3 229 | Windows Store Apps: 5 230 | XboxOne: 5 231 | iPhone: 2 232 | tvOS: 2 233 | -------------------------------------------------------------------------------- /Assets/scripts/PlayerRayMarchCollider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | public class PlayerRayMarchCollider : MonoBehaviour 8 | { 9 | 10 | public int nrPoints = 18; 11 | public float colliderOffset = 1.2f; 12 | public GameObject DistanceSphere; 13 | public GameObject colPlane; 14 | 15 | private DistanceFunctions Df; 16 | private PlayerController playCon; 17 | private float colRadius; 18 | private RaymarchCam camScript; 19 | private Vector3 ro; 20 | Vector3[] colliders; 21 | GameObject[] lines; 22 | GameObject modLine; 23 | 24 | // Start is called before the first frame update 25 | void Start() 26 | { 27 | camScript = Camera.main.GetComponent(); 28 | colRadius = GetComponent().radius; 29 | Df = GetComponent(); 30 | playCon = GetComponent(); 31 | colliders = PointsOnSphere(nrPoints, colRadius * colliderOffset); 32 | //lines = new GameObject[nrPoints]; 33 | //AddLines(); 34 | 35 | } 36 | 37 | // Update is called once per frame 38 | void Update() 39 | { 40 | 41 | if (IsClose()) 42 | { 43 | RayMarch(colliders); 44 | } 45 | } 46 | 47 | // the distancefunction from the player 48 | public float DistanceField(Vector3 p) 49 | { 50 | float dist = Camera.main.farClipPlane + 1; 51 | 52 | // check symmetry 53 | if (camScript._useSymmetry) 54 | { 55 | p = Df.sdSymXYZ(p); 56 | } 57 | // check modulor 58 | if (camScript._useModulor) 59 | { 60 | p.x = Df.mod(p.x, camScript._modInterval.x * camScript._GlobalScale * 2); 61 | p.y = Df.mod(p.y, camScript._modInterval.y * camScript._GlobalScale * 2); 62 | p.z = Df.mod(p.z, camScript._modInterval.z * camScript._GlobalScale * 2); 63 | } 64 | //menger sponge 65 | if (camScript._drawMergerSponge) 66 | { 67 | dist = Df.sdMerger(p, camScript._GlobalScale, camScript._iterations, camScript._modOffsetPos, camScript._iterationTransform.inverse, camScript._globalTransform.inverse, camScript._smoothRadius, camScript._scaleFactor); 68 | 69 | } 70 | // menger cylinder 71 | else if (camScript._drawMergerCylinder) 72 | { 73 | dist = Df.sdMergerCyl(p, camScript._GlobalScale, camScript._iterations, camScript._modOffsetPos, camScript._iterationTransform.inverse, camScript._globalTransform.inverse, camScript._smoothRadius, camScript._scaleFactor); 74 | 75 | } 76 | // terpinski triangle menger pyramid 77 | else if (camScript._drawMergerPyramid) 78 | { 79 | dist = Df.sdMergerPyr(p, camScript._GlobalScale, camScript._iterations, camScript._modOffsetPos, camScript._iterationTransform.inverse, camScript._globalTransform.inverse, camScript._smoothRadius, camScript._scaleFactor); 80 | 81 | } 82 | // negative sphere 83 | else if (camScript._drawNegativeSphere) 84 | { 85 | dist = Df.sdNegSphere(p, camScript._GlobalScale, camScript._iterations, camScript._modOffsetPos, camScript._iterationTransform.inverse, camScript._globalTransform.inverse, camScript._innerSphereRad, camScript._scaleFactor); 86 | } 87 | // sphere 88 | else if (camScript._drawSphere) 89 | { 90 | dist = Df.sdSphere(p - camScript._globalPosition, camScript._GlobalScale); 91 | } 92 | // box 93 | else if (camScript._drawBox) 94 | { 95 | dist = Df.sdBox(p - camScript._globalPosition, Vector3.one * camScript._GlobalScale); 96 | } 97 | 98 | 99 | // check section plane 100 | if (camScript._useSectionPlane) 101 | { 102 | float plane = Df.sdPlane(p, camScript._sectionTransform.inverse); 103 | return Mathf.Max(dist, plane); 104 | } 105 | 106 | return dist; 107 | 108 | /* debug modulor line 109 | //modLine.GetComponent().SetPosition(0, p); 110 | //modLine.GetComponent().SetPosition(1, p - dist); 111 | */ 112 | } 113 | 114 | // the raymarcher from the player 115 | void RayMarch(Vector3[] rd) 116 | { 117 | ro = transform.position; 118 | int nrHits = 0; 119 | 120 | for (int i = 0; i < rd.Length; i++) 121 | { 122 | Vector3 p = ro + Vector3.Normalize(rd[i]) * colRadius; 123 | //check hit 124 | float d = DistanceField(p); 125 | 126 | 127 | if (d < 0.001) //hit 128 | { 129 | Debug.Log("hit" + i); 130 | nrHits++; 131 | //collision 132 | SetColPlane(rd[i]); 133 | 134 | } 135 | // resets player position if stuck with to many collisions at once 136 | if (nrHits > rd.Length * 0.45f) 137 | { 138 | transform.position = new Vector3(0, 0, camScript._GlobalScale * 1.6f); 139 | } 140 | 141 | } 142 | } 143 | // sets the collision plane 144 | private void SetColPlane(Vector3 hitPoint) 145 | { 146 | Instantiate(colPlane, hitPoint + transform.position, Quaternion.identity); 147 | } 148 | 149 | // checks if the player is close 150 | bool IsClose() 151 | { 152 | 153 | float d = DistanceField(transform.position); 154 | //Debug.Log(d); 155 | // DistanceSphere.transform.localScale = Vector3.one * d * 2; // debug distance sphere 156 | playCon.maxSpeed = Mathf.Min(playCon.maxMaxSpeed, Mathf.Sqrt(d) * playCon.initMaxSpeed); // player speed is regulated by distance 157 | return d - (colRadius * colliderOffset) < 0.001; 158 | 159 | } 160 | 161 | //creates a fixed number of points on a sphere 162 | Vector3[] PointsOnSphere(int n, float b) 163 | { 164 | List upts = new List(); 165 | float inc = Mathf.PI * (3 - Mathf.Sqrt(5)); 166 | float off = 2.0f / n; 167 | float x = 0; 168 | float y = 0; 169 | float z = 0; 170 | float r = 0; 171 | float phi = 0; 172 | 173 | for (var k = 0; k < n; k++) 174 | { 175 | y = k * off - 1 + (off / 2); 176 | r = Mathf.Sqrt(1 - y * y); 177 | phi = k * inc; 178 | x = Mathf.Cos(phi) * r; 179 | z = Mathf.Sin(phi) * r; 180 | 181 | upts.Add(new Vector3(x, y, z) * b); 182 | } 183 | Vector3[] pts = upts.ToArray(); 184 | return pts; 185 | } 186 | 187 | // creates lines for debugging 188 | void AddLines() 189 | { 190 | modLine = new GameObject("modLine"); 191 | modLine.AddComponent(); 192 | modLine.GetComponent().startWidth = 0.05f; 193 | modLine.GetComponent().endWidth = 0.05f; 194 | 195 | for (int i = 0; i < colliders.Length; i++) 196 | { 197 | lines[i] = new GameObject("line " + i); 198 | lines[i].transform.parent = transform; 199 | lines[i].AddComponent(); 200 | lines[i].GetComponent().startWidth = 0.05f; 201 | lines[i].GetComponent().endWidth = 0.05f; 202 | lines[i].GetComponent().SetPosition(0, transform.position); 203 | lines[i].GetComponent().SetPosition(1, transform.position + colliders[i]); 204 | lines[i].GetComponent().useWorldSpace = false; 205 | 206 | 207 | } 208 | } 209 | 210 | } 211 | -------------------------------------------------------------------------------- /Assets/scripts/FractalCreator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class FractalCreator : MonoBehaviour 6 | { 7 | [Range(0, 1)] 8 | public float color; 9 | 10 | [Range(1, 6)] 11 | public int fractalType; 12 | 13 | private RaymarchCam camScript; 14 | private GameObject player; 15 | private PlayerRayMarchCollider col; 16 | private bool playerPause; 17 | 18 | // Start is called before the first frame update 19 | void Start() 20 | { 21 | camScript = GetComponent(); 22 | player = GameObject.FindGameObjectWithTag("Player"); 23 | col = player.GetComponent(); 24 | } 25 | private void Update() 26 | { 27 | while(col.DistanceField(player.transform.position) < 3 && playerPause == true) 28 | { 29 | player.transform.position += new Vector3(0, 0, -1); 30 | } 31 | } 32 | 33 | public void PlayerPause(bool pause) 34 | { 35 | playerPause = pause; 36 | } 37 | 38 | //mod Settings 39 | 40 | public void UseMod(bool use) 41 | { 42 | camScript._useModulor = use; 43 | } 44 | 45 | public void ModX (string x) 46 | { 47 | camScript._modInterval.x = float.Parse(x); 48 | } 49 | public void ModY(string y) 50 | { 51 | camScript._modInterval.y = float.Parse(y); 52 | } 53 | public void ModZ(string z) 54 | { 55 | camScript._modInterval.z = float.Parse(z); 56 | } 57 | 58 | //Fractal Settings 59 | 60 | public void SetFractal(int nr) 61 | { 62 | 63 | 64 | camScript._drawMergerSponge = false; 65 | camScript._drawMergerCylinder = false; 66 | camScript._drawMergerPyramid = false; 67 | camScript._drawNegativeSphere = false; 68 | camScript._drawSphere = false; 69 | camScript._drawBox = false; 70 | 71 | switch (nr) 72 | { 73 | case 1: 74 | camScript._drawMergerSponge = true; 75 | Debug.Log("MengerSponge"); 76 | break; 77 | 78 | case 2: 79 | camScript._drawMergerCylinder = true; 80 | Debug.Log("MengerCylinder"); 81 | break; 82 | 83 | case 3: 84 | camScript._drawMergerPyramid = true; 85 | Debug.Log("MengerPyramid"); 86 | break; 87 | 88 | case 4: 89 | camScript._drawNegativeSphere = true; 90 | Debug.Log("inversesphere"); 91 | break; 92 | 93 | case 5: 94 | camScript._drawSphere = true; 95 | Debug.Log("Sphere"); 96 | break; 97 | 98 | case 6: 99 | camScript._drawBox = true; 100 | Debug.Log("box"); 101 | break; 102 | 103 | case 0: 104 | Debug.Log("none of the above"); 105 | break; 106 | } 107 | } 108 | 109 | public void SetIterations(string nr) 110 | { 111 | camScript._iterations = int.Parse(nr); 112 | } 113 | 114 | public void SetScaleFactor (string factor) 115 | { 116 | camScript._scaleFactor = float.Parse(factor); 117 | } 118 | 119 | 120 | public void ModOffsetX(string x) 121 | { 122 | camScript._modOffsetPos.x = float.Parse(x); 123 | } 124 | public void ModOffsetY(string y) 125 | { 126 | camScript._modOffsetPos.y = float.Parse(y); 127 | } 128 | public void ModOffsetZ(string z) 129 | { 130 | camScript._modOffsetPos.z = float.Parse(z); 131 | } 132 | 133 | 134 | public void ItOffsetPosX(string x) 135 | { 136 | camScript._iterationOffsetPos.x = float.Parse(x); 137 | } 138 | public void ItOffsetPosY(string y) 139 | { 140 | camScript._iterationOffsetPos.y = float.Parse(y); 141 | } 142 | public void ItOffsetPosZ(string z) 143 | { 144 | camScript._iterationOffsetPos.z = float.Parse(z); 145 | } 146 | 147 | 148 | public void ItOffsetRotX(string x) 149 | { 150 | camScript._iterationOffsetRot.x = float.Parse(x); 151 | } 152 | public void ItOffsetRotY(string y) 153 | { 154 | camScript._iterationOffsetRot.y = float.Parse(y); 155 | } 156 | public void ItOffsetRotZ(string z) 157 | { 158 | camScript._iterationOffsetRot.z = float.Parse(z); 159 | } 160 | 161 | //Transform Settings 162 | 163 | public void GobalPosX(string x) 164 | { 165 | camScript._globalPosition.x = float.Parse(x); 166 | } 167 | public void GobalPosY(string y) 168 | { 169 | camScript._globalPosition.y = float.Parse(y); 170 | } 171 | public void GobalPosZ(string z) 172 | { 173 | camScript._globalPosition.z = float.Parse(z); 174 | } 175 | 176 | public void GobalRotX(string x) 177 | { 178 | camScript._GlobalRotation.x = float.Parse(x); 179 | } 180 | public void GobalRotY(string y) 181 | { 182 | camScript._GlobalRotation.y = float.Parse(y); 183 | } 184 | public void GobalRotZ(string z) 185 | { 186 | camScript._GlobalRotation.z = float.Parse(z); 187 | } 188 | 189 | public void SetScale (string scale) 190 | { 191 | camScript._GlobalScale = float.Parse(scale); 192 | } 193 | 194 | public void SetInnerRad (string rad) 195 | { 196 | camScript._innerSphereRad = float.Parse(rad); 197 | } 198 | 199 | //plane Settings 200 | 201 | public void SetSectionPlane (bool use) 202 | { 203 | camScript._useSectionPlane = use; 204 | } 205 | 206 | public void SetSymmetry(bool use) 207 | { 208 | camScript._useSymmetry = use; 209 | } 210 | 211 | public void SectionPosX(string x) 212 | { 213 | camScript._sectionPos.x = float.Parse(x); 214 | } 215 | public void SectionPosY(string y) 216 | { 217 | camScript._sectionPos.y = float.Parse(y); 218 | } 219 | public void SectionPosZ(string z) 220 | { 221 | camScript._sectionPos.z = float.Parse(z); 222 | } 223 | 224 | public void SectionRotX(string x) 225 | { 226 | camScript._sectionRot.x = float.Parse(x); 227 | } 228 | public void SectionRotY(string y) 229 | { 230 | camScript._sectionRot.y = float.Parse(y); 231 | } 232 | public void SectionRotZ(string z) 233 | { 234 | camScript._sectionRot.z = float.Parse(z); 235 | } 236 | 237 | public void SetColor(float randColor) 238 | { 239 | 240 | camScript._mainColor = Color.HSVToRGB(randColor, 0.95f, 0.9f); 241 | if (randColor > 2f / 3f) 242 | { 243 | camScript._secColor = Color.HSVToRGB(randColor - 1f / 3f, 0.9f, 0.9f); 244 | camScript._skyColor = Color.HSVToRGB(randColor - 2f / 3f, 0.3f, 0.95f); 245 | Camera.main.backgroundColor = Color.HSVToRGB(randColor - 2f / 3f, 0.2f, 0.95f); 246 | } 247 | else if (randColor < 1f / 3f) 248 | { 249 | camScript._secColor = Color.HSVToRGB(randColor + 2f / 3f, 0.9f, 0.9f); 250 | camScript._skyColor = Color.HSVToRGB(randColor + 1f / 3f, 0.3f, 0.95f); 251 | Camera.main.backgroundColor = Color.HSVToRGB(randColor + 1f / 3f, 0.2f, 0.95f); 252 | } 253 | else 254 | { 255 | camScript._secColor = Color.HSVToRGB(randColor - 1f / 3f, 0.9f, 0.9f); 256 | camScript._skyColor = Color.HSVToRGB(randColor + 1f / 3f, 0.3f, 0.95f); 257 | Camera.main.backgroundColor = Color.HSVToRGB(randColor + 1f / 3f, 0.2f, 0.95f); 258 | } 259 | RenderSettings.ambientLight = Camera.main.backgroundColor; 260 | RenderSettings.fogColor = camScript._skyColor; 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /Assets/Plugins/GitHub/Editor/eula.txt: -------------------------------------------------------------------------------- 1 | END-USER LICENSE AGREEMENT 2 | 3 | This End-User License Agreement (EULA) is a legal agreement between you (either as an individual or on behalf of an entity) and GitHub, Inc. regarding your use of GitHub® for Unity, and associated documentation (the "Software"). 4 | 5 | IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS EULA, DO NOT INSTALL, USE OR COPY THE SOFTWARE. 6 | 7 | SUMMARY 8 | 9 | • You must agree to all of the terms of this EULA to use this Software. 10 | • If so, you may use the Software for free and for any lawful purpose. 11 | • This Software automatically communicates with GitHub servers 12 | for two reasons: (1) to send error reports; and 13 | (2) to send anonymized usage information. You can view 14 | sample data to see what information is sent, and you may opt out of 15 | sending the anonymized usage data. 16 | • This Software is provided "as-is" with no warranties, and you agree 17 | that GitHub is not liable for anything you do with it. 18 | • You really ought to just go ahead and read the whole EULA. 19 | It's not all that long. You should not only rely on this summary. 20 | 21 | THE AGREEMENT 22 | 23 | By downloading, installing, using, or copying the Software, you accept and agree to be bound by the terms of this EULA. If you do not agree to all of the terms of this EULA, you may not download, install, use or copy the Software. 24 | 25 | THE LICENSE 26 | 27 | This EULA entitles you to install as many copies of the Software as you want, and use the Software for any lawful purpose consistent with this EULA. Your license to use the Software is expressly conditioned upon your agreement to all of the terms of this EULA. This software is licensed, not sold. GitHub reserves all other rights not granted by this EULA. 28 | 29 | THE RESTRICTIONS 30 | 31 | 1. When using the Software you must use it in a manner that complies 32 | with the applicable laws in the jurisdiction(s) in which you use the 33 | Software. 34 | 35 | 2. You may not sell, resell, rent, lease or exchange the Software for 36 | anything of value. 37 | 38 | 3. You may redistribute the software, but it must include this EULA 39 | and you may not repackage or bundle the Software with any 40 | other software. 41 | 42 | 4. You may not remove or alter any proprietary notices or marks on 43 | the Software. 44 | 45 | PRIVACY NOTICES 46 | 47 | The Software automatically communicates with GitHub servers for two purposes: (1) sending error reports; and (2) sending anonymized usage data so we may improve the Software. If you would like to learn more about the specific information we send, please visit https://unity.github.com/samples.html. You may opt out of sending the anonymized usage data, but if you do not want the Software to send error reports, you must uninstall the Software. 48 | 49 | 1. ERROR REPORTS. In order to help us improve the Software, when the 50 | Software encounters certain errors, it will automatically send some 51 | information to GitHub about the error (as described at the URL 52 | above). 53 | This feature may not be disabled. If you do not want to send error 54 | reports to GitHub, you must uninstall the Software. 55 | 56 | 2. ANONYMIZED USAGE DATA. GitHub collects anonymized data about 57 | your usage of the Software to help us make it more awesome. 58 | Approximately once a day the Software sends such data 59 | (as described in more detail at the URL above) to GitHub's servers. 60 | If you do not want to send anonymized usage data to GitHub, 61 | you may opt out by changing your settings in the 62 | Settings dialog under the GitHub dialog. 63 | 64 | OPEN-SOURCE NOTICES 65 | 66 | Certain components of the Software may be subject to open-source software licenses ("Open-Source Components"), which means any software license approved as open-source licenses by the Open Source Initiative or any substantially similar licenses, including without limitation any license that, as a condition of distribution of the software licensed under such license, requires that the distributor make the software available in source code format. If you would like to see copies of the licenses applicable to the Open-Source Components, see CREDITS.txt. 67 | 68 | To the extent there is conflict between the license terms covering the Open-Source Components and this EULA, the terms of such licenses will apply in lieu of the terms of this EULA. To the extent the terms of the licenses applicable to Open-Source Components prohibit any of the restrictions in this Agreement with respect to such Open-Source Component, such restrictions will not apply to such Open-Source Component. To the extent the terms of the licenses applicable to Open-Source Components require Licensor to make an offer to provide source code in connection with the Product, such offer is hereby made, and you may exercise it by contacting support@github.com 69 | 70 | INTELLECTUAL PROPERTY NOTICES 71 | 72 | The Software and all worldwide copyrights, trade secrets, and other intellectual property rights therein are the exclusive property of GitHub. GitHub reserves all rights in and to the Software not expressly granted to you in this EULA. 73 | 74 | GitHub®, Atom™, their stylized versions and the Invertocat® are GitHub's Trademarks or registered Trademarks. You agree not to display or use these trademarks in any manner without GitHub's prior, written permission, except as allowed by GitHub's Logos and Usage Policy: https://github.com/logos. 75 | 76 | DISCLAIMERS AND LIMITATIONS ON LIABILITY 77 | 78 | THE SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND NO WARRANTY, EITHER EXPRESS OR IMPLIED, IS GIVEN. YOUR USE OF THE SOFTWARE IS AT YOUR SOLE RISK. GitHub does not warrant that (i) the Software will meet your specific requirements; (ii) the Software is fully compatible with any particular platform; (iii) your use of the Software will be uninterrupted, timely, secure, or error-free; (iv) the results that may be obtained from the use of the Software will be accurate or reliable; (v) the quality of any products, services, information, or other material purchased or obtained by you through the Software will meet your expectations; or (vi) any errors in the Software will be corrected. 79 | 80 | YOU EXPRESSLY UNDERSTAND AND AGREE THAT GITHUB SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER INTANGIBLE LOSSES (EVEN IF GITHUB HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES) RELATED TO THE SOFTWARE, including, for example: (i) the use or the inability to use the Software; (ii) the cost of procurement of substitute goods and services resulting from any goods, data, information or services purchased or obtained or messages received or transactions entered into through or from the Software; (iii) unauthorized access to or alteration of your transmissions or data; (iv) statements or conduct of any third-party on the Software; (v) or any other matter relating to the Software. 81 | 82 | GitHub reserves the right at any time and from time to time to modify or discontinue, temporarily or permanently, the Software (or any part thereof) with or without notice. GitHub shall not be liable to you or to any third-party for any modification, price change, suspension or discontinuance of the Software. 83 | 84 | MISCELLANEA 85 | 86 | 1. If you configure the Software to work with one or more accounts 87 | on the GitHub.com website or with an instance of GitHub Enterprise, 88 | your use of the Software will also be governed by the GitHub.com 89 | website Terms of Service and/or the license agreement applicable to 90 | your instance of GitHub Enterprise. 91 | 92 | 2. The failure of GitHub to exercise or enforce any right or provision 93 | of this EULA shall not constitute a waiver of such right or provision. 94 | 95 | 3. This EULA constitutes the entire agreement between you and GitHub 96 | and governs your use of the Software, superseding any prior 97 | agreements between you and GitHub (including, but not limited to, 98 | any prior versions of the EULA). 99 | 100 | 4. You agree that this EULA and your use of the Software are governed 101 | under California law and any dispute related to the Software must 102 | be brought in a tribunal of competent jurisdiction located in or 103 | near San Francisco, California. 104 | 105 | 5. Please send any questions about this EULA to support@github.com. 106 | -------------------------------------------------------------------------------- /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: 0.001 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: 0.001 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: 0.001 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: 0.001 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 shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 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: 0.001 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: 0.1 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: 0.1 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: 0.1 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: 0.19 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: 0.19 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 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: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Roll 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: left 301 | positiveButton: right 302 | altNegativeButton: a 303 | altPositiveButton: d 304 | gravity: 3 305 | dead: 0.001 306 | sensitivity: 3 307 | snap: 1 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Pitch 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: down 317 | positiveButton: up 318 | altNegativeButton: s 319 | altPositiveButton: w 320 | gravity: 3 321 | dead: 0.001 322 | sensitivity: 3 323 | snap: 1 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Yaw 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: left 333 | positiveButton: right 334 | altNegativeButton: a 335 | altPositiveButton: d 336 | gravity: 3 337 | dead: 0.001 338 | sensitivity: 3 339 | snap: 1 340 | invert: 0 341 | type: 0 342 | axis: 0 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: Forward 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: space 350 | altNegativeButton: 351 | altPositiveButton: 352 | gravity: 1000 353 | dead: 0.001 354 | sensitivity: 1000 355 | snap: 0 356 | invert: 0 357 | type: 0 358 | axis: 0 359 | joyNum: 0 360 | -------------------------------------------------------------------------------- /Assets/Animations/Player.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1107 &-8329424588188703013 4 | AnimatorStateMachine: 5 | serializedVersion: 5 6 | m_ObjectHideFlags: 1 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Base Layer 11 | m_ChildStates: 12 | - serializedVersion: 1 13 | m_State: {fileID: 8344523831771818436} 14 | m_Position: {x: 300, y: 110, z: 0} 15 | - serializedVersion: 1 16 | m_State: {fileID: 5042405552673175725} 17 | m_Position: {x: 300, y: 190, z: 0} 18 | - serializedVersion: 1 19 | m_State: {fileID: -3140286471603865566} 20 | m_Position: {x: 560, y: 190, z: 0} 21 | - serializedVersion: 1 22 | m_State: {fileID: 8735493737758308492} 23 | m_Position: {x: 560, y: 110, z: 0} 24 | m_ChildStateMachines: [] 25 | m_AnyStateTransitions: [] 26 | m_EntryTransitions: [] 27 | m_StateMachineTransitions: {} 28 | m_StateMachineBehaviours: [] 29 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 30 | m_EntryPosition: {x: 50, y: 120, z: 0} 31 | m_ExitPosition: {x: 800, y: 120, z: 0} 32 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 33 | m_DefaultState: {fileID: 8344523831771818436} 34 | --- !u!1101 &-8093382757749148621 35 | AnimatorStateTransition: 36 | m_ObjectHideFlags: 1 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_Name: 41 | m_Conditions: 42 | - m_ConditionMode: 1 43 | m_ConditionEvent: IsFlying 44 | m_EventTreshold: 0 45 | m_DstStateMachine: {fileID: 0} 46 | m_DstState: {fileID: 5042405552673175725} 47 | m_Solo: 0 48 | m_Mute: 0 49 | m_IsExit: 0 50 | serializedVersion: 3 51 | m_TransitionDuration: 0.060495794 52 | m_TransitionOffset: 0 53 | m_ExitTime: 0.74999994 54 | m_HasExitTime: 0 55 | m_HasFixedDuration: 1 56 | m_InterruptionSource: 0 57 | m_OrderedInterruption: 1 58 | m_CanTransitionToSelf: 1 59 | --- !u!1101 &-6117291635603176378 60 | AnimatorStateTransition: 61 | m_ObjectHideFlags: 1 62 | m_CorrespondingSourceObject: {fileID: 0} 63 | m_PrefabInstance: {fileID: 0} 64 | m_PrefabAsset: {fileID: 0} 65 | m_Name: 66 | m_Conditions: 67 | - m_ConditionMode: 2 68 | m_ConditionEvent: IsFlying 69 | m_EventTreshold: 0 70 | m_DstStateMachine: {fileID: 0} 71 | m_DstState: {fileID: 8735493737758308492} 72 | m_Solo: 0 73 | m_Mute: 0 74 | m_IsExit: 0 75 | serializedVersion: 3 76 | m_TransitionDuration: 0.1 77 | m_TransitionOffset: 0 78 | m_ExitTime: 0.7794118 79 | m_HasExitTime: 0 80 | m_HasFixedDuration: 1 81 | m_InterruptionSource: 0 82 | m_OrderedInterruption: 1 83 | m_CanTransitionToSelf: 1 84 | --- !u!1101 &-4043976422899812707 85 | AnimatorStateTransition: 86 | m_ObjectHideFlags: 1 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_Name: 91 | m_Conditions: 92 | - m_ConditionMode: 1 93 | m_ConditionEvent: IsFlying 94 | m_EventTreshold: 0 95 | m_DstStateMachine: {fileID: 0} 96 | m_DstState: {fileID: 5042405552673175725} 97 | m_Solo: 0 98 | m_Mute: 0 99 | m_IsExit: 0 100 | serializedVersion: 3 101 | m_TransitionDuration: 0.25 102 | m_TransitionOffset: 0 103 | m_ExitTime: 0.9375 104 | m_HasExitTime: 0 105 | m_HasFixedDuration: 1 106 | m_InterruptionSource: 0 107 | m_OrderedInterruption: 1 108 | m_CanTransitionToSelf: 1 109 | --- !u!1101 &-3238212780970104428 110 | AnimatorStateTransition: 111 | m_ObjectHideFlags: 1 112 | m_CorrespondingSourceObject: {fileID: 0} 113 | m_PrefabInstance: {fileID: 0} 114 | m_PrefabAsset: {fileID: 0} 115 | m_Name: 116 | m_Conditions: 117 | - m_ConditionMode: 2 118 | m_ConditionEvent: IsFlying 119 | m_EventTreshold: 0 120 | m_DstStateMachine: {fileID: 0} 121 | m_DstState: {fileID: 8735493737758308492} 122 | m_Solo: 0 123 | m_Mute: 0 124 | m_IsExit: 0 125 | serializedVersion: 3 126 | m_TransitionDuration: 0.030660927 127 | m_TransitionOffset: 0 128 | m_ExitTime: 0.75 129 | m_HasExitTime: 0 130 | m_HasFixedDuration: 1 131 | m_InterruptionSource: 0 132 | m_OrderedInterruption: 1 133 | m_CanTransitionToSelf: 1 134 | --- !u!1101 &-3202178571128106792 135 | AnimatorStateTransition: 136 | m_ObjectHideFlags: 1 137 | m_CorrespondingSourceObject: {fileID: 0} 138 | m_PrefabInstance: {fileID: 0} 139 | m_PrefabAsset: {fileID: 0} 140 | m_Name: 141 | m_Conditions: [] 142 | m_DstStateMachine: {fileID: 0} 143 | m_DstState: {fileID: -3140286471603865566} 144 | m_Solo: 0 145 | m_Mute: 0 146 | m_IsExit: 0 147 | serializedVersion: 3 148 | m_TransitionDuration: 0.3 149 | m_TransitionOffset: 0 150 | m_ExitTime: 0.73 151 | m_HasExitTime: 1 152 | m_HasFixedDuration: 1 153 | m_InterruptionSource: 0 154 | m_OrderedInterruption: 1 155 | m_CanTransitionToSelf: 1 156 | --- !u!1102 &-3140286471603865566 157 | AnimatorState: 158 | serializedVersion: 5 159 | m_ObjectHideFlags: 1 160 | m_CorrespondingSourceObject: {fileID: 0} 161 | m_PrefabInstance: {fileID: 0} 162 | m_PrefabAsset: {fileID: 0} 163 | m_Name: PlayerFly 164 | m_Speed: 1 165 | m_CycleOffset: 0 166 | m_Transitions: 167 | - {fileID: -3238212780970104428} 168 | m_StateMachineBehaviours: [] 169 | m_Position: {x: 50, y: 50, z: 0} 170 | m_IKOnFeet: 0 171 | m_WriteDefaultValues: 1 172 | m_Mirror: 0 173 | m_SpeedParameterActive: 0 174 | m_MirrorParameterActive: 0 175 | m_CycleOffsetParameterActive: 0 176 | m_TimeParameterActive: 0 177 | m_Motion: {fileID: 7400000, guid: 70b72e60880394521b50c7e15cbec698, type: 2} 178 | m_Tag: 179 | m_SpeedParameter: 180 | m_MirrorParameter: 181 | m_CycleOffsetParameter: 182 | m_TimeParameter: 183 | --- !u!91 &9100000 184 | AnimatorController: 185 | m_ObjectHideFlags: 0 186 | m_CorrespondingSourceObject: {fileID: 0} 187 | m_PrefabInstance: {fileID: 0} 188 | m_PrefabAsset: {fileID: 0} 189 | m_Name: Player 190 | serializedVersion: 5 191 | m_AnimatorParameters: 192 | - m_Name: IsFlying 193 | m_Type: 4 194 | m_DefaultFloat: 0 195 | m_DefaultInt: 0 196 | m_DefaultBool: 1 197 | m_Controller: {fileID: 9100000} 198 | m_AnimatorLayers: 199 | - serializedVersion: 5 200 | m_Name: Base Layer 201 | m_StateMachine: {fileID: -8329424588188703013} 202 | m_Mask: {fileID: 0} 203 | m_Motions: [] 204 | m_Behaviours: [] 205 | m_BlendingMode: 0 206 | m_SyncedLayerIndex: -1 207 | m_DefaultWeight: 0 208 | m_IKPass: 0 209 | m_SyncedLayerAffectsTiming: 0 210 | m_Controller: {fileID: 9100000} 211 | --- !u!1101 &410469661412275044 212 | AnimatorStateTransition: 213 | m_ObjectHideFlags: 1 214 | m_CorrespondingSourceObject: {fileID: 0} 215 | m_PrefabInstance: {fileID: 0} 216 | m_PrefabAsset: {fileID: 0} 217 | m_Name: 218 | m_Conditions: [] 219 | m_DstStateMachine: {fileID: 0} 220 | m_DstState: {fileID: 8344523831771818436} 221 | m_Solo: 0 222 | m_Mute: 0 223 | m_IsExit: 0 224 | serializedVersion: 3 225 | m_TransitionDuration: 0.34999996 226 | m_TransitionOffset: 0 227 | m_ExitTime: 0.6119534 228 | m_HasExitTime: 1 229 | m_HasFixedDuration: 1 230 | m_InterruptionSource: 1 231 | m_OrderedInterruption: 1 232 | m_CanTransitionToSelf: 1 233 | --- !u!1102 &5042405552673175725 234 | AnimatorState: 235 | serializedVersion: 5 236 | m_ObjectHideFlags: 1 237 | m_CorrespondingSourceObject: {fileID: 0} 238 | m_PrefabInstance: {fileID: 0} 239 | m_PrefabAsset: {fileID: 0} 240 | m_Name: PlayerStart 241 | m_Speed: 1 242 | m_CycleOffset: 0 243 | m_Transitions: 244 | - {fileID: -3202178571128106792} 245 | - {fileID: -6117291635603176378} 246 | m_StateMachineBehaviours: [] 247 | m_Position: {x: 50, y: 50, z: 0} 248 | m_IKOnFeet: 0 249 | m_WriteDefaultValues: 1 250 | m_Mirror: 0 251 | m_SpeedParameterActive: 0 252 | m_MirrorParameterActive: 0 253 | m_CycleOffsetParameterActive: 0 254 | m_TimeParameterActive: 0 255 | m_Motion: {fileID: 7400000, guid: 7bef6b856f5474aec8480da7f8658261, type: 2} 256 | m_Tag: 257 | m_SpeedParameter: 258 | m_MirrorParameter: 259 | m_CycleOffsetParameter: 260 | m_TimeParameter: 261 | --- !u!1102 &8344523831771818436 262 | AnimatorState: 263 | serializedVersion: 5 264 | m_ObjectHideFlags: 1 265 | m_CorrespondingSourceObject: {fileID: 0} 266 | m_PrefabInstance: {fileID: 0} 267 | m_PrefabAsset: {fileID: 0} 268 | m_Name: playerIdle 269 | m_Speed: 1 270 | m_CycleOffset: 0 271 | m_Transitions: 272 | - {fileID: -4043976422899812707} 273 | m_StateMachineBehaviours: [] 274 | m_Position: {x: 50, y: 50, z: 0} 275 | m_IKOnFeet: 0 276 | m_WriteDefaultValues: 1 277 | m_Mirror: 0 278 | m_SpeedParameterActive: 0 279 | m_MirrorParameterActive: 0 280 | m_CycleOffsetParameterActive: 0 281 | m_TimeParameterActive: 0 282 | m_Motion: {fileID: 7400000, guid: 1f9552f10193e4d7ca52fdfc663297a1, type: 2} 283 | m_Tag: 284 | m_SpeedParameter: 285 | m_MirrorParameter: 286 | m_CycleOffsetParameter: 287 | m_TimeParameter: 288 | --- !u!1102 &8735493737758308492 289 | AnimatorState: 290 | serializedVersion: 5 291 | m_ObjectHideFlags: 1 292 | m_CorrespondingSourceObject: {fileID: 0} 293 | m_PrefabInstance: {fileID: 0} 294 | m_PrefabAsset: {fileID: 0} 295 | m_Name: PlayerStop 296 | m_Speed: 1 297 | m_CycleOffset: 0 298 | m_Transitions: 299 | - {fileID: 410469661412275044} 300 | - {fileID: -8093382757749148621} 301 | m_StateMachineBehaviours: [] 302 | m_Position: {x: 50, y: 50, z: 0} 303 | m_IKOnFeet: 0 304 | m_WriteDefaultValues: 1 305 | m_Mirror: 0 306 | m_SpeedParameterActive: 0 307 | m_MirrorParameterActive: 0 308 | m_CycleOffsetParameterActive: 0 309 | m_TimeParameterActive: 0 310 | m_Motion: {fileID: 7400000, guid: f9161772e948d4f65b82c04b2d7932b1, type: 2} 311 | m_Tag: 312 | m_SpeedParameter: 313 | m_MirrorParameter: 314 | m_CycleOffsetParameter: 315 | m_TimeParameter: 316 | -------------------------------------------------------------------------------- /Assets/scripts/RaymarchCam.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(Camera))] 6 | [ExecuteInEditMode] 7 | 8 | public class RaymarchCam : SceneViewFilter 9 | { 10 | [SerializeField] 11 | [Header("Global Settings")] 12 | private Shader _shader; 13 | 14 | public Material _raymarchMaterial 15 | { 16 | get 17 | { 18 | if (!_raymarchMat && _shader) 19 | { 20 | _raymarchMat = new Material(_shader); 21 | _raymarchMat.hideFlags = HideFlags.HideAndDontSave; 22 | } 23 | 24 | return _raymarchMat; 25 | } 26 | } 27 | 28 | private Material _raymarchMat; 29 | 30 | public Camera _camera 31 | { 32 | get 33 | { 34 | if (!_cam) 35 | { 36 | _cam = GetComponent < Camera >(); 37 | } 38 | return _cam; 39 | } 40 | } 41 | private Camera _cam; 42 | private float _forceFieldRad; 43 | 44 | 45 | // all the variables send to the shader Bools are converted to ints because bools are not supported in shaders 46 | public Transform _directionalLight; 47 | public Transform _player; 48 | //public float _maxDistance; 49 | public float _precision; 50 | [Header("Visual Settings")] 51 | public bool _useNormal; 52 | public bool _useShadow; 53 | [Range(0, 1)] 54 | public float _lightIntensity; 55 | [Range(0, 1)] 56 | public float _shadowIntensity; 57 | [Range(0, 1)] 58 | public float _aoIntensity; 59 | public Color _mainColor; 60 | public Color _secColor; 61 | public Color _skyColor; 62 | public Color _forceFieldColor; 63 | 64 | [Header("Modulor Settings")] 65 | public bool _useModulor; 66 | public Vector3 _modInterval; 67 | 68 | [Header("Fractal Settings")] 69 | 70 | public bool _drawMergerSponge; 71 | public bool _drawMergerCylinder; 72 | public bool _drawMergerPyramid; 73 | public bool _drawNegativeSphere; 74 | public int _iterations; 75 | public float _power; 76 | public float _scaleFactor; 77 | public Vector3 _modOffsetPos; 78 | public Vector3 _iterationOffsetPos; 79 | public Vector3 _iterationOffsetRot; 80 | 81 | [Header("transform Settings")] 82 | public Vector3 _globalPosition; 83 | public Vector3 _GlobalRotation; 84 | public float _GlobalScale; 85 | public float _smoothRadius; 86 | public float _innerSphereRad; 87 | public bool _drawSphere; 88 | public bool _drawBox; 89 | 90 | 91 | 92 | [Header("Plane Settings")] 93 | public bool _useSectionPlane; 94 | public bool _useSymmetry; 95 | public Vector3 _sectionPos; 96 | public Vector3 _sectionRot; 97 | [HideInInspector] 98 | public int _renderNr; 99 | private int _usePlane; 100 | private int _useMod; 101 | 102 | [HideInInspector] 103 | public Matrix4x4 _iterationTransform; 104 | [HideInInspector] 105 | public Matrix4x4 _sectionTransform; 106 | [HideInInspector] 107 | public Matrix4x4 _globalTransform; 108 | 109 | private void OnRenderImage(RenderTexture source, RenderTexture destination) 110 | { 111 | 112 | 113 | if (_drawMergerSponge == true || _drawMergerCylinder == true || _drawMergerPyramid == true || _drawNegativeSphere == true) 114 | { 115 | 116 | if (_drawMergerSponge) _renderNr = 1; 117 | if (_drawMergerCylinder) _renderNr = 2; 118 | if (_drawMergerPyramid) _renderNr = 3; 119 | if (_drawNegativeSphere) _renderNr = 4; 120 | 121 | 122 | // Construct a Model Matrix for the iteration transform 123 | _iterationTransform = Matrix4x4.TRS( 124 | _iterationOffsetPos, 125 | Quaternion.identity, 126 | Vector3.one); 127 | _iterationTransform *= Matrix4x4.TRS( 128 | Vector3.zero, 129 | Quaternion.Euler(_iterationOffsetRot), 130 | Vector3.one); 131 | // Send the matrix to our shader 132 | _raymarchMaterial.SetMatrix("_iterationTransform", _iterationTransform.inverse); 133 | _raymarchMaterial.SetVector("_modInterval", _modInterval); 134 | _raymarchMaterial.SetVector("_modOffsetPos", _modOffsetPos); 135 | _raymarchMaterial.SetFloat("_scaleFactor", _scaleFactor); 136 | _raymarchMaterial.SetFloat("_innerSphereRad", _innerSphereRad); 137 | 138 | } 139 | 140 | else if (_drawSphere == true) 141 | { 142 | _renderNr = 5; 143 | 144 | } 145 | 146 | else if (_drawBox == true) 147 | { 148 | _renderNr = 6; 149 | 150 | } 151 | 152 | if (_useModulor) 153 | { 154 | _useMod = 1; 155 | _raymarchMaterial.SetVector("_modInterval", _modInterval); 156 | } 157 | else _useMod = 0; 158 | 159 | if (_useSectionPlane) 160 | { 161 | _usePlane = 1; 162 | // Construct a Model Matrix for the sectionplane 163 | _sectionTransform = Matrix4x4.TRS( 164 | _sectionPos, 165 | Quaternion.identity, 166 | Vector3.one); 167 | _sectionTransform *= Matrix4x4.TRS( 168 | Vector3.zero, 169 | Quaternion.Euler(_sectionRot), 170 | Vector3.one); 171 | // Send the matrix to our shader 172 | _raymarchMaterial.SetMatrix("_sectionTransform", _sectionTransform.inverse); 173 | } 174 | else if (_useSymmetry) 175 | { 176 | _usePlane = 2; 177 | // Construct a Model Matrix for the sectionplane 178 | _sectionTransform = Matrix4x4.TRS( 179 | _sectionPos, 180 | Quaternion.identity, 181 | Vector3.one); 182 | _sectionTransform *= Matrix4x4.TRS( 183 | Vector3.zero, 184 | Quaternion.Euler(_sectionRot), 185 | Vector3.one); 186 | // Send the matrix to our shader 187 | _raymarchMaterial.SetMatrix("_sectionTransform", _sectionTransform.inverse); 188 | } 189 | else _usePlane = 0; 190 | 191 | 192 | // Construct a Model Matrix for the global transform 193 | _globalTransform = Matrix4x4.TRS( 194 | _globalPosition, 195 | Quaternion.identity, 196 | Vector3.one); 197 | _globalTransform *= Matrix4x4.TRS( 198 | Vector3.zero, 199 | Quaternion.Euler(_GlobalRotation), 200 | Vector3.one); 201 | // Send the matrix to our shader 202 | _raymarchMaterial.SetMatrix("_globalTransform", _globalTransform.inverse); 203 | _raymarchMaterial.SetVector("_globalPosition", _globalPosition); 204 | 205 | 206 | if (_useNormal) _raymarchMaterial.SetInt("_useNormal", 1); 207 | else _raymarchMaterial.SetInt("_useNormal", 0); 208 | 209 | if (_useShadow) _raymarchMaterial.SetInt("_useShadow", 1); 210 | else _raymarchMaterial.SetInt("_useShadow", 0); 211 | 212 | if (!_raymarchMaterial) 213 | { 214 | Graphics.Blit(source, destination); 215 | return; 216 | } 217 | _forceFieldRad = _player.gameObject.GetComponent().radius; 218 | 219 | _raymarchMaterial.SetMatrix("_CamFrustrum", CamFrustrum(_camera)); 220 | _raymarchMaterial.SetMatrix("_CamToWorld", _camera.cameraToWorldMatrix); 221 | _raymarchMaterial.SetFloat("_maxDistance", Camera.main.farClipPlane); 222 | _raymarchMaterial.SetFloat("_precision", _precision); 223 | _raymarchMaterial.SetFloat("_lightIntensity", _lightIntensity); 224 | _raymarchMaterial.SetFloat("_shadowIntensity", _shadowIntensity); 225 | _raymarchMaterial.SetFloat("_aoIntensity", _aoIntensity); 226 | _raymarchMaterial.SetInt("_iterations", _iterations); 227 | _raymarchMaterial.SetFloat("_power", _power); 228 | _raymarchMaterial.SetVector("_lightDir", _directionalLight ? _directionalLight.forward : Vector3.down); 229 | _raymarchMaterial.SetVector("_player", _player ? _player.position : Vector3.zero); 230 | _raymarchMaterial.SetColor("_mainColor", _mainColor); 231 | _raymarchMaterial.SetColor("_secColor", _secColor); 232 | _raymarchMaterial.SetColor("_skyColor", _skyColor); 233 | _raymarchMaterial.SetColor("_forceFieldColor", _forceFieldColor); 234 | _raymarchMaterial.SetFloat("_forceFieldRad", _forceFieldRad); 235 | _raymarchMaterial.SetFloat("_GlobalScale", _GlobalScale); 236 | _raymarchMaterial.SetFloat("_smoothRadius", _smoothRadius); 237 | 238 | 239 | _raymarchMaterial.SetInt("_renderNr", _renderNr); 240 | _raymarchMaterial.SetInt("_usePlane", _usePlane); 241 | _raymarchMaterial.SetInt("_useMod", _useMod); 242 | 243 | RenderTexture.active = destination; 244 | _raymarchMaterial.SetTexture("_MainTex", source); 245 | 246 | GL.PushMatrix(); 247 | GL.LoadOrtho(); 248 | _raymarchMaterial.SetPass(0); 249 | GL.Begin(GL.QUADS); 250 | 251 | //BL 252 | GL.MultiTexCoord2(0, 0.0f, 0.0f); 253 | GL.Vertex3(0.0f, 0.0f, 3.0f); 254 | 255 | //BR 256 | GL.MultiTexCoord2(0, 1.0f, 0.0f); 257 | GL.Vertex3(1.0f, 0.0f, 2.0f); 258 | 259 | //TR 260 | GL.MultiTexCoord2(0, 1.0f, 1.0f); 261 | GL.Vertex3(1.0f, 1.0f, 1.0f); 262 | 263 | //TL 264 | GL.MultiTexCoord2(0, 0.0f, 1.0f); 265 | GL.Vertex3(0.0f, 1.0f, 0.0f); 266 | 267 | GL.End(); 268 | GL.PopMatrix(); 269 | } 270 | 271 | private Matrix4x4 CamFrustrum(Camera cam) 272 | { 273 | Matrix4x4 frustrum = Matrix4x4.identity; 274 | float fov = Mathf.Tan((cam.fieldOfView * 0.5f) * Mathf.Deg2Rad); 275 | 276 | Vector3 goUp = Vector3.up * fov; 277 | Vector3 goRight = Vector3.right * fov * cam.aspect; 278 | 279 | Vector3 TL = (-Vector3.forward - goRight + goUp); 280 | Vector3 TR = (-Vector3.forward + goRight + goUp); 281 | Vector3 BL = (-Vector3.forward - goRight - goUp); 282 | Vector3 BR = (-Vector3.forward + goRight - goUp); 283 | 284 | frustrum.SetRow(0, TL); 285 | frustrum.SetRow(1, TR); 286 | frustrum.SetRow(2, BR); 287 | frustrum.SetRow(3, BL); 288 | 289 | 290 | return frustrum; 291 | } 292 | 293 | } 294 | -------------------------------------------------------------------------------- /Assets/scripts/DistanceFunctions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class DistanceFunctions : MonoBehaviour 6 | { 7 | // ****************** Distance Functions ****************** 8 | 9 | // Sphere 10 | // s: radius 11 | public float sdSphere(Vector3 p, float s) 12 | { 13 | return p.magnitude - s; 14 | } 15 | 16 | // Box 17 | // b: size of box in x/y/z 18 | public float sdBox(Vector3 p, Vector3 b) 19 | { 20 | Vector3 d = Abs(p) - b; 21 | return Mathf.Min(Mathf.Max(d.x, Mathf.Max(d.y, d.z)), 0.0f) + (Max(d, Vector3.zero).magnitude); 22 | } 23 | //triangle prism 24 | public float sdTriPrism(Vector2 p, Vector2 h) 25 | { 26 | p.y = -p.y; 27 | p.y += h.x; 28 | float k = Mathf.Sqrt(3.0f); 29 | h.x *= 0.5f * k; 30 | p /= h.x; 31 | p.x = Mathf.Abs(p.x) - 1.0f; 32 | p.y += 1.0f / k; 33 | if (p.x + k * p.y > 0.0) p = new Vector2(p.x - k * p.y, -k * p.x - p.y) / 2.0f; 34 | p.x -= Mathf.Clamp(p.x, -2.0f, 0.0f); 35 | float d1 = p.magnitude * Mathf.Sign(-p.y) * h.x; 36 | float d2 = -h.y; 37 | return Max2(new Vector2(d1, d2),Vector2.zero).magnitude + Mathf.Min(Mathf.Max(d1, d2), 0.0f); 38 | } 39 | 40 | // InfBox 41 | // b: size of box in x/y/z 42 | float sd2DBox(Vector2 p, Vector2 b) 43 | { 44 | Vector2 d = Abs2(p) - b; 45 | return Mathf.Sqrt( Vector2.SqrMagnitude(Max2(d, Vector2.zero))) + Mathf.Min(Mathf.Max(d.x, d.y), 0.0f); 46 | } 47 | float sd2DCylinder(Vector2 p, float c) 48 | { 49 | return p.magnitude - c; 50 | } 51 | 52 | // plane 53 | public float sdPlane(Vector3 p, Matrix4x4 _globalTransform) 54 | { 55 | 56 | float plane = _globalTransform.MultiplyPoint(p).x; 57 | return plane; 58 | 59 | } 60 | 61 | // Cross 62 | // s: size of cross 63 | float sdCross(in Vector3 p, float b) 64 | { 65 | float da = sd2DBox(new Vector2(p.x, p.y), Vector2.one * b); 66 | float db = sd2DBox(new Vector2(p.y, p.z), Vector2.one * b); 67 | float dc = sd2DBox(new Vector2(p.x, p.z), Vector2.one * b); 68 | return Mathf.Min(da, Mathf.Min(db, dc)); 69 | } 70 | float sdCylinderCross(in Vector3 p, float b) 71 | { 72 | float da = sd2DCylinder(new Vector2(p.x, p.y), b); 73 | float db = sd2DCylinder(new Vector2(p.y, p.z), b); 74 | float dc = sd2DCylinder(new Vector2(p.x, p.z), b); 75 | return Mathf.Min(da, Mathf.Min(db, dc)); 76 | } 77 | //trianglecross 78 | public float sdtriangleCross( Vector3 p, float b) 79 | { 80 | float da = sdTriPrism(new Vector2(p.x,p.y),new Vector2(b, b * 0.2f)); 81 | float db = sdTriPrism(new Vector2(p.z,p.y),new Vector2(b, b * 0.2f)); 82 | 83 | return Mathf.Min(da, db); 84 | } 85 | //pyramid 86 | float sdPyramid(Vector3 p, float h) 87 | { 88 | float m2 = h * h + 0.25f; 89 | 90 | p.x = Mathf.Abs(p.x); 91 | p.z = Mathf.Abs(p.z); 92 | if(p.z > p.x) 93 | { 94 | float pTemp = p.z; 95 | p.z = p.x; 96 | p.x = pTemp; 97 | } 98 | p.z -= 0.5f; 99 | p.x -= 0.5f; 100 | 101 | Vector3 q = new Vector3(p.z, h * p.y - 0.5f * p.x, h * p.x + 0.5f * p.y); 102 | 103 | float s = Mathf.Max(-q.x, 0.0f); 104 | float t = Mathf.Clamp((q.y - 0.5f * p.z) / (m2 + 0.25f), 0.0f, 1.0f); 105 | 106 | float a = m2 * (q.x + s) * (q.x + s) + q.y * q.y; 107 | float b = m2 * (q.x + 0.5f * t) * (q.x + 0.5f * t) + (q.y - m2 * t) * (q.y - m2 * t); 108 | 109 | float d2 = Mathf.Min(q.y, -q.x * m2 - q.y * 0.5f) > 0.0f ? 0.0f : Mathf.Min(a, b); 110 | 111 | return Mathf.Sqrt((d2 + q.z * q.z) / m2) * Mathf.Sign(Mathf.Max(q.z, -p.y)); 112 | } 113 | 114 | //mirror x plane 115 | public Vector3 sdSymX(Vector3 p) 116 | { 117 | p.x = Abs(p).x; 118 | return p; 119 | } 120 | 121 | //mirror xz plane 122 | public Vector3 sdSymXZ(Vector3 p) 123 | { 124 | p = new Vector3 (Mathf.Abs(p.x),p.y, Mathf.Abs(p.z)); 125 | return p; 126 | } 127 | //mirror all 3 128 | public Vector3 sdSymXYZ(Vector3 p) 129 | { 130 | p = Abs(p); 131 | return p; 132 | } 133 | 134 | //Menger Sponge 135 | public float sdMerger(Vector3 p, float b, int _iterations, Vector3 _modOffsetPos, Matrix4x4 _iterationTransform, Matrix4x4 _globalTransform, float _smoothRadius, float _scaleFactor) 136 | { 137 | p = _globalTransform.MultiplyPoint(p); 138 | 139 | float d = sdBox(p, new Vector3 (b - _smoothRadius, b - _smoothRadius, b - _smoothRadius)) - _smoothRadius; 140 | 141 | float s = 1.0f; 142 | for (int m = 0; m < _iterations; m++) 143 | { 144 | p = _iterationTransform.MultiplyPoint(p); 145 | p.x = mod(p.x, b * _modOffsetPos.x *2/s); 146 | p.y = mod(p.y, b * _modOffsetPos.y *2/s); 147 | p.z = mod(p.z, b * _modOffsetPos.z *2/s); 148 | 149 | 150 | s *= _scaleFactor * 3; 151 | Vector3 r = (p) * s; 152 | float c = (sdCross(r, b - _smoothRadius) - _smoothRadius) / s; 153 | //d = max(d,-c); 154 | 155 | 156 | if (-c > d) 157 | { 158 | d = -c; 159 | 160 | } 161 | 162 | } 163 | 164 | return d; 165 | } 166 | //Menger Cylinder 167 | public float sdMergerCyl(Vector3 p, float b, int _iterations, Vector3 _modOffsetPos, Matrix4x4 _iterationTransform, Matrix4x4 _globalTransform, float _smoothRadius, float _scaleFactor) 168 | { 169 | p = _globalTransform.MultiplyPoint(p); 170 | 171 | float d = sdSphere(p, b - _smoothRadius) - _smoothRadius; 172 | 173 | float s = 1.0f; 174 | for (int m = 0; m < _iterations; m++) 175 | { 176 | p = _iterationTransform.MultiplyPoint(p); 177 | p.x = mod(p.x, b * _modOffsetPos.x *2/s); 178 | p.y = mod(p.y, b * _modOffsetPos.y *2/s); 179 | p.z = mod(p.z, b * _modOffsetPos.z *2/s); 180 | 181 | 182 | s *= _scaleFactor * 3; 183 | Vector3 r = (p) * s; 184 | float c = (sdCylinderCross(r, b - _smoothRadius) - _smoothRadius) / s; 185 | //d = max(d,-c); 186 | 187 | 188 | if (-c > d) 189 | { 190 | d = -c; 191 | 192 | } 193 | 194 | } 195 | 196 | return d; 197 | } 198 | 199 | 200 | //merger piramid 201 | public float sdMergerPyr( Vector3 p, float b, int _iterations, Vector3 _modOffsetPos, Matrix4x4 _iterationTransform, Matrix4x4 _globalTransform, float _smoothRadius, float _scaleFactor) 202 | { 203 | b = 2 * b; 204 | p = _globalTransform.MultiplyPoint(p); 205 | 206 | 207 | float d = (sdPyramid(p / b, Mathf.Sqrt(3) / 2) * b); 208 | 209 | float s = 1.0f; 210 | for (int m = 0; m < _iterations; m++) 211 | { 212 | p = _iterationTransform.MultiplyPoint(p); 213 | //p = abs(p); 214 | p.x = mod(p.x, b * _modOffsetPos.x * 0.5f / s); 215 | p.y = mod(p.y, b * _modOffsetPos.y * (Mathf.Sqrt(3) / 2) / s); 216 | p.z = mod(p.z, b * _modOffsetPos.z * 0.5f / s); 217 | 218 | s *= _scaleFactor * 2; 219 | Vector3 r = (p) * s; 220 | float c = (sdtriangleCross(r, b / Mathf.Sqrt(3))) / s; 221 | 222 | 223 | 224 | if (-c > d) 225 | { 226 | d = -c; 227 | 228 | 229 | } 230 | } 231 | return d; 232 | } 233 | //negative sphere 234 | 235 | public float sdNegSphere(Vector3 p, float b, int _iterations, Vector3 _modOffsetPos, Matrix4x4 _iterationTransform, Matrix4x4 _globalTransform, float _sphere1, float _scaleFactor) 236 | { 237 | p = _globalTransform.MultiplyPoint(p); 238 | 239 | 240 | float d = sdBox(p, new Vector3(b, b, b)); 241 | 242 | float s = 1.0f; 243 | for (int m = 0; m < _iterations; m++) 244 | { 245 | p = _iterationTransform.MultiplyPoint(p); 246 | p.x = mod(p.x, b * _modOffsetPos.x * 2 / s); 247 | p.y = mod(p.y, b * _modOffsetPos.y * 2 / s); 248 | p.z = mod(p.z, b * _modOffsetPos.z * 2 / s); 249 | s *= _sphere1; 250 | Vector3 r = (p) * s; 251 | float c = sdSphere(r, b) / s; 252 | s *= _scaleFactor * 3; 253 | 254 | if (-c > d) 255 | { 256 | d = -c; 257 | 258 | 259 | } 260 | } 261 | return d; 262 | 263 | } 264 | 265 | 266 | //modulor operator 267 | public float mod(float a, float n) 268 | { 269 | float halfsize = n / 2; 270 | //float result; 271 | /* 272 | if (a < 0) 273 | { 274 | result = -((-a + halfsize) % n - halfsize); 275 | } 276 | else result = (a + halfsize) % n - halfsize; 277 | */ 278 | a = (a + halfsize) % n - halfsize; 279 | a = (a - halfsize) % n + halfsize; 280 | 281 | return a; 282 | } 283 | 284 | //returs the absolute value of a vector 285 | public Vector3 Abs(Vector3 vec) 286 | { 287 | return new Vector3(Mathf.Abs(vec.x), Mathf.Abs(vec.y), Mathf.Abs(vec.z)); 288 | } 289 | 290 | //returs the absolute value of a vector 291 | public Vector2 Abs2(Vector2 vec) 292 | { 293 | return new Vector2(Mathf.Abs(vec.x), Mathf.Abs(vec.y)); 294 | } 295 | 296 | //returns the Largest Vector 297 | public Vector3 Max(Vector3 vec1, Vector3 vec2) 298 | { 299 | return new Vector3(Mathf.Max(vec1.x, vec2.x), Mathf.Max(vec1.y, vec2.y), Mathf.Max(vec1.z, vec2.z)); 300 | } 301 | 302 | //returns the Smallest Vector 303 | public Vector3 Min(Vector3 vec1, Vector3 vec2) 304 | { 305 | return new Vector3(Mathf.Max(vec1.x, vec2.x), Mathf.Max(vec1.y, vec2.y), Mathf.Max(vec1.z, vec2.z)); 306 | } 307 | 308 | //returns the Largest Vector 309 | public Vector2 Max2(Vector2 vec1, Vector2 vec2) 310 | { 311 | return new Vector2(Mathf.Max(vec1.x, vec2.x), Mathf.Max(vec1.y, vec2.y)); 312 | } 313 | 314 | //returns the Smallest Vector 315 | public Vector2 Min2(Vector2 vec1, Vector2 vec2) 316 | { 317 | return new Vector2(Mathf.Max(vec1.x, vec2.x), Mathf.Max(vec1.y, vec2.y)); 318 | } 319 | 320 | 321 | 322 | } 323 | 324 | --------------------------------------------------------------------------------