Two settings define the basic geometry of the eye…
eyeRadius
establishes the size of the overall eyeball, in pixels. This is a radius — center to edge — so the overall eye size is twice this across. For example eyeRadius:125
configures the eye to be 250 pixels wide. This is the default if left unspecified.
The screens are only 240 pixels wide. Reason the eye is made a little bigger is because the code uses tricks to fake a rotating sphere…and that faking is more apparent as the pupil approaches an edge. So we push the edge out a few extra pixels, then cover it up with eyelids.
If designing an eye with no eyelids, you might want eyeRadius:120
instead, which provides a nice perfect circle on the screen.
Remember that JSON is case-sensitive. This must be spelled eyeRadius
. Different capitalization will cause it to be ignored!
irisRadius
establishes the size of the iris…again a radius, in pixels.
irisRadius:60
will make the iris 120 pixels across, or half the width of the screen. If you plan to use lenses over the displays, consider scaling down this number a bit to compensate.
Some creatures…cats and so forth…have very large irises and almost no visible sclera. In that case you can set irisRadius
much larger, up to (but not exceeding) eyeRadius
.
A third setting, slitPupilRadius
, lets you make cat or dragon type eyes with a vertical slit pupil (only a vertical slit is available, no goat pupils, sorry). If set to 0 (the default), a normal round pupil is used. Larger numbers (up to irisRadius
) make a taller/thinner pupil. This number sets the height. You’ll probably want an in-between value…maybe irisRadius:80
(160 pixels round) and slitPupilRadius:60
(120 pixels tall) to start.
Note that using slitPupilRadius
makes the program a bit slower to initialize…you’ll just see blank screens for several seconds while it works. This is normal and just an unfortunate math thing.
Text editor powered by tinymce.