Every named declaration in the file, 833 of them, verbatim and in the order Claude Code wrote them, 50 to a page. This is the page to land on from a signature: a verb that returns ToolCallResult links here, at whichever page it is on, and what you get is the declaration itself rather than a description of it.
The source is 22,468 lines of TypeScript mined from build 2.1.330. Anything longer than 12 lines is folded; click the line count to open it. To find a name on another page, search every symbol.
Names on this page, 801 to 833 of 833
time const
#
line 22268
Added in 2.1.326
Seconds since the start.
export const time: number
/** Seconds since the last frame. */
first const
#
line 22273
Added in 2.1.326
True on frame 0.
export const first: boolean
/** True on the first frame at a new size. */
fresh const
#
line 22275
Added in 2.1.326
export const fresh: boolean
/** Which run of a `repeat` this is, from 0. */
turn const
#
line 22277
Added in 2.1.326
export const turn: number
/** 1 under Reduce Motion, else 0. */
px const
#
line 22285
Added in 2.1.326
export const px: number
/** The prompt box: left, bottom, right, top, each 0 to 1. */
composer const
#
line 22287
Added in 2.1.326
export const composer: vec4
/** The pixel's center, in the target's pixels. */
instance const
#
line 22291
Added in 2.1.326
export const instance: number
/** Where in its point a pixel is, 0 to 1 (`draw: 'points'` only). */
Pointer type
#
line 22301
Added in 2.1.326
A press comes as a new pointer, after the others. down 1 with age 0 is its first frame, on the bare backdrop or over the app. A pointer that lifted stays up to a second with gone above 0. Check every pointer: an index doesn't keep naming the same one.
18 lines
export type Pointer = {
/** x, y and the last frame's x, y, each 0 to 1. */
readonly where: vec4
/** age, down, over, gone. */
readonly info: vec4
/** Where it is, in points. */
readonly at: vec2
/** Where it was last frame, in points. */
readonly was: vec2
/** Seconds since it came: 0 on its first frame only. */
readonly age: number
/** 1 for a press, else 0. It stays 1 after the press lifts. */
readonly down: number
/** 1 over part of the app, 0 over the bare backdrop. */
readonly over: number
/** Seconds since it lifted, 0 while it is there. */
readonly gone: number
}
pointerCount const
#
line 22320
Added in 2.1.326
0 to 4.
export const pointerCount: number
export function pointer(index: number): Pointer
pointers const
#
line 22323
Added in 2.1.326
A loop over these stops at pointerCount, and is charged for 4.
export const pointers: Iterable<Pointer>
values function
#
line 22329
Added in 2.1.326
The numbers the mod sets while it plays (Shader's values), each held to its range. A file with more than 8 names is refused.
export function values<K extends string>(
ranges: Record<K, readonly [low: number, high: number]>,
): { readonly [name in K]: number }
range function
#
line 22334
Added in 2.1.326
The whole numbers from from (or 0) up to, not including, to.
export function range(to: number): number[]
export function range(from: number, to: number): number[]
Box type
#
line 22337
Added in 2.1.326
An out parameter: a function sets .v.
export type Box<T> = { v: T }
Row type
#
line 22350
Added in 2.1.326
type Row = number | readonly number[]
type Width<R> = R extends readonly [number, number, number, number]
table function
#
line 22362
Added in 2.1.326
Up to 256 rows of 1 to 4 numbers, kept as data. .at(i) clamps i. An 'int' row of several reads as a list of ints.
export function table<const R extends Row>(
rows: readonly R[],
): { at(index: number): Width<R>; readonly length: number }
table function
#
line 22365
Added in 2.1.326
export function table<const R extends Row>(
rows: readonly R[],
kind: 'int',
): {
at(index: number): R extends readonly number[] ? { [K in keyof R]: int } : int
readonly length: number
}
Pixel type
#
line 22373
Added in 2.1.326
export type Pixel = {
/** 0 to 1 across the target. */
readonly uv: vec2
/** In points. */
readonly point: vec2
/** The whole-number texel, for `.at`. */
readonly cell: vec2
readonly pixel: vec2
readonly px: number
}
Spot type
#
line 22384
Added in 2.1.326
a and b are the vertices', blended across the shape.
export type Spot = Pixel & {
readonly coord: vec2
readonly a: vec4
readonly b: vec4
}
Buffer type
#
line 22391
Added in 2.1.326
export type Buffer = Pass & {
/** One texel, clamped to the edge. */
at(cell: number): vec4
sample(uv: number, lod?: number): vec4
/** In texels. */
readonly size: vec2
}
scene const
#
line 22399
Added in 2.1.326
A picture of the Svg under the shader; as into, the picture itself.
export const scene: Scene
buffer function
#
line 22407
Added in 2.1.326
A texture that lasts between frames: reading it gives its last write. With no body it is an empty target for shapes. With no scale or size it is as sharp as the picture. To read itself, it names its type: const trail: Buffer = buffer({}, p => vec4(trail.sample(p.uv) * exp(-dt))).
20 lines
export function buffer(
options: {
/** Texels a point, up to 2. */
scale?: number
/** Texels, up to 2048 a side. */
size?: readonly [number, number] | vec2
/** Bits a lane. Without it, lanes hold 0 to 1 in 8 bits. */
float?: 16 | 32
filter?: 'linear' | 'nearest' | 'mipmap'
wrap?: 'clamp' | 'repeat'
/** Runs a frame, up to 24. */
repeat?: number
/**
* Runs at the start and at a new size only, so it may not read time,
* frame, pointers, values or a buffer that moves.
*/
once?: boolean
},
color?: (p: Pixel) => vec4,
): Buffer
picture function
#
line 22429
Added in 2.1.326
What shows, premultiplied, over the Svg. Exactly one.
export function picture(color: (p: Pixel) => vec4): Pass
shapes function
#
line 22438
Added in 2.1.326
Draws count vertices, instances times, onto the picture or a buffer. at is -1 to 1 across the target (a vec4 is divided by its w, and hidden when z is outside it). size is a point's pixels, 1 to 64. hide: true hides every shape the vertex is part of, and keeps its a and b out of the cost. paint answers a premultiplied color: vec4(rgb * a, a).
23 lines
export function shapes(
options: {
count: number
instances?: number
/**
* How many windows of 1512x945 points the draw may cover, up to 8. It is
* charged for this much.
*/
cover: number
draw?: 'triangles' | 'strip' | 'points' | 'lines'
/** The draw may not read this buffer if it has no body. */
into?: Buffer | Scene
blend?: 'over' | 'add'
clear?: boolean
},
place: (
vertex: number,
instance: number,
) =>
| { at: number; size?: number; a?: number; b?: number; hide?: boolean }
| { hide: true },
paint: (spot: Spot) => vec4,
): Pass