flutter3d_particles 0.8.0
flutter3d_particles: ^0.8.0 copied to clipboard
A pooled CPU particle simulation for flutter3d, and the contributor that draws it. Its particles can be a light source, which is the part no other engine on this platform has.
0.8.0 #
- Smoke can be lit by the lights around it.
ParticleContributortakessixWay, aSixWayMaterial: two textures holding six pictures of one puff, each lit from one side (right, top and back with coverage inpositive; left, bottom and front with emission innegative), plus anemissioncolour and anambientterm. The newParticleSixWaystage mixes the six by where each of the scene's lights really is, so a puff is bright on the side facing a lamp, dark in its own shade, and glows at its thin edges with a light behind it. The lights are the ones the renderer would give a mesh of the particles' bounds: the eight slots, the light list, and the clustered cells in a clustered view. Null, the default, keeps the additive stages and every existing frame as they were.N6 - What a six-way draw costs. It blends "over" what is behind it, so the
live particles are sorted farthest first along the camera's forward every
frame; the pool is still one draw.
ParticleSystem.writeQuadstakesfarthestAlongfor that sort, andParticleSystem.boundsIntogives the sphere the lights are asked for with. The sheet is read with the camera's right and up, so a particle with arotationturns its picture and not its lighting. It needs theParticleSixWaystage fromflutter3d_shaders0.8.0. importSixWayrepacks a sheet exported in another channel layout into the two textures, described by aSixWayLayoutofSixWayChannels, and turns each flipbook cell upright without reordering the cells.flutter3d_buildhas a baker that makes a sheet from a density field, so a project can have smoke without an asset.- Particles mark the pixels they cover for the temporal resolve. They
write no velocity of their own, so the resolve reprojected the wall behind a
moving ember and kept nine tenths of it, and the ember showed at a fraction
of its brightness.
ParticleContributor.encodeReactivenow draws each live particle into the reactive mask through theReactiveSpritestage, by the disc's falloff or the sprite's alpha times the particle's alpha, and the resolve trusts its history less there. It runs only whileTemporalSettings.reactiveinflutter3d_coreis above nought, which is off by default, and costs one more draw of the pool when on.R4
Its flutter3d_* dependencies ask for ^0.8.0.
0.7.1 #
Released with the rest of the stack at 0.7.1. Nothing in this package changed. The release it resolves against builds from pub.dev again and no longer crashes Metal on the first unlit draw.
Its flutter3d_* dependencies ask for ^0.7.1, and it asks for vector_math ^2.4.3.
0.7.0 #
-
A burst can light something.
ParticleSystem.bursttakes an optionalsource, and aLightEmitterpassed there has its glow fed by the burst's particles, then fades and leaves the measured set on its own. Before this a burst's particles were born belonging to nobody, so a muzzle flash or an explosion cast no light however bright its colour was, while the skill in this package said it did. Existing calls are unchanged. -
flutter3d_particles_coreis back inside, and Flutter is out. The simulation had been split off so a headless caller could bake aParticleSystem; the two contributors stayed here because they imported Flutter, for adebugPrintinside anassertand forflutter3d's barrel. They importflutter3d_corenow and report a missing shader stage throughdart:developer'slog, so the whole package is plain Dart andflutter3d_model_coredepends on it directly. The public API is the same; an importer ofpackage:flutter3d_particles_corenamespackage:flutter3d_particles/flutter3d_particles.dartinstead. -
The pubspec follows.
flutter: sdkand the dependency onflutter3dare gone, and the package depends onflutter3d_core^0.7.0andflutter3d_hardware^0.7.0. An application that reachedflutter3donly because this package brought it has to name it itself. The tests run underdart test. The archive carriesskills/flutter3d-particles-one-draw-call/for a coding agent, installed withdart run skills@ get.
0.6.0 #
- Floors, and no code. One pool, one draw call, whatever is in it — byte for
byte 0.5.0's.
flutter3dandflutter3d_hardwareare now floored at^0.6.0, which is the pair this package's single batch was compiled against.
0.5.0 #
Breaking. An ease carries its curve.
KeyEaseis a value class holding the shape it applies. Opening the list alone would have been useless —easeShapewould have had no branch for a game's own ease. A game writesconst KeyEase('bounce', _bounce)and every curve and gradient samples it without this package having heard of it.
0.4.0 #
- No changes of its own; the version moves with the workspace, whose sibling constraints name a single release. The README's closing section now says what the engine around this package is.
0.3.0 #
- No changes of its own. The workspace is released as a set, in the order
ARCHITECTURE.md§16 gives, so this package's version moves with the rest and its constraints on its siblings move with it.
0.2.0 #
- A pool, emitters, modifiers and a contributor that draws every live particle in one instanced call, on any backend the engine has.
- A particle can be a light source and can carry a texture.