Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make the library usable from vanilla Three.js #20

Closed
hmans opened this issue Jun 10, 2022 · 1 comment
Closed

feat: Make the library usable from vanilla Three.js #20

hmans opened this issue Jun 10, 2022 · 1 comment

Comments

@hmans
Copy link
Owner

hmans commented Jun 10, 2022

It would be nice to make this library usable from vanilla React. A couple of notes/ideas/etc.:

  • Currently, the only effect runner, <MeshParticles>, is implemented as a React component, assuming react-three-fiber. In feat: Composable Shaders #11, this component will probably undergo heavy refactoring. It would be a good opportunity to refactor the relevant code into a normal MeshParticles class that inherits from InstancedMesh. This class could then still be exposed to React via extend (or a normal component.)
  • For materials, we're using three-custom-shader-material, which already lets you use its functionality imperatively, so there's probably nothing we need to do here.
  • <Emitter> very conveniently is only a very thin wrapper around the spawnParticles function, which can also be called imperatively. There is probably no need to provide a vanilla equivalent to this React component.
  • The library currently contains a lot of React niceties for declaratively creating animation waterfalls through the <Delay>, <Repeat> and <Lifetime> components. It should not be a goal to replicate these for imperative use. When using this library imperatively, users will most likely have their own animation primitives they can use.
@hmans hmans changed the title feat: Make the library usable without react-three-fiber feat: Make the library usable from vanilla Three.js Jun 10, 2022
This was referenced Jun 12, 2022
@hmans
Copy link
Owner Author

hmans commented Aug 21, 2022

This is now perfectly possible, thanks to VFX Composer :D

@hmans hmans closed this as completed Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant