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
Is particle rotation supported in THREE.Particle and THREE.ParticleSystem? #1891
Comments
Sadly, yes.
|
Thanks for the reply! For the 2nd question, how about the rotation? I mean if I want the all the particles in the ParticleSystem are sharing the same image but having different rotations (imaging the arrows that may point to up, down, left, right...), is that possible? Thanks! |
you could try passing rotation as attributes to the fragment shader where you draw a rotated texture in the shader |
Hi @zz85, Thanks! |
@Hanrui you can pass rotation to them as custom attributes. you can checkout those custom attribute examples. http://mrdoob.github.com/three.js/examples/webgl_custom_attributes_particles2.html |
@zz85 Thanks! |
I see there's a demo showing how to rotate the texture with Face4(http://www.html5rocks.com/en/tutorials/webgl/million_letters/), but it's rotating 4 vertex for a face which seems a little heavy for my needs. I just want rotating pictures on each vertex. Thanks! |
Here's some pesudocode I can think of out of my head
|
OK, I finally solved this issue. Thanks @zz85 very much!
|
@balakrishnanv Please use stackoverflow for help. |
@Hanrui Cool! It works perfectly! |
Actually two questions here:
Is it still the situation that ParticleSystem is WebGLRenderer-only?
Is it possible to control each particle's velocity, gravity and texture rotation via ParticleSystem? (I know that's feasible via THREE.Sprite in WebGLRenderer. And in CanvasRenderer, texture rotation seems not supported.) -- If all the particles are using the same texture and only different in rotation around Z-axis.
Thank you!
The text was updated successfully, but these errors were encountered: