pmndrs/use-cannon

presets

開放

#79 建立於 2020年5月25日

 (5 則留言) (6 個反應) (0 位負責人)TypeScript (164 個分叉)github user discovery
enhancementhelp wantedquestion

倉庫指標

星標
 (2,950 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

      <Physics
        defaultContactMaterial={{
          friction: 0.9,
          restitution: 0.7,
          contactEquationStiffness: 1e7,
          contactEquationRelaxation: 1,
          frictionEquationStiffness: 1e7,
          frictionEquationRelaxation: 2,
        }}

would it be a good idea to introduce presets for stuff like this? bouncy, crude, slippery, whatever name would make sense. for react-spring we had 4 or 5, so that users dont need to remember what damping and tension are, but here it seems even more critical, because it's probably harder to understand what these values actually mean.

貢獻者指南