Skip to content

Conversation

@malangfox
Copy link
Contributor

@malangfox malangfox commented Oct 13, 2022

Details

bandicam 2022-10-13 19-13-05-360

animateOn option adds a new way to trigger change events by continuous animation.

Usage

const axes = new Axes({
  x: {
    range: [0, 200],
  },
  y: {
    range: [0, 200],
  },
}, {
  animateOn: "change",
});

This is an example of applying animateOn option.

How it works

Legacy behavior animateOn: "release" triggers change event directly to the destination from the input.

Newly added behavior animateOn: "change" will play the animation with the destination from the input.

animateOn: "change" uses the new changeTo method in AnimationManager.
changeTo calls _animateLoop that starts the animation set by the user and fires continuous change events.
Movement through the changeTo method does not trigger animationStart and animationEnd events.

When the input is released, the existing animation behavior works for both options triggering animationStart and animationEnd events, and the sequence of events does not change.

"basePath": "packages/axes/dist",
"dists": [
"demo/dist"
"packages/demo/dist"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will manage dist by version like cdn.

Check the latest and version folders.

WoodNeck
WoodNeck approved these changes Oct 14, 2022
@WoodNeck WoodNeck self-requested a review October 14, 2022 04:31
@malangfox malangfox changed the title feat: add animateOn option feat: add useAcceleration option to PanInput Dec 29, 2022
@malangfox malangfox marked this pull request as draft June 5, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants