Reference · Samurai battle banners
samuraiAspectfunction
A banner's width over its height, from its viewBox: 0.25 for a nobori. For keeping a box before the picture is drawn.
Import it
import { samuraiAspect } from "@johnmorrisdotca/hata/samurai";
Definition
function samuraiAspect(id: string): number | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A banner's id, in any case, with or without |
Returns
number | null
The aspect ratio, or null when the set has no such banner.
Examples
import { samuraiAspect } from "@johnmorrisdotca/hata/samurai";
console.log(samuraiAspect("samurai:sanada-rokumonsen")); // 0.250.25What it prints (run when this page was built)