mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-01 13:59:22 +00:00
Merge remote-tracking branch 'PortableCameraAdditions/main'
Merge PortableCameraAdditions
This commit is contained in:
commit
f87c7791c9
8 changed files with 449 additions and 0 deletions
54
PortableCameraAdditions/HarmonyPatches.cs
Normal file
54
PortableCameraAdditions/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using ABI_RC.Systems.Camera;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.Melons.PortableCameraAdditions.HarmonyPatches;
|
||||
|
||||
[HarmonyPatch]
|
||||
internal class PortableCameraPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PortableCamera), nameof(PortableCamera.Start))]
|
||||
private static void Postfix_PortableCamera_Start(ref PortableCamera __instance)
|
||||
{
|
||||
//run mod.Setup() instead of registering full mod with icon
|
||||
VisualMods.CameraAdditions mainMod = new VisualMods.CameraAdditions();
|
||||
mainMod.Setup(__instance);
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PortableCamera), nameof(PortableCamera.OnWorldLoaded))]
|
||||
private static void Postfix_PortableCamera_OnWorldLoaded(Camera worldCamera)
|
||||
{
|
||||
VisualMods.CameraAdditions.Instance?.OnWorldLoaded(worldCamera);
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PortableCamera), nameof(PortableCamera.UpdateOptionsDisplay))]
|
||||
private static void Postfix_PortableCamera_UpdateOptionsDisplay(ref bool ____showExpertSettings)
|
||||
{
|
||||
VisualMods.CameraAdditions.Instance?.OnUpdateOptionsDisplay(____showExpertSettings);
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PortableCamera), nameof(PortableCamera.Update))]
|
||||
private static void Postfix_PortableCamera_Update(ref PortableCamera __instance)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.F11))
|
||||
{
|
||||
bool flag = __instance.mode == MirroringMode.NoMirror;
|
||||
__instance.mode = (flag) ? MirroringMode.Mirror : MirroringMode.NoMirror;
|
||||
__instance.mirroringActive.SetActive(flag);
|
||||
__instance.mirroringCanvas.gameObject.SetActive(flag);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PortableCamera), nameof(PortableCamera.OnDisable))]
|
||||
private static void Postfix_PortableCamera_OnDisable(ref PortableCamera __instance)
|
||||
{
|
||||
__instance.mode = MirroringMode.NoMirror;
|
||||
__instance.mirroringActive.SetActive(false);
|
||||
__instance.mirroringCanvas.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
11
PortableCameraAdditions/Main.cs
Normal file
11
PortableCameraAdditions/Main.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using MelonLoader;
|
||||
|
||||
namespace NAK.Melons.PortableCameraAdditions;
|
||||
|
||||
public class PortableCameraAdditions : MelonMod
|
||||
{
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
//boobs
|
||||
}
|
||||
}
|
74
PortableCameraAdditions/PortableCameraAdditions.csproj
Normal file
74
PortableCameraAdditions/PortableCameraAdditions.csproj
Normal file
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="resources\**" />
|
||||
<EmbeddedResource Remove="resources\**" />
|
||||
<None Remove="resources\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BTKUILib">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Cohtml.Runtime">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Cohtml.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MelonLoader">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\MelonLoader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Postprocessing.Runtime">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Unity.Postprocessing.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Unity.TextMeshPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AssetBundleModule">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.ImageConversionModule">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.ImageConversionModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.InputLegacyModule">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.InputLegacyModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.PhysicsModule">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.PhysicsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UIModule">
|
||||
<HintPath>..\..\..\_ManagedLibs\UnityEngine.UIModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Deploy" AfterTargets="Build">
|
||||
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" />
|
||||
<Message Text="Copied $(TargetPath) to C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" Importance="high" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
25
PortableCameraAdditions/PortableCameraAdditions.sln
Normal file
25
PortableCameraAdditions/PortableCameraAdditions.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.2.32630.192
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PortableCameraAdditions", "PortableCameraAdditions.csproj", "{3FFA9B93-18BA-4785-862A-DBDD95BE96A3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3FFA9B93-18BA-4785-862A-DBDD95BE96A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3FFA9B93-18BA-4785-862A-DBDD95BE96A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3FFA9B93-18BA-4785-862A-DBDD95BE96A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3FFA9B93-18BA-4785-862A-DBDD95BE96A3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {99545B29-77BE-44B4-8DC3-99133AB16810}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
30
PortableCameraAdditions/Properties/AssemblyInfo.cs
Normal file
30
PortableCameraAdditions/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using MelonLoader;
|
||||
using NAK.Melons.PortableCameraAdditions.Properties;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyTitle(nameof(NAK.Melons.PortableCameraAdditions))]
|
||||
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||
[assembly: AssemblyProduct(nameof(NAK.Melons.PortableCameraAdditions))]
|
||||
|
||||
[assembly: MelonInfo(
|
||||
typeof(NAK.Melons.PortableCameraAdditions.PortableCameraAdditions),
|
||||
nameof(NAK.Melons.PortableCameraAdditions),
|
||||
AssemblyInfoParams.Version,
|
||||
AssemblyInfoParams.Author,
|
||||
downloadLink: "https://github.com/NotAKidOnSteam/PortableCameraAdditions"
|
||||
)]
|
||||
|
||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
|
||||
namespace NAK.Melons.PortableCameraAdditions.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.2";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
226
PortableCameraAdditions/VisualMods/CameraAdditions.cs
Normal file
226
PortableCameraAdditions/VisualMods/CameraAdditions.cs
Normal file
|
@ -0,0 +1,226 @@
|
|||
using ABI_RC.Systems.Camera;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.Melons.PortableCameraAdditions.VisualMods;
|
||||
|
||||
public class CameraAdditions
|
||||
{
|
||||
public static CameraAdditions Instance;
|
||||
|
||||
public Camera referenceCamera;
|
||||
public bool orthographicMode;
|
||||
|
||||
//Should I move these to MelonPrefs?
|
||||
public bool CopyWorldNearClip = true;
|
||||
public bool CopyWorldFarClip = true;
|
||||
|
||||
private PortableCameraSetting setting_NearClip;
|
||||
private PortableCameraSetting setting_FarClip;
|
||||
|
||||
private PortableCameraSetting setting_OrthographicSize;
|
||||
private PortableCameraSetting setting_OrthographicNearClip;
|
||||
private PortableCameraSetting setting_OrthographicFarClip;
|
||||
|
||||
public void Setup(PortableCamera __instance)
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
__instance.@interface.AddAndGetHeader(null, typeof(CameraAdditions), "Additional Settings");
|
||||
|
||||
//Basic Settings
|
||||
|
||||
PortableCameraSetting setting_CopyWorldNearClip = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Bool);
|
||||
setting_CopyWorldNearClip.BoolChanged = new Action<bool>(value => UpdateCameraSettingBool("CopyNearClip", value));
|
||||
setting_CopyWorldNearClip.SettingName = "CopyNearClip";
|
||||
setting_CopyWorldNearClip.DisplayName = "Copy World Near Clip";
|
||||
setting_CopyWorldNearClip.OriginType = typeof(CameraAdditions);
|
||||
setting_CopyWorldNearClip.DefaultValue = true;
|
||||
setting_CopyWorldNearClip.Load();
|
||||
|
||||
PortableCameraSetting setting_CopyWorldFarClip = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Bool);
|
||||
setting_CopyWorldFarClip.BoolChanged = new Action<bool>(value => UpdateCameraSettingBool("CopyFarClip", value));
|
||||
setting_CopyWorldFarClip.SettingName = "CopyFarClip";
|
||||
setting_CopyWorldFarClip.DisplayName = "Copy World Far Clip";
|
||||
setting_CopyWorldFarClip.OriginType = typeof(CameraAdditions);
|
||||
setting_CopyWorldFarClip.DefaultValue = true;
|
||||
setting_CopyWorldFarClip.Load();
|
||||
|
||||
//Expert Settings
|
||||
|
||||
PortableCameraSetting setting_Orthographic = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Bool);
|
||||
setting_Orthographic.BoolChanged = new Action<bool>(value => UpdateCameraSettingBool("Orthographic", value));
|
||||
setting_Orthographic.SettingName = "Orthographic";
|
||||
setting_Orthographic.DisplayName = "Orthographic";
|
||||
setting_Orthographic.isExpertSetting = true;
|
||||
setting_Orthographic.OriginType = typeof(CameraAdditions);
|
||||
setting_Orthographic.DefaultValue = false;
|
||||
setting_Orthographic.Load();
|
||||
|
||||
//Normal Clipping Settings
|
||||
|
||||
setting_NearClip = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Float);
|
||||
setting_NearClip.FloatChanged = new Action<float>(value => UpdateCameraSettingFloat("NearClip", value));
|
||||
setting_NearClip.SettingName = "NearClip";
|
||||
setting_NearClip.DisplayName = "Near Clip Plane";
|
||||
setting_NearClip.isExpertSetting = true;
|
||||
setting_NearClip.OriginType = typeof(CameraAdditions);
|
||||
setting_NearClip.DefaultValue = 0.01f;
|
||||
setting_NearClip.MinValue = 0.001f;
|
||||
setting_NearClip.MaxValue = 5000f;
|
||||
setting_NearClip.Load();
|
||||
|
||||
setting_FarClip = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Float);
|
||||
setting_FarClip.FloatChanged = new Action<float>(value => UpdateCameraSettingFloat("FarClip", value));
|
||||
setting_FarClip.SettingName = "FarClip";
|
||||
setting_FarClip.DisplayName = "Far Clip Plane";
|
||||
setting_FarClip.isExpertSetting = true;
|
||||
setting_FarClip.OriginType = typeof(CameraAdditions);
|
||||
setting_FarClip.DefaultValue = 1000f;
|
||||
setting_FarClip.MinValue = 0.002f;
|
||||
setting_FarClip.MaxValue = 5000f;
|
||||
setting_FarClip.Load();
|
||||
|
||||
//Orthographic Settings
|
||||
|
||||
setting_OrthographicSize = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Float);
|
||||
setting_OrthographicSize.FloatChanged = new Action<float>(value => UpdateCameraSettingFloat("OrthographicSize", value));
|
||||
setting_OrthographicSize.SettingName = "OrthographicSize";
|
||||
setting_OrthographicSize.DisplayName = "Orthographic Size";
|
||||
setting_OrthographicSize.isExpertSetting = true;
|
||||
setting_OrthographicSize.OriginType = typeof(CameraAdditions);
|
||||
setting_OrthographicSize.DefaultValue = 5f;
|
||||
setting_OrthographicSize.MinValue = 0.01f;
|
||||
setting_OrthographicSize.MaxValue = 150f;
|
||||
setting_OrthographicSize.Load();
|
||||
|
||||
setting_OrthographicNearClip = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Float);
|
||||
setting_OrthographicNearClip.FloatChanged = new Action<float>(value => UpdateCameraSettingFloat("OrthographicNearClip", value));
|
||||
setting_OrthographicNearClip.SettingName = "OrthographicNearClip";
|
||||
setting_OrthographicNearClip.DisplayName = "Orthographic Near";
|
||||
setting_OrthographicNearClip.isExpertSetting = true;
|
||||
setting_OrthographicNearClip.OriginType = typeof(CameraAdditions);
|
||||
setting_OrthographicNearClip.DefaultValue = 0.001f;
|
||||
setting_OrthographicNearClip.MinValue = -5000f;
|
||||
setting_OrthographicNearClip.MaxValue = 5000f;
|
||||
setting_OrthographicNearClip.Load();
|
||||
|
||||
setting_OrthographicFarClip = __instance.@interface.AddAndGetSetting(PortableCameraSettingType.Float);
|
||||
setting_OrthographicFarClip.FloatChanged = new Action<float>(value => UpdateCameraSettingFloat("OrthographicFarClip", value));
|
||||
setting_OrthographicFarClip.SettingName = "OrthographicFarClip";
|
||||
setting_OrthographicFarClip.DisplayName = "Orthographic Far";
|
||||
setting_OrthographicFarClip.isExpertSetting = true;
|
||||
setting_OrthographicFarClip.OriginType = typeof(CameraAdditions);
|
||||
setting_OrthographicFarClip.DefaultValue = 1000f;
|
||||
setting_OrthographicFarClip.MinValue = -5000f;
|
||||
setting_OrthographicFarClip.MaxValue = 5000f;
|
||||
setting_OrthographicFarClip.Load();
|
||||
|
||||
OnUpdateOptionsDisplay();
|
||||
}
|
||||
|
||||
public void OnWorldLoaded(Camera playerCamera)
|
||||
{
|
||||
orthographicMode = false;
|
||||
referenceCamera = playerCamera;
|
||||
if (referenceCamera != null)
|
||||
{
|
||||
if (CopyWorldNearClip)
|
||||
{
|
||||
setting_NearClip.Set(referenceCamera.nearClipPlane);
|
||||
}
|
||||
if (CopyWorldFarClip)
|
||||
{
|
||||
setting_FarClip.Set(referenceCamera.farClipPlane);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnUpdateOptionsDisplay(bool expertMode = true)
|
||||
{
|
||||
if (!expertMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
setting_NearClip.settingsObject.SetActive(!orthographicMode);
|
||||
setting_FarClip.settingsObject.SetActive(!orthographicMode);
|
||||
setting_OrthographicSize.settingsObject.SetActive(orthographicMode);
|
||||
setting_OrthographicNearClip.settingsObject.SetActive(orthographicMode);
|
||||
setting_OrthographicFarClip.settingsObject.SetActive(orthographicMode);
|
||||
}
|
||||
|
||||
public void UpdateOrthographicMode()
|
||||
{
|
||||
if (PortableCamera.Instance != null)
|
||||
{
|
||||
PortableCamera.Instance.cameraComponent.orthographic = orthographicMode;
|
||||
}
|
||||
if (orthographicMode)
|
||||
{
|
||||
UpdateCameraSettingFloat("OrthographicNearClip", setting_OrthographicNearClip.Slider.value);
|
||||
UpdateCameraSettingFloat("OrthographicFarClip", setting_OrthographicFarClip.Slider.value);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateCameraSettingFloat("NearClip", setting_NearClip.Slider.value);
|
||||
UpdateCameraSettingFloat("FarClip", setting_FarClip.Slider.value);
|
||||
}
|
||||
OnUpdateOptionsDisplay();
|
||||
}
|
||||
|
||||
public void UpdateCameraSettingBool(string setting, bool value)
|
||||
{
|
||||
if (referenceCamera != null)
|
||||
{
|
||||
switch (setting)
|
||||
{
|
||||
//Camera Settings
|
||||
case "Orthographic":
|
||||
orthographicMode = value;
|
||||
UpdateOrthographicMode();
|
||||
break;
|
||||
//Internal Settings
|
||||
case "CopyNearClip":
|
||||
CopyWorldNearClip = value;
|
||||
if (CopyWorldNearClip)
|
||||
setting_NearClip.Set(referenceCamera.nearClipPlane);
|
||||
break;
|
||||
case "CopyFarClip":
|
||||
CopyWorldFarClip = value;
|
||||
if (CopyWorldFarClip)
|
||||
setting_FarClip.Set(referenceCamera.farClipPlane);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateCameraSettingFloat(string setting, float value)
|
||||
{
|
||||
if (PortableCamera.Instance != null)
|
||||
{
|
||||
switch (setting)
|
||||
{
|
||||
//Camera Settings
|
||||
case "NearClip":
|
||||
if (!orthographicMode)
|
||||
PortableCamera.Instance.cameraComponent.nearClipPlane = value;
|
||||
break;
|
||||
case "FarClip":
|
||||
if (!orthographicMode)
|
||||
PortableCamera.Instance.cameraComponent.farClipPlane = value;
|
||||
break;
|
||||
//Orthographic Mode
|
||||
case "OrthographicSize":
|
||||
PortableCamera.Instance.cameraComponent.orthographicSize = value;
|
||||
break;
|
||||
case "OrthographicNearClip":
|
||||
if (orthographicMode)
|
||||
PortableCamera.Instance.cameraComponent.nearClipPlane = value;
|
||||
break;
|
||||
case "OrthographicFarClip":
|
||||
if (orthographicMode)
|
||||
PortableCamera.Instance.cameraComponent.farClipPlane = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
25
PortableCameraAdditions/format.json
Normal file
25
PortableCameraAdditions/format.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"_id": 123,
|
||||
"name": "PortableCameraAdditions",
|
||||
"modversion": "1.0.2",
|
||||
"gameversion": "2022r170",
|
||||
"loaderversion": "0.5.7",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Adds a few basic settings to the Portable Camera.\n\nExpert settings for Near Clip & Far Clip.\nExpert settings for Orthographic & Orthographic Size.\nBy default, Near Clip & Far Clip are copied on world load.\nF11 to fullscreen on Desktop.",
|
||||
"searchtags": [
|
||||
"camera",
|
||||
"settings",
|
||||
"clipping",
|
||||
"clip",
|
||||
"near",
|
||||
"far"
|
||||
],
|
||||
"requirements": [
|
||||
"None"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/PortableCameraAdditions/releases/download/v1.0.2/PortableCameraAdditions.dll",
|
||||
"sourcelink": "https://github.com/NotAKidOnSteam/PortableCameraAdditions/",
|
||||
"changelog": "Added F11 bind to fullscreen Portable Camera on Desktop.",
|
||||
"embedcolor": "9b59b6"
|
||||
}
|
|
@ -236,6 +236,10 @@ As you can tell, i have no fucking clue how to use GitHub.
|
|||
|
||||
https://user-images.githubusercontent.com/37721153/188521473-9d180795-785a-4ba0-b97f-1e9163d1ba14.mp4
|
||||
|
||||
# PortableCameraAdditions
|
||||
added few more settings to camera
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue