Update to Bevy 0.15 🥳
Fix docs.rs build
inspector_egui
exampleLookupCurveEguiEditor::fit_to_curve
: Adjusts the editor viewport to contain a curve.LookupCurveEguiEditor::fitted_to_curve
: Same as above but as a constructor.- A button in the egui editor to re-fit the curve
- bevy_egui to 0.29
- bevy-inspector-egui to 0.26
Fixed build errors on some features.
Feature separation!
- Separated the crate into smaller features, allowing the use of
bevy_lookup_curve
in projects that does not want to pull in full Bevy as a dependency. See README for a full list of features. - BREAKING: Moved
save_lookup_curve
from theasset
module toLookupCurve::save_to_file
, see below.
load_from_file
andsave_to_file
toLookupCurve
. Requires featureron
to be enabled.
Bevy 0.14 🥳
- Integration with bevy-inspector-egui. Enable the feature
inspector-egui
and the curves will show up in the inspector. Click on the miniature to open the editor. - Optional feature flag for the editor:
editor
- BREAKING: Removed
title
fromLookupCurveEditor
. Instead we use the (optional) name fromLookupCurve
which is shown as editor window title. - BREAKING:
LookupCurveEguiEditor::ui_window
now requires an id (impl Hash), to ensure there are no ambiguities. LookupCurveEditor::ui_window
,LookupCurveEguiEditor::ui_window
andLookupCurveEguiEditor::ui
now return a bool to indicate whether the curve was changed/modified during this update/render.
- bevy to 0.14
- bevy_egui to 0.28
- Downgraded
bevy_egui
to 0.25 to fix problems withbevy-inspector-egui
. Waiting forbevy_egui
0.27 instead, which should be supported bybevy-inspector-egui
.
This release has multiple breaking changes within the LookupCurve
struct. If you have previously saved curves, you will need to make new ones using the new version.
- BREAKING:
Bezier
interpolation has been replaced withCubic
. Inspired by other game engines. The cubic variant allows both unweighted (fast) and weighted cubic (equivalent to Bezier) interpolation. The tangents have been changed from being Bezier control points, to defining slope and optional weight. - BREAKING:
find_y_given_x
has been renamed tolookup
- Removed
Knot::id
from reflect serialization. Will now be set internally when loading a scene containing curves. LookupCurve
now implementsClone
max_iters
andmax_error
are now public fields, and the getters and setters have been removed.
LookupCache
- near constant speed for coherent lookups (like animations)- Use with
LookupCurve::lookup_cached
, which takes a mutable reference to the cache that can be stored on a component (or wherever you need).
- Use with
- bevy_egui to 0.26
Initial release.