Replies: 1 comment
-
stdlib is just a plain fork of three/jsm so that we have more control and can merge bugfixes since threejs often doesn't. you can use anything you see in the threejs eco system in the same exact way though it's often better to form components and/or hooks to make it more re-usable. i'd check out use-cannon, it's using hooks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Initially, I was fortunate enough that all of the items in my app were available via
react-three-fiber
,three-stdlib
. However, I'd like to useCapsule
andOctree
, which come from thethree.js/examples/math
directory. Specifically I would like to implement the FPS example with fiberWhat is the best way to use these components into
react-three-fiber
? Should I follow the techniques inthree-stdlib
to make hooks for the components? Can they just be imported directly with theprimitive
object?three-stdlib - a library that makes it easier to import three.js examples - https://github.com/pmndrs/three-stdlib
FPS Game Example - https://github.com/mrdoob/three.js/blob/dev/examples/games_fps.html
Capsule, Octree:
(original) - https://github.com/mrdoob/three.js/tree/dev/examples/jsm/math
(three-stdlib) - https://github.com/pmndrs/three-stdlib/tree/main/src/math
Beta Was this translation helpful? Give feedback.
All reactions