Skip to content

v2.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Oct 13:35

Bug fixes from a review of the effects, and a shading loop about twice as fast. Two beer defaults change, and both keep the look the effect was tuned to.

Faster frames

The shading pass every effect shares now writes one 32-bit word per pixel and blends each field row once per frame. The picture is the same to the byte. Median frame times at 1920×1080:

Effect 2.6.0 2.7.0
beer 4.35 ms 2.46 ms
mandelbrot 2.62 ms 1.25 ms
ridges 1.74 ms 0.74 ms
smoke 2.00 ms 1.22 ms
rain 0.80 ms 0.37 ms
metaballs 0.77 ms 0.31 ms
plasma 1.27 ms 0.57 ms
tunnel 2.68 ms 2.45 ms

The smoke solver and the plasma also do less work each frame, with the same output.

Fixes

  • fps: 0 painted the smoke as one flat grey. A rate of zero or less now means one frame a second in every effect, as the driver already did.
  • The Mandelbrot pauses lasted half of exploreFor. They now last the full time, so the zoom stops to look around for longer.
  • The Mandelbrot autopilot sometimes undid a decision it had made on the same frame, and gave up on a descent after scans that failed far apart rather than one after another.
  • After a window resize, smoke jets, smoke drags and rain ripples are now in the right place. Before, a jet could fire from the middle of the screen.
  • When the window narrows, beer bubbles past the new wall now go. Before, they piled up against it.
  • A fast smoke drag now drops its oldest strokes when the queue is full, so the push stays with the cursor.

Changed beer defaults

  • streaming is now 0.88, up from 0.65. The stray share of the fizz was taken twice, so 0.65 gave about an eighth of the fizz to no site. 0.88 now gives that same share.
  • spread is now 0.0011, down from 0.015. The head levelling had a cap, so any field wider than about 175 columns got only part of spread. At 1080p it got 0.0011. The levelling is now one implicit step with no cap, and spread means the same at every window size. Windows narrower than about 525 px got the full 0.015 before, so the head there is now lumpier.

If you set either option yourself, check the result. streaming now means what its documentation says, and spread now has its full effect on wide windows.

Also

  • fixedStep(fps) and wrapCell(n, size) are new exports.
  • The bundle is 23.7 kB minified and gzipped, up from 23.0 kB.