Skip to content

Releases: stevenpetryk/mafs

v0.6.0: MovablePoint and setPoint!

13 Dec 02:43
Compare
Choose a tag to compare

MovablePoint can now be used directly

No longer are users stuck using useMovablePoint—now you can bypass that abstraction and use MovablePoint itself.

const [point, setPoint] = useState([0, 0])

<MovablePoint
  point={point}
  onMove={setPoint}
/>

useMovablePoint was only ever a nice wrapper around useState for movable points.

setPoint

Similarly, useMovablePoint now exposes a setPoint function to make it easy to move your point programmatically!

const point = useMovablePoint([0, 0])

function onClick() {
  point.setPoint([1, 0])
}

v0.5.1: Transpiled bundle for compatibility

19 Nov 05:04
Compare
Choose a tag to compare

This is a minor update that tells SWC to transpile out some overly-futuristic syntax.

v0.5.0: Smooth interpolation for parametric functions

06 Nov 03:12
Compare
Choose a tag to compare

The Function.Parametric sampling algorithm now dynamically increases the number of samples depending on the roughness of the function. The samples (the raw number of samples) prop has been deprecated in favor of minimumSamplingDepth (the minimum amount of subdivisions to evaluate the function with).

See PR #37.

v0.4.4: Improved keyboard accessibility

06 Nov 02:11
Compare
Choose a tag to compare

Fixes an issue where, given certain constrain functions in useMovablePoint, using the keyboard to move points didn't work (see PR #23). Also, keyboard movement was generally broken in certain cases.

v0.4.3: Firefox fix

27 Oct 17:30
Compare
Choose a tag to compare

Axis labels are no longer misaligned in Firefox.

v0.4.2: Dependency cleanup

09 Sep 20:14
Compare
Choose a tag to compare

Mafs no longer has a runtime dependency on gl-matrix-invert, gl-mat2, gl-mat3, or gl-mat4. It was only using one small function from that whole suite of packages, so it has now been inlined into Mafs' code directly. Less to download is always nice.

It also no longer depends on classnames.

Additionally, Mafs no longer depends on React ^16.8, instead depending on React >=16.8. From a real compatibility standpoint, it always worked with React 17, but just had a bad semver string (oops).

v0.4.1: Keeping VectorField's prop types honest

08 Sep 02:41
Compare
Choose a tag to compare

The TypeScript types for VectorField no longer (erroneously) require the xyOpacity and opacityStep props.

v0.4.0: Line segments!

07 Sep 20:09
Compare
Choose a tag to compare

New features

Bug fixes

  • FunctionGraph.Parametric now supports decreasing values of t, enabling functions to be evaluated "backwards".