-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds `<Mafs debug />` which shows a helpfully zoomed out view, letting you peek beyond what the camera is limited to. https://github.com/user-attachments/assets/5da478ba-7422-47e4-b436-9eda91ce0cee
- Loading branch information
1 parent
1d00248
commit 8f2d54e
Showing
13 changed files
with
203 additions
and
124 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 @@ | ||
"use client" | ||
|
||
import * as React from "react" | ||
import { Mafs, Coordinates, Plot } from "mafs" | ||
|
||
export default function Example() { | ||
const [debug, setDebug] = React.useState(true) | ||
|
||
return ( | ||
<div> | ||
{/* Set the `debug` prop on Mafs to get a bird's eye view. */} | ||
<Mafs debug={debug} height={400}> | ||
<Coordinates.Cartesian /> | ||
<Plot.OfX y={(x) => Math.sin(x * Math.PI)} /> | ||
</Mafs> | ||
<label className="p-4 bg-black flex gap-2 pointer"> | ||
<input | ||
type="checkbox" | ||
checked={debug} | ||
onChange={(e) => setDebug(e.target.checked)} | ||
/> | ||
Debug | ||
</label> | ||
</div> | ||
) | ||
} |
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
Binary file added
BIN
+12.3 KB
...spec.tsx-snapshots/guide-examples-debug-DebugExample-1-Mobile-Chrome-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.1 KB
...spec.tsx-snapshots/guide-examples-debug-DebugExample-1-Mobile-Safari-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.9 KB
...-vrt.spec.tsx-snapshots/guide-examples-debug-DebugExample-1-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.5 KB
...d-vrt.spec.tsx-snapshots/guide-examples-debug-DebugExample-1-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.2 KB
...ed-vrt.spec.tsx-snapshots/guide-examples-debug-DebugExample-1-webkit-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.