Releases: stevenpetryk/mafs
v0.10.1: Minor Text coloring improvement
This version fixes #85, making Text look better when it is colorful.
New Plot components, better plot rendering, and more!
🛠️ Breaking changes
VectorField
is nowPlot.VectorField
FunctionGraph
is nowPlot
- Several props from these components have changed. See the documentation on Plots for the latest guidance.
📈 Improved plot rendering
This update includes changes to the way Mafs samples functions. Not only is the new algorithm faster, but the result is more accurate. In the graph below, you can see a before/after for Math.sin(1/x)
.
🆕 Plot.OfY
No longer are you limited to just the x
domain 😓 There is now a Plot.OfY
. Both Plot.OfX
and Plot.OfY
use Plot.Parametric
under the hood.
v0.9.0: The Computer Modern typeface is now included!
You can now make Mafs look real swanky by pulling in every mathematician's favorite typeface, Computer Modern Serif. It's the same font you'll often see used in LaTeX, and also in 3Blue1Brown videos. It's been used on the Mafs docs site since day one.
To use it, import the Mafs core CSS, and also the font CSS.
@import "mafs/core.css";
@import "mafs/font.css";
v0.8.2 - @types/react 18 type compatibility
This is a small release that just updates the types to be compatible with @types/react ^18
.
In the meantime, the docs site has been receiving a lot of love. Check it out!
v0.8.1: Fixes ESM build
Oddly, Mafs 0.8.0 didn't export vec
from its MJS build (but it did from the CommonJS build). Seems to be something related to how Parcel was handling this export in src/index.ts
. Perhaps I'm just doing it wrong. Regardless I opened an issue in Parcel (parcel-bundler/parcel#8748).
This issue has been fixed by altering the syntax to export a const
instead, which should un-break vec
imports in create-react-app.
v0.8.0
What's Changed
This release introduces two key new features!
- The
Transform
component, which allows you to transform groups of elements at a time. - The
viewBox
prop, which allows you to declare an "area of interest" that Mafs will stay centered and zoomed in on (while preserving a 1:1 aspect ratio by default). Previously, Mafs would just stretch the axes to fill the viewport.
Breaking change
xAxisExtent
andyAxisExtent
have been replaced withviewBox
.
Full Changelog: v0.7.2...v0.8.0
v0.7.2: Panning via the keyboard
This is a small accessibility bug fix: when pan
is set on <Mafs />
, users can focus on the Mafs viewport directly and use the arrow keys to pan around.
v0.7.1
A tiny bug fix in this one: MovablePoint now handles gestures a bit better, and points will not get "stuck" in their dragging state.
v0.7.0
No longer do you need to separately import vec-la
, which is a fantastic (but untyped) vector/linear algebra library. You can now import a similar set of functions directly from Mafs:
import { vec } from "mafs"
const sum = vec.add(v1, v2)
const matrix = vec.matrixBuilder().translate(-2, 2).get()
// etc...
v0.6.1: No more stuttering grid lines
Previously, Mafs took a lazy shortcut to draw cartesian coordinate lines. Now, it's using the proper contexts to only draw a tiny bit of coordinates at a time, reducing the likelihood of floating point errors which was causing some janky line rendering.