Log inGet started
World

Fencing with Fences

Branchmain
Branchesmain
Commitc0197a6317

README.md

GardenDressing

The morning. Everything about how the Hedgerow Assizes LOOK lives in this component, so the look is part of the scene's behaviour and survives a reload with no scene.json edit.

entity.find("DuelDirector").component.add("GardenDressing")

What it owns

  • The sun. sunAzimuth / sunElevation place it; the component turns those into the direction the light travels and writes it through the lighting toolbox. Setting the sun entity's rotation does nothing — the directional light's direction lives on the light, not on the transform.
  • The sky. The ProceduralSky on the scene's sky entity: a saturated blue overhead falling to gold at the hedge line.
  • The ambient fill, warm-sky tinted and low enough that a hedge shadow is a hedge shadow.
  • The tone curve: bloom, an ACES tonemap, a touch of contrast, and a vignette. It explicitly REMOVES the fog preset, which tints the sky along with everything else and makes a bright garden read overcast whatever the sky is set to. Distance is done in the materials instead.
  • Keeping the garden built. garden.module and fencer_body.module are the builders; this component notices when an arena, a fence or a body standing in the world was not built by them and rebuilds it, and poses both fencers every frame from their own live state. Every check is a marker lookup, so once every call site has moved to the modules this costs one entity.find and returns. Set keepBuilt = false to switch it off.

Fields

fieldmeaning
sunAzimuthdegrees, measured from +X toward +Z
sunElevationdegrees above the horizon — low, for long shadows
sunIntensitydirectional light strength
ambientIntensitysky fill; raise to lift the shadow side
hazehow far the frame closes down at its edges
keepBuiltrebuild an arena/body that another builder put up
rebuildshow many arenas it has had to repair (diagnostic)
lastLinethe property line the fence was last built for

refreshLook() re-applies the whole look in one call.