Commit Graph

5 Commits

Author SHA1 Message Date
Brian Osman
c81378624f Update all example particle data to new single-code-chunk format
Change-Id: Ic53dc7ecab1b44761fe06e6b528864d24cc5fa58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-02 18:07:53 +00:00
Brian Osman
fb79f9faa4 Remove all particle examples that use SkEffectBinding
I'm going to remove this feature to simplify migration to skvm.
fireworks was updated to work without it. raincloud is fairly complex,
and not that attractive, so it's just being deleted.

Change-Id: Id2d5cd490baa7bae627002f41edf7522c8bdfcd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353076
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-12 19:09:18 +00:00
Brian Osman
95c26efc90 Pure SkSL RNG for particles
Change-Id: I2cb6255a553852a292427d6dc9ef8c5ed7f8286d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252926
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-04-10 17:20:07 +00:00
Brian Osman
559ffe4a23 Particles: Added particle flags for tracking state (one-time triggers, etc)
Also removed some older effects that weren't interesting, improved others,
cleaned up the unused functions in several, and renamed most of them to
reflect which feature they're demonstrating.

Change-Id: Ib44a00ec3d25e852a1d1661918137ba13d30c86b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244119
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-25 15:58:09 +00:00
Brian Osman
d46cb9729b Particle effect scripting update
This change adds another layer of complexity and control to
the particle system. There are now two code chunks: the old
code that's run per-particle, and new code that's run for
the effect itself. This allows for effect lifetime to be set
by the script (eg, randomly), as well as the emission rate.
Rate can vary over time (see pulse.json), and particles can
be emitted in bursts by setting the effect's burst field
(see fireworks.json).

Additionally, the effect has its own frame of reference and
color, which becomes the default state for newly emitted
particles. This allows synchronizing state across particles
in various interesting ways (see color in fireworks.json).

Change-Id: Iec2f7a3427ce1d6411ed7ef5b3023cbef2e8a134
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240498
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-16 17:48:04 +00:00