Skip to content

Commit

Permalink
Update to Fireflies app (#2774)
Browse files Browse the repository at this point in the history
  • Loading branch information
jekeybl authored Oct 7, 2024
1 parent 08003c9 commit 4cc57d7
Show file tree
Hide file tree
Showing 10 changed files with 526 additions and 302 deletions.
Binary file removed apps/fireflies/Color.png
Binary file not shown.
Binary file removed apps/fireflies/GlowDuration.png
Binary file not shown.
Binary file removed apps/fireflies/Location.png
Binary file not shown.
Binary file removed apps/fireflies/NumFireflies.png
Binary file not shown.
Binary file removed apps/fireflies/Pallete.png
Binary file not shown.
61 changes: 26 additions & 35 deletions apps/fireflies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,45 @@

##### <i>Introduction</i>

Fireflies, often referred to as "nature's tiny lanterns," captivate the imagination of people worldwide. Known scientifically as Lampyridae, these insects are famous for their fascinating ability to emit light. This unique feature is not just a magical spectacle for the eyes, but also a significant element in the firefly's enchanting life cycle.
Fireflies, often referred to as "nature's tiny lanterns," captivate the imagination of people worldwide. Scientifically known as Lampyridae, these beetles are renowned for their fascinating ability to emit light. This unique feature is not just a magical spectacle but also plays a vital role in their life cycle.

Most notable among fireflies are those belonging to the species that produce bio-luminescence during twilight to attract mates or prey. The light is generally green, yellow, or orange-red, but blue or violet light is also possible. The dedicated sequence and frequencies at which these lights flash serve as complex communication systems between individuals.
The most notable fireflies belong to species that exhibit bioluminescence during twilight to attract mates or prey. Their light typically ranges from green, yellow, or orange-red to occasionally blue or violet. The specific patterns and frequencies of these flashes serve as a complex communication system between individuals.

It is hard to match these colors perfectly to HTML colors due to variations among species and differences in perception caused by environment and individual biology. Approximations might look something like this:
Matching these natural colors perfectly to HTML colors can be challenging due to species variations and differences in perception caused by environmental factors. However, approximate matches include:

Yellow: #FFFF00
Green: #ADFF2F (It's generally a kind of light, slightly yellowish green.)
Orange-Red: #FF4500 (This color might be seen when the luminance is weak or from a distance. Only a few species radiate this color.)
Faint Blue: #0000FF (This is a much rarer color for a firefly to emit.)
>Yellow: #FFFF00
Green: #ADFF2F (generally a light, slightly yellowish green)
Orange-Red: #FF4500 (seen in some species, especially at lower luminance or from a distance)
Faint Blue: #0000FF (a rare emission among fireflies)

The radiance of fireflies has a surreal and mesmerizing beauty that dots the night landscape, rendering a celestial-like spectacle on earth. Think of them as the stars within our grasp, flickering erratically yet rhythmically, painting the black canvas of night with unpredictable strokes of light. Their shimmer amid the quiet of the night offers both a sense of tranquility and a tingly excitement.
The radiance of fireflies is a mesmerizing spectacle that dots the night landscape, creating an almost celestial experience on Earth. They appear as stars within our reach, flickering with an erratic yet rhythmic pulse, painting the night sky with strokes of light. Their shimmer offers a sense of tranquility coupled with an intriguing excitement.

##### <i>Application</i>

This can be used as a night display that replaces a nightlight in your room.
<br>
This modified and refactored version of my original fireflies app achieves smooth transitions between frames, ensuring no jumping or jittering when displaying the changing WebP files. This seamless transition is crucial for providing an uninterrupted and visually appealing animation.

##### <i>Tidbyt Screen</i>
The screen has the option to dislay the fireflies with or without the current time (<b>5:37 PM</b>). The toggle for displaying the time is via the schema.
The app animates fireflies that move and glow with options for color customization and an optional clock display. Fireflies move in elliptical patterns with brightness controlled by sinusoidal functions.

<i>Fireflies with no time showing</i>
<img src = "./fireflies-no clock.gif" width=900>

<i>Fireflies with the current time</i>
<img src = "./fireflies-clock.gif" width=900>

Fireflies are not displayed if they occur in the area of the clock.
Users have control over the number of fireflies, glow duration, speed of movement, and color. Colors can be set to a fixed option or randomized, and the app can display a clock showing local time based on a specified location.

<br>
The code offers four distinct sets of firefly data, each defining the fireflies' movement, appearance, and behavior:

##### <i>Schema</i>
The following schema data can be entered via the Tidbyt app:
>Set 1: Provides a balanced, classic firefly display.
Set 2: Features rapid movements for a more dynamic experience.
Set 3: Creates a slow, relaxing animation with larger paths.
Set 4: Offers the most varied and intricate visual patterns.

<i>Select the number of fireflies from the list {***5***, ***10***, ***15***, ***20***}. The default is {***10***}.</i>
<img src = "./NumFireflies.png" width=400>
All the selectable options allow the app to cater to a wide range of experiences, from calm and soothing to energetic and dynamic, making it adaptable to different preferences and environments.

<i>Select how long the fireflies glow from the list {***Long***, ***Regular***, ***Short***}. The default is {***Regular***}.</i>
<img src = "./GlowDuration.png" width=400>
The animation can serve as a nighttime display, replacing a traditional nightlight in your room.

<i>Select the color of the fireflies. The default is {***Yellow***}. There are also four choices from the palette corresponding to the HTML colors that best approximate the more general firefly colors described above.</i>
<img src = "./Color.png" width=400> <img src = "./Pallete.png" width=200>
##### <i>Tidbyt Display</i>
The screen has the option to dislay the fireflies with or without the current time (<b>5:37 PM</b>).

<i>When random colors is selected, every firefly has a different color chosen randomly. The default is {***Off***}.</i>
<img src = "./RandomColors.png" width=400>

<i>Select whether to display the time on the bottom of the screen. The default is {***Off***}.</i>
<img src = "./ShowClock.png" width=400>
<i>Fireflies with no time showing</i>
<img src = "./fireflies-no clock.gif" width=900>

<i>You can change the location if you do not want to used the default location from your mobile device.</i>
<img src = "./Location.png" width=400>
<i>Fireflies with the current time</i>
<img src = "./fireflies-clock.gif" width=900>

Fireflies are not displayed if they move into the area of the clock when it is displayed.
Binary file removed apps/fireflies/RandomColors.png
Binary file not shown.
Binary file removed apps/fireflies/ShowClock.png
Binary file not shown.
Loading

0 comments on commit 4cc57d7

Please sign in to comment.