const Tensor: LiveComponent<TensorProps<string | string[]>>
Sample up-to-4D array of a WGSL type. Reads input data
or samples a given expr
.
number[]
Input size up to [width, height, depth, layers]
number
Shorthand for size=[length]
string
WGSL type per sample
VectorLike
Input data
Emitter
Input emitter expression
number
Emit N items per expr
call. Output size is [items, ...size]
if > 1.
boolean
Emit 0 or N items per expr
call. Output size is [emitted]
or [items, emitted]
.
boolean
Add current TimeContext
to the expr
arguments.
boolean
Resample data
or expr
on every animation frame.
S
Inject into DataContext under this key(s) render?
S
extends
any[]
?
(
data: Record<ElementType<S>, TensorArray>,
) => LiveElement
:
(data: TensorArray) => LiveElement
children?
| LiveElement
| S extends any[] ? (data: Record<ElementType<S>, TensorArray>) => LiveElement : (data: TensorArray) => LiveElement
packages / plot / src / source / tensor.ts