-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
223 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.IO; | ||
using System.Reflection; | ||
|
||
namespace ml_fpt | ||
{ | ||
static class Scripts | ||
{ | ||
public static string GetEmbeddedScript(string p_name) | ||
{ | ||
string l_result = ""; | ||
Assembly l_assembly = Assembly.GetExecutingAssembly(); | ||
string l_assemblyName = l_assembly.GetName().Name; | ||
|
||
try | ||
{ | ||
Stream l_libraryStream = l_assembly.GetManifestResourceStream(l_assemblyName + "." + p_name); | ||
StreamReader l_streadReader = new StreamReader(l_libraryStream); | ||
l_result = l_streadReader.ReadToEnd(); | ||
} | ||
catch(Exception) { } | ||
|
||
return l_result; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var l_block = document.createElement("fpt_block"); | ||
l_block.innerHTML = ` | ||
<h2>4-Point Tracking</h2> | ||
<div class="action-btn" onclick="engine.trigger('MelonMod_Action_FPT_Calibrate');"><img src=\"gfx/recalibrate.svg\">Calibrate</div> | ||
`; | ||
document.getElementById('settings-implementation').appendChild(l_block); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
using System.Reflection; | ||
|
||
[assembly: AssemblyTitle("LeapMotionExtension")] | ||
[assembly: AssemblyVersion("1.0.8")] | ||
[assembly: AssemblyFileVersion("1.0.8")] | ||
[assembly: AssemblyVersion("1.1.0")] | ||
[assembly: AssemblyFileVersion("1.1.0")] | ||
|
||
[assembly: MelonLoader.MelonInfo(typeof(ml_lme.LeapMotionExtension), "LeapMotionExtension", "1.0.8", "SDraw", "https://github.com/SDraw/ml_mods_cvr")] | ||
[assembly: MelonLoader.MelonInfo(typeof(ml_lme.LeapMotionExtension), "LeapMotionExtension", "1.1.0", "SDraw", "https://github.com/SDraw/ml_mods_cvr")] | ||
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")] | ||
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] | ||
[assembly: MelonLoader.MelonPlatformDomain(MelonLoader.MelonPlatformDomainAttribute.CompatibleDomains.MONO)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.IO; | ||
using System.Reflection; | ||
|
||
namespace ml_lme | ||
{ | ||
static class Scripts | ||
{ | ||
public static string GetEmbeddedScript(string p_name) | ||
{ | ||
string l_result = ""; | ||
Assembly l_assembly = Assembly.GetExecutingAssembly(); | ||
string l_assemblyName = l_assembly.GetName().Name; | ||
|
||
try | ||
{ | ||
Stream l_libraryStream = l_assembly.GetManifestResourceStream(l_assemblyName + "." + p_name); | ||
StreamReader l_streadReader = new StreamReader(l_libraryStream); | ||
l_result = l_streadReader.ReadToEnd(); | ||
} | ||
catch(Exception) { } | ||
|
||
return l_result; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
var l_block = document.createElement("lme_block"); | ||
l_block.innerHTML = ` | ||
<h2>Leap Motion tracking</h2> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Enable tracking: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTracking" class ="inp_toggle" data-current="false" data-saveOnChange="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Tracking mode: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingMode" class ="inp_dropdown" data-options="0:Screentop,1:Desktop,2:HMD" data-current="1" data-saveOnChange="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Desktop offset X: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingDesktopX" class ="inp_slider" data-min="-100" data-max="100" data-current="0" data-saveOnChange="true" data-continuousUpdate="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Desktop offset Y: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingDesktopY" class ="inp_slider" data-min="-100" data-max="100" data-current="-45" data-saveOnChange="true" data-continuousUpdate="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Desktop offset Z: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingDesktopZ" class ="inp_slider" data-min="-100" data-max="100" data-current="30" data-saveOnChange="true" data-continuousUpdate="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Attach to head: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingHead" class ="inp_toggle" data-current="false" data-saveOnChange="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Head offset X: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingHeadX" class ="inp_slider" data-min="-100" data-max="100" data-current="0" data-saveOnChange="true" data-continuousUpdate="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Head offset Y: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingHeadY" class ="inp_slider" data-min="-100" data-max="100" data-current="-30" data-saveOnChange="true" data-continuousUpdate="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Head offset Z: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingHeadZ" class ="inp_slider" data-min="-100" data-max="100" data-current="15" data-saveOnChange="true" data-continuousUpdate="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Offset angle: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingAngle" class ="inp_slider" data-min="-180" data-max="180" data-current="0" data-saveOnChange="true" data-continuousUpdate="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Fingers tracking only: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingFingersOnly" class ="inp_toggle" data-current="false" data-saveOnChange="true"></div> | ||
</div> | ||
</div> | ||
<div class ="row-wrapper"> | ||
<div class ="option-caption">Model visibility: </div> | ||
<div class ="option-input"> | ||
<div id="InteractionLeapMotionTrackingModel" class ="inp_toggle" data-current="false" data-saveOnChange="true"></div> | ||
</div> | ||
</div> | ||
`; | ||
document.getElementById('settings-implementation').appendChild(l_block); | ||
|
||
// Update toggles in new menu block | ||
var l_toggles = l_block.querySelectorAll('.inp_toggle'); | ||
for (var i = 0; i < l_toggles.length; i++) { | ||
settings[settings.length] = new inp_toggle(l_toggles[i]); | ||
} | ||
|
||
//Update dropdowns in new menu block | ||
var l_dropdowns = l_block.querySelectorAll('.inp_dropdown'); | ||
for (var i = 0; i < l_dropdowns.length; i++) { | ||
settings[settings.length] = new inp_dropdown(l_dropdowns[i]); | ||
} | ||
|
||
// Update sliders in new menu block | ||
var l_sliders = l_block.querySelectorAll('.inp_slider'); | ||
for (var i = 0; i < l_sliders.length; i++) { | ||
settings[settings.length] = new inp_slider(l_sliders[i]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters