pointSlot.twinkleBrightness

The mote's brightness: a twinkle at freq cycles per second, blended in by params.twinkle (0 steady, 1 full shimmer), times a per-mote presence so some motes read nearer than others.

pointSlot.twinkleBrightness(
  layout: {readonly $: {readonly params: {readonly time: number; readonly twinkle: number}}},
  cfg: {freq: number},
): PointWorldSplatConfig['brightness']

Import sim from shaders/std and use sim.agentRender.pointSlot.twinkleBrightness.

Reads params.time.

Parameters

NameTypeNotes
layout{readonly $: {readonly params: {readonly time: number; readonly twinkle: number}}}
cfg{freq: number}

Example

brightness: pointSlot.twinkleBrightness(simLayout, {freq: 2})

See also

  • pointSlot.orbitalPlace — The mote's drawn position: its stored position plus a slow circle of radius (canvas heights) at rate turns per second, both scaled by params.randomness and varied per mote.
  • pointSlot.presenceRadius — The mote's size: params.bodyR scaled by the same per-mote presence as the brightness, so the motes that read nearer are bigger and brighter together.