Skip to content

Commit 0a68387

Browse files
authored
Add hex logo, hex text as demo data (#26)
* Add logo text matrix as example dataset * Add hex logo
1 parent 6c1e3e9 commit 0a68387

File tree

8 files changed

+57
-20
lines changed

8 files changed

+57
-20
lines changed

R/click.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ edit_pixels <- function(
180180
colours <- get_greys(n_states) # gradated colours from white to dark grey
181181
}
182182

183-
.check_colours_unique(m, colours)
183+
# .check_colours_unique(m, colours)
184184

185185
.plot_canvas(m, n_states, colours)
186186
if (grid) .add_grid(m)

R/data.R

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
#' Example Sprite Matrix: Pokémon
1+
#' Example Sprite Matrix: 'pixeltrix' Package Logo Text
22
#'
3-
#' A matrix output from \code{\link{click_pixels}} that represents the pixels of
4-
#' a player sprite from Pokémon.
3+
#' A matrix output from \code{\link{click_pixels}} that represents the
4+
#' text of the pixeltrix package logo, which is the word 'pixeltrix' written
5+
#' in a font with letters that are 3 by 3 pixels.
56
#'
67
#' @examples \dontrun{
78
#' # Plot the matrix as an image
8-
#' draw_pixels(
9-
#' m = pixeltrix::pkmn_sprite,
10-
#' colours = c("#9bbc0f", "#8bac0f", "#306230")
11-
#' )
9+
#' draw_pixels(m = pixeltrix::logo)
1210
#' }
1311
#'
14-
#' @format A matrix with 16 rows and 14 columns, taking integers from 0 to 2.
15-
#'
16-
#' @source Hand-copied from Pokemon (1996), The Pokemon Company.
17-
"pkmn_sprite"
12+
#' @format A matrix with 10 rows and 21 columns, taking integers from 0 to 2.
13+
"logo"
1814

1915
#' Example Sprite Matrix: Mario
2016
#'
@@ -23,11 +19,10 @@
2319
#' the walk cycle.
2420
#'
2521
#' @examples \dontrun{
26-
#' # Write a list of matrices to a gif
22+
#' # Write the list of matrices to a gif
2723
#' gif_pixels(
2824
#' frames = pixeltrix::mario_frames,
29-
#' colours = c("#8861FE", "#F6B95B", "#FFFFFF", "#29A41F"),
30-
#' file = "super-mario.gif",
25+
#' file = "mario.gif",
3126
#' delay = 0.15 # passed to gifski::save_gif()
3227
#' )
3328
#' }
@@ -37,3 +32,21 @@
3732
#'
3833
#' @source Super Mario Bros (1983), Nintendo.
3934
"mario_frames"
35+
36+
#' Example Sprite Matrix: Pokémon
37+
#'
38+
#' A matrix output from \code{\link{click_pixels}} that represents the pixels of
39+
#' a player sprite from Pokémon.
40+
#'
41+
#' @examples \dontrun{
42+
#' # Plot the matrix as an image
43+
#' draw_pixels(
44+
#' m = pixeltrix::pkmn_sprite,
45+
#' colours = c("#9bbc0f", "#8bac0f", "#306230")
46+
#' )
47+
#' }
48+
#'
49+
#' @format A matrix with 16 rows and 14 columns, taking integers from 0 to 2.
50+
#'
51+
#' @source Hand-copied from Pokemon (1996), The Pokemon Company.
52+
"pkmn_sprite"

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ knitr::opts_chunk$set(
1616
library(pixeltrix)
1717
```
1818

19-
# pixeltrix
19+
# pixeltrix <a href="https://github.com/matt-dray/pixeltrix"><img src="man/figures/logo.png" align="right" height="139" /></a>
2020

2121
<!-- badges: start -->
2222
[![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<!-- README.md is generated from README.Rmd. Please edit that file -->
33

4-
# pixeltrix
4+
# pixeltrix <a href="https://github.com/matt-dray/pixeltrix"><img src="man/figures/logo.png" align="right" height="139" /></a>
55

66
<!-- badges: start -->
77

data/logo.rda

216 Bytes
Binary file not shown.

man/figures/logo.png

16.1 KB
Loading

man/logo.Rd

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mario_frames.Rd

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)