From f9aac2c130dbec61c9466ae4b932aa9b4158d309 Mon Sep 17 00:00:00 2001
From: "Thomas F. K. Jorna" <thomasfkjorna@gmail.com>
Date: Wed, 28 Jul 2021 17:57:04 +0200
Subject: added some more tweaks

---
 components/tweaks.tsx | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

(limited to 'components/tweaks.tsx')

diff --git a/components/tweaks.tsx b/components/tweaks.tsx
index bfb932c..f9c58a1 100644
--- a/components/tweaks.tsx
+++ b/components/tweaks.tsx
@@ -207,11 +207,12 @@ export const Tweaks = (props: TweakProps) => {
                       onChange={() => setPhysics({ ...physics, collision: !physics.collision })}
                     >
                       <SliderWithInfo
-                        value={physics.collisionStrength * 10}
+                        value={physics.collisionStrength / 5}
                         onChange={(value) =>
-                          setPhysics({ ...physics, collisionStrength: value / 10 })
+                          setPhysics({ ...physics, collisionStrength: value * 5 })
                         }
-                        label="Strength"
+                        label="Collision Radius"
+                        infoText="Easy with this one, high values can lead to a real jiggly mess"
                       />
                     </EnableSection>
                     <SliderWithInfo
@@ -250,15 +251,6 @@ export const Tweaks = (props: TweakProps) => {
                             paddingLeft={3}
                             color="gray.800"
                           >
-                            <SliderWithInfo
-                              label="Iterations per tick"
-                              min={1}
-                              max={10}
-                              step={1}
-                              value={physics.iterations}
-                              onChange={(v) => setPhysics({ ...physics, iterations: v })}
-                              infoText="Number of times the physics simulation iterates per simulation step"
-                            />
                             <SliderWithInfo
                               label="Stabilization rate"
                               value={physics.alphaDecay * 50}
@@ -266,6 +258,22 @@ export const Tweaks = (props: TweakProps) => {
                                 setPhysics({ ...physics, alphaDecay: value / 50 })
                               }
                             />
+                            <EnableSection
+                              label="Keeps nodes centered"
+                              value={physics.centering}
+                              onChange={() =>
+                                setPhysics({ ...physics, centering: !physics.centering })
+                              }
+                              infoText="Keeps the nodes in the center of the viewport. If disabled you can drag the nodes anywhere you want."
+                            >
+                              <SliderWithInfo
+                                label="Centering Strength"
+                                value={physics.centeringStrength}
+                                max={2}
+                                step={0.1}
+                                onChange={(v) => setPhysics({ ...physics, centeringStrength: v })}
+                              />
+                            </EnableSection>
                           </VStack>
                         </AccordionPanel>
                       </AccordionItem>
-- 
cgit v1.2.3

