bbcmicrobit / bbcmicrobit/micropython

Create built in image effects.

Open
#74 14 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C
Stars
646
Forks
290
PR merge metrics
No merged PRs in 30d

Description

Pass in a single image and get back a list of images to animate a referenced effect:
- [ ] sparkle - active pixels in the original image are dimmed / brightened in a random fashion.
- [ ] throb - the throbbing effect seen when you `import love`
- Wipe effects - the image fades in from the specified direction, until all the pixels are fully on:
- [ ] wipe_left
- [ ] wipe_right
- [ ] wipe_up
- [ ] wipe_down
- [ ] radar - a circular motion is created using the active pixels and a rotating "bar" of bright pixels that gradually dim to darkness.
- Fade in/out - the whole image fades in / out to / from dark to bright:
- [ ] fade_in
- [ ] fade_out

Perhaps these functions could live under `microbit.display.fx`..? E.g.

```
>>> twinkle_happy = display.fx.sparkle(Image.HAPPY)
>>> twinkle_happy
[ ... a shortish list of Image objects ... ]
>>> display.animate(twinkle_happy, 50)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.