Beta Release: Community Patterns & Pixelblaze integration

To make it easier to discover, share, and use patterns, the pattern sharing library has had a complete overhaul. You can find it here: https://patterns.electromage.com/

For now this lives by itself, but will ultimately replace the interface at https://electromage.com/patterns

Features:

  • Full pattern search: name, description, functions, variables, and any text in the source.
  • Each pattern gets a URL, so you can share links to patterns, bookmark, etc.
  • Fast infinite scrolling, no more paging!
  • Log in using forum accounts. Logging in lets you:
    • Keep a list of favorites (star). With some new features below, this makes it much easier to load up a new Pixelblaze.
    • Sharing patterns gives you credit! In the future this will let you edit patterns attributed to you.

Pixelblaze Features

  • Integration with the new pattern site.
    • From the pattern list, you can load the site in a modal, browse around, then directly try, install, or load to the editor, all without having to download and open ‘.epe’ files.
    • Share patterns directly without downloading .epe files first.
    • Logging in works here too, giving you access to favorites and share attribution.
  • Added 1D pixel maps. This is available in the x coordinate passed to render(index, x). Previews render as a spiral. There’s also a hidden line mode, you can enable by putting this in your browser console: previewSettings.render1DStyle = "line" but it’s kind of boring :slight_smile:

Improvements

  • Better pattern compatibility across 1D, 2D, and 3D. It will now prefer the highest dimension render function when an exact match isn’t found. Missing coordinates default to the middle of world space, and if there is no pixel map at all, x defaults to index/pixelCount.
  • Leader Gone Timeout setting lets you configure how long it takes followers to fall back to local patterns when a leader goes away.
  • UI change notifications (toasts) give you some visual confirmation when it otherwise might not be obvious when something took effect. For example, when you change settings and they automatically apply, or click save on a pixel map, or delete a pattern.
    Screenshot 2024-12-13 at 11.27.46 AM
  • Fix autocomplete issues where it would pick completions too aggressively.
  • Prompts when closing the tab/window with unsaved edits.
  • Experimental auto-saves to browser storage. This is currently hidden, but running restoreAutoSave() in the browser console will load the last edited code.

Possibly breaking changes

  • If you have a pixel count higher than the number of pixels in a pixel map, these will now render, where they would not before. Pixels outside of a pixel map (or when there is no pixel map at all) get default coordinates (x is index/pixelCount, y and z are in the middle).
  • The mapPixels function more closely aligns with how render functions are called. It will now work without a pixel map, and if the pixel count is higher than the number of mapped pixels will iterate pixels outside of the pixelmap. In both cases it uses the same default coordinate strategy. The pixelMapDimensions() function will still return 0 if there is no pixel map.

Fixes

  • Group sync robustness fixes. This has less aggressive timeouts and randomize timers so that it works better with large sync groups.
  • Timesync fixes. In some cases followers could try to send timesync replies. Now followers just follow the timesync of their leader, ignoring everything else. Leaders / solo will sync between themselves.
  • Add sequencer API to docs (oops)

You can install this using the /recovery URL.

Please let me know if you give this a try and how it works for you, and if you experience any issues.

14 Likes

Wow, great work, very nice changes! I just tested it with the PB that lives on my bench, works great!

The search box in the Browse More Patterns modal does act strangely for me, though. Tested with Firefox and Chrome, and it constantly clears/resets?

1 Like

Hmm… yeah this does seem a bit funky, but only inside the modal. Seems to work fine directly.

1 Like

Has something to do with how I have to check logins, causing a re-render of some static components.

Good news, the workaround is that problem goes away if you log in!

1 Like

Fixed the search clobbering issue (at least 98% fixed anyway). I probably should have made a stateful component, but at least now the whole page isn’t re-rendering constantly.