pmndrs/use-cannon

presets

Open

#79 aperta il 25 mag 2020

Vedi su GitHub
 (5 commenti) (6 reazioni) (0 assegnatari)TypeScript (164 fork)github user discovery
enhancementhelp wantedquestion

Metriche repository

Star
 (2950 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

      <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.

Guida contributor