Skip to the content

Jarajaraジャラジャラ

Draw mahjong tiles, arrange racks and stacked boards, and play seeded Awase alone or at a shared table.

Jarajara is the Japanese sound of mahjong tiles rattling together. About the name

Contents

Reference · SVG faces and looks

shadowSvgfunction

The shadow a tile casts on what lies under it: soft, in three widening layers, falling the way the thickness shows and reaching further the higher the tile (layer 0 is a tile on the table: a tight contact shadow). Under the block.

Import it

import { shadowSvg } from "@johnmorrisdotca/jarajara/faces";

Definition

function shadowSvg(colours: BlockColours, direction: BlockDirection, layer: number): string

Parameters

NameTypeDescription
coloursBlockColours

The solid tile block’s colours.

directionBlockDirection

The horizontal and vertical orientation of the block.

layernumber

The stacked layer number for the shadow.

Returns

string

The shadow a tile casts on what lies under it: soft, in three widening layers, falling the way the thickness shows and reaching further the higher the tile (layer 0 is a tile on the table: a tight contact shadow). Under the block.

Examples

import { blockColours, shadowSvg } from "@johnmorrisdotca/jarajara/faces";

console.log(shadowSvg(blockColours(),{x:1,y:1},0).length);
267

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jarajara 1.7.0.