iRhino Announcements
iRhino reads announcement.v1.json from https://www.rhino3d.com/api/irhino/. A message plays as a pixel-art rhino that moonwalks into the viewport, spins a two-sided sign, and moonwalks out. Tapping the sign opens the message’s url. Each message plays once per device.
This is separate from the desktop splash screen settings (/api/rhino/<version>/splash/), which iRhino does not read.
Files
| File | Notes |
|---|---|
announcement.v1.json |
The messages. English only: one file serves every language. |
announcement.schema.v1.json |
Schema for the above (VS Code auto-completes from the $schema property). |
<message>/sign.json |
Text on the sign. The only file that gets translated. |
sign.schema.v1.json |
Schema for sign.json. |
<message>/loops.json, walkin.gif, turnin.gif, spin.gif, turnout.gif, walkout.gif |
Generated from sign.json. Don’t edit. |
Translating
Copy content/en/api/irhino/<message>/sign.json to content/<lang>/api/irhino/<message>/sign.json and translate the four strings. Nothing else in this folder is translated.
- Each line holds at most 14 characters, spaces included. Text is drawn in capitals.
- The sign’s pixel font has
A–Z,0–9, space and! ? . , : ; ' " - + / & % $ # ( ) * @. Other characters (accents, non-Latin scripts) can’t be drawn until the font has them.
Making the GIFs
Run from the gif_maker folder, with SITE pointing at this repo. It writes the GIFs and loops.json next to each sign.json:
for f in $SITE/content/*/api/irhino/rhino9-launch/sign.json; do
python make_rhino_gif.py --loops "$(dirname "$f")" \
--front-title "$(jq -r .front.title "$f")" --front-subtitle "$(jq -r .front.subtitle "$f")" \
--back-title "$(jq -r .back.title "$f")" --back-subtitle "$(jq -r .back.subtitle "$f")"
done
iRhino looks for the GIFs under the user’s language first (/de/api/irhino/...) and uses the English ones when that language has none.
Changing the message
Add a new folder and a new message with a new id. iRhino never replays an id it has played, so editing a live message’s text without changing its id only reaches people who haven’t seen it yet. For example, when the launch promotion ends, add rhino9/ with new sign text and a message whose start is the launch message’s end.
iRhino plays the first message in the list that is live (between start and end) and not yet played. Messages it can’t read are skipped.
Testing
Debug builds of iRhino read the feed from the IRHINO_ANNOUNCEMENTS_URL environment variable instead, when it is set: a URL, or a path relative to the app’s Documents folder.
