Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 15 additions & 22 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,42 @@ You need these to run the examples:

- Clone this Git repo: <https://github.com/firefly-zero/firefly-moon>
- MoonBit CLI (`moon`): <https://www.moonbitlang.com/download#moonbit-cli-tools>
- Taskfile CLI (`task`): <https://taskfile.dev/>
- Firefly Zero CLI (`ff`): <https://docs.fireflyzero.com/user/installation/#-cli>
- Firefly Zero emulator (`firefly-emulator`): <https://docs.fireflyzero.com/user/installation/#-emulator>

To run one of the examples then execute the listed command from the root of
this repository.

## Example: [font](./font)
To run one of the examples then navigate to its directory and run:

```bash
task example/font:run
ff build

# replace $NAME with the name shown in the `ff build` output
firefly-emulator --id demo.moonbit-$NAME
```

## Example: [audio](./audio)

> *(no screenshot, it only plays some sounds)*

## Example: [font](./font)

[![font screenshot](./font/screenshot.png)](./font)

## Example: [image](./image)

```bash
task example/image:run
```

[![image screenshot](./image/screenshot.png)](./image)

## Example: [input](./input)

```bash
task example/input:run
```

[![input screenshot](./input/screenshot.png)](./input)

## Example: [random](./random)

```bash
task example/random:run
```

[![random screenshot](./random/screenshot.png)](./random)

## Example: [shapes](./shapes)
## Example: [scores](./scores)

```bash
task example/shapes:run
```
[![scores screenshot](./scores/screenshot.png)](./scores)

## Example: [shapes](./shapes)

[![shapes screenshot](./shapes/screenshot.png)](./shapes)
2 changes: 1 addition & 1 deletion example/audio/moon.mod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "firefly/firefly/example/audio",
"name": "example-audio",
"deps": {
"firefly/firefly": {
"path": "../.."
Expand Down
4 changes: 2 additions & 2 deletions example/font/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# SPDX-License-Identifier: CC0-1.0

author_id = "demo"
app_id = "moonbit-text"
app_id = "moonbit-font"
author_name = "Demo"
app_name = "Text example (MoonBit)"
app_name = "Font demo (MoonBit)"

[files]
font = { path = "assets/eg_6x12.fff" }
2 changes: 1 addition & 1 deletion example/font/moon.mod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "example-text",
"name": "example-font",
"deps": {
"firefly/firefly": {
"path": "../.."
Expand Down
Binary file added example/scores/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions example/scores/screenshot.png.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Kalle Fagerberg

SPDX-License-Identifier: MIT
Loading