[feat]: Integrate M3 Expressive's stiffness and damping

オープン
#2,403 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
react, typescript
領域
frontend

調査の方向性

リンクされたCodeSandboxとそのApp.jsの例から始め、参照されているM3 Expressive motion-physicsのドキュメントを読んでください。代表的なアニメーションを通じて、提案されているstiffness、damping、tension、frictionの値を比較してください。完了の条件は、合意されたAPIまたは変換の範囲と、意図した動作を示す再現可能な例があることです。

索引モデルが issue の本文から書いたものです。

説明

template: request
A clear and concise description of what the feature is

Hi, take a look at M3 Expressive's motion physics system.

It's a design pattern for animating objects in UI. Main parts are stiffness and damping take a look at the image below

Image

I've come to realize that we can adapt stiffness and damping from M3 Expressive to React Spring. I'm facing some obstacles with adapting damping though.

I see that tension is good as stiffness value from m3 expressive, but friction needs some factor like this
`
const mass = 1;
const stiffness = 1800;
const damping = 0.6;

const tension = stiffness;
const friction = 2 * damping * Math.sqrt(stiffness * mass);
`

I'm not sure that i'm doing right with the formula, what do u think?

https://codesandbox.io/p/sandbox/staging-snow-sqlvdx?file=%2FApp.js%3A15%2C31

Why should this feature be included?

M3 Expressive is a great standard for spring animations. It makes UI alive and fluid

Please provide an example for how this would work

https://codesandbox.io/p/sandbox/staging-snow-sqlvdx?file=%2FApp.js%3A15%2C31

主要言語
TypeScript
スター
29.3k
フォーク
1.2k
平均マージ
3日 15時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pmndrs/react-spring のほかの issue

pmndrs/react-spring の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。