spotlightLevel
Returns how lit these nodes are kept by the spotlights among them, 0 to 1: the strongest of their own spotlights.
@internote/canvas-sdk/reactOn this page
import { spotlightLevel } from '@internote/canvas-sdk/react';What a surface fades a group by while a spotlight is on: a group's opacity is dimmed + (1 - dimmed) * spotlightLevel(group), so as one spotlight hands over to the next the old group sinks to the dimmed level while the new one rises out of it, rather than the two swapping in a frame.
#Signature
(nodes: CompiledNode[], runtime: EnvironmentContext["animation"]): number#Parameters
nodesA group's nodes, searched at any depth.
runtimeThe environment's animation runtime,
ctx.animation.Declared in packages/canvas-sdk/src/react/attention.tsx:256.