Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

LeafCardsProps

Property Type Default value Description
cards readonly LeafCard[] undefined Every card it draws, one draw for all: a crown’s, or a grove’s.
castShadow? boolean true Casts into the sun’s shadow map, each card turned to the light, so a crown casts its whole cover at every camera yaw.
lean? number | BillboardLeanOptions { view: 0.42, shadow: 0.15 } How far each card leans back from upright: a share of the camera’s pitch, and of the light’s elevation in the shadow pass. A number sets the view’s share and keeps the shadow’s 0.15.
map Texture undefined The leaf texture each card shows, cut out at half alpha, such as a definePixelTexture painter’s.
rootDarkening? number undefined Darkens the bottom 60% of each card toward its root by this share, as a lit sprite’s foot. Left out, none.
upNormalBlend? number undefined Lights each card as a lit sprite, by a normal from the camera turned toward up by this share, in place of its crown’s: a bed of flowers rather than a crown. Left out, the crown’s.
wrap? number 0.5 Wrap lighting, (N·L + wrap) / (1 + wrap), so a card with the sun behind it keeps some of it.