createViewChannel

Creates a view channel for one environment type, declared at module scope beside the surface that draws through it and the toolbar that drives it.

@internote/canvas-sdkFunction
On this page
import { createViewChannel } from '@internote/canvas-sdk';

A button press is a jump, not a gesture, so glide eases the window to its target over a few frames; the wheel and the drag stay direct. A reset releases the frame rather than landing on a matching window, so a later !cue.to still moves it. Without a frame loop, on a server or in a test, a glide lands immediately.

#Signature

<V, S = unknown>(options: ViewChannelOptions<V, S>): ViewChannel<V>

#Parameters

options
The view's shape, where it lives, and how two blend.

#Example

// In the surface, every render:
plotView.record(ctx, drawnWindow, session.view !== undefined);

// In the toolbar, where the host resolves it into the scene's view group:
toolbar: (ctx) => [{ type: 'view', channel: plotView }],

Declared in packages/canvas-sdk/src/view/index.ts:179.

Last updated