Closed GoogleCodeExporter closed 9 years ago
Raj can you give an example of how you used that property?
Original comment by jpywt...@gmail.com
on 17 Jun 2011 at 5:02
The frames property only exists in the old ParticleSystem class (the one
running purely in Javascript). That property is still present. The system in
unit test 9 is a GpuParticleSystem (due to the "fast" property being set to
true in the system config), which has never had a frames property.
To get good performance in JS, the old ParticleSystem calculates how many
frames it needs to render (system_lifetime_in_seconds *
rendered_frames_per_second) for each particle. It then precalculates each
particle's position along the curve for each frame. So when the ParticleSystem
is running, each particle just moves to its cached positions along the curve.
The new GpuParticleSystem performs these positional calculations in the shader,
which is fast enough to be done in real time. So there's no need to know how
many frames the system might need to render each particle at ahead of time; it
just does it. One advantage of this approach is that things like the curve's
bounding boxes, system life time, etc. can be changed while the
GpuParticleSystem is running. The old ParticleSystem has to recalculate all of
the frame positions for every particle if you were to try to change these
properties while it was running.
Original comment by erik.kit...@gmail.com
on 17 Jun 2011 at 5:36
Ok, I can listen for the onRender event and increment a counter each time to
track the number of frames rendered.
Original comment by raj...@gmail.com
on 19 Jun 2011 at 7:47
BTW I updated Unit Test 9 to calculate the performance statistics without the
'frames' property.
Original comment by raj...@gmail.com
on 19 Jun 2011 at 7:48
Original comment by raj...@gmail.com
on 19 Jun 2011 at 7:49
Original issue reported on code.google.com by
raj...@gmail.com
on 17 Jun 2011 at 2:09