useSceneParameters

Returns the numeric value of each of the scene's parameters by name, re-rendering the caller whenever one moves.

@internote/canvas-sdk/reactHook
On this page
import { useSceneParameters } from '@internote/canvas-sdk/react';

Numeric alone, because that is what a surface draws with: a selector over a column of names holds a name, and nothing samples an expression at Brazil. For the names as well, read ctx.parameters.values() after this hook has subscribed.

#Signature

(ctx: EnvironmentContext): Record<string, number>

#Parameters

ctx
The environment's context.

#Example

const params = useSceneParameters(ctx);
const y = evaluateExpression(curve.js, { ...params, x });

Declared in packages/canvas-sdk/src/react/use-scene-parameters.ts:35.

Last updated