Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

Reference · Dice and card dressing

TENKA_BACKconstant

Tenka's own back, as the deck shows it.

Import it

import { TENKA_BACK } from "@johnmorrisdotca/tenka/dressing";

Definition

const TENKA_BACK: CardBackOptions = { colour: "#2f5d4a", ink: "#e9dfc3", paper: "#fffdf8", mark: "天" }

Members

NameTypeDescription
colour (optional)string | undefined

The field's colour, in place of the back's own: #8f2826, rebeccapurple, rgb(…). Anything else is ignored.

ink (optional)string | undefined

The colour of the lines and dots on the field.

paper (optional)string | undefined

The colour of the paper round the field.

mark (optional)string | undefined

Words in the middle, such as a site's name or mark ("五つ", "一つ"), in place of the back's own ornament.

width (optional)number | undefined

The width to draw at, in pixels; the height is 1.4 times it. Unless said, the drawing has no size and fills what holds it.

title (optional)string | undefined

What a screen reader says for it. Unless said (or said as ""), the back is decoration and says nothing.

art (optional)string | undefined

Your own artwork for the whole back: SVG markup drawn in the 100 by 140 box, over the paper, in place of the lattice and the ornament. It is the page's own markup: scripts, handlers and foreign objects are taken out of it.

image (optional)string | undefined

Your own picture for the whole back, in place of the lattice and the ornament: a data:image/ address, an https: address, or an address on your own site. It fills the card inside its rounded edge. Drawn into a page it loads like any image; as an image of its own (cardBackUrl) only a data:image/ address can load, which is how browsers treat a picture inside a picture.

logo (optional)string | undefined

Your logo, in the middle of the back: SVG markup drawn in a 100 by 100 box, or a picture's address as for image. Over the lattice it sits on a plate of the paper's colour; over your own art or image it sits as it is.

logoSize (optional)number | undefined

How wide the logo is drawn, in units of the 100 wide card. Unless said, 34; at most 80.

Examples

import { TENKA_BACK } from "@johnmorrisdotca/tenka/dressing";
console.log(TENKA_BACK);
{ colour: '#2f5d4a', ink: '#e9dfc3', paper: '#fffdf8', mark: '天' }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tenka 2.2.0.