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
| Name | Type | Description |
|---|---|---|
colours | BlockColours | The solid tile block’s colours. |
direction | BlockDirection | The horizontal and vertical orientation of the block. |
layer | number | 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);267What it prints (run when this page was built)