summaryrefslogtreecommitdiff
path: root/app/components/tweaks
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-17 22:51:13 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-17 22:51:13 +0200
commitd7fc87e0c0b6782f803fc90cd21a333340120d90 (patch)
treef68ea6031773f89253db965b61f9fb331915ecc1 /app/components/tweaks
parent6de4b3a6f24c5ff9d29e014589414cfecdb37b00 (diff)
just added so much, bad commit
Diffstat (limited to 'app/components/tweaks')
-rw-r--r--app/components/tweaks/tweaks.tsx44
1 files changed, 44 insertions, 0 deletions
diff --git a/app/components/tweaks/tweaks.tsx b/app/components/tweaks/tweaks.tsx
index e235ad4..8913e98 100644
--- a/app/components/tweaks/tweaks.tsx
+++ b/app/components/tweaks/tweaks.tsx
@@ -41,6 +41,18 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element
title: "Physics",
content:
<View>
+ <Text preset="fieldLabel" text="Gravity" />
+ <Switch style={{ width: "5", height: 20, marginVertical: 10 }}
+ value={physics.gravityOn}
+ onValueChange={() => { setPhysics({ ...physics, gravityOn: !physics.gravityOn })}}
+ />
+ <Text preset="fieldLabel" text={"Gravity: " + physics.gravity} />
+ <Slider style={{ height: 40, width: "90%" }}
+ minimumValue={0}
+ maximumValue={1}
+ onValueChange={(value) => { setPhysics({ ...physics, gravity: value }) }}
+ value={physics.gravity}
+ step={0.01} />
<Text preset="fieldLabel" text={"Repulsive force: " + physics.charge} />
<Slider style={{ height: 40, width: "90%" }}
minimumValue={-400}
@@ -68,12 +80,44 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element
value={physics.collision}
onValueChange={() => { setPhysics({ ...physics, collision: !physics.collision }) }}
/>
+ <Text preset="fieldLabel" text={"Alhpa Decay: " + physics.alphaDecay} />
+ <Slider style={{ height: 40, width: "90%" }}
+ minimumValue={0}
+ maximumValue={1}
+ onValueChange={(value) => { setPhysics({ ...physics, alphaDecay: value }) }}
+ value={physics.alphaDecay}
+ step={.01} />
+ <Text preset="fieldLabel" text={"Alhpa Target: " + physics.alphaTarget} />
+ <Slider style={{ height: 40, width: "90%" }}
+ minimumValue={0}
+ maximumValue={1}
+ onValueChange={(value) => { setPhysics({ ...physics, alphaTarget: value }) }}
+ value={physics.alphaTarget}
+ step={0.1}
+ />
+ <Text preset="fieldLabel" text={"Viscosity: " + physics.velocityDecay} />
+ <Slider style={{ height: 40, width: "90%" }}
+ minimumValue={0}
+ maximumValue={1}
+ onValueChange={(value) => { setPhysics({ ...physics, velocityDecay: value }) }}
+ value={physics.velocityDecay}
+ step={0.01} />
</View>,
},
{
title: 'Visual',
content:
<View>
+ <Text preset="fieldLabel" text="Colorful" />
+ <Switch style={{ width: "5", height: 20, marginVertical: 10 }}
+ value={physics.colorful}
+ onValueChange={() => { setPhysics({ ...physics, colorful: !physics.colorful })}}
+ />
+ <Text preset="fieldLabel" text="Hover highlight" />
+ <Switch style={{ width: "5", height: 20, marginVertical: 10 }}
+ value={physics.hover}
+ onValueChange={() => { setPhysics({ ...physics, hover: !physics.hover })}}
+ />
<Text preset="fieldLabel" text={"Line Opacity: " + physics.linkOpacity} />
<Slider style={{ height: 40, width: "90%" }}
minimumValue={0}