Crate radiance

Source

Structs§

ArcTextureViewSampler
A bundle of a texture, a texture view, and a sampler. Each is stored within an Arc for sharing between threads if necessary.
BeatTracker
CommonNodeProps
This is a struct of props that are common to every node.
Context
A Context bundles all of the state and graphics resources necessary to support iterated rendering of a Props.
Edge
An edge in the graph is identified by a source NodeId (“from”), a sink NodeId (“to”), and which input of the sink node to use (“input”).
EffectNodeProps
Properties of an EffectNode. Fields that are None are set to their default when the shader is loaded.
EffectNodeStateReady
Graph
A Graph stores node connectivity information. Each node is identified by a NodeId and is stored in a sorted list. The ordering of the list does not affect updating and painting, but may be used for when visualizing the graph in the UI.
InsertionPoint
A insertion point describes a place in a graph where a subgraph can be inserted. A insertion point may be:
Mir
A Mir (Music information retrieval) object handles listening to the music via the system audio and generates a global timebase from the beats, along with other relevant real-time inputs based on the music such as the low, mid, high, and overall audio level. It can be polled from the main thread at every frame, at which point it will compute and return the current time in beats, and the four audio levels. It has a buffer of about a second or so, but should be polled frequently to avoid dropped updates.
MusicInfo
The structure returned from the Mir object when it is polled, containing real-time information about the audio.
NodeId
A unique identifier that can be used to look up a Node. We use 128 bit IDs and assume that, as long as clients generate them randomly, they will be unique and never collide, even across different application instances.
Props
Props contains nodes (such as effects, movies, and images) and connectivity information (which nodes feed into which other nodes) that describe an overall visual composition.
RenderTarget
RenderTargets describe different instances of the render pipeline for a given Graph. You may want different render target for different render requirements, for instance, a different size / shape output, or a different frame rate. For example, you might use one render target at a low resolution for rendering previews, a second render target at a resolution matching your monitor for video output, and a third render target at an intermediate resolution for output to a LED lighting setup.
RenderTargetId
A unique identifier that can be used to look up a RenderTarget in a RenderTargetList. We use 128 bit IDs and assume that, as long as clients generate them randomly, they will be unique and never collide, even across different application instances.
RenderTargetList
A RenderTargetList represents a set of render targets and their IDs. This RenderTargetList object is only a description: It does not contain any render state or graphics resources. One use case of a RenderTargetList is passing it to Context.paint during rendering.
RenderTargetState
Internal state and resources that is associated with a specific RenderTarget, but not with any specific node.

Enums§

EffectNodeState
NodeProps
NodeProps govern the construction and behavior of a single node. For example, an EffectNode has properties of name and intensity.
NodeState
Internal state and resources that is associated with a specific Node

Constants§

FPS
SAMPLE_RATE

Functions§

gen_filterbank
topo_sort_nodes
Use DFS to compute a topological ordering of the nodes in a graph (represented as a mapping.) The input mapping must be acyclic or this function will panic. This sort is stable (calling topo_sort_nodes a second time should be idempotent.)