Closed packadal closed 11 years ago
Actually. That's not the real bug. Being limited to -0.5, 0.5
in the program is expected. Maybe I should somehow push it to -1, 1
? The problem is that if you use a sprite, it sprite overrides this "model" and ray picking doesn't work.
So I think the solution is to render the sprites scaled into the -0.5,0.5
range instead and if you want to keep the aspect ratio you can scale the particle size (as in particle.scale.x = 640; particle.scale.y = 480;
).
I'm not sure pushing it to '-1;1' would be much of a difference, it just needs to be in the documentation. (not trying to be snide, just pointing out why I had trouble with it)
Rendering the sprite into the same range sounds like a good idea. I have been doing some text billboarding in an app that must support both Canvas and WebGL and understanding the differences between Particles and Sprites is a bit difficult.
Ideally though it would automagically get the right scale. I haven't seen anything to have a size in the materials so I don't know if this would be possible.
It seems to me this bug is related to this one and the fact that Sprites and Particles behave differently.
Thanks for your time and work, Three.js is a really nice framework to work with :)
When I use a CanvasParticleMaterial and I draw outside of (-0.5, 0.5) in both x and y; I have the IE6 effect. My guess is it is the dirty regions that are not correctly computed.
I worked around this by drawing inside of (-0.5, 0.5) and increasing the scale of my particles.
Here is a jsFidlle to illustrate my problem