Skip to content

Commit

Permalink
设置了惯性范围,防止惯性过大 Merge pull request #46 from HomeArchbishop/main
Browse files Browse the repository at this point in the history
[待讨论]设置了惯性范围,防止惯性过大
  • Loading branch information
itorr authored Aug 28, 2022
2 parents ed59f51 + aee0677 commit a86fa45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ what2.md
html/document.css
html/sakana.css
package-lock.json
node_modules
1 change: 1 addition & 0 deletions html/sakana.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const Sakana = (_=>{
if(!el) throw new Error('invalid Element');

if(!inertia) inertia = 0.08;
inertia = Math.min(0.5, Math.max(0, inertia))

const setOriginRotate = or=>originRotate = or;

Expand Down
2 changes: 1 addition & 1 deletion html/sakana.min.js

Large diffs are not rendered by default.

0 comments on commit a86fa45

Please sign in to comment.