Skip to content

Releases: stevenpetryk/mafs

v0.10.1: Minor Text coloring improvement

13 Jan 06:44
Compare
Choose a tag to compare

This version fixes #85, making Text look better when it is colorful.

New Plot components, better plot rendering, and more!

08 Jan 21:47
Compare
Choose a tag to compare

🛠️ Breaking changes

  • VectorField is now Plot.VectorField
  • FunctionGraph is now Plot
  • 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!

06 Jan 07:11
Compare
Choose a tag to compare

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

06 Jan 00:14
Compare
Choose a tag to compare

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

04 Jan 22:56
Compare
Choose a tag to compare

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

02 Jan 19:19
Compare
Choose a tag to compare

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 and yAxisExtent have been replaced with viewBox.

Full Changelog: v0.7.2...v0.8.0

v0.7.2: Panning via the keyboard

02 Jan 19:17
Compare
Choose a tag to compare

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

02 Jan 19:17
Compare
Choose a tag to compare

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

02 Jan 19:16
Compare
Choose a tag to compare

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

17 Aug 18:58
Compare
Choose a tag to compare

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.