diff --git a/.ladd b/.ladd new file mode 100644 index 0000000..b4c02fe --- /dev/null +++ b/.ladd @@ -0,0 +1 @@ +Hi :P diff --git a/Layout.md b/Layout.md new file mode 100644 index 0000000..aecf8b1 --- /dev/null +++ b/Layout.md @@ -0,0 +1,23 @@ +Overlay > Info Box + +Each toolbar gives itself a header tool which expands/collapses the toolbar. + +- Toolbar Group: Left Side + - Toolbar: Tools + - Tool: Zoom + - Toolbar: Modes + - Tool: Mode Switch + - Toolbar: Utils + - Tool: Utility Tool +- Toolbar Group: Right Side + - Toolbar: Options + - Tool: Options Tool + - Section: Pause During + - Section: Display + - Section: Collision + - Toolbar: Params + - Tool: Options Tool + - Section: Param + - Toolbar: Debug + - Tool: Options Tool + - Section: Debug diff --git a/tool/zoom.js b/tool/zoom.js index 5a4cea2..c4b441b 100644 --- a/tool/zoom.js +++ b/tool/zoom.js @@ -60,9 +60,8 @@ export class Zoom extends Tool { const y = (box.start.y + box.end.y) / 2; const widthRatio = Math.abs(box.start.x - box.end.x) / this.sim.display.width; const heightRatio = Math.abs(box.start.y - box.end.y) / this.sim.display.height; - const biggerRatio = Math.max(widthRatio, heightRatio); - const base2factor = Math.log2(1 / biggerRatio) - 1; - const factor = Math.ceil(base2factor); + const ratio = Math.max(widthRatio, heightRatio) * 2.5; + const factor = Math.ceil(Math.log2(1 / ratio)); // Determine average momentum and set panning velocity to match const { netMomentum, totalMass } = this.sim.system.computeSystemCenter();